/* ============================================================
   LinguaPlay — Main Stylesheet
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800;900&display=swap');

/* ─── RESET & BASE ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg-base: #080812;
  --bg-surface: #0f0f1e;
  --bg-card: #141428;
  --bg-card-hover: #1a1a35;
  --border: rgba(255,255,255,0.07);
  --text-primary: #f0f0ff;
  --text-secondary: #8888aa;
  --text-muted: #555570;

  --korean: #f43f5e;
  --korean-glow: rgba(244,63,94,0.3);
  --english: #3b82f6;
  --english-glow: rgba(59,130,246,0.3);
  --toefl: #f59e0b;
  --toefl-glow: rgba(245,158,11,0.35);
  --xp: #eab308;
  --xp-glow: rgba(234,179,8,0.3);
  --success: #22c55e;
  --error: #ef4444;
  --warning: #f59e0b;
  --purple: #a855f7;
  --cyan: #06b6d4;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-full: 999px;

  --shadow-sm: 0 2px 8px rgba(0,0,0,0.4);
  --shadow-md: 0 4px 24px rgba(0,0,0,0.5);
  --shadow-lg: 0 8px 40px rgba(0,0,0,0.6);

  --transition: 0.2s cubic-bezier(0.4,0,0.2,1);
  --transition-slow: 0.4s cubic-bezier(0.4,0,0.2,1);
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
  max-width: 100vw;
  width: 100%;
}

body {
  font-family: 'Outfit', sans-serif;
  background: var(--bg-base);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  max-width: 100vw;
  width: 100%;
  line-height: 1.6;
}

/* Background animated gradient */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 20% 10%, rgba(168,85,247,0.08) 0%, transparent 60%),
    radial-gradient(ellipse 50% 40% at 80% 90%, rgba(59,130,246,0.07) 0%, transparent 60%),
    radial-gradient(ellipse 40% 30% at 50% 50%, rgba(244,63,94,0.04) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
}

#app {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  overflow-x: hidden;
  max-width: 100vw;
  width: 100%;
}

/* ─── VIEWS ─────────────────────────────────────────────────── */
.view { display: none; min-height: 100vh; }
.view.active { display: block; animation: fadeIn 0.3s ease; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ─── NAVIGATION ────────────────────────────────────────────── */
#main-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 28px;
  min-height: 72px;
  background: rgba(8,8,18,0.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

#main-nav.hidden { display: none; }

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  text-decoration: none;
}
.nav-brand:hover { opacity: 0.95; }

.nav-brand-logo {
  height: 54px;
  width: auto;
  max-width: 240px;
  object-fit: contain;
  filter: drop-shadow(0 3px 10px rgba(0,0,0,0.5));
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.25s ease;
}
.nav-brand:hover .nav-brand-logo {
  transform: scale(1.05);
  filter: drop-shadow(0 4px 16px rgba(6, 182, 212, 0.5));
}

.nav-stats {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.stat-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  padding: 6px 14px;
  font-size: 0.9rem;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
}
.stat-icon { font-size: 1rem; }
.stat-value { color: var(--xp); }
.stat-label { color: var(--text-secondary); font-size: 0.75rem; }

#nav-hearts {
  white-space: nowrap;
  flex-shrink: 0;
}
#hearts-display,
#lesson-hearts-display {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  letter-spacing: 2px;
  font-size: 0.95rem;
}

/* ─── ONBOARDING ─────────────────────────────────────────────── */
#view-onboarding {
  display: none;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 24px;
}

#view-onboarding.active {
  display: flex;
}

.onboarding-container {
  width: 100%;
  max-width: 500px;
  text-align: center;
}

.onboarding-hero { margin-bottom: 32px; }

.onboarding-brand-badge {
  display: flex;
  justify-content: center;
  margin-bottom: 14px;
}

.onboarding-hero-logo {
  max-width: 340px;
  width: 90%;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 12px 35px rgba(0, 0, 0, 0.6));
  animation: floatMascot 4s ease-in-out infinite;
}

@keyframes floatMascot {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.onboarding-brand-meaning {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.meaning-chip {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(8px);
  border-radius: var(--radius-full);
  padding: 5px 14px;
  font-size: 0.85rem;
  color: var(--text-primary);
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}
.meaning-chip strong {
  color: var(--cyan);
}

.hero-sub {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 460px;
  margin: 0 auto;
}

.onboarding-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: center;
}

.form-label {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-secondary);
  align-self: flex-start;
}

.form-input {
  width: 100%;
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  font-size: 1.1rem;
  font-family: 'Outfit', sans-serif;
  color: var(--text-primary);
  outline: none;
  transition: var(--transition);
}

.form-input:focus {
  border-color: var(--purple);
  box-shadow: 0 0 0 4px rgba(168,85,247,0.15);
}

.form-input.shake {
  animation: shake 0.5s ease;
  border-color: var(--error);
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-8px); }
  40%, 80% { transform: translateX(8px); }
}

/* ─── BUTTONS ────────────────────────────────────────────────── */
.btn-primary {
  background: linear-gradient(135deg, var(--purple), #7c3aed);
  color: white;
  border: none;
  border-radius: var(--radius-full);
  padding: 14px 32px;
  font-size: 1rem;
  font-weight: 700;
  font-family: 'Outfit', sans-serif;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 4px 20px rgba(168,85,247,0.35);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(168,85,247,0.5);
  filter: brightness(1.1);
}
.btn-primary:active { transform: translateY(0); }

.btn-large { padding: 18px 48px; font-size: 1.15rem; width: 100%; }

.btn-secondary {
  background: transparent;
  color: var(--text-secondary);
  border: 2px solid var(--border);
  border-radius: var(--radius-full);
  padding: 14px 28px;
  font-size: 1rem;
  font-weight: 600;
  font-family: 'Outfit', sans-serif;
  cursor: pointer;
  transition: var(--transition);
}
.btn-secondary:hover { border-color: var(--text-secondary); color: var(--text-primary); }

.onboarding-divider {
  display: flex;
  align-items: center;
  width: 100%;
  margin: 6px 0;
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.onboarding-divider::before,
.onboarding-divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid var(--border);
}
.onboarding-divider span {
  padding: 0 14px;
}

.btn-login-onboard {
  border-color: rgba(168, 85, 247, 0.4);
  color: #c084fc;
  background: rgba(168, 85, 247, 0.08);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.btn-login-onboard:hover {
  border-color: var(--purple);
  background: rgba(168, 85, 247, 0.2);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(168, 85, 247, 0.3);
}

/* Google Sign-in Button */
.btn-google {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: #ffffff;
  color: #1f2937;
  border: 1px solid #e5e7eb;
  border-radius: var(--radius-full);
  padding: 14px 28px;
  font-size: 1.02rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  width: 100%;
  transition: var(--transition);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}
.btn-google:hover {
  background: #f8fafc;
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(255, 255, 255, 0.25);
}
.btn-google:active { transform: translateY(0); }
.google-icon { flex-shrink: 0; }

.onboarding-auth-actions {
  display: flex;
  gap: 12px;
  width: 100%;
}
.btn-action-half {
  flex: 1;
  font-size: 0.95rem;
  padding: 12px 14px;
  white-space: nowrap;
}

.guest-start-box {
  width: 100%;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
  text-align: left;
}
.guest-input-row {
  display: flex;
  gap: 10px;
  margin-top: 8px;
}
.guest-input-row .form-input {
  flex: 1;
  padding: 12px 16px;
  font-size: 1rem;
}
.btn-guest-start {
  padding: 12px 24px;
  border-radius: var(--radius-lg);
  font-size: 1rem;
  font-weight: 700;
  white-space: nowrap;
}

/* Google Modal */
.google-modal-card {
  max-width: 440px;
  background: #18182a;
  border: 1px solid rgba(255, 255, 255, 0.12);
}
.google-modal-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
}
.google-modal-title {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 2px;
}
.google-modal-sub {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin: 0;
}
.google-modal-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.google-account-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  border: 1.5px solid rgba(66, 133, 244, 0.35);
  background: rgba(66, 133, 244, 0.08);
  cursor: pointer;
  transition: var(--transition);
}
.google-account-item:hover {
  background: rgba(66, 133, 244, 0.18);
  border-color: #4285F4;
  transform: translateY(-2px);
}
.google-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #4285F4, #34A853);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  font-weight: 800;
}
.google-account-info {
  flex: 1;
}
.google-account-name {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-primary);
}
.google-account-email {
  font-size: 0.82rem;
  color: var(--text-secondary);
}
.google-badge-fast {
  background: rgba(34, 197, 94, 0.18);
  color: #4ade80;
  border: 1px solid rgba(34, 197, 94, 0.3);
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
}
.google-custom-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.btn-auth-nav {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  color: var(--text-primary);
  border-radius: var(--radius-full);
  padding: 6px 14px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
}
.btn-auth-nav:hover {
  background: rgba(168, 85, 247, 0.2);
  border-color: var(--purple);
  color: white;
}

.user-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  padding: 5px 12px;
  font-size: 0.85rem;
  font-weight: 600;
}
.user-sync-status {
  color: #22c55e;
  font-size: 0.7rem;
  animation: pulse 2s infinite;
}
.btn-logout-nav {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.75rem;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  font-family: inherit;
}
.btn-logout-nav:hover {
  color: var(--error);
}

.btn-back {
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  border-radius: var(--radius-full);
  padding: 8px 20px;
  font-size: 0.9rem;
  font-weight: 600;
  font-family: 'Outfit', sans-serif;
  cursor: pointer;
  transition: var(--transition);
}
.btn-back:hover { background: rgba(255,255,255,0.1); color: var(--text-primary); }

.btn-audio {
  background: rgba(6,182,212,0.15);
  border: 1px solid rgba(6,182,212,0.3);
  color: var(--cyan);
  border-radius: var(--radius-full);
  padding: 12px 28px;
  font-size: 1rem;
  font-weight: 600;
  font-family: 'Outfit', sans-serif;
  cursor: pointer;
  transition: var(--transition);
}
.btn-audio:hover { background: rgba(6,182,212,0.25); transform: scale(1.04); }

.btn-quit {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.9rem;
  font-family: 'Outfit', sans-serif;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}
.btn-quit:hover { color: var(--error); background: rgba(239,68,68,0.1); }

/* ─── DASHBOARD ──────────────────────────────────────────────── */
.dashboard-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 32px 24px 80px;
}

.dashboard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 40px;
}

.greeting-mascot-row {
  display: flex;
  align-items: center;
  gap: 16px;
}

.dashboard-mascot-img {
  width: 60px;
  height: 60px;
  border-radius: 18px;
  object-fit: cover;
  box-shadow: 0 8px 24px rgba(6, 182, 212, 0.3);
  border: 2px solid rgba(255, 255, 255, 0.18);
  flex-shrink: 0;
  animation: floatMascot 4s ease-in-out infinite;
  transition: transform 0.25s ease;
}
.dashboard-mascot-img:hover {
  transform: scale(1.08) rotate(3deg);
}

.greeting { font-size: 1.9rem; font-weight: 800; }
.greeting-sub { color: var(--text-secondary); margin-top: 4px; }

/* Daily Goal Ring */
.daily-goal { display: flex; align-items: center; }
.goal-ring { position: relative; width: 90px; height: 90px; }

.circular-chart {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.circle-bg {
  fill: none;
  stroke: rgba(255,255,255,0.07);
  stroke-width: 3;
}

.circle {
  fill: none;
  stroke: var(--xp);
  stroke-width: 3;
  stroke-linecap: round;
  transition: stroke-dasharray 0.6s ease;
  filter: drop-shadow(0 0 6px var(--xp-glow));
}

.goal-text {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--xp);
  line-height: 1.1;
}

.goal-label { font-size: 0.55rem; color: var(--text-muted); font-weight: 500; }

/* Lang Cards */
.lang-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  margin-bottom: 40px;
}

.lang-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 28px;
  cursor: pointer;
  transition: var(--transition-slow);
  overflow: hidden;
}

.lang-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  opacity: 0;
  transition: var(--transition);
}

.korean-card::before { background: linear-gradient(135deg, rgba(244,63,94,0.08) 0%, transparent 60%); }
.english-card::before { background: linear-gradient(135deg, rgba(59,130,246,0.08) 0%, transparent 60%); }
.toefl-card::before { background: linear-gradient(135deg, rgba(245,158,11,0.08) 0%, transparent 60%); }

.lang-card:hover { transform: translateY(-4px); }
.lang-card:hover::before { opacity: 1; }
.korean-card:hover { border-color: rgba(244,63,94,0.3); box-shadow: 0 8px 40px rgba(244,63,94,0.15); }
.english-card:hover { border-color: rgba(59,130,246,0.3); box-shadow: 0 8px 40px rgba(59,130,246,0.15); }
.toefl-card:hover { border-color: rgba(245,158,11,0.35); box-shadow: 0 8px 40px rgba(245,158,11,0.18); }

.card-glow {
  position: absolute;
  top: -40px;
  right: -40px;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  opacity: 0.12;
  filter: blur(30px);
  pointer-events: none;
}
.korean-card .card-glow { background: var(--korean); }
.english-card .card-glow { background: var(--english); }
.toefl-card .card-glow { background: var(--toefl); }

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.card-flag { font-size: 2.2rem; line-height: 1; display: block; font-family: 'Segoe UI Emoji', 'Apple Color Emoji', 'Noto Color Emoji', sans-serif; }

