@import url('https://fonts.googleapis.com/css2?family=Exo+2:wght@400;600;800&family=Orbitron:wght@500;700;900&display=swap');


html, body { 
    width: 100%; height: 100%; overflow-x: hidden; 
    /* HAPUS background-color: #000; yang lama */
    background-color: transparent; /* Ubah jadi transparan biar video kelihatan */
}

/* Background Video */
#bg-video {
    position: fixed; top: 0; left: 0;
    width: 100vw; height: 100vh;
    object-fit: cover; 
    z-index: -1; /* Di belakang konten */
    filter: brightness(0.6); /* Gelapkan dikit biar teks terbaca (opsional) */
}


/* =========================================
   RESET & DASAR
   ========================================= */
* {
    margin: 0; padding: 0; box-sizing: border-box;
    font-family: 'Exo 2', sans-serif;
}

html, body { 
    width: 100%; height: 100%; overflow-x: hidden; 
    background-color: #000;
}

/* Background Video */
#bg-video {
    position: fixed; top: 0; left: 0;
    width: 100vw; height: 100vh;
    object-fit: cover; z-index: -1;
    filter: brightness(0.5); /* Gelapkan background biar teks jelas */
}

/* =========================================
   LAYOUT UTAMA (HOMEPAGE)
   ========================================= */
.main-container {
    display: flex; width: 100%; height: 100vh;
    background: radial-gradient(circle at center, rgba(0, 20, 40, 0.4) 0%, rgba(0, 10, 20, 0.9) 100%);
}

/* PANEL KIRI (Character) */
.left-panel {
    flex: 3; position: relative; display: flex;
    justify-content: center; align-items: flex-end;
    overflow: hidden;
}

#char-video {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    object-fit: cover; z-index: 1; opacity: 0.8;
    mask-image: linear-gradient(to bottom, black 80%, transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, black 80%, transparent 100%);
}

.text-overlay {
    position: absolute; top: 100px; left: 50px; z-index: 10; text-align: left;
}

.text-overlay h1 {
    font-family: 'Orbitron', sans-serif; font-size: 5rem; color: #fff;
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.5); line-height: 0.9; margin-bottom: 0;
}

.text-overlay .highlight {
    color: #00c3ff; display: block; text-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
    font-size: 6rem; font-weight: 900; line-height: 0.9; margin-top: -10px;
}

.text-overlay p {
    color: #fff; margin-top: 20px; font-size: 1.3rem; letter-spacing: 3px;
    text-transform: uppercase; opacity: 0.8; padding-left: 5px;
}

/* PANEL TENGAH (Login) */
.center-panel {
    flex: 4;
    background: linear-gradient(180deg, rgba(200, 220, 255, 0.15) 0%, rgba(150, 180, 220, 0.1) 100%);
    backdrop-filter: blur(15px);
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    padding: 40px; box-shadow: 0 0 50px rgba(0, 10, 20, 0.5);
}

.top-nav {
    position: absolute; top: 30px; width: 100%;
    display: flex; justify-content: center; gap: 30px;
}

.top-nav a {
    text-decoration: none; color: #aaa; font-weight: 700; 
    text-transform: uppercase; font-size: 0.9rem; letter-spacing: 2px; transition: all 0.3s;
}
.top-nav a:hover { color: #00c3ff; text-shadow: 0 0 8px rgba(0, 195, 255, 0.8); }

.login-content { width: 80%; text-align: center; }

.sao-logo-area h2 {
    font-family: 'Orbitron', sans-serif; font-size: 5rem; color: #fff;
    margin-bottom: 5px; letter-spacing: -3px;
    text-shadow: 2px 2px 0px rgba(0, 0, 0, 0.5);
}
.sao-logo-area .orange-text { color: #00c3ff; }
.subtitle {
    font-size: 0.9rem; letter-spacing: 5px; color: #00c3ff;
    margin-bottom: 40px; text-transform: uppercase; opacity: 0.7;
}

/* Form Styles */
form label {
    display: block; text-align: left; font-size: 0.8rem; 
    font-weight: 800; color: #ccc; margin-bottom: 5px; margin-top: 20px; letter-spacing: 1px;
}

input, select {
    width: 100%; padding: 15px;
    background: rgba(0, 20, 40, 0.3); border: none; border-bottom: 2px solid #555;
    font-family: 'Exo 2', sans-serif; font-size: 1.1rem; font-weight: 600; color: #fff;
    transition: all 0.3s; cursor: pointer;
}
input:focus, select:focus {
    outline: none; border-bottom-color: #00c3ff;
    background: rgba(0, 195, 255, 0.1); box-shadow: 0 5px 10px -5px rgba(0, 195, 255, 0.5);
}
select option { background-color: #000; color: #fff; }

#btn-ready {
    margin-top: 40px; width: 100%;
    background: linear-gradient(to bottom, #00c3ff 0%, #008cff 100%);
    color: #fff; padding: 18px; border: 1px solid rgba(255,255,255,0.3);
    border-radius: 50px; font-family: 'Orbitron', sans-serif; font-size: 1.8rem; font-weight: 900;
    letter-spacing: 3px; cursor: pointer;
    box-shadow: 0 5px 20px rgba(0, 140, 255, 0.6); transition: all 0.2s;
}
#btn-ready:hover {
    transform: translateY(-2px); filter: brightness(1.2);
    box-shadow: 0 0 30px rgba(0, 195, 255, 0.9);
}

/* PANEL KANAN (Leaderboard) */
.right-panel {
    flex: 3; backdrop-filter: blur(5px); padding: 30px; color: #fff; overflow-y: auto;
}
.leaderboard-header h3 {
    font-family: 'Orbitron', sans-serif; font-size: 1.8rem;
    border-bottom: 1px solid #00c3ff; padding-bottom: 15px; margin-bottom: 20px;
}
.leaderboard-header .orange-text { color: #00c3ff; }

#leaderboard-list li {
    display: flex; align-items: center;
    background: linear-gradient(135deg, rgba(0, 195, 255, 0.15) 0%, rgba(0, 10, 20, 0.4) 100%);
    border: 2px solid rgba(0, 195, 255, 0.5); border-radius: 8px;
    margin-bottom: 15px; padding: 15px 20px; transition: all 0.3s ease;
}
#leaderboard-list li:hover {
    border-color: #00c3ff; background: rgba(0, 195, 255, 0.25);
    transform: translateX(5px); box-shadow: 0 5px 20px rgba(0, 195, 255, 0.4);
}

.rank-circle {
    font-family: 'Orbitron', sans-serif; font-size: 1.2rem; 
    color: #00c3ff; margin-right: 15px; font-weight: bold;
}
.player-info strong { display: block; font-size: 1rem; color: #fff; }
.player-info small { color: #aaa; font-size: 0.8rem; }
.points { margin-left: auto; font-family: 'Orbitron', sans-serif; color: #00c3ff; font-weight: bold; }

/* Special Ranks */
#leaderboard-list li:nth-child(1) {
    border-color: #FFD700; background: linear-gradient(90deg, rgba(255, 215, 0, 0.15) 0%, rgba(0, 10, 20, 0.4) 100%);
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.4);
}
#leaderboard-list li:nth-child(1) .rank-circle, #leaderboard-list li:nth-child(1) .points { color: #FFD700; }

#leaderboard-list li:nth-child(2) {
    border-color: #C0C0C0; background: linear-gradient(90deg, rgba(192, 192, 192, 0.15) 0%, rgba(0, 10, 20, 0.4) 100%);
    box-shadow: 0 0 15px rgba(192, 192, 192, 0.3);
}
#leaderboard-list li:nth-child(2) .rank-circle { color: #E0E0E0; }

#leaderboard-list li:nth-child(3) {
    border-color: #CD7F32; background: linear-gradient(90deg, rgba(205, 127, 50, 0.15) 0%, rgba(0, 10, 20, 0.4) 100%);
    box-shadow: 0 0 15px rgba(205, 127, 50, 0.3);
}
#leaderboard-list li:nth-child(3) .rank-circle { color: #CD7F32; }


/* =========================================
   HALAMAN GAME (ARENA)
   ========================================= */
