/* =========================
   THEME PREMIUM (VISUAL ONLY)
========================= */

body.theme-premium {
    background: radial-gradient(circle at top, #0f5132, #052e1f);
    font-family: 'Segoe UI', sans-serif;
}

/* CARD */
.theme-premium .ui-card {
    background: linear-gradient(180deg, #0d5c3a, #063d28);
    border-radius: 20px;
    border: 2px solid rgba(255,215,0,0.2);
    box-shadow: 0 10px 40px rgba(0,0,0,0.6);
    color: #fff;
    padding: 20px;
}

/* TITLE */
.theme-premium .ui-title {
    text-align: center;
    font-size: 28px;
    font-weight: bold;
    color: #facc15;
    margin-bottom: 10px;
}

/* QUESTION PANEL (EMAS) */
.theme-premium .game-question {
    background: linear-gradient(180deg, #7c5a1f, #3f2f12);
    padding: 16px;
    border-radius: 12px;
    margin-bottom: 18px;
    text-align: center;
    font-weight: 600;
    border: 2px solid #facc15;
    box-shadow: inset 0 2px 6px rgba(0,0,0,0.4);
}

/* OPTION BASE */
.theme-premium .game-option {
    padding: 16px;
    border-radius: 14px;
    margin-bottom: 12px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.15s ease;
    border: 2px solid rgba(255,255,255,0.2);
}

/* HIDE RADIO */
.theme-premium .game-option input {
    display: none;
}

/* DEFAULT (ORANGE BUTTON) */
.theme-premium .game-option {
    background: linear-gradient(180deg, #fb923c, #c2410c);
    box-shadow: 0 4px 0 #7c2d12;
}

/* CLICK EFFECT */
.theme-premium .game-option:active {
    transform: scale(0.98);
}

/* SELECTED (HIJAU â€” HANYA VISUAL) */
.theme-premium .game-option.active {
    background: linear-gradient(180deg, #22c55e, #15803d);
    border-color: #4ade80;
    box-shadow: 0 4px 0 #14532d;
}

/* TIMER */
.theme-premium .game-timer {
    background: #ef4444;
    color: #fff;
    padding: 8px 14px;
    border-radius: 12px;
    font-weight: bold;
}

/* PROGRESS */
.theme-premium .progress-modern {
    background: rgba(255,255,255,0.2);
    border-radius: 999px;
}

.theme-premium .progress-fill {
    background: linear-gradient(90deg, #22c55e, #4ade80);
}

/* =========================
   PREMIUM UPGRADE (LEVEL 2)
========================= */

/* CARD LEBIH HIDUP */
.theme-premium .ui-card {
    box-shadow: 
        0 20px 60px rgba(0,0,0,0.8),
        inset 0 0 30px rgba(255,255,255,0.05);
}

/* JUDUL LEBIH GLOW */
.theme-premium .ui-title {
    text-shadow: 
        0 2px 0 #854d0e,
        0 0 10px rgba(255,215,0,0.6);
}

/* PANEL PERTANYAAN EMAS GLOW */
.theme-premium .game-question {
    box-shadow:
        inset 0 3px 8px rgba(0,0,0,0.6),
        0 0 15px rgba(255,215,0,0.3);
}

/* OPTION JADI 3D */
.theme-premium .game-option {
    position: relative;
    transform: translateY(0);
}

/* SHADOW BAWAH (EFEK TOMBOL) */
.theme-premium .game-option::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 8px;
    right: 8px;
    height: 6px;
    border-radius: 10px;
    background: rgba(0,0,0,0.4);
    z-index: -1;
}

/* HOVER */
.theme-premium .game-option:hover {
    transform: translateY(-2px);
}

/* KLIK */
.theme-premium .game-option:active {
    transform: translateY(2px);
}

/* SELECTED LEBIH HIDUP */
.theme-premium .game-option.active {
    box-shadow:
        0 0 12px rgba(34,197,94,0.7),
        0 4px 0 #14532d;
}

/* TIMER LEBIH GAME */
.theme-premium .game-timer {
    box-shadow: 0 4px 0 #7f1d1d;
}

/* TIMER BADGE */
.theme-premium .game-timer-badge {
    background: linear-gradient(180deg, #ef4444, #991b1b);
    color: #fff;
    padding: 10px 16px;
    border-radius: 14px;
    font-weight: bold;
    box-shadow: 
        0 4px 0 #7f1d1d,
        0 0 10px rgba(239,68,68,0.5);
}

.theme-premium .ui-card {
    position: relative;
}

.theme-premium .ui-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 20px;
    background: radial-gradient(circle at center, rgba(255,255,255,0.05), transparent 70%);
    pointer-events: none;
}

.theme-premium .game-question {
    font-size: 18px;
    line-height: 1.5;
    letter-spacing: 0.3px;
}

.theme-premium .ui-subtitle {
    opacity: 0.8;
    font-size: 14px;
}

/* =========================
   HASIL PREMIUM
========================= */

.result-card{
    max-width:500px;
    margin:auto;
    background:linear-gradient(180deg,#0f3d2e,#0a2b22);
    border-radius:20px;
    padding:30px;
    text-align:center;
    box-shadow:0 20px 50px rgba(0,0,0,0.4);
    border:2px solid rgba(255,215,0,0.3);
}

.result-title{
    font-size:22px;
    color:#fff;
    margin-bottom:20px;
}

.result-score{
    font-size:60px;
    font-weight:bold;
    color:#FFD700;
    margin-bottom:10px;
}

.result-nilai{
    color:#ccc;
    margin-bottom:10px;
}

.result-pesan{
    font-size:18px;
    color:#fff;
    margin-bottom:15px;
}

.result-waktu{
    color:#aaa;
    margin-bottom:25px;
}

.result-actions button{
    width:100%;
    margin:10px 0;
    padding:14px;
    border:none;
    border-radius:12px;
    font-size:16px;
    cursor:pointer;
}

/* tombol utama */
.btn-premium{
    background:linear-gradient(180deg,#2ecc71,#27ae60);
    color:#fff;
}

/* tombol kedua */
.btn-secondary{
    background:#2c3e50;
    color:#fff;
}

body{
    font-family:'Poppins', sans-serif;
}

/* judul */
.result-title{
    font-size:26px;
    font-weight:700;
    letter-spacing:0.5px;
}

/* skor besar */
.result-score{
    font-size:72px;
    font-weight:800;
    color:#FFD700;
    text-shadow:0 4px 10px rgba(0,0,0,0.5);
}

/* nilai */
.result-nilai{
    font-size:16px;
    font-weight:500;
    color:#ddd;
}

/* pesan */
.result-pesan{
    font-size:20px;
    font-weight:600;
}

/* waktu */
.result-waktu{
    font-size:14px;
}

.result-score{
    animation:pop 0.5s ease;
}

@keyframes pop{
    0%{transform:scale(0.8);opacity:0;}
    100%{transform:scale(1);opacity:1;}
}

/* =========================
   TYPOGRAPHY PREMIUM (RAMAH MATA)
========================= */

.result-title{
    font-size:28px;
    font-weight:700;
    letter-spacing:0.5px;
}

/* skor utama */
.result-score{
    font-size:76px;
    font-weight:800;
    color:#FFD700;
    text-shadow:0 4px 12px rgba(0,0,0,0.6);
}

/* nilai */
.result-nilai{
    font-size:18px;
    font-weight:600;
    color:#e0e0e0;
    margin-top:10px;
}

/* pesan */
.result-pesan{
    font-size:20px;
    font-weight:700;
    margin-top:8px;
}

/* waktu */
.result-waktu{
    font-size:16px;
    font-weight:500;
    margin-top:6px;
    color:#cfcfcf;
}

.result-actions button{
    width:100%;
    margin:12px 0;
    padding:16px;
    border:none;
    border-radius:14px;
    font-size:18px; /* ðŸ”¥ diperbesar */
    font-weight:700; /* ðŸ”¥ ditebalkan */
    cursor:pointer;
}

@media (max-width:600px){

    .result-score{
        font-size:64px;
    }

    .result-title{
        font-size:24px;
    }

    .result-actions button{
        font-size:17px;
        padding:15px;
    }

}

/* =========================
   LEADERBOARD PREMIUM
========================= */

.leaderboard-card{
    max-width:500px;
    margin:auto;
    background:linear-gradient(180deg,#0f3d2e,#0a2b22);
    border-radius:20px;
    padding:25px;
    box-shadow:0 20px 50px rgba(0,0,0,0.4);
    border:2px solid rgba(255,215,0,0.3);
}

.leaderboard-title{
    text-align:center;
    font-size:26px;
    font-weight:700;
    margin-bottom:20px;
    color:#fff;
}

.leaderboard-list{
    margin-bottom:20px;
}

.leaderboard-item{
    display:flex;
    align-items:center;
    justify-content:space-between;
    padding:12px;
    margin-bottom:10px;
    border-radius:12px;
    background:rgba(255,255,255,0.05);
}

.leaderboard-item.top{
    background:linear-gradient(90deg,#1abc9c,#16a085);
    font-weight:700;
}

.lb-rank{
    width:40px;
    font-weight:700;
}

.lb-nama{
    flex:1;
}

.lb-skor{
    width:50px;
    text-align:right;
}

.lb-waktu{
    width:70px;
    text-align:right;
    font-size:14px;
    color:#ccc;
}

.leaderboard-item.top {
    background: linear-gradient(135deg, #2ecc71, #27ae60);
    font-weight: 700;
}

/* subtitle */
.leaderboard-subtitle {
    text-align: center;
    color: #cbd5e1;
    font-size: 14px;
    margin-top: -10px;
    margin-bottom: 20px;
}

/* item layout */
.leaderboard-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    border-radius: 12px;
    margin-bottom: 10px;
    background: rgba(255,255,255,0.05);
}

/* rank number */
.lb-rank {
    font-size: 18px;
    font-weight: 700;
    width: 40px;
    text-align: center;
}

/* content */
.lb-content {
    flex: 1;
}

.lb-nama {
    font-size: 16px;
    font-weight: 700;
}

.lb-detail {
    font-size: 14px;
    opacity: 0.9;
}

/* TOP 3 COLORS */
.leaderboard-item.gold {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

.leaderboard-item.silver {
    background: linear-gradient(135deg, #94a3b8, #64748b);
}

.leaderboard-item.bronze {
    background: linear-gradient(135deg, #b45309, #92400e);
}

/* =========================
   TEXT IMPROVEMENT
========================= */

.lb-nama {
    font-size: 18px;      /* sebelumnya kecil */
    font-weight: 700;     /* lebih tebal */
    letter-spacing: 0.3px;
}

.lb-detail {
    font-size: 15px;      /* lebih besar */
    font-weight: 600;     /* tidak tipis */
    margin-top: 4px;
    opacity: 0.95;
}

/* =========================
   RANK NUMBER
========================= */

.lb-rank {
    font-size: 20px;
    font-weight: 800;
}

/* =========================
   ITEM DEFAULT (BARIS 4+)
========================= */

.leaderboard-item.normal {
    background: rgba(255,255,255,0.08);  /* lebih terang */
}

/* hover biar hidup */
.leaderboard-item.normal:hover {
    background: rgba(255,255,255,0.12);
}

/* =========================
   TOP 3 (BIAR LEBIH KONTRAS)
========================= */

.leaderboard-item.gold {
    background: linear-gradient(135deg, #f59e0b, #f97316);
    color: #111;
}

.leaderboard-item.silver {
    background: linear-gradient(135deg, #cbd5f5, #94a3b8);
    color: #111;
}

.leaderboard-item.bronze {
    background: linear-gradient(135deg, #fb923c, #b45309);
    color: #111;
}

/* =========================
   MOBILE FRIENDLY
========================= */

@media (max-width: 480px){

    .lb-nama {
        font-size: 17px;
    }

    .lb-detail {
        font-size: 14px;
    }

    .lb-rank {
        font-size: 18px;
    }

}

.leaderboard-item {
    border: 1px solid rgba(255,255,255,0.05);
}

/* =========================
   TEXT (LEBIH RAMAH MATA)
========================= */

.lb-nama {
    font-size: 20px;      /* diperbesar lagi */
    font-weight: 800;     /* lebih tebal */
    letter-spacing: 0.3px;
}

.lb-detail {
    font-size: 16px;      /* lebih jelas */
    font-weight: 600;
    margin-top: 6px;
    opacity: 1;
}

/* =========================
   RANK NUMBER
========================= */

.lb-rank {
    font-size: 22px;
    font-weight: 900;
}

/* =========================
   SUBTITLE
========================= */

.leaderboard-subtitle {
    text-align: center;
    color: #e2e8f0;
    font-size: 15px;       /* diperbesar */
    font-weight: 600;      /* ditambah tebal */
    margin-top: -8px;
    margin-bottom: 22px;
}

/* =========================
   BARIS 4+ (WARNA CERAH)
========================= */

.leaderboard-item.normal {
    background: linear-gradient(135deg, #fcd9b6, #f4a261); /* coklat muda cerah */
    color: #111; /* biar kontras */
}

/* hover biar hidup */
.leaderboard-item.normal:hover {
    transform: scale(1.01);
}

/* =========================
   TOP 3 (SEDIKIT DIPERTEGAS)
========================= */

.leaderboard-item.gold {
    background: linear-gradient(135deg, #ffb703, #fb8500);
    color: #111;
}

.leaderboard-item.silver {
    background: linear-gradient(135deg, #cbd5f5, #94a3b8);
    color: #111;
}

.leaderboard-item.bronze {
    background: linear-gradient(135deg, #f97316, #c2410c);
    color: #111;
}

/* =========================
   MOBILE FRIENDLY
========================= */

@media (max-width: 480px){

    .lb-nama {
        font-size: 19px;
    }

    .lb-detail {
        font-size: 15px;
    }

    .lb-rank {
        font-size: 20px;
    }

}

/* =========================
   STRUCTURE FIX LAYOUT
========================= */

.leaderboard-card {
    display: flex;
    flex-direction: column;
    height: 80vh; /* biar ada ruang scroll */
    max-height: 700px;
}

/* HEADER FIX */
.leaderboard-header {
    flex: 0 0 auto;
    text-align: center;
}

/* LIST SCROLL */
.leaderboard-scroll {
    flex: 1;
    overflow-y: auto;
    padding: 10px 0;
}

/* FOOTER FIX */
.leaderboard-footer {
    flex: 0 0 auto;
    padding-top: 15px;
}

/* SCROLL SMOOTH */
.leaderboard-scroll::-webkit-scrollbar {
    width: 6px;
}

.leaderboard-scroll::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.2);
    border-radius: 10px;
}

/* CENTER */
.text-center{
    text-align: center;
}

/* BUTTON KUNCI JAWABAN */
.btn-primary{
    display: inline-block;
    padding: 14px 22px;
    font-size: 17px;
    font-weight: 700;
    border-radius: 12px;
    border: none;
    cursor: pointer;

    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: #fff;

    box-shadow: 0 6px 15px rgba(0,0,0,0.3);
    transition: 0.2s;
}

/* HOVER */
.btn-primary:hover{
    transform: scale(1.05);
}

/* MOBILE (BIAR RAMAH ORANG TUA) */
@media (max-width: 600px){
    .btn-primary{
        width: 100%;
        font-size: 18px;
        padding: 16px;
    }
}

/* ===== TOP INFO (SOAL & TIMER) ===== */

.top-info{
    display:flex;
    justify-content:space-between;
    align-items:center;
    margin-top:10px;
}

.soal-info{
    font-size:20px;
    font-weight:bold;
}

.timer-info{
    font-size:14px;
    font-weight:600;
    color:#ffd700;
}

/* ===== PROGRESS BAR BARU ===== */

.progress-container{
    width:100%;
    height:10px;
    background:rgba(255,255,255,0.2);
    border-radius:10px;
    overflow:hidden;
    margin:10px 0 20px;
}

.progress-bar{
    height:100%;
    background:linear-gradient(90deg,#ff9800,#ff5722);
    width:0%;
    transition:0.4s ease;
}

.progress-container{
    margin:15px 0 20px;
}

.progress-bar{
    transition: width 0.5s ease;
}

.soal-info{
    font-size:22px;
    font-weight:bold;
}

.timer-info{
    font-size:18px;
    font-weight:bold;
}

/* efek tekan */
.game-option:active{
    transform:scale(0.96);
}

/* animasi halus */
.game-option{
    transition:all 0.15s ease;
}

.game-option:active{
    transform:scale(0.96);
    box-shadow:0 2px 5px rgba(0,0,0,0.3);
}

.game-option:hover{
    transform:scale(1.02);
}

.game-option{
    position:relative;
    overflow:hidden;
}

.ripple{
    position:absolute;
    border-radius:50%;
    transform:scale(0);
    background:rgba(255,255,255,0.5);
    animation:ripple 0.5s linear;
}

@keyframes ripple{
    to{
        transform:scale(4);
        opacity:0;
    }
}

.app-container {
  display:flex;
  justify-content:center;
  align-items:center;
  height:100vh;
  padding:20px;
}

.card {
  background:#fff;
  padding:30px;
  border-radius:20px;
  box-shadow:0 20px 50px rgba(0,0,0,0.1);
  max-width:400px;
  width:100%;
  text-align:center;
}

.event-title {
  font-size:22px;
  font-weight:700;
  margin-bottom:10px;
}

.event-meta {
  font-size:14px;
  color:#777;
  margin-bottom:20px;
}

.status.waiting {
  font-size:16px;
  font-weight:600;
  margin-bottom:15px;
}

.info-text {
  font-size:14px;
  color:#555;
}

.loader {
  margin-top:20px;
  width:30px;
  height:30px;
  border:4px solid #eee;
  border-top:4px solid #333;
  border-radius:50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.fade-in {
  animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
  from {opacity:0; transform:translateY(10px);}
  to {opacity:1;}
}

.pulse {
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0% {opacity:1;}
  50% {opacity:0.5;}
  100% {opacity:1;}
}

.option {
    position: relative;
    overflow: hidden;
}

/* ACTIVE STATE */
.option.active {
    background: #22c55e !important;
    color: #fff;
    transform: scale(1.02);
}

/* RIPPLE */
.option .ripple {
    position: absolute;
    border-radius: 50%;
    transform: scale(0);
    background: rgba(255,255,255,0.6);
    animation: ripple 0.5s linear;
    pointer-events: none;
}

@keyframes ripple {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

.progress-container {
    position: relative;
    height: 10px;
    border-radius: 20px;
    overflow: hidden;
    margin-bottom: 20px;
}

/* background (abu/hijau tua) */
.progress-bg {
    position: absolute;
    width: 100%;
    height: 100%;
    background: #2f6f4f;
}

/* fill (gradient DEMO) */
.progress-fill {
    position: absolute;
    height: 100%;
    background: linear-gradient(to right, #ff9800, #22c55e);
    transition: width 0.4s ease;
}

.progress-fill {
    box-shadow: 0 0 8px rgba(255, 165, 0, 0.6);
}

.progress-fill {
    background: linear-gradient(to right, red, yellow, lime) !important;
}

/* =========================
   INPUT PREMIUM
========================= */

.ui-input {
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  color: #fff;
  font-weight: 500;

  outline: none;
  transition: 0.2s;
}

.ui-input::placeholder {
  color: #ccc;
}

.ui-input:focus {
  border: 1px solid #00e676;
  box-shadow: 0 0 10px rgba(0,255,100,0.5);
}


/* =========================
   BUTTON PREMIUM
========================= */

.ui-button {
  background: linear-gradient(135deg,#00e676,#00c853);
  color: #000;
  font-weight: bold;
  cursor: pointer;

  box-shadow: 0 5px 20px rgba(0,255,100,0.4);
  transition: 0.2s;
}

.ui-button:hover {
  transform: scale(1.03);
}

.ui-button:active {
  transform: scale(0.98);
}

/* =========================
   LEADERBOARD ENHANCEMENT
========================= */

/* separator */
.separator {
    text-align: center;
    margin: 12px 0;
    opacity: 0.5;
    font-weight: bold;
    letter-spacing: 2px;
}

/* highlight user */
.leaderboard-item.me {
    outline: 3px solid #00e676;
    transform: scale(1.03);
    background: rgba(0,255,174,0.12);
    box-shadow: 0 0 20px rgba(0,255,174,0.6);
    transition: all 0.3s ease;
}

.leaderboard-item {
    transition: all 0.3s ease;
}.leaderboard-item {
    transition: all 0.3s ease;
}