.card-badge {
  background: rgba(255,255,255,0.08);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  padding: 4px 12px;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-secondary);
}

.card-title { font-size: 1.4rem; font-weight: 800; margin-bottom: 6px; }
.card-subtitle { font-size: 0.85rem; color: var(--text-secondary); margin-bottom: 20px; }

.progress-bar {
  height: 6px;
  background: rgba(255,255,255,0.07);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-bottom: 8px;
}

.progress-fill {
  height: 100%;
  border-radius: var(--radius-full);
  transition: width 0.8s cubic-bezier(0.4,0,0.2,1);
}

.korean-progress { background: linear-gradient(90deg, var(--korean), #fb7185); box-shadow: 0 0 8px var(--korean-glow); }
.english-progress { background: linear-gradient(90deg, var(--english), #60a5fa); box-shadow: 0 0 8px var(--english-glow); }
.toefl-progress { background: linear-gradient(90deg, var(--toefl), #fbbf24); box-shadow: 0 0 8px var(--toefl-glow); }

.progress-text { font-size: 0.78rem; color: var(--text-muted); }

.card-stats {
  display: flex;
  gap: 16px;
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin: 16px 0;
}

.card-action { margin-top: 8px; }

.btn-card {
  width: 100%;
  border: none;
  border-radius: var(--radius-full);
  padding: 12px 24px;
  font-size: 0.9rem;
  font-weight: 700;
  font-family: 'Outfit', sans-serif;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: var(--transition);
}

.korean-btn { background: linear-gradient(135deg, var(--korean), #fb7185); color: white; }
.korean-btn:hover { filter: brightness(1.1); transform: translateY(-1px); }
.english-btn { background: linear-gradient(135deg, var(--english), #60a5fa); color: white; }
.english-btn:hover { filter: brightness(1.1); transform: translateY(-1px); }
.toefl-btn { background: linear-gradient(135deg, var(--toefl), #d97706); color: white; }
.toefl-btn:hover { filter: brightness(1.1); transform: translateY(-1px); }

/* Achievements */
.section-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 16px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-size: 0.85rem;
}

.achievements-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}

.achievement-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  transition: var(--transition);
}

.achievement-item.earned {
  border-color: rgba(234,179,8,0.3);
  background: linear-gradient(135deg, rgba(234,179,8,0.05), var(--bg-card));
}

.achievement-item.locked { opacity: 0.4; filter: grayscale(0.7); }

.ach-icon { font-size: 1.6rem; }
.ach-title { font-size: 0.85rem; font-weight: 700; }
.ach-desc { font-size: 0.72rem; color: var(--text-muted); }
.ach-check { margin-left: auto; color: var(--success); font-weight: 700; }

/* ─── LESSON MAP ─────────────────────────────────────────────── */
.map-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 24px 20px 80px;
}

.map-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
  padding: 16px;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
}

.map-title { font-size: 1.4rem; font-weight: 800; }
.map-xp { font-weight: 700; color: var(--xp); }

/* Unit Section */
.unit-section {
  margin-bottom: 32px;
  position: relative;
}

.unit-section.unit-locked { opacity: 0.5; pointer-events: none; }

.unit-header {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-top: 3px solid var(--unit-color);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 16px;
}

.unit-icon-wrap {
  position: relative;
  width: 60px;
  height: 60px;
  min-width: 60px;
  background: rgba(255,255,255,0.06);
  border: 2px solid var(--unit-color);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
}

.unit-icon-wrap.complete { background: rgba(34,197,94,0.15); border-color: var(--success); }
.unit-check { position: absolute; top: -8px; right: -8px; background: var(--success); color: white; border-radius: 50%; width: 20px; height: 20px; display: flex; align-items: center; justify-content: center; font-size: 0.7rem; font-weight: 700; }

.unit-title { font-size: 1.2rem; font-weight: 800; margin-bottom: 2px; }
.unit-subtitle { font-size: 0.8rem; color: var(--text-secondary); margin-bottom: 8px; }
.unit-desc { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 12px; }

.unit-progress-bar {
  height: 4px;
  background: rgba(255,255,255,0.07);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-bottom: 4px;
}

.unit-progress-fill { height: 100%; border-radius: var(--radius-full); }
.unit-progress-text { font-size: 0.72rem; color: var(--text-muted); }

/* Lesson Nodes */
.lessons-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
}

.lesson-node {
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 16px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
}

.lesson-node.available:hover {
  border-color: var(--unit-color);
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}

.lesson-node.done {
  border-color: rgba(34,197,94,0.4);
  background: rgba(34,197,94,0.06);
}

.lesson-node.locked { cursor: not-allowed; opacity: 0.5; }

.lesson-node-icon { font-size: 2rem; margin-bottom: 8px; }
.lesson-node-title { font-size: 0.82rem; font-weight: 600; color: var(--text-secondary); margin-bottom: 8px; line-height: 1.3; }
.lesson-node-xp { font-size: 0.75rem; font-weight: 700; color: var(--xp); }

/* ─── LESSON CONTAINER ───────────────────────────────────────── */
.lesson-container {
  max-width: 660px;
  margin: 0 auto;
  padding: 20px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.lesson-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 32px;
  padding: 12px 0;
}

.lesson-progress-bar {
  flex: 1;
  height: 8px;
  background: rgba(255,255,255,0.08);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.lesson-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--purple), var(--cyan));
  border-radius: var(--radius-full);
  transition: width 0.5s ease;
  box-shadow: 0 0 10px rgba(168,85,247,0.4);
}

.lesson-hearts { font-size: 1.1rem; letter-spacing: 2px; }
.lesson-hearts.shake { animation: shake 0.5s ease; }

.lesson-content { flex: 1; display: flex; align-items: center; justify-content: center; }

/* ─── FLASHCARD ──────────────────────────────────────────────── */
.flashcard-wrapper {
  width: 100%;
  max-width: 500px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.flashcard-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.flashcard {
  width: 100%;
  min-height: 360px;
  perspective: 1000px;
  cursor: pointer;
  position: relative;
}

.fc-front, .fc-back {
  position: absolute;
  inset: 0;
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  transition: transform 0.6s cubic-bezier(0.4,0,0.2,1);
  text-align: center;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none;
}

.fc-front::-webkit-scrollbar,
.fc-back::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

.fc-back { transform: rotateY(180deg); }

.flashcard.flipped .fc-front { transform: rotateY(-180deg); }
.flashcard.flipped .fc-back { transform: rotateY(0deg); }

.flashcard:hover { box-shadow: 0 12px 40px rgba(0,0,0,0.4); }

.fc-char {
  font-size: clamp(3rem, 9vw, 5.2rem);
  font-weight: 800;
  margin-bottom: 12px;
  background: linear-gradient(135deg, var(--purple), var(--cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.15;
  word-break: break-word;
  max-width: 100%;
}

.fc-char.fc-char-word {
  font-size: clamp(2rem, 5.5vw, 2.8rem);
  line-height: 1.2;
}

.fc-char.fc-char-phrase {
  font-size: clamp(1.4rem, 4.5vw, 2rem);
  line-height: 1.25;
}

.fc-char.fc-char-title {
  font-size: clamp(1.15rem, 3.8vw, 1.6rem);
  line-height: 1.35;
  letter-spacing: 0.3px;
  margin-bottom: 10px;
}

.fc-romanization {
  font-size: clamp(0.95rem, 3.2vw, 1.3rem);
  font-weight: 600;
  color: var(--text-secondary);
  line-height: 1.4;
  max-width: 100%;
  word-break: break-word;
  margin-bottom: 14px;
}

.fc-tap-hint {
  margin-top: 10px;
  font-size: 0.8rem;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.fc-char-sm { font-size: 2rem; font-weight: 700; color: var(--purple); margin-bottom: 6px; }
.fc-pronunciation { font-size: 1.15rem; font-weight: 600; color: var(--cyan); margin-bottom: 12px; }

.fc-example {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  margin-bottom: 10px;
  width: 100%;
}

.fc-ex-text { font-size: 1.05rem; font-weight: 700; margin-bottom: 4px; color: var(--text-primary); }
.fc-ex-rom {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: var(--radius-sm);
  padding: 3px 10px;
  margin: 4px 0 6px;
  font-size: 0.88rem;
  color: #38bdf8;
}
.fc-rom-icon { font-size: 0.9rem; }
.fc-rom-label { font-size: 0.75rem; text-transform: uppercase; color: #7dd3fc; font-weight: 700; letter-spacing: 0.04em; }
.fc-rom-value { font-weight: 700; color: #bae6fd; }

.fc-ex-meaning { font-size: 0.85rem; color: var(--text-muted); }

.fc-rule-box {
  background: rgba(244, 63, 94, 0.08);
  border: 1.5px solid rgba(244, 63, 94, 0.3);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  margin: 8px 0;
  text-align: left;
  width: 100%;
  box-shadow: 0 4px 16px rgba(244, 63, 94, 0.08);
}
.fc-rule-badge {
  font-size: 0.78rem;
  font-weight: 800;
  color: #fb7185;
  margin-bottom: 6px;
  letter-spacing: 0.02em;
}
.fc-rule-desc {
  font-size: 0.82rem;
  line-height: 1.55;
  color: #f1f5f9;
}

.fc-tip { font-size: 0.78rem; color: var(--text-secondary); font-style: italic; margin-top: 4px; }

.fc-actions {
  display: flex;
  gap: 12px;
  width: 100%;
}

.btn-prev-fc {
  padding: 12px 20px;
  font-weight: 700;
  border-radius: var(--radius-full);
}

.btn-next-fc { flex: 1; }

/* ─── VERB DRILL ─────────────────────────────────────────────── */
.verb-drill-wrapper {
  width: 100%;
  max-width: 580px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.verb-drill-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.verb-card {
  width: 100%;
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 32px;
}

.verb-meaning {
  text-align: center;
  font-size: 1rem;
  color: var(--text-muted);
  margin-bottom: 24px;
  font-style: italic;
}

.verb-forms {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.verb-form-box {
  background: rgba(255,255,255,0.04);
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  text-align: center;
  min-width: 130px;
  transition: var(--transition);
}

.verb-form-box.v1 { border-color: rgba(59,130,246,0.4); }
.verb-form-box.v2 { border-color: rgba(168,85,247,0.4); }
.verb-form-box.v3 { border-color: rgba(34,197,94,0.4); }

.vf-label { font-size: 0.7rem; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 8px; }
.vf-word { font-size: 1.3rem; font-weight: 800; }
.v1 .vf-word { color: var(--english); }
.v2 .vf-word { color: var(--purple); }
.v3 .vf-word { color: var(--success); }

.verb-arrow { font-size: 1.2rem; color: var(--text-muted); }

.verb-example {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
}

.verb-ex-label { font-size: 0.75rem; font-weight: 600; color: var(--text-muted); text-transform: uppercase; margin-bottom: 8px; }
.verb-ex-text { font-size: 0.92rem; color: var(--text-secondary); line-height: 1.6; }

/* ─── QUIZ ───────────────────────────────────────────────────── */
.quiz-wrapper {
  width: 100%;
  max-width: 560px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.quiz-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.quiz-char-display {
  font-size: clamp(2.5rem, 8vw, 4.5rem);
  font-weight: 800;
  color: var(--korean);
  padding: 16px;
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  width: 100%;
  text-align: center;
}

.quiz-question {
  font-size: 1.2rem;
  font-weight: 700;
  text-align: center;
  line-height: 1.4;
}

.quiz-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  width: 100%;
}

.quiz-option {
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  font-size: 1rem;
  font-weight: 600;
  font-family: 'Outfit', sans-serif;
  color: var(--text-primary);
  cursor: pointer;
  transition: var(--transition);
  text-align: center;
}

.quiz-option:hover:not(:disabled) {
  border-color: var(--purple);
  background: rgba(168,85,247,0.08);
  transform: translateY(-2px);
}

.quiz-option.correct {
  border-color: var(--success);
  background: rgba(34,197,94,0.12);
  color: var(--success);
  animation: popIn 0.3s ease;
}

.quiz-option.wrong {
  border-color: var(--error);
  background: rgba(239,68,68,0.12);
  color: var(--error);
  animation: shake 0.4s ease;
}

.quiz-option.pop, .quiz-option.correct.pop { animation: popIn 0.3s ease; }

@keyframes popIn {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

/* ─── MATCH GAME ─────────────────────────────────────────────── */
.match-wrapper {
  width: 100%;
  max-width: 620px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.match-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.match-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  width: 100%;
}

.match-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.match-item {
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  font-size: 0.95rem;
  font-weight: 600;
  font-family: 'Outfit', sans-serif;
  color: var(--text-primary);
  cursor: pointer;
  transition: var(--transition);
  text-align: center;
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.match-item:hover:not(:disabled) {
  border-color: var(--purple);
  background: rgba(168,85,247,0.08);
}

.match-item.selected {
  border-color: var(--purple);
  background: rgba(168,85,247,0.15);
  transform: scale(1.03);
  box-shadow: 0 0 16px rgba(168,85,247,0.25);
}

.match-item.matched {
  border-color: var(--success);
  background: rgba(34,197,94,0.1);
  color: var(--success);
  cursor: default;
  animation: popIn 0.35s ease;
}

.match-item.wrong-flash {
  border-color: var(--error);
  background: rgba(239,68,68,0.12);
  animation: shake 0.35s ease;
}

.match-progress {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
}

/* ─── FILL IN BLANK ──────────────────────────────────────────── */
.fill-wrapper {
  width: 100%;
  max-width: 560px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.fill-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  text-align: center;
}

.fill-context {
  background: rgba(234,179,8,0.07);
  border: 1px solid rgba(234,179,8,0.2);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  font-size: 0.9rem;
  color: var(--text-secondary);
  font-style: italic;
}

.fill-sentence {
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  font-size: 1.1rem;
  font-weight: 600;
  line-height: 2;
  text-align: center;
}

.fill-blank {
  display: inline-block;
  border-bottom: 3px solid var(--purple);
  color: var(--purple);
  padding: 0 8px;
  min-width: 120px;
  font-style: italic;
}

.fill-hint {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-style: italic;
}

.fill-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.fill-option {
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
  font-size: 0.95rem;
  font-weight: 600;
  font-family: 'Outfit', sans-serif;
  color: var(--text-primary);
  cursor: pointer;
  transition: var(--transition);
  text-align: center;
}

.fill-option:hover:not(:disabled) {
  border-color: var(--purple);
  background: rgba(168,85,247,0.08);
  transform: translateY(-2px);
}

.fill-option.correct {
  border-color: var(--success);
  background: rgba(34,197,94,0.12);
  color: var(--success);
  animation: popIn 0.3s ease;
}

.fill-option.wrong {
  border-color: var(--error);
  background: rgba(239,68,68,0.12);
  color: var(--error);
  animation: shake 0.4s ease;
}

/* ─── RESULT SCREEN ──────────────────────────────────────────── */
#view-result {
  display: none;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 80px);
  padding: 40px 20px;
  width: 100%;
}
#view-result.active {
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
}

.result-container {
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
}

.result-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 28px 24px 24px;
  text-align: center;
  position: relative;
  z-index: 10;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
}

.result-icon { font-size: 3rem; margin-bottom: 10px; animation: bounceIn 0.5s ease; }

@keyframes bounceIn {
  0% { transform: scale(0); opacity: 0; }
  60% { transform: scale(1.2); }
  100% { transform: scale(1); opacity: 1; }
}

.result-title { font-size: 1.7rem; font-weight: 900; margin-bottom: 4px; }
.result-sub { color: var(--text-secondary); margin-bottom: 18px; font-size: 0.95rem; }

.result-stats {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 20px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
}

.result-stat { text-align: center; }
.result-stat-icon { display: block; font-size: 1.3rem; margin-bottom: 4px; }
.result-stat-value { display: block; font-size: 1.4rem; font-weight: 900; color: var(--xp); }
.result-stat-label { display: block; font-size: 0.72rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; font-weight: 600; margin-top: 2px; }

.result-actions {
  display: flex;
  gap: 10px;
  flex-direction: column;
}

.btn-repeat-drill {
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: #fbbf24;
  font-weight: 600;
  transition: var(--transition);
}

.btn-repeat-drill:hover {
  background: rgba(245, 158, 11, 0.22);
  border-color: #f59e0b;
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(245, 158, 11, 0.25);
}

.btn-repeat-drill.repeat-highlight {
  animation: pulseRepeat 2s infinite ease-in-out;
  border-color: #f59e0b;
}

.locked-next-btn {
  background: rgba(255, 255, 255, 0.05) !important;
  border: 1px dashed rgba(255, 255, 255, 0.25) !important;
  color: var(--text-muted) !important;
  cursor: pointer !important;
  opacity: 0.85;
  transition: var(--transition);
}

.locked-next-btn:hover {
  background: rgba(239, 68, 68, 0.12) !important;
  border-color: rgba(239, 68, 68, 0.5) !important;
  color: #fca5a5 !important;
  transform: translateY(-1px);
}

@keyframes pulseRepeat {
  0%, 100% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.4); }
  50% { box-shadow: 0 0 0 8px rgba(245, 158, 11, 0); }
}

/* ─── CONFETTI CANVAS ────────────────────────────────────────── */
#confetti-canvas {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  display: none;
}

/* ─── TOAST ──────────────────────────────────────────────────── */
.toast {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius-full);
  font-size: 0.95rem;
  font-weight: 600;
  z-index: 9000;
  backdrop-filter: blur(16px);
  animation: slideUp 0.25s ease;
  box-shadow: var(--shadow-lg);
  white-space: nowrap;
}

@keyframes slideUp {
  from { transform: translateX(-50%) translateY(20px); opacity: 0; }
  to { transform: translateX(-50%) translateY(0); opacity: 1; }
}

.toast.hidden { display: none; }

.toast-success { background: rgba(34,197,94,0.15); border: 1px solid rgba(34,197,94,0.4); color: var(--success); }
.toast-error { background: rgba(239,68,68,0.15); border: 1px solid rgba(239,68,68,0.4); color: var(--error); }
.toast-warning { background: rgba(245,158,11,0.15); border: 1px solid rgba(245,158,11,0.4); color: var(--warning); }
.toast-info { background: rgba(168,85,247,0.15); border: 1px solid rgba(168,85,247,0.4); color: var(--purple); }

/* ─── SCROLLBAR ──────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-base); }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.25); }

/* ─── TOEFL MAP & READING QUIZ ───────────────────────────── */
.toefl-info-banner {
  display: flex;
  align-items: center;
  gap: 16px;
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  margin-bottom: 28px;
}
.toefl-banner-icon { font-size: 2rem; flex-shrink: 0; }
.toefl-info-banner strong { color: #fbbf24; font-size: 1rem; display: block; margin-bottom: 4px; }
.toefl-info-banner p { color: var(--text-secondary); font-size: 0.88rem; margin: 0; line-height: 1.5; }

/* Reading Quiz Container */
.reading-quiz-container {
  max-width: 760px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.passage-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 24px 28px;
  box-shadow: var(--shadow-sm);
}

.passage-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.passage-badge {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: var(--radius-full);
}

.passage-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 14px;
}

.passage-text {
  font-size: 0.96rem;
  line-height: 1.75;
  color: #d1d5db;
  max-height: 240px;
  overflow-y: auto;
  padding-right: 10px;
}

.reading-question-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 26px 28px;
}

.question-meta {
  font-size: 0.8rem;
  font-weight: 700;
  color: #fbbf24;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.question-heading {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 20px;
  line-height: 1.5;
}

.reading-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.reading-opt-btn {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  font-size: 0.95rem;
  color: var(--text-primary);
  text-align: left;
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
}

.reading-opt-btn:hover:not(:disabled) {
  border-color: #fbbf24;
  background: rgba(245, 158, 11, 0.06);
  transform: translateX(4px);
}

.reading-opt-letter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  font-weight: 700;
  font-size: 0.8rem;
  flex-shrink: 0;
}

.reading-opt-btn.correct {
  background: rgba(34, 197, 94, 0.15) !important;
  border-color: #22c55e !important;
  color: #86efac !important;
}

.reading-opt-btn.correct .reading-opt-letter {
  background: #22c55e;
  color: #052e16;
}

.reading-opt-btn.wrong {
  background: rgba(239, 68, 68, 0.15) !important;
  border-color: #ef4444 !important;
  color: #fca5a5 !important;
}

.reading-opt-btn.wrong .reading-opt-letter {
  background: #ef4444;
  color: white;
}

.explanation-box {
  margin-top: 18px;
  padding: 16px 18px;
  background: rgba(59, 130, 246, 0.08);
  border-left: 3px solid #3b82f6;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  line-height: 1.55;
  color: #93c5fd;
  animation: fadeIn 0.3s ease;
}

.reading-next-bar {
  margin-top: 20px;
  display: flex;
  justify-content: flex-end;
}

/* ─── HANGUL BANNER & GUIDE MODAL ────────────────────────── */
.korean-hangul-rule-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: linear-gradient(135deg, rgba(244, 63, 94, 0.12), rgba(168, 85, 247, 0.08));
  border: 1.5px solid rgba(244, 63, 94, 0.35);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  margin-bottom: 24px;
  cursor: pointer;
  transition: var(--transition);
}
.korean-hangul-rule-banner:hover {
  transform: translateY(-2px);
  border-color: rgba(244, 63, 94, 0.6);
  box-shadow: 0 8px 30px rgba(244, 63, 94, 0.15);
}
.hangul-banner-left {
  display: flex;
  align-items: center;
  gap: 14px;
}
.hangul-banner-icon { font-size: 2rem; flex-shrink: 0; }
.hangul-banner-title { font-weight: 800; font-size: 1rem; color: #fb7185; margin-bottom: 3px; }
.hangul-banner-sub { font-size: 0.85rem; color: var(--text-secondary); margin: 0; }
.hangul-banner-btn {
  background: var(--korean);
  color: white;
  padding: 8px 16px;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 700;
  white-space: nowrap;
}

/* Modal Overlay & Card */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(4, 4, 10, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 99999 !important;
  padding: 20px;
}
.modal-overlay.active {
  display: flex;
  animation: fadeIn 0.25s ease;
}

.modal-card {
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 680px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
}
.modal-title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}
.modal-title-icon { font-size: 1.4rem; }
.modal-title { font-size: 1.15rem; font-weight: 800; color: var(--text-primary); }
.modal-close-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}
.modal-close-btn:hover {
  color: var(--error);
  background: rgba(239, 68, 68, 0.1);
}

.modal-body {
  padding: 24px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
}

/* Guide Sections inside Modal */
.guide-section {
  display: flex;
  gap: 16px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px;
}
.guide-num {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(244, 63, 94, 0.2);
  color: var(--korean);
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 0.95rem;
}
.guide-num.special {
  background: rgba(168, 85, 247, 0.25);
  color: #c084fc;
}
.guide-content { flex: 1; }
.guide-content h4 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}
.guide-content p {
  font-size: 0.9rem;
  line-height: 1.6;
  color: #cbd5e1;
  margin-bottom: 10px;
}

.guide-rule-badge {
  background: rgba(234, 179, 8, 0.1);
  border-left: 3px solid #eab308;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  color: #fde047;
  line-height: 1.5;
}

/* Compare Grid */
.guide-compare-grid {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 14px 0 8px;
}
.compare-card {
  flex: 1;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.compare-card.highlight {
  background: rgba(34, 197, 94, 0.08);
  border-color: rgba(34, 197, 94, 0.35);
}
.compare-hangeul {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--text-primary);
}
.compare-label {
  font-size: 0.82rem;
  color: var(--text-secondary);
}
.compare-status {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-full);
}
.compare-status.bad { background: rgba(239, 68, 68, 0.15); color: #fca5a5; }
.compare-status.good { background: rgba(34, 197, 94, 0.15); color: #86efac; }
.compare-arrow { font-size: 1.5rem; color: var(--text-muted); font-weight: 700; }
.guide-note { font-size: 0.85rem; color: #94a3b8; font-style: italic; margin-top: 6px; }

/* Position Grid */
.position-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 10px;
}
.pos-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px;
}
.pos-badge {
  font-size: 0.78rem;
  font-weight: 800;
  color: #fb7185;
  margin-bottom: 8px;
}
.pos-badge.horizontal {
  color: #38bdf8;
}
.pos-examples {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}
.pos-chip {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 4px 8px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}
.pos-chip:hover {
  background: rgba(244, 63, 94, 0.2);
  border-color: var(--korean);
}

/* Batchim Spotlight */
.batchim-spotlight {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 10px;
}
.spotlight-anatomy {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(168, 85, 247, 0.1);
  border: 1px solid rgba(168, 85, 247, 0.3);
  border-radius: var(--radius-md);
  padding: 14px 18px;
}
.anatomy-block {
  display: flex;
  align-items: center;
  gap: 18px;
}
.anatomy-char {
  font-size: 3rem;
  font-weight: 900;
  color: #d8b4fe;
  line-height: 1;
}
.anatomy-legend {
  font-size: 0.85rem;
  line-height: 1.5;
  color: #e2e8f0;
}
.anatomy-result {
  margin-top: 4px;
  font-size: 0.95rem;
  color: #fde047;
}

.spotlight-examples {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.ex-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 14px;
}
.ex-korean { font-size: 1.2rem; font-weight: 800; color: var(--text-primary); width: 60px; }
.ex-breakdown { font-size: 0.85rem; color: #94a3b8; flex: 1; }
.ex-meaning { font-size: 0.85rem; font-weight: 600; color: #86efac; margin-right: 12px; }

.btn-micro-audio {
  background: rgba(6, 182, 212, 0.15);
  border: 1px solid rgba(6, 182, 212, 0.3);
  color: #38bdf8;
  border-radius: var(--radius-sm);
  padding: 3px 8px;
  font-size: 0.75rem;
  cursor: pointer;
  transition: var(--transition);
}
.btn-micro-audio:hover {
  background: rgba(6, 182, 212, 0.3);
}

/* ─── AUTH & MYSQL NAVIGATION STYLES ─────────────────────── */
.nav-auth-section {
  display: flex;
  align-items: center;
  margin-left: 12px;
}

.btn-auth-nav {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border);
  color: var(--text-primary);
  padding: 8px 16px;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
  display: flex;
  align-items: center;
  gap: 6px;
}
.btn-auth-nav:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.25);
  transform: translateY(-1px);
}

