/* ============================================
   CUSTOM STYLES — MESIN CBT UTBK SNBT 2027
   v2.0 — Sistem Sekuensial Per-Subtes
   ============================================ */

/* ---------- Viewport & Box Sizing Protection ---------- */
*, *::before, *::after {
  box-sizing: border-box;
}
html {
  overflow-x: hidden;
  max-width: 100vw;
  width: 100%;
  min-height: 100%;
  min-height: 100dvh;
  background-color: #f8fafc;
}
body {
  overflow-x: hidden;
  max-width: 100vw;
  width: 100%;
  min-height: 100%;
  min-height: 100dvh;
  background-color: #f8fafc;
  padding-bottom: calc(2rem + env(safe-area-inset-bottom, 16px));
}

/* Modal Open Canvas Lock & Midnight Slate Bleed (Zero Bottom Gap) */
html.modal-open,
body.modal-open {
  overflow: hidden !important;
  background-color: #0f172a !important;
}
img, svg {
  max-width: 100%;
}

/* ---------- Scrollbar Kustom ---------- */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: #f1f5f9; border-radius: 999px; }
::-webkit-scrollbar-thumb { background: #94a3b8; border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: #64748b; }

/* ---------- Transisi Layar ---------- */
.screen {
  display: none;
  animation: fadeSlideIn 0.3s ease-out;
}
.screen.active {
  display: flex;
}
@keyframes fadeSlideIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- Timer Pulse (< 60 detik) ---------- */
@keyframes timerPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}
.timer-warning {
  color: #f59e0b !important;
  background-color: #fffbeb !important;
  border-color: #fcd34d !important;
}
.timer-critical {
  animation: timerPulse 0.8s ease-in-out infinite;
  color: #ef4444 !important;
  background-color: #fef2f2 !important;
  border-color: #fca5a5 !important;
}

/* ---------- Mobile Nav Drawer ---------- */
.nav-drawer-overlay {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: -150px !important;
  width: 100vw !important;
  height: calc(100% + 150px) !important;
  height: calc(100dvh + 150px) !important;
  z-index: 50 !important;
  display: none;
}
.nav-drawer-overlay.open { display: block; }
.nav-drawer-backdrop {
  position: absolute; inset: 0;
  background: rgba(0,0,0,0.5);
  transition: opacity 0.3s ease;
}
.nav-drawer-panel {
  position: absolute; right: 0; top: 0;
  height: 100%; width: 320px; max-width: 85vw;
  background: #fff;
  box-shadow: -4px 0 24px rgba(0,0,0,0.15);
  transform: translateX(100%);
  transition: transform 0.3s ease;
  overflow-y: auto;
}
.nav-drawer-overlay.open .nav-drawer-panel {
  transform: translateX(0);
}