.arena-layout {
    display: flex; width: 100%; min-height: 100vh;
    justify-content: space-between; align-items: center;
}

.game-container {
    flex-grow: 1; width: auto; max-width: 800px; margin: 0 auto;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    padding: 20px;
}

/* HUD */
.hud {
    display: flex; justify-content: space-between; align-items: center;
    width: 100%; max-width: 800px; margin-bottom: 30px;
    background: linear-gradient(to bottom, rgba(40, 50, 60, 0.9), rgba(20, 30, 40, 0.85));
    border-bottom: 2px solid #00c3ff; border-radius: 4px; padding: 15px 40px;
    box-shadow: 0 5px 20px rgba(0, 195, 255, 0.15);
}
.hud-item .label { font-size: 0.8rem; letter-spacing: 2px; color: #00c3ff; font-weight: 800; }
.hud-item .value { font-family: 'Orbitron', sans-serif; font-size: 1.6rem; color: #fff; text-shadow: 0 0 10px rgba(0, 195, 255, 0.5); }
#timer-display { color: #00c3ff; font-size: 2.5rem; font-weight: 900; text-shadow: 0 0 15px rgba(0, 195, 255, 0.8); }

/* Question Area */
.question-area {
    background: rgba(10, 20, 30, 0.6); backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1); width: 100%; max-width: 800px;
    min-height: 280px; border-radius: 2px; padding: 40px; margin-bottom: 30px;
    border: 1px solid rgba(0, 195, 255, 0.3); box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
    position: relative;
}
.question-area::before {
    content: ''; position: absolute; top: 0; left: 0; width: 20px; height: 20px;
    border-top: 2px solid #00c3ff; border-left: 2px solid #00c3ff;
}
.question-area::after {
    content: ''; position: absolute; bottom: 0; right: 0; width: 20px; height: 20px;
    border-bottom: 2px solid #00c3ff; border-right: 2px solid #00c3ff;
}
#question-img { max-width: 100%; max-height: 250px; margin-bottom: 25px; border: 1px solid #00c3ff; }
#question-text { font-family: 'Exo 2', sans-serif; font-size: 1.5rem; font-weight: 600; color: #fff; line-height: 1.5; }

/* Tombol Jawaban */
.options-grid {
    display: grid; grid-template-columns: 1fr 1fr; gap: 20px;
    width: 100%; max-width: 800px;
}
.btn-option {
    background: rgba(0, 195, 255, 0.05); color: #fff;
    border: 1px solid rgba(0, 195, 255, 0.4); padding: 20px;
    font-family: 'Exo 2', sans-serif; font-size: 1.2rem; font-weight: 600;
    border-radius: 4px; cursor: pointer; transition: all 0.2s ease-out;
    text-align: left; padding-left: 30px; position: relative; backdrop-filter: blur(5px);
    clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
    border-left: 3px solid rgba(0, 195, 255, 0.3);
}
.btn-option:hover {
    background: rgba(0, 195, 255, 0.15); border-color: #00c3ff;
    box-shadow: 0 0 15px rgba(0, 195, 255, 0.6); transform: translateX(5px);
}
.btn-option:active { background: #00c3ff; color: #000; box-shadow: 0 0 30px rgba(0, 195, 255, 0.8); }

/* Score & Ads */
.score-display {
    margin-top: 30px; background: rgba(0, 0, 0, 0.8);
    border: 1px solid #00c3ff; border-radius: 50px; padding: 10px 50px;
    font-family: 'Orbitron', sans-serif; font-size: 1.8rem; color: #00c3ff;
}
.ad-space { width: 250px; height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; z-index: 10; }
.ad-placeholder {
    width: 100%; height: 600px; border: 1px dashed #00c3ff;
    background: rgba(0, 195, 255, 0.05); display: flex; align-items: center;
    justify-content: center; text-align: center; color: rgba(0, 195, 255, 0.5);
    font-family: 'Orbitron', sans-serif; animation: pulseAd 3s infinite;
}
.mobile-ad-banner { display: none; } /* Default Hidden on Desktop */


/* =========================================
   TOMBOL POWERUPS (DENGAN DESKRIPSI)
   ========================================= */

/* Container Utama */
.powerups-container {
    display: flex; justify-content: center; align-items: center;
    gap: 10px; margin-bottom: -25px; z-index: 20; position: relative;
    width: 100%; max-width: 800px;
}

/* --- 1. TOMBOL ORB (Gold & Diamond) --- */
.btn-orb {
    /* Ukuran fleksibel */
    flex: 1; min-width: 110px; max-width: 160px;
    height: 55px; 
    padding: 5px 10px;
    border-radius: 10px; /* Sedikit kotak biar teks muat */
    
    border: 2px solid rgba(255,255,255,0.3);
    font-family: 'Exo 2', sans-serif; color: #fff;
    cursor: pointer; transition: all 0.2s;
    
    display: flex; align-items: center; gap: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    position: relative;
}

.orb-label {
    display: flex; flex-direction: column; align-items: flex-start;
    line-height: 1.1; width: 100%;
}

.item-name {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.7rem; font-weight: bold; color: #fff;
}

.item-desc {
    font-size: 0.6rem; color: rgba(255,255,255,0.8); /* Warna agak pudar */
    white-space: nowrap; /* Jangan turun baris */
}

/* Badge Jumlah (x1) di pojok */
.item-qty {
    position: absolute; top: -5px; right: -5px;
    background: #000; border: 1px solid #fff;
    font-size: 0.7rem; padding: 2px 6px; border-radius: 10px;
    font-family: 'Orbitron', sans-serif;
}

/* Warna Spesifik */
.btn-orb.gold { background: linear-gradient(135deg, #e6b800, #ffaa00); border-color: #ffd700; }
.btn-orb.diamond { background: linear-gradient(135deg, #00cccc, #0088cc); border-color: #00ffff; }

.btn-orb:hover { transform: translateY(-3px); filter: brightness(1.2); }
.btn-orb:active { transform: scale(0.95); }
.btn-orb:disabled { filter: grayscale(100%); opacity: 0.5; cursor: not-allowed; }


/* =========================================
   TOMBOL SYSTEM BYPASS (ORIGINAL CRYSTAL)
   ========================================= */

.btn-skip {
    /* === BENTUK KRISTAL HEXAGON (BENAR) === */
    /* Ini membuat ujung kiri dan kanan runcing pas di tengah */
    clip-path: polygon(
        20px 0,              /* Kiri Atas */
        calc(100% - 20px) 0, /* Kanan Atas */
        100% 50%,            /* Runcing Kanan */
        calc(100% - 20px) 100%, /* Kanan Bawah */
        20px 100%,           /* Kiri Bawah */
        0 50%                /* Runcing Kiri */
    );

    /* Ukuran & Posisi */
    flex: 1.5;
    height: 55px; /* Tinggi pas */
    border: none;
    padding: 0 30px; /* Padding samping biar teks gak kena potong */
    
    /* Warna Biru SAO */
    background: linear-gradient(180deg, rgba(0, 195, 255, 0.9) 0%, rgba(0, 60, 120, 1) 100%);
    
    /* Teks */
    color: #fff;
    font-family: 'Orbitron', sans-serif;
    font-weight: 900;
    font-size: 0.95rem;
    letter-spacing: 1px;
    text-shadow: 0 0 10px rgba(0, 255, 255, 0.8);
    
    cursor: pointer; 
    transition: all 0.3s;
    
    /* Dekorasi Border Halus (Inset Shadow) */
    box-shadow: inset 0 0 15px rgba(0, 255, 255, 0.4);
    
    /* Agar sejajar dengan Orb */
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Hover Effect */
.btn-skip:hover {
    background: linear-gradient(180deg, #00eaff 0%, #008cff 100%);
    transform: scale(1.05);
    filter: drop-shadow(0 0 10px #00c3ff);
    z-index: 25;
}

/* Disabled Effect */
.btn-skip:disabled {
    background: #222;
    color: #555;
    box-shadow: none;
    cursor: not-allowed;
    filter: none;
    transform: none;
}


/* =========================================
   MODAL SYSTEMS (ALERT & REWARD)
   ========================================= */
.modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background-color: rgba(0, 10, 25, 0.9); backdrop-filter: blur(10px);
    z-index: 9999; display: flex; align-items: center; justify-content: center;
}
.modal-box.sao-style {
    background: linear-gradient(135deg, rgba(5, 20, 40, 0.95) 0%, rgba(0, 5, 15, 0.98) 100%);
    width: 95%; max-width: 550px; padding: 35px; text-align: center;
    border-radius: 2px; border: 2px solid #00c3ff;
    box-shadow: 0 0 50px rgba(0, 195, 255, 0.5), inset 0 0 30px rgba(0, 195, 255, 0.2);
    animation: systemBoot 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}
.modal-header { display: flex; align-items: center; justify-content: center; gap: 20px; margin-bottom: 30px; }
.decoration-line { height: 4px; flex-grow: 1; background: linear-gradient(90deg, transparent, #00c3ff, transparent); }
#modal-title { font-family: 'Orbitron', sans-serif; font-size: 2.2rem; color: #fff; text-shadow: 0 0 20px rgba(0, 195, 255, 1); }
#modal-ok-btn, .btn-sao-ok {
    background: linear-gradient(180deg, #00c3ff 0%, #008cff 100%); border: none; padding: 12px 40px;
    color: white; font-family: 'Orbitron', sans-serif; font-weight: bold; font-size: 1rem;
    clip-path: polygon(15px 0, 100% 0, calc(100% - 15px) 100%, 0 100%); cursor: pointer; transition: all 0.2s;
}
.btn-sao-ok:hover, #modal-ok-btn:hover { transform: scale(1.05); box-shadow: 0 0 30px rgba(0, 195, 255, 0.8); }

/* REWARD MODAL SPECIFIC */
#modal-reward h2 { color: #ffaa00 !important; text-shadow: 0 0 10px rgba(255, 170, 0, 0.8); }
#modal-reward p { color: #ffffff !important; }
.reward-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(0, 0, 0, 0.5) 100%);
    backdrop-filter: blur(5px); border: 1px solid rgba(0, 195, 255, 0.3); border-radius: 8px;
    padding: 15px; flex: 1; min-width: 130px; max-width: 32%; cursor: pointer;
    transition: all 0.3s; box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}
.reward-card h3 { color: #00c3ff !important; font-family: 'Orbitron', sans-serif; margin: 10px 0; }
.reward-card p { color: #aaa !important; font-size: 0.8rem; }
.reward-card:hover { transform: translateY(-5px) scale(1.05); border-color: #00c3ff; box-shadow: 0 0 20px rgba(0, 195, 255, 0.4); }


/* =========================================
   ANIMASI & KEYFRAMES
   ========================================= */
@keyframes pulseAd { 0% { opacity: 0.5; } 50% { opacity: 1; } 100% { opacity: 0.5; } }
@keyframes systemBoot { to { opacity: 1; transform: scale(1); } }
@keyframes cyberSlide { 0% { opacity: 0; transform: translateX(-50px); filter: blur(10px); } 100% { opacity: 1; transform: translateX(0); filter: blur(0); } }
@keyframes gentleFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes digitalShimmer { 0%, 100% { opacity: 0.7; color: #00c3ff; } 50% { opacity: 1; color: #ffffff; } }

/* Animasi Logo Login */
.text-overlay h1 { animation: cyberSlide 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards; animation-delay: 0.5s; opacity: 0; }
.text-overlay .highlight { display: inline-block; animation: cyberSlide 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards; animation-delay: 0.5s; opacity: 0; }
.text-overlay p { animation: cyberSlide 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards; animation-delay: 1s; opacity: 0; }

.sao-logo-area { animation: gentleFloat 4s ease-in-out infinite; }
.sao-logo-area .subtitle { animation: digitalShimmer 3s ease-in-out infinite; }


/* =========================================
   RESPONSIVE MOBILE (HP)
   ========================================= */
@media screen and (max-width: 900px) {
    body, html { overflow-y: auto; }
    .main-container { flex-direction: column; height: auto; min-height: 100vh; background: rgba(0, 10, 20, 0.9); }
    .left-panel { display: none; }
    
    .center-panel { width: 100%; flex: none; padding: 40px 20px; background: transparent; backdrop-filter: none; box-shadow: none; }
    
    /* Logo Stacked */
    .sao-logo-area h2 { font-size: 15vw; line-height: 0.9; display: flex; flex-direction: column; align-items: center; }
    .sao-logo-area h2 span { display: block; width: 100%; text-align: center; }
    /* Atur Teks OTAKU (Atas) */
.text-otaku {
    font-weight: 700;
    color: #fff;
    /* Opsional: Tambah letter-spacing biar gagah */
    letter-spacing: 2px; 
}
    .text-battle { font-size: 19vw; color: #00c3ff; text-shadow: 0 0 15px rgba(0, 195, 255, 0.8); margin-top: 5px; }
    .subtitle { font-size: 0.8rem; width: 90%; margin: 10px auto 30px auto; }
    
    .right-panel { width: 100%; flex: none; padding: 30px 20px; background: #000; border-top: 2px solid #00c3ff; }
    #leaderboard-list { max-height: 350px; overflow-y: auto; }

    /* Game Layout Fix */
    .ad-space { display: none !important; }
    .mobile-ad-banner { display: flex !important; position: fixed; bottom: 0; left: 0; width: 100%; height: 70px; background: rgba(0, 10, 20, 0.95); border-top: 2px solid #00c3ff; z-index: 999; justify-content: center; align-items: center; }
    .ad-placeholder-mobile { color: rgba(0, 195, 255, 0.5); font-family: 'Orbitron', sans-serif; font-size: 0.8rem; animation: pulseAd 3s infinite; }
    
    .game-container { width: 100%; margin-bottom: 80px; }
    .question-area { min-height: 200px; padding: 20px; }
    .options-grid { grid-template-columns: 1fr; }
    #timer-display { font-size: 2rem; }
    .powerups-container { flex-wrap: wrap; gap: 10px; }
    
    /* Reward Card Stack */
    .reward-card { min-width: 100%; max-width: 100%; margin-bottom: 10px; display: flex; align-items: center; gap: 15px; text-align: left; }
    .reward-card div { font-size: 2rem !important; }
}

/* Score Card untuk Gambar (Hidden) */
.sao-card { width: 600px; height: 350px; background: #000; border: 4px solid #00c3ff; padding: 20px; color: white; display: flex; flex-direction: column; justify-content: space-between; }
.card-header h2 { text-shadow: 0 0 10px #00c3ff; }
.card-body { display: flex; align-items: center; justify-content: space-around; flex-grow: 1; }
#card-score { font-size: 5rem; color: #00c3ff; text-shadow: 0 0 20px #00c3ff; }
.card-footer { border-top: 1px solid #333; padding-top: 10px; text-align: center; color: #aaa; }



/* =========================================
   PERBAIKAN TOMBOL AUDIO (FIX)
   ========================================= */
.music-control {
    position: fixed;
    bottom: 20px;
    right: 20px; /* Pindah ke KANAN */
    left: auto;  /* Pastikan tidak menempel kiri */
    z-index: 1000; /* Pastikan di atas segalanya */
    
    /* Gaya SAO */
    background: rgba(0, 10, 20, 0.85); /* Gelap transparan */
    border: 1px solid #00c3ff; /* Garis Cyan */
    color: #fff;
    padding: 12px 25px;
    border-radius: 2px;
    
    font-family: 'Orbitron', sans-serif;
    font-size: 0.9rem;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s;
    
    /* Glow effect */
    box-shadow: 0 0 10px rgba(0, 195, 255, 0.3);
}

.music-control:hover {
    background: rgba(0, 195, 255, 0.2);
    box-shadow: 0 0 20px rgba(0, 195, 255, 0.6);
    transform: scale(1.05);
}

.music-control span.on {
    color: #00c3ff;
    font-weight: bold;
    text-shadow: 0 0 5px #00c3ff;
}


/* =========================================
   PERBAIKAN BACKGROUND VIDEO (TRANSPARAN)
   ========================================= */

/* 1. Pastikan Body Transparan */
html, body {
    background-color: transparent !important; /* Paksa transparan */
}

/* 2. Pastikan Wadah Utama tidak Hitam Pekat */
.main-container {
    /* Gunakan gradasi yang lebih tipis (0.4 dan 0.8) jangan 1.0 */
    background: radial-gradient(circle at center, rgba(0, 20, 40, 0.2) 0%, rgba(0, 10, 20, 0.85) 100%) !important;
}

/* 3. Panel Tengah & Kanan: Pastikan Efek Kaca */
.center-panel {
    background: rgba(0, 10, 30, 0.4) !important; /* Transparan biru gelap */
    backdrop-filter: blur(10px); /* Efek buram */
}

.right-panel {
    background: rgba(0, 0, 0, 0.5) !important; /* Transparan hitam */
    backdrop-filter: blur(5px);
}

/* 4. Pastikan Video ada di belakang */
#bg-video {
    z-index: -99; /* Paling belakang */
    display: block !important;
    opacity: 1;
}



/* =========================================
   DESAIN KARTU SKOR (UNTUK GAMBAR) - PREMIUM
   ========================================= */

.sao-card {
    width: 600px;
    height: 350px;
    
    /* === BACKGROUND MULTI-LAYER === */
    background: 
        /* LAYER 1 (Paling Atas): Vignette Gelap di Kiri dan Kanan */
        /* Ini membuat pinggiran kiri/kanan gelap, tengahnya transparan */
        linear-gradient(90deg, rgba(0, 10, 25, 0.9) 0%, transparent 30%, transparent 70%, rgba(0, 10, 25, 0.9) 100%),

        /* LAYER 2 (Tengah): Gradasi Gelap dari Atas ke Bawah */
        /* Supaya teks putih di atas dan bawah tetap kontras */
        linear-gradient(to bottom, rgba(5, 16, 32, 0.6), rgba(0, 0, 0, 0.95)),
        
        /* LAYER 3 (Paling Bawah): Gambar Anime Kamu */
        /* PASTIKAN FILE GAMBAR ADA DI FOLDER IMAGES */
        url('images/card_bg.png'); 
    
    /* Pengaturan agar gambar memenuhi kartu */
    background-size: cover; 
    background-position: center;
    background-repeat: no-repeat;

    /* Border Neon Biru */
    border: 3px solid #00c3ff;
    /* Sedikit rounded biar elegan */
    border-radius: 8px; 
    
    /* Padding & Layout */
    padding: 25px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    font-family: 'Orbitron', sans-serif;
    color: white;
    position: relative;
    overflow: hidden; /* Penting agar sudut gambar tidak keluar border radius */
    
    /* Glow Luar */
    box-shadow: 0 0 40px rgba(0, 195, 255, 0.3);
}

/* Hiasan Sudut Tech (Pojok Kanan Bawah) */
.sao-card::after {
    content: '';
    position: absolute;
    bottom: 0; right: 0;
    width: 0; height: 0;
    border-style: solid;
    border-width: 0 0 50px 50px;
    border-color: transparent transparent rgba(0, 195, 255, 0.8) transparent;
    z-index: 1;
}

/* Pastikan konten ada di atas background */
.card-header, .card-body, .card-footer {
    z-index: 2;
    position: relative;
}

/* Hiasan Sudut Tech (Pojok Kanan Bawah) */
.sao-card::after {
    content: '';
    position: absolute;
    bottom: 0; right: 0;
    width: 0; height: 0;
    border-style: solid;
    border-width: 0 0 40px 40px;
    border-color: transparent transparent #00c3ff transparent;
}

/* Header Kartu */
.card-header {
    border-bottom: 2px solid rgba(0, 195, 255, 0.5);
    padding-bottom: 10px;
    display: flex; justify-content: space-between; align-items: flex-end;
}
.card-header h2 { 
    margin: 0; font-size: 2.2rem; 
    text-shadow: 0 0 15px #00c3ff; /* Glow Teks Judul */
}
.card-header span { 
    color: #00c3ff; font-size: 0.8rem; letter-spacing: 3px; font-weight: bold;
}

/* Isi Kartu */
.card-body {
    display: flex; align-items: center; justify-content: space-between;
    flex-grow: 1; padding: 10px 0;
}

/* Bagian Skor (Kiri) */
.card-rank { text-align: left; }
#card-real-rank { font-size: 1.2rem; color: #fff; margin: 0; opacity: 0.8; }
#card-rank-title { font-size: 0.8rem; color: #00c3ff; letter-spacing: 1px; display: block; margin-top: 10px; }

#card-score { 
    font-size: 5.5rem; /* Skor Besar */
    margin: 0; 
    line-height: 1;
    
    /* HAPUS BAGIAN GRADIENT LAMA (Background clip) */
    /* background: -webkit-linear-gradient... (Hapus) */
    /* -webkit-background-clip... (Hapus) */
    /* -webkit-text-fill-color... (Hapus) */

    /* GANTI DENGAN INI (Warna Solid + Glow Kuat) */
    background: none; /* Pastikan tidak ada background */
    color: #00c3ff;   /* Warna Biru Neon Solid */
    
    /* Efek Cahaya Tumpuk biar menyala seperti lampu */
    text-shadow: 
        0 0 10px rgba(0, 195, 255, 0.8),
        0 0 30px rgba(0, 195, 255, 0.4),
        0 0 60px rgba(0, 195, 255, 0.2);
        
    /* Filter drop-shadow juga boleh dihapus kalau text-shadow sudah cukup */
    filter: none;
}

/* Detail Player (Kanan) */
.card-details { 
    text-align: center; /* Rata tengah horizontal */
    display: flex;
    flex-direction: column; /* Susun ke bawah */
    justify-content: center; /* Rata tengah vertikal */
    align-items: center;
    height: 100%; /* Ambil tinggi penuh */
    padding-right: 20px;
}
.card-details p { 
    margin: 5px 0; font-family: 'Exo 2', sans-serif; 
    font-size: 1.1rem; color: #ccc; 
}

.player-name-card {
    font-family: 'Orbitron', sans-serif;
    font-size: 2.2rem; /* Ukuran besar */
    font-weight: bold;
    color: #00c3ff;
    text-transform: uppercase;
    text-shadow: 0 0 15px rgba(0, 195, 255, 0.6);
    margin: 0;
    line-height: 1.2;
}

/* GAYA STATUS (Kecil & Putih) */
.status-text-card {
    font-family: 'Exo 2', sans-serif;
    font-size: 1rem;
    color: #ccc;
    margin-top: 5px;
    letter-spacing: 2px;
    text-transform: uppercase;
    border-top: 1px solid #333; /* Garis pemisah tipis */
    padding-top: 5px;
    width: 100%; /* Garis memanjang */
}

.card-details span { color: #00c3ff; font-weight: bold; text-shadow: 0 0 5px #00c3ff; }

/* KHUSUS MENANG (Emas) */
.status-win { color: #ffd700; border-color: #ffd700; text-shadow: 0 0 10px rgba(255, 215, 0, 0.5); }
/* KHUSUS KALAH (Merah Pudar) */
.status-lose { color: #ff5555; border-color: #ff5555; text-shadow: 0 0 10px rgba(255, 85, 85, 0.5); }

/* Footer */
.card-footer {
    text-align: center; font-size: 0.7rem; color: #555;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}


/* ==================================================================
   DESAIN BARU: LAYAR KALAH/MENANG (YOU ARE DEFEATED)
   ================================================================== */

/* Judul Alert (Merah untuk kalah) */
#alert-title { font-size: 2rem; letter-spacing: 3px; }

/* Kotak Skor Final */
.final-score-box {
    background: rgba(0, 10, 20, 0.6);
    border: 2px solid #333;
    padding: 15px;
    margin: 20px auto;
    border-radius: 8px;
    max-width: 300px;
}
/* Versi Menang (Glow Emas) */
.win-glow { border-color: gold; box-shadow: inset 0 0 20px rgba(255, 215, 0, 0.2); }

.final-score-box span { display: block; font-size: 0.8rem; color: #aaa; letter-spacing: 2px; margin-bottom: 5px; }
.final-score-box h1 { font-family: 'Orbitron', sans-serif; font-size: 3rem; margin: 0; color: #fff; }

/* Teks Alasan Kalah */
.defeat-message .reason { font-size: 1.2rem; color: #ff5555; margin-bottom: 10px; }

/* Tombol Tunggu Ranking */
.btn-ranking-wait {
    background: #1a1a1a; border: 1px solid #333; color: #777;
    padding: 10px 25px; border-radius: 30px;
    font-family: 'Orbitron', sans-serif; font-size: 0.9rem;
    display: flex; align-items: center; gap: 10px; margin: 20px auto;
    cursor: not-allowed;
}
.spin-icon { display: inline-block; animation: spin 2s linear infinite; }
@keyframes spin { 100% { transform: rotate(360deg); } }

/* Container Share */
.share-section {
    margin-top: 20px; padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

/* PERBAIKAN TOMBOL "LINK START (RETRY)" */
.btn-sao-ok {
    /* Bentuk Hexagon/Tech tajam */
    clip-path: polygon(15px 0, 100% 0, calc(100% - 15px) 100%, 0 100%);
    width: auto; min-width: 250px; /* Lebar yang pas */
    padding: 15px 30px;
    font-size: 1.2rem; letter-spacing: 3px;
    margin-top: 10px;
}


/* =========================================
   GAYA MODAL RULES (MISSION BRIEFING)
   ========================================= */

.rules-grid {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.rule-item {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.05);
    padding: 15px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s;
}

/* Khusus Miniboss agak merah dikit backgroundnya */
.rule-item.boss-rule {
    background: linear-gradient(90deg, rgba(50, 10, 10, 0.6) 0%, rgba(20, 5, 5, 0.6) 100%);
    border-color: rgba(255, 50, 50, 0.3);
}

.rule-icon {
    font-size: 2rem;
    margin-right: 15px;
    width: 50px;
    text-align: center;
}

.rule-text h4 {
    margin: 0 0 5px 0;
    font-family: 'Orbitron', sans-serif;
    color: #fff;
    font-size: 1rem;
    letter-spacing: 1px;
}

.rule-text p {
    margin: 0;
    font-size: 0.85rem;
    color: #ccc !important; /* Timpa warna default */
    text-align: left !important;
}

.rule-item:hover {
    transform: translateX(5px);
    border-color: #00c3ff;
    background: rgba(0, 195, 255, 0.1);
}


/* =========================================
   PERBAIKAN DARURAT: PAKSA TEKS JADI PUTIH
   ========================================= */

/* 1. Teks Pesan di dalam Modal (Login Success / Start Game) */
#modal-message {
    color: #ffffff !important;       /* Paksa Putih */
    font-size: 1.3rem !important;    /* Perbesar sedikit */
    font-weight: bold !important;    /* Tebalkan */
    text-shadow: 0 0 10px rgba(0, 195, 255, 0.8); /* Glow Biru agar kontras */
    line-height: 1.5;
    opacity: 1 !important;
}


/* =========================================
   PERBAIKAN LAYOUT HP (RESPONSIF)
   ========================================= */

@media screen and (max-width: 600px) {

    /* 1. HUD: Baris Horizontal Rapi */
    .hud {
        flex-direction: row !important; /* Susun ke samping */
        justify-content: space-between !important; /* Sebar Kiri-Tengah-Kanan */
        align-items: center !important;
        padding: 10px 15px !important; /* Padding lebih tipis */
        height: auto !important;
        gap: 5px;
    }

    /* 2. ITEM KIRI (FLOOR) */
    .hud-item:first-child {
        text-align: left !important;
        flex: 1; /* Ambil sisa ruang kiri */
    }
    /* Kecilkan label FLOOR */
    .hud-item:first-child .label { font-size: 0.6rem !important; opacity: 0.8; }
    /* Besarkan angkanya */
    .hud-item:first-child .value { font-size: 1rem !important; }

    /* 3. ITEM TENGAH (TIMER) */
    .timer-box {
        flex: 0 0 auto; /* Jangan melar */
        order: 2;
    }
    #timer-display {
        font-size: 2.2rem !important; /* Timer tetap dominan */
        line-height: 1;
    }

    /* 4. ITEM KANAN (HP) */
    .hud-item:last-child {
        flex: 1; /* Ambil sisa ruang kanan */
        text-align: right !important;
        display: flex;
        flex-direction: column;
        align-items: flex-end; /* Rata kanan */
    }
    /* Sembunyikan tulisan "HP" biar bersih */
    .hud-item:last-child .label { display: none !important; }
    
    /* Atur Hati */
    #lives-display {
        font-size: 1.2rem; /* Hati sedikit lebih kecil biar muat */
        letter-spacing: 2px;
    }

    /* 5. TOMBOL POWERUPS (Tetap 2 Baris) */
    .powerups-container {
        margin-top: 10px; /* Sedikit jarak dari HUD */
        margin-bottom: -10px;
        flex-wrap: wrap; /* Izinkan tombol turun baris */
        gap: 10px;
    }

    /* Tombol Orb (Gold & Diamond) berbagi tempat 50:50 */
    .btn-orb {
        flex: 1 1 40%; 
        min-width: auto; /* Reset min-width biar muat */
        height: 45px;    /* Sedikit lebih kecil */
        font-size: 0.8rem;
    }
    
    /* Tombol Tengah (Instant Kill) jadi Full Lebar di Bawah */
    .btn-skip {
        flex: 1 1 100%; /* Ambil lebar penuh 100% */
        order: 3;       /* Taruh di posisi terakhir (bawah) */
        margin-top: 5px;
        height: 50px;
    }
    
    /* Rapikan teks di dalam tombol */
    .orb-label span:first-child { font-size: 0.6rem; }
    .orb-label span:last-child { font-size: 1rem; }

    /* Responsif HP untuk HP Bar (Kalau sudah pakai HP Bar) */
    .hp-box { 
        width: 100px !important; /* Di HP lebar penuh */
        padding-left: 0 !important;
        align-items: flex-end !important;
    }
    .hp-container-outer { height: 15px !important; width: 100px !important; } 
    #hp-text-value { font-size: 0.6rem !important; }

} /* <--- INI PENTING! TUTUP MEDIA QUERY HP DI SINI */


/* =========================================
   PERBAIKAN GENERATE GAMBAR (NETLIFY FIX)
   ========================================= */

#score-card-container {
    /* JANGAN pakai left: -9999px (Browser malas render ini) */
    
    /* GANTI DENGAN TEKNIK INI: */
    position: fixed;
    top: 0;
    left: 0;
    
    /* Taruh di lapisan paling belakang dunia */
    z-index: -9999; 
    
    /* Bikin tidak terlihat mata, tapi tetap dirender browser */
    opacity: 0; 
    
    /* Pastikan tidak menghalangi klik mouse */
    pointer-events: none; 
}


/* =========================================
   PERBAIKAN POSISI TOMBOL START (TENGAH)
   ========================================= */

#btn-start-game {
    display: block !important;       /* Ubah jadi elemen blok */
    margin: 25px auto 0 auto !important; /* Margin Kiri-Kanan AUTO = Tengah */
    width: fit-content !important;   /* Lebar menyesuaikan isi teks */
    min-width: 250px;                /* Lebar minimal biar gagah */
}


/* =========================================
   1. UPGRADE HP BAR (VERSI BESAR & GAGAH)
   ========================================= */

/* Wadah Luar HP */
.hp-box {
    width: 350px !important;        /* Desktop: Lebar gagah */
    margin-top: 15px !important;    /* Jarak dari atas */
    margin-bottom: 20px !important; /* Jarak dari bawah */
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Sembunyikan label kecil "HP" (biar bersih) */
.hp-box .label { display: none !important; }

/* Batang Bar (Tebal) */
.hp-container-outer {
    width: 100% !important;
    height: 40px !important;        /* Tinggi Bar Tebal */
    background: rgba(0, 0, 0, 0.7);
    border: 3px solid #777;
    border-radius: 25px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.5);
    position: relative;
    overflow: hidden;
}

/* Isi Bar Warna */
.hp-fill {
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, #00ff00, #adff2f);
    box-shadow: 0 0 10px #00ff00;
    transition: width 0.4s cubic-bezier(0.25, 1, 0.5, 1), background 0.4s;
}

/* Teks Angka (100/100) */
#hp-text-value {
    position: absolute;
    top: 52%; left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    font-family: 'Orbitron', sans-serif;
    font-size: 1.2rem !important; /* Angka Besar */
    font-weight: bold;
    text-shadow: 0 1px 2px #000;
    z-index: 2;
}

/* Warna Kondisi (Merah/Kuning) */
.hp-warning { background: linear-gradient(90deg, #ffcc00, #ffeb3b) !important; box-shadow: 0 0 10px #ffcc00 !important; }
.hp-danger { background: linear-gradient(90deg, #ff0000, #ff4444) !important; box-shadow: 0 0 10px #ff0000 !important; }


/* =========================================
   2. FIX TEKS PUTIH (SUPAYA TERBACA JELAS)
   ========================================= */
#question-text, .info-value, #floor-display, #modal-message {
    color: #ffffff !important;
    text-shadow: 0 0 10px rgba(0, 195, 255, 0.8) !important;
    opacity: 1 !important;
}


/* =========================================
   LAYOUT MOBILE: HP BAR BESAR DI TENGAH
   ========================================= */
@media screen and (max-width: 600px) {

    .hud {
        flex-direction: row !important;
        justify-content: space-between !important;
        align-items: center !important;
        padding: 10px !important;
        gap: 5px;
    }

    /* 1. FLOOR (Kiri - Kecil) */
    .hud-item:first-child { 
        order: 1; 
        flex: 0 0 auto; /* Ukuran pas sesuai teks */
        text-align: left !important;
    }
    .hud-item:first-child .label { font-size: 0.6rem !important; opacity: 0.8; }
    .hud-item:first-child .value { font-size: 1rem !important; }

    /* 2. HP BAR (Tengah - DOMINAN/BESAR) */
    .hp-box {
        order: 2; /* Pindah ke Tengah */
        flex: 1;  /* Ambil semua sisa ruang kosong di tengah */
        width: auto !important; /* Reset lebar fixed */
        margin: 0 8px !important; /* Jarak kiri kanan */
        display: flex;
        justify-content: center;
    }
    
    .hp-container-outer { 
        width: 100% !important; /* Penuh di area tengah */
        height: 30px !important; /* TEBAL (Naik dari 20px) */
        border: 2px solid #fff;  /* Border diperjelas */
        border-radius: 8px;
    }
    
    #hp-text-value {
    position: absolute;
    top: 52%; left: 50%;
    transform: translate(-50%, -50%); /* Pas tengah */
    color: #fff;
    font-family: 'Orbitron', sans-serif;
    font-size: 1.2rem !important;
    font-weight: bold;
    text-shadow: 0 1px 2px #000;
    z-index: 2;
    
    /* 🔥 TAMBAHAN PENTING AGAR TIDAK TURUN BARIS 🔥 */
    white-space: nowrap; 
    width: 100%; /* Pastikan wadah teks lebar */
    text-align: center;
    pointer-events: none; /* Biar klik tembus ke bar */
}

    /* 3. TIMER (Kanan - Pas) */
    .timer-box {
        order: 3; /* Pindah ke Kanan */
        flex: 0 0 auto;
        text-align: right !important;
    }
    #timer-display { 
        font-size: 1.8rem !important; /* Sedikit dikecilkan biar HP Bar muat */
        line-height: 1;
    }

    /* --- POWERUPS TETAP DI BAWAH --- */
    .powerups-container {
        margin-top: 15px; margin-bottom: -10px;
        flex-wrap: wrap; gap: 10px;
    }
    .btn-orb { flex: 1 1 40%; min-width: auto; height: 45px; }
    .btn-skip { flex: 1 1 100%; height: 50px; }
}


/* =========================================
   BOSS BATTLE STYLE (LAYOUT HORIZONTAL)
   ========================================= */

#boss-arena {
    width: 100%;
    max-width: 700px; /* Batasi lebar biar rapi */
    margin: 0 auto 20px auto; /* Tengah & Jarak bawah */
    
    /* 🔥 KUNCI LAYOUT KIRI-KANAN 🔥 */
    display: flex; 
    flex-direction: row; 
    align-items: center; /* Rata tengah vertikal */
    justify-content: center; /* Rata tengah horizontal */
    gap: 25px; /* Jarak antara Avatar dan Info */
    
    animation: fadeIn 0.5s;
    padding: 10px;
}

/* --- KOLOM KIRI (AVATAR) --- */
.boss-avatar-container {
    width: 130px; height: 130px; /* Ukuran Avatar */
    border-radius: 50%;
    border: 4px solid #ff3333;
    overflow: hidden;
    box-shadow: 0 0 25px rgba(255, 51, 51, 0.6);
    position: relative;
    background: #000;
}
.boss-avatar-container img { width: 100%; height: 100%; object-fit: cover; }

/* Efek Getar (Hit) */
@keyframes shake {
    0% { transform: translate(1px, 1px) rotate(0deg); }
    10% { transform: translate(-1px, -2px) rotate(-1deg); }
    /* ... (Sama kayak sebelumnya) ... */
    100% { transform: translate(1px, -1px) rotate(0deg); }
}
.boss-hit { animation: shake 0.5s; }


/* --- KOLOM KANAN (INFO) --- */
.boss-col-right {
    flex: 1; /* Ambil sisa ruang yang ada */
    display: flex;
    flex-direction: column; /* Susun Nama & HP ke bawah */
    align-items: flex-start; /* Rata Kiri sesuai desain */
    justify-content: center;
}

/* Nama Boss */
.boss-name-text {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.8rem;
    color: #ff3333;
    text-transform: uppercase;
    text-shadow: 0 0 15px #ff0000;
    margin: 0 0 10px 0; /* Jarak ke HP Bar */
    letter-spacing: 2px;
    line-height: 1;
    text-align: left;
}

/* HP Bar Boss */
.boss-hp-box { 
    width: 100%; 
}
.boss-hp-box .hp-container-outer {
    height: 35px !important; /* Tebal */
    background: rgba(50, 0, 0, 0.8);
}
.boss-fill {
    background: linear-gradient(90deg, #ff0000, #ff4444) !important;
    box-shadow: 0 0 15px #ff0000 !important;
}

/* Timer Boss */
.boss-timer {
    margin-top: 8px;
    font-family: 'Orbitron', sans-serif;
    font-size: 1.5rem; color: #ff3333;
    text-shadow: 0 0 10px #ff3333;
    align-self: flex-end; /* Timer di pojok kanan bawah info */
}



/* --- RESPONSIF HP (Balik ke Atas-Bawah biar muat) --- */
@media screen and (max-width: 600px) {
    #boss-arena {
        flex-direction: column; /* Tumpuk lagi di HP */
        gap: 10px;
        text-align: center;
    }
    .boss-col-right {
        align-items: center; /* Rata tengah di HP */
        width: 100%;
    }
    .boss-name-text { text-align: center; font-size: 1.5rem; }
    .boss-timer { align-self: center; } /* Timer tengah di HP */
}


/* =========================================
   BOSS WARNING SCREEN (RED ALERT)
   ========================================= */
#boss-warning-overlay {
    position: fixed; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%;
    background-color: rgba(50, 0, 0, 0.9); /* Merah gelap */
    z-index: 30000; /* Harus di atas segalanya */
    display: flex; 
    justify-content: center; 
    align-items: center;
    flex-direction: column;
}

.warning-content {
    border-top: 5px solid red;
    border-bottom: 5px solid red;
    padding: 20px 100px;
    background: rgba(0, 0, 0, 0.8);
    animation: warningPulse 0.5s infinite alternate;
}

.warning-text {
    font-family: 'Orbitron', sans-serif; font-size: 5rem;
    color: red; margin: 0; letter-spacing: 10px;
    text-shadow: 0 0 20px red;
}

.warning-sub {
    font-family: 'Exo 2', sans-serif; font-size: 1.5rem;
    color: #fff; margin: 0; text-align: center; letter-spacing: 5px;
    animation: blink 0.2s infinite;
}

@keyframes warningPulse {
    from { transform: scale(1); box-shadow: 0 0 20px red; }
    to { transform: scale(1.1); box-shadow: 0 0 50px red; }
}

@keyframes blink { 0% { opacity: 1; } 50% { opacity: 0; } 100% { opacity: 1; } }


/* =========================================
   FIX BACKGROUND BOSS (SUPAYA JADI WALLPAPER)
   ========================================= */

#bg-image {
    position: fixed !important; /* KUNCI: Paku ke layar */
    top: 0;
    left: 0;
    width: 100vw;   /* Lebar penuh layar */
    height: 100vh;  /* Tinggi penuh layar */
    object-fit: cover; /* Biar gambar tidak gepeng */
    z-index: -50;   /* Taruh di lapisan paling belakang */
    
    /* Pastikan tidak menggeser elemen lain */
    display: none; /* Default sembunyi, nanti JS yang nyalakan */
}


/* =========================================
   BATTLE EFFECTS (SCREEN SHAKE & DAMAGE)
   ========================================= */

/* 1. Animasi Layar Bergetar (Saat Player Kena Hit) */
@keyframes screenShake {
    0% { transform: translate(0, 0); }
    20% { transform: translate(-10px, 10px); }
    40% { transform: translate(10px, -10px); }
    60% { transform: translate(-10px, 0); }
    80% { transform: translate(10px, 0); }
    100% { transform: translate(0, 0); }
}

.shake-screen {
    animation: screenShake 0.4s ease-in-out;
}

/* 2. Animasi Boss Bergetar (Saat Boss Kena Hit) */
@keyframes bossShake {
    0% { transform: scale(1); filter: brightness(1); }
    50% { transform: scale(0.9) rotate(5deg); filter: brightness(2) sepia(1) hue-rotate(-50deg) saturate(5); /* Efek Merah */ } 
    100% { transform: scale(1); filter: brightness(1); }
}

.boss-hit-effect {
    animation: bossShake 0.3s ease-in-out;
}

/* 3. Angka Damage Melayang */
.damage-number {
    position: fixed;
    font-family: 'Orbitron', sans-serif;
    font-size: 3rem;
    font-weight: 900;
    pointer-events: none; /* Biar gak ngeblok klik */
    z-index: 99999;
    animation: floatUp 1s forwards;
    text-shadow: 2px 2px 0 #000;
}

@keyframes floatUp {
    0% { opacity: 1; transform: translateY(0) scale(1); }
    100% { opacity: 0; transform: translateY(-100px) scale(1.5); }
}

/* =========================================
   SISTEM INVENTORY (TAS RPG)
   ========================================= */

/* 1. Tombol Buka Tas (Kecil & Rapi) */
.inventory-btn-container {
    width: 100%; max-width: 800px;
    display: flex; justify-content: flex-end; /* Taruh di Kanan */
    margin-bottom: -20px; z-index: 20; position: relative;
    padding-right: 10px;
}

/* TOMBOL ITEM BOX (VERSI BESAR) */
.btn-inventory {
    background: linear-gradient(135deg, #0044cc, #0088ff);
    border: 2px solid #fff;
    border-radius: 12px; /* Sedikit lebih rounded */
    
    /* PERBESAR BAGIAN INI */
    padding: 12px 30px;  /* Atas-Bawah: 12px, Kiri-Kanan: 30px */
    font-size: 1rem;     /* Ukuran huruf lebih besar (default biasanya 0.8-0.9rem) */
    
    color: #fff;
    font-family: 'Orbitron', sans-serif;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(0,0,0,0.5);
    display: flex; align-items: center; gap: 10px;
    transition: all 0.2s;

}
.btn-inventory:hover { 
    transform: scale(1.1); /* Membesar 10% saat di-hover */
    filter: brightness(1.2); 
    box-shadow: 0 0 20px rgba(0, 136, 255, 0.6); /* Glow biru */
}

/* 2. Grid di dalam Modal */
.inventory-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); /* Auto Responsive */
    gap: 15px;
    max-height: 400px;
    overflow-y: auto;
    padding: 10px;
}



/* 3. Slot Item */
.inv-slot {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(0, 195, 255, 0.3);
    border-radius: 5px;
    padding: 10px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}
.inv-slot:hover {
    background: rgba(0, 195, 255, 0.1);
    border-color: #00c3ff;
    transform: translateY(-2px);
}

/* Ikon & Teks Item */
.inv-icon { font-size: 2.5rem; margin-bottom: 5px; display: block; }
.inv-name { font-size: 0.7rem; color: #fff; font-family: 'Orbitron', sans-serif; display: block; }
.inv-qty {
    position: absolute; top: 5px; right: 5px;
    background: #000; color: #00c3ff;
    font-size: 0.7rem; padding: 2px 5px; border-radius: 4px;
    border: 1px solid #00c3ff;
}

/* Item Kosong/Habis */
.inv-slot.empty { opacity: 0.5; cursor: not-allowed; filter: grayscale(100%); }


/* =========================================
   SISTEM EQUIPMENT UI
   ========================================= */

/* Wadah 3 Kotak */
.equipment-container {
    display: flex;
    justify-content: space-around; /* Jarak rata */
    gap: 10px;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2); /* Garis pemisah dengan inventory */
}

/* Kotak Slot Individual */
.equip-slot {
    width: 30%;
    min-width: 90px;
    height: 100px;
    background: rgba(0, 0, 0, 0.5);
    border: 2px dashed #555; /* Garis putus-putus tanda kosong */
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
}

/* Label Kecil (WEAPON, ARMOR, dll) */
.slot-label {
    font-size: 0.6rem;
    color: #00c3ff;
    letter-spacing: 1px;
    position: absolute;
    top: 5px;
    font-weight: bold;
}

/* Ikon Besar di Tengah */
.slot-icon {
    font-size: 2rem;
    opacity: 0.5; /* Agak transparan kalau kosong */
    margin-top: 5px;
}

/* Nama Item di Bawah */
.slot-name {
    font-size: 0.7rem;
    color: #aaa;
    margin-top: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 90%;
    text-align: center;
}

/* --- STATE: KALAU ADA ISI (EQUIPPED) --- */
.equip-slot.equipped {
    border: 2px solid #ffd700; /* Border Emas Solid */
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.1), rgba(0, 0, 0, 0.6));
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.3);
}
.equip-slot.equipped .slot-icon {
    opacity: 1;
    filter: drop-shadow(0 0 5px gold);
    font-size: 2.5rem;
}
.equip-slot.equipped .slot-name {
    color: #fff;
    font-weight: bold;
}

/* Hover Effect */
.equip-slot:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-3px);
}

/* =========================================
   WARNA RARITY (BORDER & GLOW)
   ========================================= */

/* 🔵 RARE (Biru Neon - Item Menengah) */
.rarity-rare { 
    border: 2px solid #00ccff; 
    box-shadow: 0 0 8px rgba(0, 204, 255, 0.5); 
    background: linear-gradient(135deg, rgba(0, 50, 80, 0.8), rgba(0, 0, 0, 0.6));
}

/* 🟣 EPIC (Ungu Misterius - Item Kuat) */
.rarity-epic { 
    border: 2px solid #aa00ff; 
    box-shadow: 0 0 12px rgba(170, 0, 255, 0.6); 
    background: linear-gradient(135deg, rgba(50, 0, 80, 0.8), rgba(0, 0, 0, 0.6));
}

/* 🟡 LEGENDARY (Emas Mengkilap - Item Dewa) */
.rarity-legendary { 
    border: 2px solid #ffd700; 
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.8); 
    background: linear-gradient(135deg, rgba(80, 60, 0, 0.9), rgba(0, 0, 0, 0.6));
    animation: pulseGold 2s infinite alternate;
}

@keyframes pulseGold {
    from { box-shadow: 0 0 10px #ffd700; }
    to { box-shadow: 0 0 25px #ffaa00; }
}

/* Label Rarity di Pojok */
.rarity-label {
    font-size: 0.55rem; 
    font-weight: 900;
    text-transform: uppercase;
    position: absolute; 
    bottom: 2px; right: 5px;
    opacity: 0.9;
    letter-spacing: 1px;
    text-shadow: 1px 1px 0 #000;
}

/* =========================================
   FIX TAMPILAN GAMBAR ITEM (ANTI-RAKSASA)
   ========================================= */

/* 1. Kecilkan Gambar di dalam Tas */
.inv-img {
    width: 60px !important;       /* Lebar maksimal 60px */
    height: 60px !important;      /* Tinggi maksimal 60px */
    object-fit: contain !important; /* KUNCI: Gambar mengecil proporsional (tidak gepeng) */
    margin: 0 auto 5px auto;      /* Posisi tengah */
    display: block;
    filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.3)); /* Efek glow dikit */
}

/* 2. Pastikan Kotak Item Rapi */
.inv-slot {
    display: flex;
    flex-direction: column;       /* Susun ke bawah (Gambar atas, Teks bawah) */
    align-items: center;          /* Rata tengah */
    justify-content: center;
    padding: 10px;
    overflow: hidden;             /* Potong gambar kalau masih bandel keluar */
    height: 110px;                /* Tinggi tetap biar seragam */
}

/* 3. Rapikan Teks Nama Item */
.inv-name {
    font-size: 0.7rem !important;
    line-height: 1.1;
    margin-top: auto;             /* Dorong ke bawah */
    width: 100%;
    white-space: nowrap;          /* Jangan turun baris */
    overflow: hidden;
    text-overflow: ellipsis;      /* Kasih titik-titik (...) kalau kepanjangan */
}

/* =========================================
   FIX GAMBAR EQUIPMENT (SUPAYA TIDAK RAKSASA)
   ========================================= */

/* 1. Target gambar yang sedang dipakai di slot atas */
.equip-img {
    width: 50px !important;       
    height: 50px !important;      
    object-fit: contain !important; 
    margin: 2px auto !important;
   
 filter: drop-shadow(0 0 5px gold); /* Efek glow emas dikit */
}

/* 2. Pastikan Slot Equipment Memotong Gambar Berlebih */
.equip-slot {
    overflow: hidden !important;    /* Potong apapun yang keluar batas */
    position: relative;             /* Penting untuk posisi label */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* 3. Rapikan Teks Nama Item di Slot */
.slot-name {
    font-size: 0.6rem !important;   /* Teks kecil */
    margin-top: 2px !important;
    width: 100%;
    white-space: nowrap;            /* Jangan turun baris */
    overflow: hidden;
    text-overflow: ellipsis;        /* Titik-titik (...) */
    text-align: center;
}


/* =========================================
   TAMBAHKAN CSS INI KE style.css
   (Paste di bagian paling bawah file)
   ========================================= */

/* === RULES MODAL V2 (WITH IMAGES) === */

.rules-grid-v2 {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 15px 0;
    max-height: 450px;
    overflow-y: auto;
    padding: 5px;
}

/* Custom Scrollbar */
.rules-grid-v2::-webkit-scrollbar {
    width: 8px;
}
.rules-grid-v2::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 4px;
}
.rules-grid-v2::-webkit-scrollbar-thumb {
    background: #00c3ff;
    border-radius: 4px;
}

/* Card Container */
.rule-card-v2 {
    display: flex;
    gap: 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 12px;
    transition: all 0.3s ease;
    align-items: flex-start;
}

.rule-card-v2:hover {
    background: rgba(0, 195, 255, 0.1);
    transform: translateX(3px);
}

/* Border Kiri Sesuai Tipe */
.rule-card-v2.normal-card { border-left: 4px solid #00c3ff; }
.rule-card-v2.miniboss-card { border-left: 4px solid #ff6b00; }
.rule-card-v2.boss-card { border-left: 4px solid #ff0000; }
.rule-card-v2.item-card { border-left: 4px solid #ffd700; }
.rule-card-v2.gameover-card { border-left: 4px solid #888; }

/* Icon Container */
.card-icon {
    width: 60px;
    height: 60px;
    flex-shrink: 0;
    background: rgba(0, 0, 0, 0.5);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.card-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.icon-fallback {
    font-size: 2.5rem;
}

/* Content */
.card-content {
    flex: 1;
}

.card-content h4 {
    margin: 0 0 8px 0;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.95rem;
    color: #fff;
    letter-spacing: 1px;
}

.card-content .chance {
    font-size: 0.7rem;
    color: #aaa;
    font-weight: normal;
}

.card-content .reward {
    margin: 5px 0;
    font-size: 0.85rem;
    color: #ccc;
}

.card-content .gold {
    color: #ffd700;
    font-weight: bold;
}

.card-content .danger {
    color: #ff3333;
    font-weight: bold;
}

/* Drop Info */
.drop-info {
    margin: 8px 0 0 0;
    font-size: 0.75rem;
    color: #aaa;
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.bonus-info {
    margin: 5px 0 0 0;
    font-size: 0.75rem;
    color: #ffd700;
}

/* Badge Rarity */
.badge-rare,
.badge-epic,
.badge-legendary {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.7rem;
    font-weight: bold;
    margin-right: 4px;
    border: 1px solid;
}

.badge-rare {
    background: rgba(0, 204, 255, 0.2);
    border-color: #00ccff;
    color: #00ccff;
}

.badge-epic {
    background: rgba(170, 0, 255, 0.2);
    border-color: #aa00ff;
    color: #aa00ff;
}

.badge-legendary {
    background: rgba(255, 215, 0, 0.2);
    border-color: #ffd700;
    color: #ffd700;
}

/* Item List */
.item-list {
    margin: 8px 0 0 0;
    padding-left: 20px;
    font-size: 0.8rem;
    color: #ccc;
    line-height: 1.6;
}

.item-list li {
    margin-bottom: 4px;
}

.item-list strong {
    color: #00c3ff;
}

/* === RESPONSIVE MOBILE === */
@media screen and (max-width: 600px) {
    .rules-grid-v2 {
        max-height: 350px;
    }

    .card-icon {
        width: 50px;
        height: 50px;
    }

    .card-content h4 {
        font-size: 0.85rem;
    }

    .card-content .reward,
    .drop-info,
    .item-list {
        font-size: 0.75rem;
    }
}

/* === ANIMASI === */
@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.rule-card-v2 {
    animation: slideInRight 0.4s ease-out backwards;
}

.rule-card-v2:nth-child(1) { animation-delay: 0.1s; }
.rule-card-v2:nth-child(2) { animation-delay: 0.2s; }
.rule-card-v2:nth-child(3) { animation-delay: 0.3s; }
.rule-card-v2:nth-child(4) { animation-delay: 0.4s; }
.rule-card-v2:nth-child(5) { animation-delay: 0.5s; }

/*POP UP UPDATE*/ 

.popup-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
  z-index: 9999;
  animation: fadeIn 0.5s ease;
}

.popup-box {
  background: #fff;
  padding: 25px;
  width: 85%;
  max-width: 350px;
  border-radius: 12px;
  text-align: center;
  box-shadow: 0 0 15px rgba(255,255,255,0.4);
  animation: popIn 0.4s ease;
  font-family: "Poppins", sans-serif;
}

.popup-box h2 {
  margin-top: 0;
  margin-bottom: 10px;
}

#close-popup {
  margin-top: 15px;
  padding: 8px 18px;
  border: none;
  background: #007bff;
  color: white;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes popIn {
  from { transform: scale(0.7); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}


/* =========================================
   FIX TOMBOL LINK START (BIAR HILANG SAAT MAIN)
   ========================================= */

/* Default: Sembunyikan tombol start */
#btn-start-game {
    display: none !important; /* Paksa hilang */
}

/* Hanya munculkan JIKA berada di dalam modal yang sedang aktif */
/* Selektor ini mencari tombol start HANYA jika modal-rules sedang visible */
#modal-rules[style*="flex"] #btn-start-game,
#modal-rules[style*="block"] #btn-start-game {
    display: block !important;
    margin: 20px auto 0 auto;
}