.user-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.3);
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
}
.user-pill-icon { font-size: 0.95rem; }
.user-pill-name { font-weight: 700; color: #86efac; max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-sync-status {
  color: #22c55e;
  font-size: 0.75rem;
  line-height: 1;
  animation: pulseDot 2s infinite;
}
@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

.btn-logout-nav {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.75rem;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  font-family: inherit;
}
.btn-logout-nav:hover {
  color: var(--error);
  background: rgba(239, 68, 68, 0.1);
}

/* Onboarding Divider & Login Button */
.onboarding-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 18px 0 12px;
  position: relative;
  width: 100%;
}
.onboarding-divider::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  height: 1px;
  background: rgba(255, 255, 255, 0.1);
}
.onboarding-divider span {
  position: relative;
  background: var(--bg-card);
  padding: 0 12px;
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: lowercase;
}

.btn-login-onboard {
  width: 100%;
  border-color: rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-primary);
  font-size: 0.95rem;
}
.btn-login-onboard:hover {
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
}

/* Auth Modal Styles */
.auth-modal-card {
  max-width: 460px;
}
.auth-modal-body {
  gap: 16px;
}
.auth-benefit-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(168, 85, 247, 0.1);
  border: 1px solid rgba(168, 85, 247, 0.25);
  padding: 10px 16px;
  border-radius: var(--radius-md);
  font-size: 0.84rem;
  color: #d8b4fe;
  line-height: 1.4;
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  background: rgba(255, 255, 255, 0.04);
  padding: 4px;
  border-radius: var(--radius-md);
}
.auth-tab-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  padding: 10px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
}
.auth-tab-btn.active {
  background: var(--bg-card);
  color: var(--text-primary);
  box-shadow: var(--shadow-sm);
}