/* ---------- Opsi Jawaban ---------- */
.option-btn {
  transition: all 0.15s ease;
  cursor: pointer;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  padding: 14px 16px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: #fff;
  text-align: left;
  width: 100%;
}
.option-btn:hover { border-color: #818cf8; background: #eef2ff; }
.option-btn.selected {
  border-color: #0f172a; background: #f8fafc;
}
.option-btn .option-letter {
  flex-shrink: 0; width: 32px; height: 32px;
  border-radius: 8px; display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 14px;
  background: #f1f5f9; color: #334155;
  transition: all 0.15s ease;
}
.option-btn.selected .option-letter {
  background: #0f172a; color: #fff;
}
.option-btn .option-text { flex: 1; padding-top: 4px; line-height: 1.5; }

/* ---------- Opsi Review (Benar/Salah) ---------- */
.option-correct { border-color: #059669 !important; background: #f0fdf4 !important; }
.option-correct .option-letter { background: #059669 !important; color: #fff !important; }
.option-wrong { border-color: #dc2626 !important; background: #fef2f2 !important; }
.option-wrong .option-letter { background: #dc2626 !important; color: #fff !important; }

/* ---------- Tombol Navigasi Soal ---------- */
.nav-num-btn {
  width: 42px; height: 42px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 600; font-size: 14px;
  cursor: pointer; transition: all 0.15s ease;
  border: 2px solid transparent; position: relative;
}
.nav-num-btn:hover { transform: scale(1.05); }
.nav-num-btn.unanswered { background: #f1f5f9; color: #64748b; }
.nav-num-btn.answered { background: #0f172a; color: #fff; }
.nav-num-btn.flagged { background: #d97706; color: #fff; }
.nav-num-btn.current { border-color: #0f172a; outline: 2px solid #0f172a; outline-offset: 1px; }

/* ---------- Progress bar ---------- */
.progress-bar {
  height: 8px; border-radius: 999px;
  background: #e2e8f0; overflow: hidden;
}
.progress-bar-fill {
  height: 100%; border-radius: 999px;
  transform-origin: left;
  transition: transform 0.3s ease;
}

/* ---------- Subtes Step Indicator ---------- */
.step-indicator {
  display: flex; align-items: center; gap: 0;
  overflow-x: auto; padding: 4px 0;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.step-indicator::-webkit-scrollbar { display: none; }
.step-dot {
  width: 32px; height: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 12px; flex-shrink: 0;
  transition: all 0.2s ease;
}
.step-dot.completed { background: #059669; color: #fff; }
.step-dot.active { background: #0f172a; color: #fff; outline: 2px solid #0f172a; outline-offset: 2px; }
.step-dot.pending { background: #e2e8f0; color: #94a3b8; }
.step-line {
  width: 24px; height: 3px; flex-shrink: 0;
  border-radius: 999px; transition: background 0.2s ease;
}
.step-line.done { background: #059669; }
.step-line.upcoming { background: #e2e8f0; }

/* ---------- Gambar Soal ---------- */
.question-image-container {
  margin: 12px 0 16px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
}
.question-image-container img {
  display: block;
  max-width: 100%;
  max-height: 400px;
  margin: 0 auto;
  object-fit: contain;
}

/* ---------- Card pembahasan ---------- */
.review-card {
  border-radius: 16px;
  border: 1px solid #e2e8f0;
  background: #fff;
  overflow: hidden;
  transition: box-shadow 0.2s ease;
}
.review-card:hover { box-shadow: 0 4px 20px rgba(0,0,0,0.04); }

/* ---------- Callout boxes (Full-bordered, zero side-tab) ---------- */
.callout-trick {
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 14px;
  padding: 16px 20px;
}
.callout-explain {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 16px 20px;
}

/* ---------- Stat card ---------- */
.stat-card {
  border-radius: 14px; padding: 20px;
  text-align: center; border: 1px solid #e2e8f0;
}

/* ---------- Skor Donut ---------- */
.score-ring { transform: rotate(-90deg); }
.score-ring-bg { stroke: #e2e8f0; }
.score-ring-fill {
  stroke-linecap: round;
  transition: stroke-dashoffset 1s ease-out;
}

/* ---------- Modal (Executive High-Trust Design) ---------- */
.modal-overlay {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: -150px !important;
  width: 100vw !important;
  width: 100% !important;
  height: calc(100% + 150px) !important;
  height: calc(100dvh + 150px) !important;
  min-height: calc(100vh + 150px) !important;
  padding-bottom: calc(150px + max(16px, env(safe-area-inset-bottom, 16px))) !important;
  box-sizing: border-box !important;
  z-index: 100 !important;
  display: none; align-items: center; justify-content: center;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding-left: 16px;
  padding-right: 16px;
  padding-top: 16px;
}

/* CBT Wallet & Profile Modal Overlay & Story Modal (100% Edge-to-Edge Immunity & Zero Bottom Gap) */
#cbt-wallet-modal-overlay,
#story-export-modal {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: -150px !important;
  width: 100vw !important;
  width: 100% !important;
  height: calc(100% + 150px) !important;
  height: calc(100dvh + 150px) !important;
  min-height: calc(100vh + 150px) !important;
  padding-bottom: calc(150px + max(16px, env(safe-area-inset-bottom, 16px))) !important;
  box-sizing: border-box !important;
  z-index: 9999 !important;
}
.modal-overlay.open { display: flex; }
.modal-box {
  background: #ffffff;
  border-radius: 24px;
  padding: 32px 28px 24px;
  max-width: 480px;
  width: 100%;
  box-shadow: 0 25px 60px -15px rgba(15, 23, 42, 0.3), 0 0 0 1px rgba(226, 232, 240, 0.9);
  animation: modalPop 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}
@keyframes modalPop {
  from { opacity: 0; transform: scale(0.94) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

/* ---------- Executive Edutech Tryout Cards ---------- */
.to-card-item {
  position: relative;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}
.to-card-item::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: transparent;
  transition: all 0.25s ease;
}
.to-card-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 32px -8px rgba(15, 23, 42, 0.08), 0 4px 12px -2px rgba(15, 23, 42, 0.03);
}
.to-card-item.accent-indigo::before { background: #0f172a; }
.to-card-item.accent-purple::before { background: #334155; }
.to-card-item.accent-emerald::before { background: #059669; }
.to-card-item.accent-amber::before { background: #d97706; }

.to-card-item:hover.accent-indigo { border-color: #94a3b8; box-shadow: 0 16px 32px -8px rgba(15, 23, 42, 0.12); }
.to-card-item:hover.accent-purple { border-color: #94a3b8; box-shadow: 0 16px 32px -8px rgba(15, 23, 42, 0.12); }
.to-card-item:hover.accent-emerald { border-color: #6ee7b7; box-shadow: 0 16px 32px -8px rgba(15, 23, 42, 0.12); }
.to-card-item:hover.accent-amber { border-color: #fcd34d; box-shadow: 0 16px 32px -8px rgba(15, 23, 42, 0.12); }

/* ---------- Subtes Intro Card ---------- */
.subtes-intro-card {
  background: #fff;
  border-radius: 24px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 8px 32px rgba(0,0,0,0.08);
  overflow: hidden;
  max-width: 520px;
  width: 100%;
}
.subtes-intro-header {
  background: #0f172a;
  padding: 40px 32px;
  text-align: center;
  color: #fff;
  border-bottom: 1px solid #1e293b;
}
@keyframes countPop {
  0% { transform: scale(0.5); opacity: 0; }
  60% { transform: scale(1.15); }
  100% { transform: scale(1); opacity: 1; }
}
.count-animate { animation: countPop 0.4s ease-out; }

/* ---------- IRT Score Bar ---------- */
.irt-score-bar {
  height: 12px;
  border-radius: 999px;
  background: #e2e8f0;
  overflow: hidden;
  position: relative;
}
.irt-score-fill {
  height: 100%;
  border-radius: 999px;
  transform-origin: left;
  transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  background: #0f172a;
}
.irt-score-marker {
  position: absolute; top: -6px;
  width: 2px; height: 24px;
  background: #0f172a;
  border-radius: 1px;
}

/* ---------- 21st.dev High-Craft Spotlight Cards ---------- */
.spotlight-card {
  position: relative;
  --mouse-x: 50%;
  --mouse-y: 50%;
}
.spotlight-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: radial-gradient(450px circle at var(--mouse-x) var(--mouse-y), rgba(15, 23, 42, 0.04), transparent 50%);
  opacity: 0;
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 1;
}
.spotlight-card:hover::after {
  opacity: 1;
}

/* Dark mode spotlight for Rapor Bento */
.spotlight-card-dark {
  position: relative;
  --mouse-x: 50%;
  --mouse-y: 50%;
}
.spotlight-card-dark::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: radial-gradient(480px circle at var(--mouse-x) var(--mouse-y), rgba(255, 255, 255, 0.07), transparent 50%);
  opacity: 0;
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 1;
}
.spotlight-card-dark:hover::after {
  opacity: 1;
}

/* ---------- Modern High-Craft Smooth Entrance Animations ---------- */
@keyframes smoothRise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-smooth-rise {
  animation: smoothRise 0.55s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.stagger-1 { animation-delay: 40ms; }
.stagger-2 { animation-delay: 90ms; }
.stagger-3 { animation-delay: 140ms; }
.stagger-4 { animation-delay: 190ms; }
.stagger-5 { animation-delay: 240ms; }

/* Interactive button physics */
.btn-press {
  transition: transform 0.18s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}
.btn-press:active {
  transform: scale(0.98);
}

/* ============================================================
   GLASSMORPHISM UNIFIED SLATE THEME (Anti-Slop / Executive BPPP)
   ============================================================ */
.glass-card-slate,
.glass-card-to1,
.glass-card-to2,
.glass-card-to3,
.glass-card-to4 {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 250, 252, 0.93) 100%);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1.5px solid rgba(226, 232, 240, 0.95);
  box-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.05), 0 2px 6px -1px rgba(0, 0, 0, 0.02);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.25s ease;
}

.glass-card-slate:hover,
.glass-card-to1:hover,
.glass-card-to2:hover,
.glass-card-to3:hover,
.glass-card-to4:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 36px -8px rgba(15, 23, 42, 0.12), 0 4px 12px -2px rgba(0, 0, 0, 0.04);
  border-color: rgba(148, 163, 184, 0.9);
}

/* Reduced Motion Safety */
@media (prefers-reduced-motion: reduce) {
  .animate-smooth-rise,
  .count-animate,
  .screen,
  .modal-box {
    animation: none !important;
    transition: none !important;
  }
  .spotlight-card::after,
  .spotlight-card-dark::after {
    display: none !important;
  }
}

/* ---------- Print ---------- */
@media print {
  .no-print { display: none !important; }
  body { font-size: 12pt; }
  .review-card { break-inside: avoid; page-break-inside: avoid; }
}

/* ============================================================
   FRAMER-STYLE LIQUID FLOW BUTTON & CARD (Portfolio Standard)
   Efek Aliran Cairan Mengalir Membesar (Expanding Bubble Flow)
   Biru Navy + Kuning -> Mengalir Hijau Emerald + Putih
   Hover In: 1.05s (Sinematis & Terasa Mengalir)
   Hover Out: 0.6s (Cepat & Responsif)
   ============================================================ */
.flow-qris-card {
  position: relative;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), 
              box-shadow 0.35s cubic-bezier(0.16, 1, 0.3, 1), 
              border-color 0.35s ease;
  cursor: default;
}

.flow-qris-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px -4px rgba(15, 23, 42, 0.08);
  border-color: #cbd5e1;
}

.flow-qris-btn {
  position: relative;
  overflow: hidden;
  background-color: #0f172a; /* Slate-900 / Deep Navy */
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 0.75rem; /* rounded-xl */
  cursor: pointer;
  transition: border-color 0.4s cubic-bezier(0.16, 1, 0.3, 1), 
              box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1), 
              transform 0.2s ease;
  z-index: 1;
}

/* Layer Cairan Mengalir (Liquid Bubble Flow) persis seperti Framer 'Color BG' */
.flow-qris-btn .flow-bg {
  position: absolute;
  width: 24px;
  height: 24px;
  bottom: -12px;
  left: -12px;
  border-radius: 9999px;
  background: linear-gradient(135deg, #10b981 0%, #059669 50%, #047857 100%); /* Hijau Emerald Segar */
  transform: scale(0);
  transform-origin: center center;
  /* KETIKA MOUSE KELUAR: Pas sesuai timing responsif (0.6s) */
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
  z-index: 1;
}

/* KETIKA MOUSE MENYENTUH TOMBOL SECARA PAS: Diperlambat (1.05s) agar proses aliran terlihat megah & dinikmati */
.flow-qris-btn:hover .flow-bg {
  transform: scale(42); /* Mengalir dan meluap menyelimuti seluruh tombol secara bundar/organik */
  transition: transform 1.05s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Shimmer Light Wave Flow */
.flow-qris-btn .flow-shimmer {
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.28), transparent);
  transform: skewX(-20deg);
  pointer-events: none;
  z-index: 2;
}

.flow-qris-btn:hover {
  border-color: #10b981;
  box-shadow: 0 4px 18px -2px rgba(16, 185, 129, 0.4);
}

.flow-qris-btn:hover .flow-shimmer {
  animation: qrisFlowSheen 1.15s cubic-bezier(0.16, 1, 0.3, 1) 0.12s 1 forwards;
}

@keyframes qrisFlowSheen {
  0% { left: -100%; }
  100% { left: 220%; }
}

/* Konten Ikon & Teks */
.flow-qris-btn .flow-content {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  width: 100%;
}

.flow-qris-btn .flow-icon {
  color: #fbbf24; /* Kuning Emas Awal */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: color 0.65s cubic-bezier(0.16, 1, 0.3, 1), transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.flow-qris-btn .flow-icon svg {
  color: inherit;
}

.flow-qris-btn .flow-text {
  color: #ffffff; /* Putih */
  transition: color 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Saat disentuh tombolnya: Ikon kuning mengalir berubah jadi putih murni menyala */
.flow-qris-btn:hover .flow-icon {
  color: #ffffff;
  transform: scale(1.08);
}

.flow-qris-btn:hover .flow-text {
  color: #ffffff;
}

/* ============================================================
   STRICT DECOUPLING GUARD (Zero Slop / Explicit Isolation)
   Hovering anywhere on .flow-qris-card NEVER activates .flow-qris-btn
   Only direct hover on .flow-qris-btn:hover triggers the liquid flow
   ============================================================ */
.flow-qris-card:hover .flow-qris-btn:not(:hover) {
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: none;
}
.flow-qris-card:hover .flow-qris-btn:not(:hover) .flow-bg {
  transform: scale(0) !important;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.flow-qris-card:hover .flow-qris-btn:not(:hover) .flow-shimmer {
  animation: none !important;
}
.flow-qris-card:hover .flow-qris-btn:not(:hover) .flow-icon {
  color: #fbbf24;
  transform: scale(1);
}

/* ============================================================
   MODERN EXECUTIVE HEADER & PROFILE DROPDOWN (Hybrid Hover & Click)
   Glassmorphism, Live Status Indicator, Framer Slide-Down Physics
   ============================================================ */

/* Glassmorphism Navigation Bar Header (Anti-Slop / Executive BPPP) */
.header-blur-glass {
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border-bottom: 1px solid rgba(226, 232, 240, 0.85);
  box-shadow: 0 1px 3px 0 rgba(15, 23, 42, 0.03), 0 1px 2px -1px rgba(15, 23, 42, 0.02);
  transition: background-color 0.25s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.25s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Live Server Status Micro-Pulse */
@keyframes serverLivePulse {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.2); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.8; }
}

@keyframes twPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

.animate-pulse {
  animation: twPulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Token Balance Pill Micro-Glow */
.header-token-glow {
  position: relative;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.header-token-glow:hover {
  box-shadow: 0 0 16px 2px rgba(245, 158, 11, 0.22), 0 2px 8px -1px rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.45);
  transform: translateY(-1px);
}
.header-token-glow:active {
  transform: translateY(0) scale(0.98);
}

/* Chevron Icon Rotation 180deg */
.header-chevron {
  display: inline-block;
  transform-origin: center center;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.header-profile-container.is-open .header-chevron {
  transform: rotate(180deg);
}

/* Dropdown Menu Container with Invisible Bridge (Safe Buffer) */
.header-profile-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 310px;
  background: #ffffff;
  border-radius: 1.125rem; /* rounded-2xl */
  border: 1px solid rgba(226, 232, 240, 0.95);
  box-shadow: 0 20px 40px -8px rgba(15, 23, 42, 0.16), 0 0 0 1px rgba(15, 23, 42, 0.04);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px) scale(0.97);
  transform-origin: top right;
  transition: opacity 0.22s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.22s cubic-bezier(0.16, 1, 0.3, 1),
              visibility 0.22s;
  z-index: 50;
  pointer-events: none;
}

/* Invisible Hover Bridge Buffer agar mouse saat meluncur ke dropdown tidak menutup menu */
.header-profile-dropdown::before {
  content: "";
  position: absolute;
  top: -14px;
  left: -10px;
  right: -10px;
  height: 14px;
  pointer-events: auto;
}

/* Active / Open state: via Click (.is-open) */
.header-profile-container.is-open .header-profile-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
  pointer-events: auto;
  transition: opacity 0.24s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.24s cubic-bezier(0.16, 1, 0.3, 1),
              visibility 0s;
}

/* Hover support ONLY for desktop / fine pointer devices */
@media (hover: hover) and (pointer: fine) {
  .header-profile-container:hover .header-chevron {
    transform: rotate(180deg);
  }
  .header-profile-container:hover .header-profile-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
    pointer-events: auto;
    transition: opacity 0.24s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.24s cubic-bezier(0.16, 1, 0.3, 1),
                visibility 0s;
  }
}

/* Dropdown Sub-menu Items */
.dropdown-menu-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.625rem 0.75rem;
  border-radius: 0.75rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #334155;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
  text-decoration: none;
}
.dropdown-menu-item:hover {
  background-color: #f8fafc;
  color: #0f172a;
  transform: translateX(2px);
}
.dropdown-menu-item:hover .item-icon {
  color: #4f46e5;
  transform: scale(1.1);
}
.dropdown-menu-item .item-icon {
  transition: transform 0.2s ease, color 0.2s ease;
}

/* ============================================================
   MOBILE ENTRY-LEVEL & LOW-POWER HARDWARE ACCELERATION SHIELD
   Optimasi Khusus Layar HP: Anti-Lag, 60 FPS Compositor, Hemat Baterai
   ============================================================ */

/* CSS Content Visibility: Hemat CPU & Memori pada Daftar Soal / Pembahasan Panjang */
.review-card {
  content-visibility: auto;
  contain-intrinsic-size: 0 160px;
}

/* Optimasi Timer Kritis: Hilangkan GPU Transform Scaling Loop yang Memboroskan Frame */
.timer-critical {
  animation: none !important;
  color: #ef4444 !important;
  background-color: #fef2f2 !important;
  border-color: #fca5a5 !important;
  font-weight: 800 !important;
}

/* Penyesuaian Khusus Layar Ponsel & Tablet Entry-Level (< 768px) */
@media (max-width: 768px) {
  /* 1. Hilangkan Backdrop-Filter Blur yang Membebani GPU Entry-Level (Mali/PowerVR) */
  .modal-overlay,
  #cbt-wallet-modal-overlay,
  .header-blur-glass,
  .glass-card-slate,
  .glass-card-to1,
  .glass-card-to2,
  .glass-card-to3,
  .glass-card-to4,
  .spotlight-card-dark,
  .nav-drawer-backdrop {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }

  /* 2. Gunakan Warna Solid/Semi-Solid Berkualitas Tinggi & Ringan */
  .header-blur-glass {
    background-color: #ffffff !important;
  }

  .modal-overlay,
  #cbt-wallet-modal-overlay {
    background-color: rgba(15, 23, 42, 0.8) !important;
  }

  .nav-drawer-backdrop {
    background-color: rgba(15, 23, 42, 0.55) !important;
  }

  .spotlight-card-dark {
    background-color: #0f172a !important;
  }

  .glass-card-slate,
  .glass-card-to1,
  .glass-card-to2,
  .glass-card-to3,
  .glass-card-to4 {
    background: #ffffff !important;
  }

  /* 3. Ringankan Box-Shadow Multi-Layer Menjadi Single Subtle Shadow */
  .modal-box {
    box-shadow: 0 12px 30px -6px rgba(15, 23, 42, 0.25) !important;
  }

  .glass-card-slate,
  .glass-card-to1,
  .glass-card-to2,
  .glass-card-to3,
  .glass-card-to4,
  .to-card-item {
    box-shadow: 0 2px 6px -1px rgba(15, 23, 42, 0.06) !important;
  }

  /* 4. Nonaktifkan Efek Hover Mengambang di Touchscreen untuk Mencegah Sticky Hover */
  .option-btn:hover {
    border-color: #e2e8f0;
    background: #ffffff;
  }
  .option-btn.selected:hover {
    border-color: #0f172a;
    background: #f8fafc;
  }
}

/* ---------- Full-Width Footer & Safe Area Padding ---------- */
footer {
  width: 100% !important;
  max-width: 100vw !important;
  padding-bottom: calc(2.5rem + env(safe-area-inset-bottom, 16px)) !important;
}