.auth-alert {
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  line-height: 1.4;
}
.auth-alert.error {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #fca5a5;
}
.auth-alert.success {
  background: rgba(34, 197, 94, 0.15);
  border: 1px solid rgba(34, 197, 94, 0.35);
  color: #86efac;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
  text-align: left;
}

/* ─── MINI-DIALOGUE SIMULATOR STYLES ────────────────────────── */
.dialogue-cta-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.12) 0%, rgba(59, 130, 246, 0.12) 50%, rgba(244, 63, 94, 0.08) 100%);
  border: 1px solid rgba(168, 85, 247, 0.28);
  border-radius: var(--radius-lg);
  padding: 24px 28px;
  margin: 28px 0 32px 0;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}
.dialogue-cta-banner:hover {
  transform: translateY(-2px);
  border-color: rgba(168, 85, 247, 0.5);
  box-shadow: 0 8px 30px rgba(168, 85, 247, 0.2);
}
.dialogue-cta-badge {
  display: inline-block;
  padding: 4px 10px;
  background: linear-gradient(135deg, #a855f7, #6366f1);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: var(--radius-full);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.dialogue-cta-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 6px;
}
.dialogue-cta-desc {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.5;
  max-width: 680px;
  margin-bottom: 12px;
}
.dialogue-cta-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.dialogue-cta-tags span {
  padding: 4px 10px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  color: var(--text-primary);
}
.dialogue-cta-btn {
  white-space: nowrap;
  padding: 12px 22px;
  font-weight: 700;
}

/* Dialogue Hub */
.dialogue-hub-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 16px 16px 84px 16px;
  width: 100%;
  box-sizing: border-box;
}
.dialogue-hub-subtitle {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 20px;
  line-height: 1.5;
}
.dialogue-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  gap: 16px;
  width: 100%;
  box-sizing: border-box;
}
.dialogue-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}
.dialogue-card:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: var(--shadow-md);
}
.dialogue-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.dialogue-card-badge {
  font-size: 0.8rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
}
.dialogue-card-xp {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--xp);
}
.dialogue-card-title-group {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.dialogue-card-icon {
  font-size: 2rem;
  line-height: 1;
}
.dialogue-card-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-primary);
}
.dialogue-card-native {
  font-size: 0.88rem;
  color: var(--text-secondary);
}
.dialogue-card-desc {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.5;
  flex: 1;
}
.dialogue-card-partner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: var(--radius-md);
  font-size: 0.85rem;
}
.dialogue-card-avatar {
  font-size: 1.2rem;
}
.dialogue-card-partner-name {
  font-weight: 600;
  color: var(--text-primary);
}
.dialogue-card-partner-role {
  color: var(--text-muted);
  font-size: 0.78rem;
}

/* Active Simulation View */
.dialogue-container {
  max-width: 720px;
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 16px 16px 24px 16px;
}
.dialogue-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  background: rgba(20, 20, 40, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin-bottom: 16px;
  position: sticky;
  top: 14px;
  z-index: 20;
}
.dialogue-partner-info {
  display: flex;
  align-items: center;
  gap: 10px;
}
.partner-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #a855f7, #6366f1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  box-shadow: 0 2px 10px rgba(168, 85, 247, 0.3);
}
.partner-name {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-primary);
}
.partner-status {
  font-size: 0.75rem;
  color: var(--success);
}
.btn-toggle-rom {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  padding: 6px 12px;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
}
.btn-toggle-rom.active {
  background: rgba(168, 85, 247, 0.2);
  border-color: rgba(168, 85, 247, 0.5);
  color: #c084fc;
}

/* Chat Stream */
.dialogue-chat-stream {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 8px 4px 20px 4px;
  overflow-y: auto;
}
.chat-row {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  animation: chatSlideUp 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.chat-row.user {
  justify-content: flex-end;
}
@keyframes chatSlideUp {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

.chat-bubble {
  max-width: 82%;
  padding: 14px 18px;
  border-radius: 18px;
  position: relative;
  line-height: 1.5;
}
.chat-row.partner .chat-bubble {
  background: #181832;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-bottom-left-radius: 4px;
  color: var(--text-primary);
}
.chat-row.user .chat-bubble {
  background: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
  color: #ffffff;
  border-bottom-right-radius: 4px;
  box-shadow: 0 4px 16px rgba(99, 102, 241, 0.3);
}

.chat-text-main {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 4px;
}
.chat-text-rom {
  font-size: 0.85rem;
  color: #a5b4fc;
  margin-bottom: 4px;
}
.chat-text-meaning {
  font-size: 0.85rem;
  color: var(--text-secondary);
  border-top: 1px dashed rgba(255, 255, 255, 0.1);
  padding-top: 4px;
  margin-top: 4px;
}
.chat-row.user .chat-text-meaning {
  color: rgba(255, 255, 255, 0.85);
  border-top-color: rgba(255, 255, 255, 0.2);
}
.chat-audio-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.08);
  border: none;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  font-size: 0.85rem;
  color: var(--text-primary);
  cursor: pointer;
  margin-right: 6px;
  vertical-align: middle;
  transition: var(--transition);
}
.chat-audio-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.08);
}

/* Cultural Note in Chat */
.cultural-callout {
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  font-size: 0.85rem;
  color: #fde68a;
  line-height: 1.45;
  margin: 4px 0 0 46px;
  animation: fadeIn 0.3s ease;
}

/* Typing Indicator */
.dialogue-typing-indicator {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  background: #181832;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-full);
  width: fit-content;
  margin: 4px 0 12px 10px;
}
.typing-dot {
  width: 7px;
  height: 7px;
  background: #a855f7;
  border-radius: 50%;
  animation: typingBounce 1.2s infinite ease-in-out;
}
.typing-dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dot:nth-child(3) { animation-delay: 0.4s; }
@keyframes typingBounce {
  0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
  40% { transform: scale(1.1); opacity: 1; }
}
.typing-text {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-left: 4px;
}

/* Action Area */
.dialogue-action-area {
  background: rgba(15, 15, 30, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.4);
}
.dialogue-prompt-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: #c084fc;
}
.dialogue-options-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.dialogue-option-btn {
  background: #181832;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  text-align: left;
  cursor: pointer;
  transition: var(--transition);
  color: var(--text-primary);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.dialogue-option-btn:hover:not(:disabled) {
  background: #202042;
  border-color: rgba(168, 85, 247, 0.5);
  transform: translateY(-1px);
}
.dialogue-option-btn.selected-correct {
  background: rgba(34, 197, 94, 0.18) !important;
  border-color: var(--success) !important;
}
.dialogue-option-btn.selected-wrong {
  background: rgba(239, 68, 68, 0.18) !important;
  border-color: var(--error) !important;
}
.dialogue-opt-main {
  font-size: 1rem;
  font-weight: 700;
}
.dialogue-opt-sub {
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.dialogue-feedback-banner {
  padding: 12px 14px;
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  line-height: 1.45;
  animation: fadeIn 0.25s ease;
}
.dialogue-feedback-banner.correct {
  background: rgba(34, 197, 94, 0.15);
  border: 1px solid rgba(34, 197, 94, 0.4);
  color: #86efac;
}
.dialogue-feedback-banner.wrong {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #fca5a5;
}

/* Completed Summary Card */
.dialogue-finish-card {
  text-align: center;
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}
.dialogue-finish-icon {
  font-size: 3rem;
  animation: celebrate 0.6s ease;
}
.dialogue-phrases-summary {
  width: 100%;
  text-align: left;
  background: rgba(255, 255, 255, 0.04);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  margin: 10px 0;
  max-height: 180px;
  overflow-y: auto;
}
.dialogue-phrase-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.88rem;
}
.dialogue-phrase-item:last-child { border-bottom: none; }

/* ─── TOEFL CONVERSATION LISTENING (2-PERSON) ─────────────────── */
.convo-listening-wrapper {
  max-width: 760px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
  animation: fadeIn 0.35s ease;
}

.convo-hero-card {
  background: linear-gradient(145deg, #16162e 0%, #1c1c38 100%);
  border: 1px solid rgba(59, 130, 246, 0.25);
  border-radius: var(--radius-xl);
  padding: 24px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35), 0 0 25px rgba(59, 130, 246, 0.08);
  position: relative;
  overflow: hidden;
}

.convo-hero-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.convo-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(59, 130, 246, 0.15);
  border: 1px solid rgba(59, 130, 246, 0.35);
  border-radius: var(--radius-full);
  padding: 4px 12px;
  font-size: 0.8rem;
  font-weight: 700;
  color: #93c5fd;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.pulse-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #3b82f6;
  box-shadow: 0 0 8px #3b82f6;
  animation: pulse 1.5s infinite;
}

.convo-counter {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
}

.convo-scenario-title {
  font-size: 1.3rem;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 6px;
}

.convo-instruction {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin: 0 0 16px 0;
}

.convo-audio-controls {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

.btn-play-all {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-md);
  padding: 12px 20px;
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
  transition: var(--transition);
}

.btn-play-all:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.5);
}

.btn-transcript-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-primary);
  border-radius: var(--radius-md);
  padding: 12px 18px;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.btn-transcript-toggle:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.25);
}

.btn-transcript-toggle.active {
  background: rgba(59, 130, 246, 0.15);
  border-color: #3b82f6;
  color: #93c5fd;
}

/* Soundwave animation banner */
.convo-soundwave-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(59, 130, 246, 0.12);
  border: 1px solid rgba(59, 130, 246, 0.3);
  border-radius: var(--radius-md);
  padding: 10px 16px;
  margin-top: 14px;
  animation: fadeIn 0.25s ease;
}

.soundwave-bars {
  display: flex;
  align-items: center;
  gap: 3px;
  height: 20px;
}

.sw-bar {
  width: 3px;
  height: 100%;
  background: #60a5fa;
  border-radius: 2px;
  animation: soundwaveBounce 0.8s infinite ease-in-out;
}

.sw-bar:nth-child(2) { animation-delay: 0.15s; }
.sw-bar:nth-child(3) { animation-delay: 0.3s; }
.sw-bar:nth-child(4) { animation-delay: 0.45s; }
.sw-bar:nth-child(5) { animation-delay: 0.6s; }

@keyframes soundwaveBounce {
  0%, 100% { transform: scaleY(0.25); }
  50% { transform: scaleY(1); }
}

.soundwave-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #93c5fd;
}

/* Speakers grid */
.convo-speakers-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 18px;
}

.convo-speaker-card {
  background: #191932;
  border: 2px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: all 0.25s ease;
}

.convo-speaker-card.speaker-man {
  border-left: 4px solid #3b82f6;
}

.convo-speaker-card.speaker-woman {
  border-left: 4px solid #ec4899;
}

.convo-speaker-card.active-speaking {
  transform: translateY(-2px);
}

.convo-speaker-card.speaker-man.active-speaking {
  border-color: #3b82f6;
  box-shadow: 0 0 20px rgba(59, 130, 246, 0.4);
  background: #1c2242;
}

.convo-speaker-card.speaker-woman.active-speaking {
  border-color: #ec4899;
  box-shadow: 0 0 20px rgba(236, 72, 153, 0.4);
  background: #2a1c38;
}

.speaker-avatar {
  font-size: 1.8rem;
  line-height: 1;
}

.speaker-info {
  flex: 1;
}

.speaker-role {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-primary);
}

.speaker-snippet {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.btn-line-audio {
  background: rgba(255, 255, 255, 0.08);
  border: none;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  font-size: 0.9rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-primary);
  transition: var(--transition);
}

.btn-line-audio:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.1);
}

/* Transcript Drawer */
.convo-transcript-drawer {
  background: #121226;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
  padding: 16px;
  margin-top: 18px;
  animation: fadeIn 0.3s ease;
}

.transcript-drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.transcript-hint {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: normal;
}

.transcript-bubbles-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.transcript-bubble {
  padding: 10px 14px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.03);
}

.transcript-bubble.man {
  border-left: 3px solid #3b82f6;
}

.transcript-bubble.woman {
  border-left: 3px solid #ec4899;
}

.tb-speaker {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 2px;
}

.tb-en {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-primary);
}

.tb-id {
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-top: 4px;
  font-style: italic;
}

/* Question Area */
.convo-question-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 24px;
  box-shadow: var(--shadow-md);
}

.convo-question-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.question-narrator-badge {
  font-size: 0.82rem;
  font-weight: 700;
  color: #c084fc;
}

.btn-narrator-audio {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(192, 132, 252, 0.12);
  border: 1px solid rgba(192, 132, 252, 0.3);
  color: #c084fc;
  border-radius: var(--radius-full);
  padding: 4px 12px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.btn-narrator-audio:hover {
  background: rgba(192, 132, 252, 0.25);
  transform: translateY(-1px);
}

.convo-question-text {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.45;
  margin-bottom: 18px;
}

.convo-options-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.convo-option-btn {
  display: flex;
  align-items: center;
  gap: 14px;
  background: #181832;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
  padding: 14px 18px;
  text-align: left;
  cursor: pointer;
  transition: var(--transition);
  color: var(--text-primary);
  position: relative;
}

.convo-option-btn:hover:not(:disabled) {
  background: #202042;
  border-color: rgba(59, 130, 246, 0.5);
  transform: translateY(-1px);
}

.convo-opt-letter {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  font-weight: 800;
  font-size: 0.95rem;
  color: var(--text-primary);
  flex-shrink: 0;
}

.convo-opt-text {
  font-size: 0.95rem;
  line-height: 1.4;
  flex: 1;
}

.convo-option-btn.correct {
  background: rgba(34, 197, 94, 0.18) !important;
  border-color: var(--success) !important;
}

.convo-option-btn.correct .convo-opt-letter {
  background: var(--success);
  color: #ffffff;
}

.convo-option-btn.wrong {
  background: rgba(239, 68, 68, 0.18) !important;
  border-color: var(--error) !important;
}

.convo-option-btn.wrong .convo-opt-letter {
  background: var(--error);
  color: #ffffff;
}

/* ─── TOEFL SIMULATION CTA BANNERS ───────────────────────────── */
.toefl-sim-cta-banner {
  background: linear-gradient(135deg, #1e1b4b 0%, #311042 50%, #172554 100%);
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: var(--radius-xl);
  padding: 24px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35), 0 0 25px rgba(245, 158, 11, 0.1);
  transition: var(--transition);
  margin-top: 18px;
}
.toefl-sim-cta-banner:hover {
  transform: translateY(-2px);
  border-color: #f59e0b;
  box-shadow: 0 14px 35px rgba(0, 0, 0, 0.45), 0 0 30px rgba(245, 158, 11, 0.2);
}
.toefl-sim-cta-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: #fbbf24;
  border-radius: var(--radius-full);
  padding: 4px 12px;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.toefl-sim-cta-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 6px;
}
.toefl-sim-cta-desc {
  font-size: 0.9rem;
  color: #cbd5e1;
  line-height: 1.45;
  margin-bottom: 12px;
  max-width: 650px;
}
.toefl-sim-cta-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.toefl-sim-cta-tags span {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-full);
  padding: 3px 10px;
  font-size: 0.78rem;
  color: #e2e8f0;
}
.toefl-sim-cta-btn {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%) !important;
  color: #ffffff !important;
  box-shadow: 0 4px 16px rgba(245, 158, 11, 0.35) !important;
  flex-shrink: 0;
  padding: 12px 22px;
  font-weight: 700;
  border-radius: var(--radius-md);
}

.toefl-sim-map-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: linear-gradient(145deg, #1b203c 0%, #15182e 100%);
  border: 1px solid rgba(59, 130, 246, 0.3);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  margin: 16px 0;
  cursor: pointer;
  transition: var(--transition);
}
.toefl-sim-map-cta:hover {
  border-color: #3b82f6;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.2);
}
.sim-cta-icon {
  font-size: 2rem;
  flex-shrink: 0;
}
.sim-cta-info h4 {
  font-size: 1.05rem;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 4px;
}
.sim-cta-info p {
  font-size: 0.82rem;
  color: var(--text-secondary);
}

/* ─── TOEFL EXAM VIEW (TEST INTERFACE) ────────────────────────── */
.toefl-exam-container {
  max-width: 860px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-bottom: 60px;
}

.exam-top-bar {
  position: sticky;
  top: 10px;
  z-index: 100;
  background: rgba(18, 18, 36, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-lg);
  padding: 12px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.exam-title-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn-exam-quit {
  background: rgba(255, 255, 255, 0.08);
  border: none;
  border-radius: var(--radius-md);
  padding: 6px 12px;
  color: var(--text-secondary);
  font-size: 0.82rem;
  cursor: pointer;
  transition: var(--transition);
}
.btn-exam-quit:hover {
  background: rgba(239, 68, 68, 0.2);
  color: #fca5a5;
}

.exam-section-name {
  font-size: 0.95rem;
  font-weight: 800;
  color: #ffffff;
}

.exam-test-name {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.exam-timer-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-weight: 800;
  font-size: 1.05rem;
  color: #60a5fa;
  font-variant-numeric: tabular-nums;
}
.exam-timer-wrapper.urgent-warning {
  border-color: var(--error);
  background: rgba(239, 68, 68, 0.2);
  color: #fca5a5;
  animation: pulse 1s infinite;
}

.btn-submit-exam {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-md);
  padding: 8px 16px;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
  transition: var(--transition);
}
.btn-submit-exam:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(16, 185, 129, 0.4);
}

/* Question Grid Navigator */
.exam-nav-drawer {
  background: #15152c;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  padding: 12px 16px;
}
.exam-nav-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 10px;
}
.exam-answered-count {
  font-weight: 700;
  color: #10b981;
}

.exam-grid-numbers {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.exam-num-btn {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-secondary);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.18s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.exam-num-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
}
.exam-num-btn.answered {
  background: rgba(16, 185, 129, 0.2);
  border-color: #10b981;
  color: #6ee7b7;
}
.exam-num-btn.current {
  border-color: #3b82f6 !important;
  background: #1e3a8a !important;
  color: #ffffff !important;
  box-shadow: 0 0 10px rgba(59, 130, 246, 0.5);
}

/* Exam Question Card */
.exam-question-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 24px;
  min-height: 360px;
}

.exam-sec-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(59, 130, 246, 0.15);
  border: 1px solid rgba(59, 130, 246, 0.3);
  color: #93c5fd;
  border-radius: var(--radius-full);
  padding: 3px 10px;
  font-size: 0.78rem;
  font-weight: 700;
}

/* Listening in Exam */
.exam-audio-box {
  background: #14142a;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  padding: 18px;
  margin-bottom: 20px;
}
.eab-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.eab-prompt {
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin-bottom: 14px;
}
.eab-action-row {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.btn-exam-play {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-md);
  padding: 10px 18px;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35);
  transition: var(--transition);
}
.btn-exam-play:hover {
  transform: translateY(-1px);
}
.exam-wave {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 20px;
  font-size: 0.82rem;
  color: #93c5fd;
}
.exam-speakers-mini-grid {
  display: flex;
  gap: 12px;
  margin-top: 14px;
}
.exam-speaker-mini {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 6px 12px;
  font-size: 0.82rem;
  color: var(--text-secondary);
  transition: all 0.2s;
}
.exam-speaker-mini.active {
  border-color: #3b82f6;
  background: rgba(59, 130, 246, 0.18);
  color: #ffffff;
  box-shadow: 0 0 12px rgba(59, 130, 246, 0.3);
}

/* Structure in Exam */
.exam-sentence-box {
  background: #121226;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 20px;
  font-size: 1.15rem;
  font-weight: 600;
  color: #ffffff;
  line-height: 1.6;
}
.err-tag {
  position: relative;
  text-decoration: underline;
  text-underline-offset: 5px;
  color: #93c5fd;
}
.err-sub {
  font-size: 0.72rem;
  font-weight: 800;
  background: #3b82f6;
  color: white;
  border-radius: 4px;
  padding: 1px 4px;
  margin-right: 4px;
  vertical-align: middle;
}

/* Reading in Exam */
.exam-reading-layout {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.exam-passage-box {
  background: #121226;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  max-height: 250px;
  overflow-y: auto;
}
.exam-passage-badge {
  font-size: 0.75rem;
  font-weight: 700;
  color: #c084fc;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.exam-passage-title {
  font-size: 1.1rem;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 10px;
}
.exam-passage-content {
  font-size: 0.9rem;
  color: #cbd5e1;
  line-height: 1.6;
}

/* Question options */
.exam-question-text {
  font-size: 1.05rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 16px;
  line-height: 1.45;
}
.exam-options-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.exam-opt-btn {
  display: flex;
  align-items: center;
  gap: 14px;
  background: #171732;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
  padding: 14px 18px;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s;
  color: var(--text-primary);
}
.exam-opt-btn:hover {
  background: #202046;
  border-color: rgba(59, 130, 246, 0.4);
  transform: translateY(-1px);
}
.exam-opt-btn.selected {
  background: rgba(59, 130, 246, 0.2) !important;
  border-color: #3b82f6 !important;
  box-shadow: 0 0 14px rgba(59, 130, 246, 0.25);
}
.exam-opt-btn.selected .opt-letter {
  background: #3b82f6;
  color: #ffffff;
}
.opt-letter {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  font-weight: 800;
  font-size: 0.92rem;
  color: var(--text-primary);
  flex-shrink: 0;
}
.opt-label {
  font-size: 0.95rem;
  line-height: 1.4;
  flex: 1;
}

/* Exam Bottom Bar */
.exam-bottom-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
}
.btn-exam-nav {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-primary);
  border-radius: var(--radius-md);
  padding: 10px 18px;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}
.btn-exam-nav:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.15);
  transform: translateY(-1px);
}
.btn-exam-nav:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.btn-exam-nav.primary {
  background: #3b82f6;
  border-color: #3b82f6;
  color: #ffffff;
}
.exam-current-indicator {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ─── TOEFL SCORE REPORT CARD VIEW ────────────────────────────── */
.toefl-report-container {
  max-width: 820px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding-bottom: 60px;
  animation: fadeIn 0.4s ease;
}

.report-certificate-card {
  position: relative;
  background: linear-gradient(145deg, #161830 0%, #1e1b38 100%);
  border: 2px solid rgba(245, 158, 11, 0.4);
  border-radius: 24px;
  padding: 32px;
  box-shadow: 0 16px 45px rgba(0, 0, 0, 0.5), 0 0 35px rgba(245, 158, 11, 0.12);
  overflow: hidden;
}
.cert-watermark {
  position: absolute;
  right: -20px;
  bottom: -20px;
  font-size: 7rem;
  font-weight: 900;
  color: rgba(255, 255, 255, 0.02);
  pointer-events: none;
  user-select: none;
  font-family: serif;
}

.cert-header {
  display: flex;
  align-items: center;
  gap: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 20px;
  margin-bottom: 20px;
}
.cert-emblem {
  font-size: 2.8rem;
  line-height: 1;
}
.cert-title {
  font-size: 1.45rem;
  font-weight: 900;
  color: #fbbf24;
  letter-spacing: 0.5px;
}
.cert-subtitle {
  font-size: 0.85rem;
  color: #cbd5e1;
}

.cert-candidate-row {
  display: flex;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.04);
  border-radius: var(--radius-md);
  padding: 12px 18px;
  font-size: 0.85rem;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 10px;
}
.candidate-item .label {
  color: var(--text-muted);
  margin-right: 6px;
}
.candidate-item .val {
  font-weight: 700;
  color: #ffffff;
}

/* Score Hero */
.cert-score-hero {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: var(--radius-xl);
  padding: 24px 32px;
  margin-bottom: 24px;
}
.score-label {
  font-size: 0.82rem;
  font-weight: 800;
  color: #f59e0b;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 4px;
}
.score-number-wrap {
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.score-big {
  font-size: 4rem;
  font-weight: 900;
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1;
}
.score-max {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-muted);
}
.score-cefr-badge {
  text-align: right;
}
.cefr-code {
  font-size: 1.5rem;
  font-weight: 900;
  color: #ffffff;
  background: rgba(59, 130, 246, 0.25);
  border: 1px solid #3b82f6;
  border-radius: var(--radius-full);
  padding: 6px 16px;
  display: inline-block;
}
.cefr-title {
  font-size: 0.82rem;
  color: #93c5fd;
  margin-top: 6px;
  font-weight: 600;
}

/* Section Breakdown Cards */
.cert-sections-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 14px;
  margin-bottom: 22px;
}
.section-score-card {
  background: #14142a;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.sec-score-icon {
  font-size: 1.6rem;
  flex-shrink: 0;
}
.sec-score-info {
  flex: 1;
  min-width: 0;
}
.sec-name {
  font-size: 0.8rem;
  font-weight: 700;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sec-raw {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin: 3px 0;
}
.sec-bar {
  width: 100%;
  height: 5px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 3px;
  overflow: hidden;
}
.sec-bar-fill {
  height: 100%;
  background: #3b82f6;
  border-radius: 3px;
}
.sec-scale-val {
  font-size: 1.35rem;
  font-weight: 800;
  color: #60a5fa;
  flex-shrink: 0;
}

/* Analysis Box */
.cert-analysis-box {
  background: rgba(255, 255, 255, 0.04);
  border-left: 4px solid #f59e0b;
  border-radius: var(--radius-md);
  padding: 14px 18px;
  font-size: 0.88rem;
  color: #e2e8f0;
  line-height: 1.5;
}

/* Review List */
.report-review-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 24px;
}
.review-section-header h3 {
  font-size: 1.2rem;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 4px;
}
.review-section-header p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 18px;
}
.review-questions-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.review-item {
  background: #16162e;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
}
.review-item.correct {
  border-left: 4px solid var(--success);
}
.review-item.wrong {
  border-left: 4px solid var(--error);
}
.review-item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.review-q-num {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
}
.review-status-badge {
  font-size: 0.78rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-full);
}
.review-status-badge.correct {
  background: rgba(34, 197, 94, 0.15);
  color: #86efac;
}
.review-status-badge.wrong {
  background: rgba(239, 68, 68, 0.15);
  color: #fca5a5;
}
.review-question-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 10px;
}
.review-choices-compare {
  background: rgba(255, 255, 255, 0.03);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  font-size: 0.85rem;
  margin-bottom: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.choice-row {
  display: flex;
  gap: 8px;
}
.cr-label {
  color: var(--text-muted);
  min-width: 140px;
}
.cr-val.correct {
  color: #86efac;
  font-weight: 700;
}
.cr-val.wrong {
  color: #fca5a5;
  font-weight: 700;
}
.review-explanation-box {
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.25);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  font-size: 0.85rem;
  color: #bfdbfe;
  line-height: 1.45;
}

.report-actions-bar {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ─── RESPONSIVE ─────────────────────────────────────────────── */
@media (max-width: 600px) {
  .toefl-sim-cta-banner { flex-direction: column; align-items: flex-start; }
  .cert-sections-grid { grid-template-columns: 1fr; }
  .cert-score-hero { flex-direction: column; align-items: flex-start; gap: 14px; }
  .score-cefr-badge { text-align: left; }
  .exam-top-bar { flex-direction: column; gap: 10px; align-items: stretch; }
  .exam-bottom-bar { flex-direction: column; gap: 10px; }
  .convo-speakers-grid { grid-template-columns: 1fr; }
  .convo-audio-controls { flex-direction: column; align-items: stretch; }
  .btn-play-all, .btn-transcript-toggle { justify-content: center; }
  .lang-cards { grid-template-columns: 1fr; }
  .dashboard-header { flex-direction: column; align-items: flex-start; gap: 20px; }
  .verb-forms { flex-direction: column; }
  .verb-arrow { transform: rotate(90deg); }
  .quiz-options { grid-template-columns: 1fr; }
  .fill-options { grid-template-columns: 1fr; }
  .nav-stats .stat-item:last-child { display: none; }
  .result-stats { gap: 16px; }
  .lessons-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
  .match-grid { gap: 10px; }
  .position-grid { grid-template-columns: 1fr; }
  .guide-compare-grid { flex-direction: column; }
  .nav-auth-section { margin-left: 6px; }
}

/* ─── UCD ERGONOMIC BACK & NAVIGATION BUTTONS ───────────────── */
.btn-back-nav {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #e2e8f0;
  border-radius: var(--radius-full);
  padding: 10px 18px;
  min-height: 44px; /* UCD standard min touch target */
  min-width: 44px;
  font-size: 0.95rem;
  font-weight: 600;
  font-family: 'Outfit', sans-serif;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
  touch-action: manipulation;
  user-select: none;
}
.btn-back-nav:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.3);
  color: #ffffff;
  transform: translateY(-1px);
}
.btn-back-nav:active {
  transform: scale(0.96);
  background: rgba(255, 255, 255, 0.12);
}
.btn-back-nav .back-arrow {
  font-size: 1.15rem;
  line-height: 1;
  transition: transform 0.2s ease;
}
.btn-back-nav:hover .back-arrow {
  transform: translateX(-3px);
}

/* Sticky Top Navigation Bar for Long Pages (e.g. TOEFL Report) */
.report-sticky-top-bar {
  position: sticky;
  top: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 18px;
  background: rgba(14, 15, 30, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-xl);
  margin-bottom: 20px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}
.report-top-bar-title {
  font-size: 1rem;
  font-weight: 700;
  color: #ffffff;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.btn-home-nav {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(99, 102, 241, 0.2);
  border: 1px solid rgba(99, 102, 241, 0.4);
  color: #c7d2fe;
  border-radius: var(--radius-full);
  padding: 8px 16px;
  min-height: 40px;
  font-size: 0.88rem;
  font-weight: 600;
  font-family: 'Outfit', sans-serif;
  cursor: pointer;
  transition: all 0.2s ease;
}
.btn-home-nav:hover {
  background: rgba(99, 102, 241, 0.35);
  color: #ffffff;
  transform: translateY(-1px);
}
.btn-home-nav:active {
  transform: scale(0.96);
}

/* ─── UCD MOBILE BOTTOM NAVIGATION BAR ───────────────────────── */
.mobile-bottom-nav {
  display: none; /* hidden on desktop */
}

@media (max-width: 768px) {
  /* Extra bottom padding so content & action buttons are never obscured */
  #views-container {
    padding-bottom: 84px !important;
  }

  .mobile-bottom-nav {
    display: flex !important;
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100vw !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    z-index: 9999 !important;
    background: rgba(14, 15, 30, 0.94);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    padding: 6px 4px max(6px, env(safe-area-inset-bottom)) 4px;
    justify-content: space-around;
    align-items: center;
    box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.55);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s ease;
  }

  .mobile-bottom-nav.nav-hidden,
  .mobile-bottom-nav.hidden {
    display: none !important;
    transform: translateY(100%);
    opacity: 0;
    pointer-events: none;
  }

  .mobile-nav-item {
    flex: 1 1 0 !important;
    min-width: 0 !important;
    overflow: hidden !important;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    min-height: 48px;
    padding: 6px 2px;
    border: none;
    background: transparent;
    color: #94a3b8;
    font-family: 'Outfit', sans-serif;
    cursor: pointer;
    border-radius: 12px;
    transition: all 0.2s ease;
    touch-action: manipulation;
    user-select: none;
  }

  .mobile-nav-item:active {
    transform: scale(0.92);
  }

  .mobile-nav-icon {
    font-size: 1.28rem;
    line-height: 1;
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  }

  .mobile-nav-label {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.2px;
  }

  .mobile-nav-item.active {
    color: #38bdf8;
    background: rgba(56, 189, 248, 0.12);
  }

  .mobile-nav-item.active .mobile-nav-icon {
    transform: scale(1.15) translateY(-1px);
  }

  .mobile-nav-item.active .mobile-nav-label {
    font-weight: 700;
    color: #ffffff;
  }

  /* Map headers spacing on mobile */
  .map-header {
    flex-wrap: wrap;
    gap: 10px;
    padding: 12px 14px;
    box-sizing: border-box;
    width: 100%;
  }
  .map-header .map-title {
    font-size: 1.15rem;
    flex: 1 1 auto;
    min-width: 160px;
    margin: 0;
  }
  .map-header .btn-back-nav {
    padding: 6px 14px;
    font-size: 0.85rem;
    min-height: 40px;
    flex-shrink: 0;
  }
  .map-header .map-xp {
    font-size: 0.85rem;
    margin-left: auto;
  }

  /* Report sticky bar on mobile */
  .report-sticky-top-bar {
    padding: 10px 14px;
    margin-bottom: 16px;
  }
  .report-top-bar-title {
    font-size: 0.9rem;
  }
  .btn-home-nav {
    padding: 6px 12px;
    font-size: 0.82rem;
  }
}

/* ─── TOEFL HACK 450 BOOTCAMP BANNER & MODAL ────────────────── */
.toefl-hack-banner {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.16) 0%, rgba(239, 68, 68, 0.12) 50%, rgba(168, 85, 247, 0.15) 100%);
  border: 1px solid rgba(245, 158, 11, 0.4);
  border-radius: var(--radius-xl);
  padding: 20px 24px;
  margin-bottom: 24px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 8px 30px rgba(245, 158, 11, 0.15);
}
.toefl-hack-banner:hover {
  transform: translateY(-2px);
  border-color: rgba(245, 158, 11, 0.65);
  box-shadow: 0 12px 36px rgba(245, 158, 11, 0.25);
}
.toefl-hack-banner:active {
  transform: scale(0.99);
}
.hack-banner-badge {
  display: inline-block;
  background: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%);
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.6px;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  margin-bottom: 12px;
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.35);
}
.hack-banner-main {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 14px;
}
.hack-banner-icon {
  font-size: 2.2rem;
  background: rgba(245, 158, 11, 0.2);
  width: 54px;
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  border: 1px solid rgba(245, 158, 11, 0.4);
  flex-shrink: 0;
}
.hack-banner-text {
  flex: 1;
}
.hack-banner-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 4px;
}
.hack-banner-sub {
  font-size: 0.88rem;
  color: #cbd5e1;
  line-height: 1.45;
  margin: 0;
}
.btn-hack-cta {
  background: linear-gradient(135deg, #f59e0b 0%, #ea580c 100%);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-full);
  padding: 10px 20px;
  font-size: 0.9rem;
  font-weight: 700;
  font-family: 'Outfit', sans-serif;
  cursor: pointer;
  flex-shrink: 0;
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.4);
  transition: all 0.2s ease;
}
.btn-hack-cta:hover {
  transform: scale(1.04);
}
.hack-pills-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.hack-pill {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #e2e8f0;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 8px;
}
.hack-pill.highlight {
  background: rgba(245, 158, 11, 0.2);
  border-color: rgba(245, 158, 11, 0.4);
  color: #fde68a;
}

/* ───────── TOEFL TRACK SWITCHER (Fast Track 3 Hari vs Komprehensif) ───────── */
.toefl-track-switcher {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 24px;
}
.toefl-track-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(18, 20, 36, 0.7);
  border: 1.5px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
  padding: 12px 16px;
  text-align: left;
  cursor: pointer;
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
  color: var(--text-color);
}
.toefl-track-btn:hover {
  background: rgba(26, 29, 52, 0.9);
  border-color: rgba(245, 158, 11, 0.4);
  transform: translateY(-1px);
}
.toefl-track-btn.active {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.15) 0%, rgba(239, 68, 68, 0.1) 100%);
  border-color: #f59e0b;
  box-shadow: 0 4px 20px rgba(245, 158, 11, 0.2);
}
.toefl-track-btn.active::after {
  content: '✓ Aktif';
  position: absolute;
  top: 8px;
  right: 12px;
  font-size: 0.68rem;
  font-weight: 700;
  color: #f59e0b;
  background: rgba(245, 158, 11, 0.18);
  padding: 2px 8px;
  border-radius: var(--radius-full);
}
.track-btn-icon {
  font-size: 1.8rem;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-md);
}
.toefl-track-btn.active .track-btn-icon {
  background: rgba(245, 158, 11, 0.2);
}
.track-btn-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.track-btn-info strong {
  font-size: 0.95rem;
  font-weight: 700;
  color: #ffffff;
}
.track-btn-info small {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.3;
}
@media (max-width: 640px) {
  .toefl-track-switcher {
    grid-template-columns: 1fr;
    gap: 8px;
  }
}

/* Modal styling */
.toefl-hack-modal-card {
  max-width: 820px !important;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  background-color: #0c0d18 !important;
  border: 1px solid rgba(245, 158, 11, 0.35) !important;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.95), 0 0 40px rgba(245, 158, 11, 0.2) !important;
  position: relative;
  z-index: 100000 !important;
}
.hack-tabs-nav {
  display: flex;
  gap: 6px;
  padding: 10px 16px;
  background: rgba(10, 10, 22, 0.85);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  overflow-x: auto;
  white-space: nowrap;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.hack-tabs-nav::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}
.hack-tab-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #94a3b8;
  padding: 7px 13px;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1;
  font-family: 'Outfit', sans-serif;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
  box-sizing: border-box;
  text-align: center;
}
.tab-emoji {
  font-size: 1rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.hack-tab-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.25);
}
.hack-tab-btn.active {
  background: rgba(245, 158, 11, 0.18);
  border-color: #f59e0b;
  color: #fbbf24;
  font-weight: 700;
  box-shadow: 0 0 16px rgba(245, 158, 11, 0.25);
}
.hack-tab-btn.highlight.active {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.3) 0%, rgba(239, 68, 68, 0.25) 100%);
  border-color: #f59e0b;
  color: #ffffff;
  box-shadow: 0 0 16px rgba(245, 158, 11, 0.35);
}

.hack-modal-body {
  padding: 20px 24px;
  overflow-y: auto;
  flex: 1;
}
.hack-tab-pane {
  display: none;
}
.hack-tab-pane.active {
  display: block;
  animation: fadeIn 0.25s ease;
}

/* Alert Boxes */
.hack-hero-alert {
  display: flex;
  gap: 14px;
  padding: 14px 18px;
  border-radius: var(--radius-lg);
  margin-bottom: 20px;
  font-size: 0.9rem;
  line-height: 1.5;
}
.hack-hero-alert.warning {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #fca5a5;
}
.hack-hero-alert.warning strong { color: #fecaca; }
.hack-hero-alert.info {
  background: rgba(59, 130, 246, 0.12);
  border: 1px solid rgba(59, 130, 246, 0.35);
  color: #bfdbfe;
}
.hack-hero-alert.info strong { color: #dbeafe; }
.hack-hero-alert.purple {
  background: rgba(168, 85, 247, 0.12);
  border: 1px solid rgba(168, 85, 247, 0.35);
  color: #e9d5ff;
}
.hack-hero-alert.purple strong { color: #f3e8ff; }
.hack-hero-alert.cyan {
  background: rgba(6, 182, 212, 0.12);
  border: 1px solid rgba(6, 182, 212, 0.35);
  color: #a5f3fc;
}
.hack-hero-alert.cyan strong { color: #cffafe; }
.hack-alert-icon { font-size: 1.6rem; line-height: 1; flex-shrink: 0; }

/* Demo Box */
.hack-demo-box {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
  padding: 18px;
  margin-bottom: 20px;
}
.demo-box-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.badge-tag {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #94a3b8;
  letter-spacing: 0.5px;
}
.demo-script-quote {
  font-size: 1.05rem;
  font-style: italic;
  color: #ffffff;
  padding: 12px 16px;
  background: rgba(0, 0, 0, 0.3);
  border-left: 3px solid #f59e0b;
  border-radius: 8px;
  margin-bottom: 16px;
}
.compare-options-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.hack-option-card {
  padding: 14px;
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.hack-option-card.trap {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
}
.hack-option-card.correct {
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.3);
}
.opt-badge {
  font-size: 0.75rem;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 6px;
  display: inline-block;
  align-self: flex-start;
}
.opt-badge.bad { background: rgba(239, 68, 68, 0.25); color: #fca5a5; }
.opt-badge.good { background: rgba(34, 197, 94, 0.25); color: #86efac; }
.opt-text { font-size: 0.95rem; font-weight: 700; color: #ffffff; }
.opt-reason { font-size: 0.82rem; color: #cbd5e1; line-height: 1.4; }

/* Tip Card */
.hack-tip-card {
  display: flex;
  gap: 14px;
  padding: 16px;
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: var(--radius-lg);
}
.tip-card-icon { font-size: 1.8rem; flex-shrink: 0; }
.tip-card-content h4 { font-size: 0.95rem; font-weight: 700; color: #fbbf24; margin-bottom: 4px; }
.tip-card-content p { font-size: 0.85rem; color: #e2e8f0; margin: 0; line-height: 1.45; }

/* Formula Visual */
.hack-formula-visual {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
  padding: 18px;
}
.formula-title { font-size: 0.95rem; font-weight: 700; color: #38bdf8; margin-bottom: 6px; }
.equation-box {
  background: rgba(0, 0, 0, 0.35);
  border-radius: var(--radius-md);
  padding: 14px;
  margin: 14px 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.strike { text-decoration: line-through; opacity: 0.45; color: #ef4444; }
.badge-s { background: #3b82f6; color: white; padding: 2px 6px; border-radius: 4px; font-size: 0.75rem; font-weight: 700; }
.badge-need { background: #ef4444; color: white; padding: 2px 6px; border-radius: 4px; font-size: 0.75rem; font-weight: 700; }
.eq-arrow { font-size: 0.85rem; color: #94a3b8; font-weight: 600; text-align: center; }

/* Sins Grid */
.sins-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.sin-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 14px;
  position: relative;
}
.sin-num {
  font-size: 0.72rem;
  font-weight: 800;
  color: #c084fc;
  text-transform: uppercase;
  margin-bottom: 4px;
}
.sin-card h4 { font-size: 0.92rem; font-weight: 700; color: #ffffff; margin-bottom: 8px; }
.sin-wrong { font-size: 0.82rem; color: #fca5a5; margin-bottom: 4px; }
.sin-right { font-size: 0.82rem; color: #86efac; line-height: 1.35; }

/* Ninja Rules */
.ninja-rules-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.ninja-rule-item {
  display: flex;
  gap: 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 14px;
}
.ninja-icon { font-size: 1.6rem; flex-shrink: 0; }
.ninja-rule-item strong { font-size: 0.92rem; color: #38bdf8; display: block; margin-bottom: 4px; }
.ninja-rule-item p { font-size: 0.85rem; color: #cbd5e1; margin: 0; line-height: 1.45; }

/* Roadmap 14 Hari */
.roadmap-header-box {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.15) 0%, rgba(99, 102, 241, 0.15) 100%);
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  margin-bottom: 18px;
}
.roadmap-badge {
  display: inline-block;
  background: #f59e0b;
  color: #000000;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 4px;
  margin-bottom: 6px;
}
.roadmap-header-box h4 { font-size: 1.1rem; color: #ffffff; margin-bottom: 4px; }
.roadmap-header-box p { font-size: 0.85rem; color: #cbd5e1; margin-bottom: 12px; }
.roadmap-progress-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}
.roadmap-progress-bar {
  flex: 1;
  height: 10px;
  background: rgba(0, 0, 0, 0.4);
  border-radius: var(--radius-full);
  overflow: hidden;
}
.roadmap-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #f59e0b, #10b981);
  transition: width 0.3s ease;
}
.roadmap-count { font-size: 0.82rem; font-weight: 700; color: #fbbf24; white-space: nowrap; }

.roadmap-days-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.roadmap-day-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.roadmap-day-card:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.16);
}
.roadmap-day-card.done {
  background: rgba(16, 185, 129, 0.08);
  border-color: rgba(16, 185, 129, 0.3);
}
.roadmap-day-card.done .day-title {
  text-decoration: line-through;
  opacity: 0.6;
}
.day-checkbox-wrap input[type="checkbox"] {
  width: 20px;
  height: 20px;
  accent-color: #10b981;
  cursor: pointer;
}
.day-info-wrap { flex: 1; }
.day-top-meta { display: flex; gap: 8px; align-items: center; margin-bottom: 3px; }
.day-badge {
  font-size: 0.68rem;
  font-weight: 800;
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
  padding: 1px 6px;
  border-radius: 4px;
}
.day-time { font-size: 0.72rem; color: #94a3b8; }
.day-title { font-size: 0.92rem; font-weight: 700; color: #ffffff; margin-bottom: 2px; }
.day-focus { font-size: 0.8rem; color: #94a3b8; margin: 0; }
.day-status-icon { font-size: 1.1rem; }

@media (max-width: 600px) {
  .compare-options-grid, .sins-grid { grid-template-columns: 1fr; }
  .hack-banner-main { flex-direction: column; align-items: flex-start; }
  .btn-hack-cta { width: 100%; text-align: center; }
}

/* ============================================================
   INTERACTIVE POPUP MODAL (Custom Alert & Confirm)
   ============================================================ */
.popup-modal-card {
  max-width: 440px !important;
  width: 92% !important;
  padding: 34px 28px 28px !important;
  background: linear-gradient(165deg, rgba(22, 24, 42, 0.98), rgba(12, 13, 24, 0.99)) !important;
  border: 1.5px solid rgba(255, 255, 255, 0.14) !important;
  border-radius: 26px !important;
  box-shadow: 0 25px 65px rgba(0, 0, 0, 0.75), 0 0 50px rgba(139, 92, 246, 0.16) !important;
  text-align: center !important;
  align-items: center !important;
  transform: scale(0.92);
  opacity: 0;
  transition: transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.22s ease;
}

.modal-overlay.active .popup-modal-card {
  transform: scale(1);
  opacity: 1;
}

.popup-icon-badge {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  font-size: 2.3rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  animation: pulseBadge 2.2s infinite ease-in-out;
}

.popup-icon-badge.popup-warning {
  background: rgba(245, 158, 11, 0.18);
  border: 2px solid rgba(245, 158, 11, 0.5);
  box-shadow: 0 0 35px rgba(245, 158, 11, 0.25);
  color: #fbbf24;
}

.popup-icon-badge.popup-danger {
  background: rgba(239, 68, 68, 0.18);
  border: 2px solid rgba(239, 68, 68, 0.5);
  box-shadow: 0 0 35px rgba(239, 68, 68, 0.25);
  color: #f87171;
}

.popup-icon-badge.popup-info {
  background: rgba(99, 102, 241, 0.18);
  border: 2px solid rgba(99, 102, 241, 0.5);
  box-shadow: 0 0 35px rgba(99, 102, 241, 0.25);
  color: #a5b4fc;
}

.popup-icon-badge.popup-success {
  background: rgba(16, 185, 129, 0.18);
  border: 2px solid rgba(16, 185, 129, 0.5);
  box-shadow: 0 0 35px rgba(16, 185, 129, 0.25);
  color: #34d399;
}

@keyframes pulseBadge {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}

.popup-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: #ffffff;
  margin: 0 0 12px;
  letter-spacing: -0.01em;
}

.popup-message {
  font-size: 0.98rem;
  color: #94a3b8;
  line-height: 1.6;
  margin: 0 0 28px;
  max-width: 360px;
}

.popup-actions {
  display: flex;
  gap: 12px;
  width: 100%;
  justify-content: center;
}

.popup-btn-cancel {
  flex: 1;
  padding: 13px 18px;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #e2e8f0;
  cursor: pointer;
  transition: all 0.2s ease;
}

.popup-btn-cancel:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
  transform: translateY(-1px);
}

.popup-btn-confirm {
  flex: 1;
  padding: 13px 18px;
  font-size: 0.95rem;
  font-weight: 700;
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.popup-btn-confirm:hover {
  transform: translateY(-1px);
}

/* ============================================================
   QUIZ FEEDBACK DRAWER / BOX (Interactive Learning)
   ============================================================ */
.quiz-feedback-box {
  margin-top: 24px;
  padding: 22px 24px;
  border-radius: 20px;
  background: rgba(18, 20, 36, 0.95);
  border: 1.5px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px);
  display: flex;
  flex-direction: column;
  gap: 16px;
  animation: slideUpFeedback 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
}

@keyframes slideUpFeedback {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.quiz-feedback-box.fb-correct {
  border-color: rgba(16, 185, 129, 0.55);
  background: linear-gradient(145deg, rgba(16, 185, 129, 0.14), rgba(15, 23, 42, 0.96));
  box-shadow: 0 10px 30px rgba(16, 185, 129, 0.18);
}

.quiz-feedback-box.fb-wrong {
  border-color: rgba(239, 68, 68, 0.55);
  background: linear-gradient(145deg, rgba(239, 68, 68, 0.14), rgba(15, 23, 42, 0.96));
  box-shadow: 0 10px 30px rgba(239, 68, 68, 0.18);
}

.fb-header {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.fb-icon {
  font-size: 2.2rem;
  flex-shrink: 0;
  line-height: 1;
}

.fb-text-wrap {
  flex: 1;
  text-align: left;
}

.fb-title {
  font-size: 1.18rem;
  font-weight: 800;
  margin-bottom: 5px;
}

.fb-correct .fb-title {
  color: #34d399;
}

.fb-wrong .fb-title {
  color: #f87171;
}

.fb-answer {
  font-size: 0.96rem;
  color: #f1f5f9;
  margin-bottom: 6px;
  line-height: 1.5;
}

.fb-answer strong {
  color: #6ee7b7;
  font-weight: 700;
}

.fb-explanation {
  font-size: 0.92rem;
  color: #cbd5e1;
  line-height: 1.55;
  background: rgba(0, 0, 0, 0.35);
  border-left: 3px solid #8b5cf6;
  padding: 10px 14px;
  border-radius: 8px;
  margin-top: 8px;
}

/* ───────── ENHANCED ANSWER FEEDBACK BREAKDOWN ───────── */
.fb-breakdown-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 8px 0 10px 0;
}
.fb-tag {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.4;
  text-align: left;
}
.fb-tag.wrong {
  background: rgba(239, 68, 68, 0.18);
  border: 1px solid rgba(239, 68, 68, 0.45);
  color: #fca5a5;
}
.fb-tag.correct {
  background: rgba(16, 185, 129, 0.18);
  border: 1px solid rgba(16, 185, 129, 0.45);
  color: #6ee7b7;
}
.fb-explanation-detail {
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-left: 4px solid #f59e0b;
  border-radius: 10px;
  padding: 12px 14px;
  margin-top: 8px;
  text-align: left;
}
.fb-exp-title {
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #fbbf24;
  margin-bottom: 5px;
}
.fb-exp-text {
  font-size: 0.92rem;
  color: #e2e8f0;
  line-height: 1.55;
}

.fb-xp {
  background: rgba(245, 158, 11, 0.2);
  border: 1px solid rgba(245, 158, 11, 0.45);
  color: #fbbf24;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 800;
  align-self: flex-start;
  white-space: nowrap;
}

.fb-next-btn {
  width: 100%;
  padding: 14px;
  font-size: 1.05rem;
  font-weight: 800;
  border-radius: 14px;
  cursor: pointer;
  letter-spacing: 0.02em;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 15px rgba(139, 92, 246, 0.35);
}

.fb-next-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(139, 92, 246, 0.45);
}

/* ───────── PWA INSTALL SYSTEM (App Shortcut di HP) ───────── */
.btn-install-pwa {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.2) 0%, rgba(59, 130, 246, 0.2) 100%);
  border: 1.5px solid rgba(16, 185, 129, 0.45);
  color: #a7f3d0;
  padding: 7px 14px;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 2px 10px rgba(16, 185, 129, 0.2);
}
.btn-install-pwa:hover {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.35) 0%, rgba(59, 130, 246, 0.35) 100%);
  border-color: #34d399;
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(16, 185, 129, 0.35);
}
.install-pwa-icon {
  font-size: 1.1rem;
}

/* PWA Dashboard Banner */
.pwa-install-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.15) 0%, rgba(37, 99, 235, 0.12) 50%, rgba(139, 92, 246, 0.15) 100%);
  border: 1.5px solid rgba(16, 185, 129, 0.4);
  border-radius: var(--radius-xl);
  padding: 18px 24px;
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 30px rgba(16, 185, 129, 0.15);
  animation: pwaBannerFadeIn 0.4s ease;
}
@keyframes pwaBannerFadeIn {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}
.pwa-banner-left {
  display: flex;
  align-items: center;
  gap: 16px;
  flex: 1;
}
.pwa-banner-icon-img {
  width: 58px;
  height: 58px;
  border-radius: 16px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.4);
  flex-shrink: 0;
  object-fit: cover;
}
.pwa-banner-badge {
  display: inline-block;
  background: rgba(16, 185, 129, 0.25);
  border: 1px solid rgba(16, 185, 129, 0.5);
  color: #6ee7b7;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  margin-bottom: 4px;
}
.pwa-banner-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: #ffffff;
  margin: 0 0 3px 0;
}
.pwa-banner-sub {
  font-size: 0.85rem;
  color: #cbd5e1;
  margin: 0;
  line-height: 1.4;
}
.pwa-banner-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.btn-pwa-install {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #ffffff;
  border: none;
  padding: 10px 18px;
  border-radius: var(--radius-lg);
  font-size: 0.88rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
  transition: all 0.2s ease;
  white-space: nowrap;
}
.btn-pwa-install:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.55);
}
.btn-pwa-dismiss {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #94a3b8;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  transition: all 0.2s ease;
}
.btn-pwa-dismiss:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.4);
  color: #f87171;
}

/* PWA Guide Modal */
.pwa-guide-card {
  max-width: 580px !important;
  background-color: #0c0d18 !important;
  border: 1.5px solid rgba(16, 185, 129, 0.35) !important;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.95), 0 0 40px rgba(16, 185, 129, 0.2) !important;
}
.pwa-device-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 20px;
}
.pwa-tab-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #94a3b8;
  font-weight: 700;
  font-size: 0.88rem;
  cursor: pointer;
  transition: all 0.2s ease;
}
.pwa-tab-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}
.pwa-tab-btn.active {
  background: rgba(16, 185, 129, 0.18);
  border-color: #10b981;
  color: #34d399;
}
.pwa-step-card {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: var(--radius-md);
  padding: 14px;
  margin-bottom: 12px;
}
.step-num {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #ffffff;
  font-weight: 800;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.4);
}
.step-info h4 {
  font-size: 0.95rem;
  font-weight: 700;
  color: #f1f5f9;
  margin: 0 0 4px 0;
}
.step-info p {
  font-size: 0.85rem;
  color: #94a3b8;
  margin: 0;
  line-height: 1.45;
}
.step-info strong {
  color: #a7f3d0;
}
.pwa-action-btn {
  width: 100%;
  padding: 12px;
  margin-top: 10px;
  font-weight: 800;
  border-radius: var(--radius-lg);
  font-size: 0.95rem;
}

@media (max-width: 640px) {
  .pwa-install-banner {
    flex-direction: column;
    align-items: stretch;
    padding: 16px;
    gap: 14px;
  }
  .pwa-banner-actions {
    width: 100%;
    justify-content: space-between;
  }
  .btn-pwa-install {
    flex: 1;
    text-align: center;
  }
}

/* ───────── SECTION SCORE CHECKPOINTS & CAMPUS 430 ALERT SYSTEM ───────── */
.section-checkpoint-card {
  max-width: 520px !important;
  background-color: #0d0f1e !important;
  border: 1.5px solid rgba(59, 130, 246, 0.45) !important;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.95), 0 0 35px rgba(59, 130, 246, 0.25) !important;
  text-align: center;
}
.checkpoint-hero {
  padding: 10px 0 20px 0;
}
.checkpoint-icon {
  font-size: 3rem;
  margin-bottom: 8px;
  display: inline-block;
  animation: checkpointBounce 0.5s ease;
}
@keyframes checkpointBounce {
  0% { transform: scale(0.6); }
  60% { transform: scale(1.15); }
  100% { transform: scale(1); }
}
.checkpoint-badge {
  display: inline-block;
  background: rgba(59, 130, 246, 0.2);
  border: 1px solid rgba(59, 130, 246, 0.5);
  color: #93c5fd;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.6px;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  margin-bottom: 10px;
}
.checkpoint-title {
  font-size: 1.35rem;
  font-weight: 900;
  color: #ffffff;
  margin: 0 0 6px 0;
}
.checkpoint-sub {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin: 0;
}
.checkpoint-score-box {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  margin: 18px 0;
  display: flex;
  align-items: center;
  justify-content: space-around;
}
.checkpoint-stat-item {
  text-align: center;
}
.checkpoint-stat-label {
  font-size: 0.76rem;
  font-weight: 700;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}
.checkpoint-stat-val {
  font-size: 1.7rem;
  font-weight: 900;
  color: #ffffff;
}
.checkpoint-stat-val.highlight {
  color: #38bdf8;
}
.checkpoint-campus-status {
  padding: 10px 14px;
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  font-weight: 700;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.checkpoint-campus-status.safe {
  background: rgba(16, 185, 129, 0.18);
  border: 1px solid rgba(16, 185, 129, 0.45);
  color: #6ee7b7;
}
.checkpoint-campus-status.danger {
  background: rgba(239, 68, 68, 0.18);
  border: 1px solid rgba(239, 68, 68, 0.45);
  color: #fca5a5;
}

/* Campus Final 430 Alert Modal */
.campus-alert-modal-card {
  max-width: 560px !important;
  text-align: center;
  animation: campusAlertZoom 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes campusAlertZoom {
  0% { transform: scale(0.85); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}
.campus-alert-modal-card.fail {
  background-color: #14070a !important;
  border: 2px solid #ef4444 !important;
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.95), 0 0 50px rgba(239, 68, 68, 0.4) !important;
}
.campus-alert-modal-card.pass {
  background-color: #06150f !important;
  border: 2px solid #10b981 !important;
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.95), 0 0 50px rgba(16, 185, 129, 0.4) !important;
}
.campus-alert-icon {
  font-size: 3.5rem;
  margin-bottom: 10px;
}
.campus-alert-badge {
  display: inline-block;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.8px;
  padding: 4px 14px;
  border-radius: var(--radius-full);
  margin-bottom: 12px;
}
.fail .campus-alert-badge {
  background: rgba(239, 68, 68, 0.25);
  border: 1px solid rgba(239, 68, 68, 0.6);
  color: #fca5a5;
}
.pass .campus-alert-badge {
  background: rgba(16, 185, 129, 0.25);
  border: 1px solid rgba(16, 185, 129, 0.6);
  color: #6ee7b7;
}
.campus-alert-title {
  font-size: 1.55rem;
  font-weight: 900;
  color: #ffffff;
  margin: 0 0 8px 0;
}
.fail .campus-alert-title {
  color: #f87171;
}
.pass .campus-alert-title {
  color: #34d399;
}
.campus-alert-sub {
  font-size: 0.92rem;
  color: #cbd5e1;
  margin: 0 0 18px 0;
  line-height: 1.5;
}
.campus-section-breakdown {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  margin-bottom: 20px;
}
.sec-stat-pill {
  padding: 10px 8px;
  border-radius: var(--radius-md);
  font-size: 0.78rem;
  font-weight: 700;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.sec-stat-pill strong {
  font-size: 1.15rem;
  font-weight: 900;
}
.sec-stat-pill.safe {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #6ee7b7;
}
.sec-stat-pill.danger {
  background: rgba(239, 68, 68, 0.18);
  border: 1px solid rgba(239, 68, 68, 0.5);
  color: #fca5a5;
}
.campus-alert-instruction {
  background: rgba(255, 255, 255, 0.04);
  border: 1px dashed rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  font-size: 0.88rem;
  color: #e2e8f0;
  margin-bottom: 22px;
  line-height: 1.5;
}
.fail .campus-alert-instruction strong {
  color: #f87171;
}
.pass .campus-alert-instruction strong {
  color: #34d399;
}
.campus-alert-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.btn-repeat-test {
  padding: 14px;
  font-size: 1rem;
  font-weight: 900;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, #ef4444 0%, #b91c1c 100%) !important;
  box-shadow: 0 6px 20px rgba(239, 68, 68, 0.4) !important;
  border: none;
  cursor: pointer;
  color: #ffffff;
}
.btn-repeat-test:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(239, 68, 68, 0.55) !important;
}

/* Campus pill in certificate hero */
.campus-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: var(--radius-full);
  font-size: 0.86rem;
  font-weight: 800;
  margin-top: 10px;
}
.campus-status-pill.pass {
  background: rgba(16, 185, 129, 0.2);
  border: 1px solid rgba(16, 185, 129, 0.5);
  color: #6ee7b7;
}
.campus-status-pill.fail {
  background: rgba(239, 68, 68, 0.2);
  border: 1px solid rgba(239, 68, 68, 0.5);
  color: #fca5a5;
}

/* ───────── TOEFL SETUP MODAL & 140 EXAM CONTROLS ───────── */
.exam-setup-modal-card {
  max-width: 540px;
  width: 92%;
  background: #111827;
  border: 1px solid rgba(99, 102, 241, 0.35);
  border-radius: var(--radius-xl);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.7);
  overflow: hidden;
}
.exam-setup-body {
  padding: 18px 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.exam-rules-banner {
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: var(--radius-lg);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.exam-rules-banner .rule-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.exam-rules-banner .rule-icon {
  font-size: 1.25rem;
  line-height: 1.2;
}
.exam-rules-banner .rule-item strong {
  display: block;
  font-size: 0.88rem;
  color: #fbbf24;
  margin-bottom: 2px;
}
.exam-rules-banner .rule-item p {
  margin: 0;
  font-size: 0.82rem;
  color: #e2e8f0;
  line-height: 1.4;
}

.exam-mode-select-label {
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.exam-mode-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.exam-mode-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--radius-lg);
  border: 1.5px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.03);
  cursor: pointer;
  transition: all 0.2s ease;
}
.exam-mode-card input[type="radio"] {
  margin-top: 4px;
  accent-color: #6366f1;
}
.exam-mode-card:hover {
  background: rgba(99, 102, 241, 0.08);
  border-color: rgba(99, 102, 241, 0.4);
}
.exam-mode-card.selected {
  background: rgba(99, 102, 241, 0.14);
  border-color: #6366f1;
  box-shadow: 0 0 15px rgba(99, 102, 241, 0.25);
}
.emc-content {
  flex: 1;
}
.emc-badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
  margin-bottom: 4px;
}
.emc-badge.recommended {
  background: rgba(99, 102, 241, 0.25);
  color: #a5b4fc;
  border: 1px solid rgba(99, 102, 241, 0.4);
}
.emc-badge.campus {
  background: rgba(16, 185, 129, 0.25);
  color: #6ee7b7;
  border: 1px solid rgba(16, 185, 129, 0.4);
}
.emc-title {
  font-weight: 800;
  font-size: 0.95rem;
  color: #ffffff;
  margin-bottom: 3px;
}
.emc-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.35;
}
.exam-setup-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 8px;
}

/* ───────── EXAM GRID SECTION FILTERS (140 SOAL) ───────── */
.exam-section-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}
.exam-filter-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: var(--text-muted);
  padding: 5px 10px;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.18s ease;
}
.exam-filter-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
}
.exam-filter-btn.active {
  background: #3b82f6;
  border-color: #3b82f6;
  color: #ffffff;
  box-shadow: 0 0 10px rgba(59, 130, 246, 0.4);
}

.exam-grid-numbers {
  max-height: 160px;
  overflow-y: auto;
  padding: 4px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.2);
}

/* ───────── LISTENING 1X ONLY AUDIO LOCK ───────── */
.btn-exam-play.played-locked {
  background: rgba(55, 65, 81, 0.8) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  color: #9ca3af !important;
  cursor: not-allowed !important;
  box-shadow: none !important;
  opacity: 0.75;
}
.btn-exam-play.playing {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
  animation: pulseAudio 1.5s infinite alternate;
}
@keyframes pulseAudio {
  from { box-shadow: 0 0 10px rgba(16, 185, 129, 0.4); }
  to { box-shadow: 0 0 22px rgba(16, 185, 129, 0.8); }
}

.exam-audio-notice {
  margin-top: 10px;
  padding: 10px 14px;
  border-radius: 8px;
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.3);
  color: #fef3c7;
  font-size: 0.82rem;
  line-height: 1.4;
  display: flex;
  align-items: center;
  gap: 8px;
}
.exam-audio-notice.locked {
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.3);
  color: #fca5a5;
}

@media (max-width: 640px) {
  .campus-section-breakdown {
    grid-template-columns: 1fr;
    gap: 6px;
  }
  .exam-mode-card {
    padding: 10px 12px;
  }
  .emc-title {
    font-size: 0.88rem;
  }
  .exam-filter-btn {
    font-size: 0.72rem;
    padding: 4px 8px;
  }
}


