/* Spoken English Pro — Refined Ruby Crimson & Velvet Slate Palette:
   #E11D48 (Ruby Crimson), #BE123C (Velvet Carmine), #9F1239 (Deep Wine),
   #FDA4AF (Soft Rose Glow), #F8FAFC (Pearl White), #94A3B8 (Cool Slate),
   #0A0F1D (Midnight Velvet), #12192C (Card Navy)
*/
:root {
  --brand-crimson: #E11D48;
  --brand-crimson-dark: #BE123C;
  --brand-wine: #9F1239;
  --brand-navy-dark: #0A0F1D;
  --brand-pearl: #F8FAFC;
  --brand-rose-soft: #FDA4AF;
  --brand-slate-silver: #94A3B8;
  --brand-blush: #FFE4E6;
  --brand-slate: #475569;

  --bg-dark: #0A0F1D;
  --bg-card: rgba(18, 25, 44, 0.94);
  --primary-neon: #E11D48;
  --primary-glow: rgba(225, 29, 72, 0.4);
  --accent-purple: #BE123C;
  --accent-emerald: #10B981;
  --accent-amber: #F59E0B;
  --text-main: #F8FAFC;
  --text-muted: #94A3B8;
  --border-glass: rgba(253, 164, 175, 0.14);
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --radius-sm: 12px;
  --radius-md: 20px;
  --radius-lg: 28px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-sans);
  background: radial-gradient(circle at 50% 0%, #1A2238 0%, var(--bg-dark) 75%);
  color: var(--text-main);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header */
.app-header {
  background: rgba(10, 15, 29, 0.92);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-glass);
  position: sticky;
  top: 0;
  z-index: 100;
  padding-top: env(safe-area-inset-top, 0px);
}

.header-container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0.65rem 1.4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.2rem;
}

.header-right-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.brand-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  font-weight: 800;
  font-size: 1.3rem;
  cursor: pointer;
  color: var(--brand-pearl);
  transition: transform 0.2s ease;
  user-select: none;
  text-decoration: none;
  line-height: 1;
}

.brand-logo:hover {
  transform: translateY(-1px);
}

.logo-brand-wrap {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  white-space: nowrap;
  line-height: 1;
}

.logo-brand-name {
  font-size: 1.35rem;
  font-weight: 800;
  color: #FFFFFF;
  letter-spacing: -0.4px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.logo-brand-pro {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.4px;
  color: var(--brand-crimson);
  line-height: 1;
}

.header-app-logo {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  object-fit: cover;
  flex-shrink: 0;
  border: none;
  box-shadow: none;
  transition: transform 0.25s ease;
}

.brand-logo:hover .header-app-logo {
  transform: scale(1.05);
}

.nav-links {
  display: flex;
  gap: 1.2rem;
  align-items: center;
}

.nav-link {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.2s;
  cursor: pointer;
  padding: 0.4rem 0.8rem;
  border-radius: 20px;
}

.nav-link:hover, .nav-link.active {
  color: white;
  background: rgba(255, 255, 255, 0.08);
}

.supernova-stats,
.stat-pill {
  display: none !important;
}

.user-profile-header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.user-greeting {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--brand-pearl);
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.btn-header-auth {
  padding: 0.45rem 1.1rem !important;
  font-size: 0.88rem !important;
  border-radius: 20px !important;
}

.btn-header-logout {
  padding: 0.35rem 0.8rem !important;
  font-size: 0.82rem !important;
  border-radius: 20px !important;
}

/* ── Mobile Bottom Navigation Bar (App Bar) ── */
.mobile-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  min-height: 68px;
  height: auto;
  background: rgba(10, 15, 29, 0.98);
  backdrop-filter: blur(20px);
  border-top: 1px solid var(--border-glass);
  z-index: 999;
  justify-content: space-around;
  align-items: center;
  padding: 0.5rem 0.5rem max(20px, calc(12px + env(safe-area-inset-bottom, 20px)));
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.5);
}

.mobile-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.28rem;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.75rem;
  font-weight: 600;
  flex: 1;
  padding: 0.35rem 0;
  cursor: pointer;
  transition: all 0.2s ease;
}

.mobile-nav-item .nav-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.footer-svg-icon {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  fill: none;
  transition: all 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
  display: block;
}

.mobile-nav-item.active, .mobile-nav-item:hover {
  color: var(--brand-pearl);
}

.mobile-nav-item.active .footer-svg-icon {
  stroke: #FFFFFF;
  transform: translateY(-2px) scale(1.12);
  filter: drop-shadow(0 2px 8px rgba(225, 29, 72, 0.7));
}

.mobile-nav-item:hover .footer-svg-icon {
  stroke: #FFFFFF;
  transform: translateY(-1px);
}

.mobile-nav-item#mob-nav-upgrade .footer-svg-icon {
  stroke: #FBBF24;
}

.mobile-nav-item#mob-nav-upgrade.active .footer-svg-icon {
  stroke: #FDE047;
  filter: drop-shadow(0 0 10px rgba(251, 191, 36, 0.8));
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
  }

  .supernova-stats {
    display: none;
  }

  .mobile-bottom-nav:not(.hidden) {
    display: flex;
  }

  .app-main {
    padding-bottom: max(100px, calc(80px + env(safe-area-inset-bottom, 24px))) !important;
  }

  .header-container {
    padding: 0.6rem 1rem;
  }

  .user-greeting {
    display: none;
  }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--brand-crimson), var(--brand-burgundy));
  color: var(--brand-pearl);
  border: 1px solid rgba(253, 190, 192, 0.2);
  box-shadow: 0 4px 14px var(--primary-glow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 22px rgba(212, 23, 30, 0.6);
  background: linear-gradient(135deg, #e31b23, var(--brand-crimson-dark));
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.07);
  color: var(--text-main);
  border: 1px solid var(--border-glass);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.14);
}

.btn-upgrade {
  background: linear-gradient(135deg, var(--brand-crimson), #b5141b);
  color: white;
  font-size: 1.05rem;
  padding: 0.85rem 1.6rem;
  border: 1px solid var(--brand-rose-soft);
  box-shadow: 0 4px 16px rgba(212, 23, 30, 0.45);
}

.btn-upgrade:hover {
  background: linear-gradient(135deg, #e31b23, #9e1016);
  box-shadow: 0 6px 24px rgba(212, 23, 30, 0.7);
}

.btn-full { width: 100%; }

/* ── Landing Hero & Feature Cards ── */
.landing-hero {
  text-align: center;
  padding: 2.5rem 1rem;
  max-width: 800px;
  margin: 0 auto;
}

.landing-hero h1 {
  font-size: 2.3rem;
  font-weight: 900;
  line-height: 1.25;
  color: var(--brand-pearl);
  margin-bottom: 1rem;
  letter-spacing: -0.5px;
}

.landing-hero h1 span {
  background: linear-gradient(135deg, #FFFFFF 20%, #FFE4E6 60%, #FDA4AF 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.landing-hero p {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 620px;
  margin: 0 auto 1.8rem;
  line-height: 1.6;
}

.landing-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.2rem;
  margin-top: 3rem;
  text-align: left;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  padding: 1.5rem;
  border-radius: var(--radius-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.feature-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  border-color: rgba(253, 164, 175, 0.3);
}

.feature-card .icon {
  font-size: 1.8rem;
  margin-bottom: 0.8rem;
}

.feature-card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--brand-pearl);
  margin-bottom: 0.4rem;
}

.feature-card p {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 0;
}

/* Simple Focused Card Layout */
.app-main {
  flex: 1;
  max-width: 860px;
  width: 100%;
  margin: 0 auto;
  padding: 1.2rem 1rem;
}

.simple-lesson-wrapper {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 1.3rem 1.6rem;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(16px);
}

.simple-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.9rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--border-glass);
}

.simple-prompt-card {
  background: rgba(212, 23, 30, 0.08);
  border: 1px solid rgba(212, 23, 30, 0.3);
  padding: 1rem 1.4rem;
  border-radius: var(--radius-sm);
  margin-bottom: 1.2rem;
  text-align: center;
}

.simple-prompt-card h3 {
  font-size: 1.2rem;
  color: var(--brand-blush);
  margin-bottom: 0.3rem;
}

.simple-prompt-card p {
  font-size: 1.05rem;
  color: var(--brand-pearl);
  font-weight: 500;
}

/* Question Header Card (Distinct Elevated Question Row) */
.question-header-card {
  width: 100%;
  max-width: 580px;
  margin: 0.3rem auto 0.9rem;
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.75) 0%, rgba(15, 23, 42, 0.95) 100%);
  border: 1.5px solid rgba(56, 189, 248, 0.45);
  border-radius: var(--radius-md);
  padding: 1rem 1.3rem;
  box-shadow: 0 10px 30px rgba(14, 165, 233, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  text-align: left;
  backdrop-filter: blur(12px);
}

.question-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.8rem;
}

.question-category-tag {
  background: rgba(56, 189, 248, 0.18);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.4);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  padding: 0.25rem 0.65rem;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.question-body-text {
  font-size: 1.25rem;
  font-weight: 700;
  color: #F8FAFC;
  line-height: 1.5;
  letter-spacing: -0.2px;
}

.options-section-label {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.92rem;
  font-weight: 600;
  margin: 1.2rem 0 0.8rem;
}

/* Answer Choice Tiles (Distinct Interactive Options with A, B, C Badges) */
.selection-options-grid {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  width: 100%;
  max-width: 540px;
  margin: 0 auto 1.5rem;
}

.btn-selection-pill {
  display: flex;
  align-items: center;
  gap: 1rem;
  width: 100%;
  text-align: left;
  padding: 1rem 1.3rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1.5px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.option-letter-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #F8FAFC;
  font-weight: 800;
  font-size: 0.95rem;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.option-label-text {
  color: #F1F5F9;
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.4;
  flex: 1;
}

.btn-selection-pill:hover {
  background: linear-gradient(135deg, rgba(225, 29, 72, 0.16) 0%, rgba(159, 18, 57, 0.26) 100%);
  border-color: rgba(225, 29, 72, 0.6);
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(225, 29, 72, 0.25);
}

.btn-selection-pill:hover .option-letter-badge {
  background: var(--brand-crimson);
  border-color: var(--brand-crimson);
  color: #FFFFFF;
  box-shadow: 0 0 12px rgba(225, 29, 72, 0.6);
}

.btn-selection-pill:active {
  transform: scale(0.98);
  background: rgba(16, 185, 129, 0.2);
  border-color: #10b981;
}

/* Big Mic Button for Voice Practice */
.simple-voice-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.4rem 0;
  text-align: center;
}

.btn-mic-supernova-lg {
  width: 82px;
  height: 82px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #fdbec0 0%, var(--brand-crimson) 50%, var(--brand-crimson-dark) 85%);
  color: white;
  border: 3px solid rgba(253, 190, 192, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 0 32px rgba(212, 23, 30, 0.6);
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  margin: 0.2rem auto;
  position: relative;
}

.btn-mic-supernova-lg:hover {
  transform: scale(1.08);
  box-shadow: 0 0 45px rgba(212, 23, 30, 0.9);
}

.mic-svg-icon {
  width: 36px;
  height: 36px;
  stroke: #FFFFFF;
  color: #FFFFFF;
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.4));
  pointer-events: none;
  display: block;
}

.btn-mic-supernova-lg:hover .mic-svg-icon {
  transform: scale(1.1);
  filter: drop-shadow(0 0 12px rgba(255, 255, 255, 0.9));
}

.btn-mic-supernova-lg.recording {
  background: radial-gradient(circle, #ef4444 0%, #b91c1c 100%) !important;
  box-shadow: 0 0 36px rgba(239, 68, 68, 0.85) !important;
  animation: pulseMic 1.2s infinite alternate ease-in-out;
}

.btn-mic-supernova-lg.recording .mic-svg-icon {
  stroke: #FFFFFF;
  color: #FFFFFF;
  animation: micSvgPulse 0.9s infinite alternate ease-in-out;
}

@keyframes micSvgPulse {
  0% { transform: scale(1); filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.6)); }
  100% { transform: scale(1.16); filter: drop-shadow(0 0 18px rgba(255, 255, 255, 1)); }
}

@keyframes pulseMic {
  0% { transform: scale(1); }
  100% { transform: scale(1.12); }
}

/* Chat & Feedback */
.simple-feedback-box {
  margin-top: 1.5rem;
  padding: 1.2rem 1.5rem;
  border-radius: var(--radius-sm);
  font-size: 1.05rem;
}

.simple-feedback-box.correct {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #34d399;
}

.simple-feedback-box.incorrect {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #f87171;
}

/* Modals */
.modal-dialog {
  border: none;
  border-radius: var(--radius-md);
  padding: 0;
  max-width: 480px;
  width: 92%;
  margin: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
  background: var(--bg-dark);
  color: white;
}

.modal-dialog::backdrop {
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
}

.modal-content {
  padding: 2.2rem;
  position: relative;
  background: rgba(20, 27, 44, 0.95);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
}

.btn-close {
  position: absolute;
  top: 1.2rem;
  right: 1.2rem;
  background: none;
  border: none;
  font-size: 1.6rem;
  cursor: pointer;
  color: var(--text-muted);
}

.auth-tabs {
  display: flex;
  border-bottom: 1px solid var(--border-glass);
  margin-bottom: 1.8rem;
}

.tab-btn {
  flex: 1;
  padding: 0.8rem;
  background: none;
  border: none;
  font-weight: 600;
  cursor: pointer;
  color: var(--text-muted);
  border-bottom: 2px solid transparent;
}

.tab-btn.active {
  color: var(--primary-neon);
  border-bottom-color: var(--primary-neon);
}

.form-group { margin-bottom: 1.4rem; }
.form-group label { display: block; font-size: 0.9rem; font-weight: 600; margin-bottom: 0.4rem; }
.form-group input {
  width: 100%;
  padding: 0.8rem 1rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  color: white;
  font-size: 0.98rem;
}

.error-banner {
  color: #f87171;
  background: rgba(239, 68, 68, 0.15);
  padding: 0.7rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  margin-bottom: 1.2rem;
  display: none;
}

/* Google Sign-In & One-Tap Styling */
.auth-divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 1.4rem 0 1.1rem;
  color: var(--text-muted);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid var(--border-glass);
}

.auth-divider span {
  padding: 0 0.8rem;
}

.google-auth-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  width: 100%;
}

.btn-google-custom {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 0.75rem 1.2rem;
  background: #FFFFFF;
  color: #1f2937;
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: var(--radius-sm);
  border: 1px solid #e5e7eb;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.btn-google-custom:hover {
  background: #f9fafb;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.22);
  transform: translateY(-1px);
}

.hidden { display: none !important; }

/* Dashboard & Course Grid */
.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 1.8rem;
}

@media (max-width: 850px) {
  .dashboard-grid { grid-template-columns: 1fr; }
}

.card-box {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 1.8rem;
  margin-bottom: 1.5rem;
}

.lesson-list { display: flex; flex-direction: column; gap: 0.8rem; }
.lesson-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.2rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
}

.badge-status { font-size: 0.75rem; padding: 0.2rem 0.5rem; border-radius: 12px; font-weight: 700; }
.badge-free { background: rgba(16, 185, 129, 0.2); color: #34d399; }
.badge-paid { background: rgba(245, 158, 11, 0.2); color: #fbbf24; }

.progress-bar-container {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  height: 8px;
  width: 100%;
  overflow: hidden;
  margin: 0.6rem 0;
}
.progress-bar-fill {
  background: linear-gradient(90deg, var(--primary-neon), var(--accent-emerald));
  height: 100%;
}

/* ── Mobile Touch & Phone Optimizations ── */
@media (max-width: 640px) {
  .header-container {
    padding: 0.7rem 1rem;
    gap: 0.5rem;
  }

  .logo-brand-name {
    font-size: 1.1rem;
  }

  .logo-orb {
    width: 28px;
    height: 28px;
  }

  .logo-orb::after {
    font-size: 0.75rem;
  }

  .supernova-stats {
    gap: 0.4rem;
  }

  .stat-pill {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
  }

  .app-main {
    padding: 0.6rem 0.5rem;
  }

  .simple-lesson-wrapper {
    padding: 0.9rem 0.8rem;
    border-radius: var(--radius-sm);
  }

  .simple-prompt-card {
    padding: 0.8rem 0.8rem;
  }

  .simple-prompt-card h3 {
    font-size: 1.1rem;
  }

  .simple-prompt-card p {
    font-size: 0.95rem;
  }

  .selection-options-grid {
    grid-template-columns: 1fr;
    gap: 0.6rem;
  }

  .btn-selection-pill {
    padding: 0.8rem 1rem;
    font-size: 0.98rem;
    min-height: 46px;
  }

  .btn-mic-supernova-lg {
    width: 76px;
    height: 76px;
    font-size: 2rem;
  }

  .modal-content {
    padding: 1.4rem 1rem;
    width: 94vw;
  }
}

/* Live Waveform Audio Bars */
.live-wave-bars {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.wave-bar {
  display: inline-block;
  width: 4px;
  height: 12px;
  background: var(--primary-neon);
  border-radius: 4px;
  animation: wavePulse 0.8s ease-in-out infinite alternate;
}

.wave-bar:nth-child(1) { animation-delay: 0.1s; height: 8px; }
.wave-bar:nth-child(2) { animation-delay: 0.3s; height: 18px; }
.wave-bar:nth-child(3) { animation-delay: 0.2s; height: 24px; }
.wave-bar:nth-child(4) { animation-delay: 0.4s; height: 16px; }
.wave-bar:nth-child(5) { animation-delay: 0.15s; height: 10px; }

@keyframes wavePulse {
  0% { transform: scaleY(0.4); opacity: 0.6; }
  100% { transform: scaleY(1.4); opacity: 1; filter: drop-shadow(0 0 6px var(--primary-neon)); }
}

.btn-mic-supernova-lg.recording {
  background: radial-gradient(circle, #ef4444 0%, #b91c1c 100%) !important;
  box-shadow: 0 0 25px rgba(239, 68, 68, 0.7) !important;
  animation: micPulse 1.2s infinite ease-in-out;
}

@keyframes micPulse {
  0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); }
  70% { transform: scale(1.08); box-shadow: 0 0 0 16px rgba(239, 68, 68, 0); }
  100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

/* Interactive Target Sentence & Word Highlighting (Duolingo Style) */
.target-sentence-card {
  width: 100%;
  max-width: 580px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 0.9rem 1.2rem;
  margin-bottom: 0.4rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(12px);
  text-align: center;
}

.target-sentence-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
  font-size: 0.85rem;
}

.target-badge {
  color: var(--text-muted);
  font-weight: 600;
  letter-spacing: 0.3px;
}

.btn-listen-pronounce {
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.3);
  padding: 0.3rem 0.75rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  transition: all 0.2s ease;
}

.btn-listen-pronounce:hover {
  background: rgba(56, 189, 248, 0.3);
  transform: translateY(-1px);
}

.target-words-flow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.4rem 0.5rem;
  margin: 0.4rem 0 0.6rem;
  line-height: 1.5;
}

.target-word-chip {
  font-size: 1.22rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.82);
  padding: 0.2rem 0.5rem;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  display: inline-block;
}

.target-word-chip.spoken-correct {
  color: #10b981 !important;
  background: rgba(16, 185, 129, 0.18) !important;
  border-color: rgba(16, 185, 129, 0.45) !important;
  transform: scale(1.08);
  box-shadow: 0 0 14px rgba(16, 185, 129, 0.4);
  text-shadow: 0 0 8px rgba(16, 185, 129, 0.5);
}

.target-sentence-footer {
  display: flex;
  justify-content: center;
  margin-top: 0.3rem;
}

.target-progress-pill {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.06);
  padding: 0.25rem 0.75rem;
  border-radius: 12px;
  border: 1px solid var(--border-glass);
  transition: all 0.3s ease;
}

.target-progress-pill.all-matched {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
  border-color: #10b981;
  transform: scale(1.05);
}

/* =============================================================
   POST-SESSION CUSTOMER FEEDBACK & RATING STYLES
   ============================================================= */
.feedback-modal-dialog {
  max-width: 580px;
  width: 94%;
  border-radius: var(--radius-md);
  background: #0D1322;
  border: 1px solid rgba(225, 29, 72, 0.25);
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.8), 0 0 40px rgba(225, 29, 72, 0.15);
}

.feedback-modal-content {
  padding: 1.8rem;
  max-height: 88vh;
  overflow-y: auto;
  scrollbar-width: thin;
}

.feedback-header {
  text-align: center;
  margin-bottom: 1.4rem;
}

.feedback-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.8px;
  color: #FDA4AF;
  background: rgba(225, 29, 72, 0.18);
  border: 1px solid rgba(225, 29, 72, 0.35);
  padding: 0.25rem 0.8rem;
  border-radius: 20px;
  text-transform: uppercase;
}

.session-feedback-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.feedback-q-block {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-glass);
  border-radius: 14px;
  padding: 1rem 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  transition: border-color 0.2s ease;
}

.feedback-q-block:focus-within {
  border-color: rgba(225, 29, 72, 0.4);
}

.feedback-q-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #FFFFFF;
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.q-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--brand-crimson);
  color: white;
  font-size: 0.75rem;
  font-weight: 800;
}

.feedback-chips-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.chip-btn {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--brand-slate-silver);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 0.4rem 0.75rem;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.chip-btn:hover {
  background: rgba(225, 29, 72, 0.15);
  border-color: rgba(225, 29, 72, 0.35);
  color: #FFFFFF;
}

.chip-btn.active {
  background: var(--brand-crimson);
  color: #FFFFFF;
  border-color: #FDA4AF;
  box-shadow: 0 0 12px rgba(225, 29, 72, 0.4);
  transform: scale(1.02);
}

.voice-input-wrapper {
  position: relative;
  width: 100%;
}

.voice-input-wrapper textarea {
  width: 100%;
  padding: 0.65rem 0.85rem;
  padding-right: 5rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.35);
  color: #FFFFFF;
  font-family: var(--font-sans);
  font-size: 0.88rem;
  resize: vertical;
  min-height: 52px;
  line-height: 1.4;
}

.voice-input-wrapper textarea:focus {
  outline: none;
  border-color: var(--brand-crimson);
  box-shadow: 0 0 0 2px rgba(225, 29, 72, 0.25);
}

.btn-voice-input {
  position: absolute;
  right: 8px;
  bottom: 10px;
  background: rgba(225, 29, 72, 0.2);
  border: 1px solid rgba(225, 29, 72, 0.4);
  color: #FDA4AF;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.3rem 0.65rem;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  transition: all 0.2s ease;
}

.btn-voice-input:hover {
  background: var(--brand-crimson);
  color: #FFFFFF;
}

.btn-voice-input.listening {
  background: #DC2626;
  color: #FFFFFF;
  animation: pulseMic 1.2s infinite ease-in-out;
  border-color: #FCA5A5;
}

@keyframes pulseMic {
  0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.7); }
  70% { transform: scale(1.05); box-shadow: 0 0 0 8px rgba(220, 38, 38, 0); }
  100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(220, 38, 38, 0); }
}

/* Play Store Rating Card */
.store-rating-block {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.08) 0%, rgba(245, 158, 11, 0.08) 100%);
  border-color: rgba(16, 185, 129, 0.25);
}

.play-store-card {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.play-store-info {
  display: flex;
  gap: 0.8rem;
  align-items: flex-start;
}

.store-icon-wrap {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: linear-gradient(135deg, #F59E0B, #E11D48);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.btn-store-rate {
  background: linear-gradient(135deg, #059669 0%, #10B981 100%);
  color: #FFFFFF;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.75rem 1.2rem;
  border-radius: 12px;
  font-weight: 700;
  font-size: 0.92rem;
  box-shadow: 0 4px 16px rgba(16, 185, 129, 0.35);
  transition: all 0.25s ease;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-store-rate:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.5);
  color: #FFFFFF;
}

.feedback-form-actions {
  display: flex;
  gap: 0.8rem;
  margin-top: 0.4rem;
}

.feedback-form-actions .btn {
  flex: 1;
  padding: 0.75rem;
  font-size: 0.92rem;
  font-weight: 700;
}

.session-feedback-success {
  text-align: center;
  padding: 2rem 1rem;
}

/* Floating Feedback Button */
.btn-floating-feedback {
  position: fixed;
  bottom: 5rem;
  right: 1.2rem;
  z-index: 95;
  background: linear-gradient(135deg, var(--brand-crimson) 0%, var(--brand-wine) 100%);
  color: #FFFFFF;
  border: 1px solid rgba(253, 164, 175, 0.35);
  padding: 0.6rem 1rem;
  border-radius: 24px;
  font-weight: 700;
  font-size: 0.86rem;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(225, 29, 72, 0.45);
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  user-select: none;
}

.btn-floating-feedback:hover {
  transform: translateY(-3px) scale(1.04);
  box-shadow: 0 8px 25px rgba(225, 29, 72, 0.6);
  border-color: #FDA4AF;
}

.btn-floating-feedback .fab-icon {
  font-size: 1.05rem;
}

/* ── THEME TOGGLE BUTTON ── */
.theme-toggle-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #FFFFFF;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1rem;
  transition: all 0.2s ease;
  flex-shrink: 0;
  user-select: none;
}

.theme-toggle-btn:hover {
  transform: scale(1.08);
  background: rgba(225, 29, 72, 0.2);
  border-color: rgba(225, 29, 72, 0.4);
}

/* ── LIGHT MODE STYLING ── */
[data-theme="light"] {
  --bg-dark: #F8FAFC;
  --bg-card: #FFFFFF;
  --text-main: #0F172A;
  --text-muted: #64748B;
  --border-glass: rgba(0, 0, 0, 0.08);
  --brand-pearl: #0F172A;
  --brand-rose-soft: #BE123C;
  --brand-slate-silver: #64748B;
  --brand-slate: #E2E8F0;
}

[data-theme="light"] body {
  background: radial-gradient(circle at 50% 0%, #FFF1F2 0%, #F8FAFC 60%);
  color: #0F172A;
}

[data-theme="light"] .app-header {
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.03);
}

[data-theme="light"] .logo-brand-name {
  color: #0F172A;
}

[data-theme="light"] .theme-toggle-btn {
  background: #F1F5F9;
  border: 1px solid #CBD5E1;
  color: #0F172A;
}

[data-theme="light"] .theme-toggle-btn:hover {
  background: #FFE4E6;
  border-color: #FDA4AF;
}

[data-theme="light"] .stat-pill {
  background: #FFFFFF;
  border-color: rgba(0, 0, 0, 0.08);
  color: #334155;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

[data-theme="light"] .stat-pill.streak {
  background: #FFF7ED;
  color: #C2410C;
  border-color: #FDBA74;
}

[data-theme="light"] .stat-pill.xp {
  background: #EFF6FF;
  color: #1D4ED8;
  border-color: #93C5FD;
}

[data-theme="light"] .hero-banner {
  background: #FFFFFF;
  border: 1px solid rgba(225, 29, 72, 0.15);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
}

[data-theme="light"] .card-box,
[data-theme="light"] .lesson-detail-card,
[data-theme="light"] .task-card,
[data-theme="light"] .lesson-item {
  background: #FFFFFF;
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
}

[data-theme="light"] .lesson-item:hover {
  background: #FFF1F2;
  border-color: rgba(225, 29, 72, 0.3);
}

[data-theme="light"] .modal-content {
  background: #FFFFFF;
  border: 1px solid rgba(0, 0, 0, 0.1);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
}

[data-theme="light"] .feedback-modal {
  background: #FFFFFF;
  border: 1px solid rgba(0, 0, 0, 0.1);
  color: #0F172A;
}

[data-theme="light"] .btn-secondary {
  background: #F1F5F9;
  color: #334155;
  border: 1px solid #CBD5E1;
}

[data-theme="light"] .btn-secondary:hover {
  background: #E2E8F0;
  color: #0F172A;
}

[data-theme="light"] .chip-btn {
  background: #F8FAFC;
  color: #475569;
  border: 1px solid #E2E8F0;
}

[data-theme="light"] .chip-btn:hover {
  background: #F1F5F9;
  color: #0F172A;
}

[data-theme="light"] .chip-btn.active {
  background: #FFE4E6;
  color: #BE123C;
  border-color: #FDA4AF;
}

[data-theme="light"] .text-input-field,
[data-theme="light"] .form-group input,
[data-theme="light"] .form-group textarea {
  background: #FFFFFF;
  color: #0F172A;
  border: 1px solid #CBD5E1;
}

[data-theme="light"] .text-input-field:focus,
[data-theme="light"] .form-group input:focus,
[data-theme="light"] .form-group textarea:focus {
  border-color: #E11D48;
  box-shadow: 0 0 0 3px rgba(225, 29, 72, 0.15);
}

[data-theme="light"] .playstore-rating-card {
  background: #FFFBEB;
  border: 1px solid #FDE68A;
}

[data-theme="light"] .mobile-bottom-nav {
  background: rgba(255, 255, 255, 0.95);
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.04);
}

[data-theme="light"] .mobile-nav-btn {
  color: #64748B;
}

[data-theme="light"] .mobile-nav-btn.active {
  color: #E11D48;
}

[data-theme="light"] .simple-lesson-wrapper {
  background: #FFFFFF;
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
}

[data-theme="light"] .simple-lesson-wrapper h2,
[data-theme="light"] .simple-lesson-wrapper h3,
[data-theme="light"] .simple-lesson-wrapper p {
  color: #0F172A;
}

[data-theme="light"] .simple-prompt-card {
  background: #FFF1F2;
  border: 1px solid #FECDD3;
}

[data-theme="light"] .simple-prompt-card h3 {
  color: #BE123C;
}

[data-theme="light"] .simple-prompt-card p {
  color: #334155;
}

/* Practice Cards & Sentences */
[data-theme="light"] .target-sentence-card {
  background: #F8FAFC;
  border: 1.5px solid #E2E8F0;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
}

[data-theme="light"] .target-badge {
  color: #475569;
}

[data-theme="light"] .target-word-chip {
  color: #0F172A !important;
  background: #FFFFFF;
  border: 1.5px solid #CBD5E1;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

[data-theme="light"] .target-word-chip:hover {
  background: #F1F5F9;
  border-color: #94A3B8;
}

[data-theme="light"] .target-word-chip.spoken-correct {
  color: #047857 !important;
  background: #D1FAE5 !important;
  border-color: #34D399 !important;
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.3);
  text-shadow: none;
}

[data-theme="light"] .target-progress-pill {
  background: #E2E8F0;
  color: #334155;
}

/* Question Header Card (MCQ) */
[data-theme="light"] .question-header-card {
  background: #F0F9FF;
  border: 1.5px solid #BAE6FD;
  box-shadow: 0 4px 16px rgba(14, 165, 233, 0.08);
}

[data-theme="light"] .question-category-tag {
  background: #E0F2FE;
  color: #0284C7;
  border-color: #BAE6FD;
}

[data-theme="light"] .question-body-text {
  color: #0F172A !important;
}

[data-theme="light"] .options-section-label {
  color: #475569;
}

/* Choice Buttons (MCQ) */
[data-theme="light"] .btn-selection-pill {
  background: #FFFFFF;
  border: 1.5px solid #CBD5E1;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

[data-theme="light"] .btn-selection-pill .option-label-text {
  color: #0F172A !important;
}

[data-theme="light"] .btn-selection-pill .option-letter-badge {
  background: #F1F5F9;
  border-color: #CBD5E1;
  color: #334155;
}

[data-theme="light"] .btn-selection-pill:hover {
  background: #FFF1F2;
  border-color: #FDA4AF;
  box-shadow: 0 4px 16px rgba(225, 29, 72, 0.12);
}

[data-theme="light"] .btn-selection-pill:hover .option-letter-badge {
  background: #E11D48;
  border-color: #E11D48;
  color: #FFFFFF;
}

/* Multilingual Helpers & Drawers */
[data-theme="light"] .language-helper-bar {
  border-top-color: rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .language-select-btn {
  background: #FFFFFF;
  border-color: #CBD5E1;
  color: #334155;
}

[data-theme="light"] .language-select-btn:hover {
  background: #FFF1F2;
  border-color: #FDA4AF;
  color: #BE123C;
}

[data-theme="light"] .btn-toggle-hint {
  background: #ECFDF5;
  border-color: #6EE7B7;
  color: #065F46;
}

[data-theme="light"] .btn-toggle-hint:hover {
  background: #D1FAE5;
  border-color: #34D399;
}

[data-theme="light"] .translation-hint-drawer {
  background: #F8FAFC;
  border: 1.5px solid #BAE6FD;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
}

[data-theme="light"] .hint-text-pronounce {
  color: #B45309 !important;
  font-weight: 700;
}

[data-theme="light"] .hint-text-meaning {
  color: #0369A1 !important;
  font-weight: 600;
}

[data-theme="light"] .hint-badge-pronounce {
  background: #FEF3C7;
  color: #B45309;
  border-color: #FCD34D;
}

[data-theme="light"] .hint-badge-meaning {
  background: #E0F2FE;
  color: #0284C7;
  border-color: #BAE6FD;
}

/* Navigation & Status Labels */
[data-theme="light"] .nav-link {
  color: #475569;
}

[data-theme="light"] .nav-link:hover,
[data-theme="light"] .nav-link.active {
  color: #E11D48;
  background: #FFF1F2;
}

[data-theme="light"] .user-greeting {
  color: #0F172A;
}

[data-theme="light"] #task-step-indicator {
  background: #F1F5F9 !important;
  color: #475569 !important;
}

[data-theme="light"] .task-navigation-row {
  border-top-color: rgba(0, 0, 0, 0.08) !important;
}

[data-theme="light"] .lesson-switcher-bar {
  border-top-color: rgba(0, 0, 0, 0.08) !important;
}

[data-theme="light"] #mic-status-label {
  color: #BE123C !important;
}

[data-theme="light"] #input-voice-text-fallback {
  background: #FFFFFF !important;
  color: #0F172A !important;
  border: 1.5px solid #CBD5E1 !important;
}

[data-theme="light"] #btn-toggle-type-mode {
  color: #64748B !important;
}

/* Tooltip / Popover */
[data-theme="light"] .word-popover-tooltip {
  background: #FFFFFF;
  border-color: #0284C7;
  color: #0F172A;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

[data-theme="light"] .word-popover-tooltip::after {
  border-color: #0284C7 transparent transparent transparent;
}

[data-theme="light"] .word-popover-pronounce {
  color: #B45309;
}

[data-theme="light"] .word-popover-meaning {
  color: #0284C7;
}

/* Course Syllabus Cards */
[data-theme="light"] .course-module-header h2,
[data-theme="light"] .lesson-title,
[data-theme="light"] .lesson-detail-title {
  color: #0F172A !important;
}

[data-theme="light"] .course-module-desc,
[data-theme="light"] .lesson-desc {
  color: #475569 !important;
}

[data-theme="light"] .lang-card-pill {
  background: #FFFFFF;
  border-color: #CBD5E1;
  color: #334155;
}

[data-theme="light"] .lang-card-pill:hover,
[data-theme="light"] .lang-card-pill.active {
  background: #FFF1F2;
  border-color: #E11D48;
  color: #BE123C;
}

[data-theme="light"] .mobile-nav-item {
  color: #64748B;
}

[data-theme="light"] .mobile-nav-item.active {
  color: #E11D48;
}

[data-theme="light"] .mobile-nav-item.active .footer-svg-icon {
  stroke: #E11D48;
  filter: drop-shadow(0 2px 8px rgba(225, 29, 72, 0.3));
}

[data-theme="light"] .badge-tag {
  background: #F1F5F9;
  color: #475569;
}

/* ═══════════════════════════════════════════════════════════════════
   MULTILINGUAL TRANSLATION & TRANSLITERATION SYSTEM (Duolingo-ELSA)
   ═══════════════════════════════════════════════════════════════════ */

.language-helper-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  margin-top: 0.8rem;
  padding-top: 0.6rem;
  border-top: 1px dashed rgba(255, 255, 255, 0.1);
  flex-wrap: wrap;
}

.language-select-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.75rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 20px;
  color: #E2E8F0;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.language-select-btn:hover {
  background: rgba(225, 29, 72, 0.15);
  border-color: rgba(225, 29, 72, 0.5);
  color: #FFFFFF;
}

.btn-toggle-hint {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.8rem;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: 20px;
  color: #34D399;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-toggle-hint:hover {
  background: rgba(16, 185, 129, 0.22);
  border-color: #10B981;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.3);
}

.translation-hint-drawer {
  margin-top: 0.8rem;
  padding: 0.9rem 1.1rem;
  background: rgba(15, 23, 42, 0.75);
  border: 1.5px solid rgba(56, 189, 248, 0.25);
  border-radius: 12px;
  backdrop-filter: blur(12px);
  animation: slideDownFade 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  text-align: left;
}

@keyframes slideDownFade {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

.hint-row {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  margin-bottom: 0.55rem;
}

.hint-row:last-child {
  margin-bottom: 0;
}

.hint-badge-tag {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  white-space: nowrap;
}

.hint-badge-pronounce {
  background: rgba(245, 158, 11, 0.15);
  color: #FBBF24;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.hint-badge-meaning {
  background: rgba(56, 189, 248, 0.15);
  color: #38BDF8;
  border: 1px solid rgba(56, 189, 248, 0.3);
}

.hint-text-pronounce {
  font-size: 0.98rem;
  font-weight: 700;
  color: #FEF08A;
  line-height: 1.45;
  flex: 1;
}

.hint-text-meaning {
  font-size: 0.95rem;
  font-weight: 600;
  color: #E2E8F0;
  line-height: 1.45;
  flex: 1;
}

/* Word Tap Tooltip */
.target-word-chip {
  cursor: pointer;
  position: relative;
}

.target-word-chip:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
}

.word-popover-tooltip {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: #0F172A;
  border: 1.5px solid #38BDF8;
  border-radius: 10px;
  padding: 0.5rem 0.8rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
  z-index: 1000;
  min-width: 140px;
  max-width: 220px;
  text-align: center;
  animation: fadeIn 0.18s ease;
  pointer-events: none;
}

.word-popover-tooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border-width: 6px;
  border-style: solid;
  border-color: #38BDF8 transparent transparent transparent;
}

.word-popover-pronounce {
  font-size: 0.85rem;
  font-weight: 800;
  color: #FBBF24;
}

.word-popover-meaning {
  font-size: 0.8rem;
  font-weight: 600;
  color: #E2E8F0;
  margin-top: 0.15rem;
}

/* Language Onboarding & Selector Modal */
.language-grid-pills {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 0.65rem;
  margin: 1.2rem 0;
}

.lang-card-pill {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.75rem 0.9rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1.5px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  text-align: left;
  color: #E2E8F0;
}

.lang-card-pill:hover, .lang-card-pill.active {
  background: linear-gradient(135deg, rgba(225, 29, 72, 0.18) 0%, rgba(159, 18, 57, 0.28) 100%);
  border-color: #E11D48;
  color: #FFFFFF;
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(225, 29, 72, 0.3);
}

.lang-flag {
  font-size: 1.4rem;
}

.lang-names-wrap {
  display: flex;
  flex-direction: column;
}

.lang-native-title {
  font-size: 0.92rem;
  font-weight: 700;
}

.lang-english-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* ==========================================================================
   Reading Practice Lab & Interactive Reader Styles
   ========================================================================== */
.reading-lab-header {
  margin-bottom: 2rem;
  text-align: center;
}

.reading-lab-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.4rem;
  margin-bottom: 2.5rem;
}

.reading-card {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
}

.reading-card:hover {
  transform: translateY(-3px);
  border-color: rgba(139, 92, 246, 0.45);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

.reading-card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.8rem;
}

.reading-level-tag {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.2rem 0.65rem;
  border-radius: 12px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.reading-level-tag.beginner {
  background: rgba(16, 185, 129, 0.2);
  color: #34D399;
  border: 1px solid rgba(16, 185, 129, 0.4);
}

.reading-level-tag.intermediate {
  background: rgba(59, 130, 246, 0.2);
  color: #60A5FA;
  border: 1px solid rgba(59, 130, 246, 0.4);
}

.reading-level-tag.advanced {
  background: rgba(168, 85, 247, 0.2);
  color: #C084FC;
  border: 1px solid rgba(168, 85, 247, 0.4);
}

.reading-card-title {
  font-size: 1.2rem;
  color: #FFFFFF;
  margin: 0 0 0.4rem;
  font-weight: 700;
  line-height: 1.35;
}

.reading-card-desc {
  font-size: 0.86rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 0 0 1rem;
  flex: 1;
}

.reading-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 0.9rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* Interactive Reader View */
.reader-container {
  max-width: 780px;
  margin: 0 auto 3rem;
}

.reader-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.reader-passage-box {
  background: rgba(20, 27, 44, 0.95);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 2.2rem;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
  line-height: 1.85;
  margin-bottom: 1.8rem;
  transition: font-size 0.2s ease;
}

.reader-sentence {
  display: inline;
  padding: 0.15rem 0.35rem;
  border-radius: 6px;
  transition: background 0.2s ease;
}

.reader-sentence.active-audio {
  background: rgba(139, 92, 246, 0.28);
  color: #FFFFFF;
  box-shadow: 0 0 12px rgba(139, 92, 246, 0.4);
}

.reader-word {
  cursor: pointer;
  border-radius: 4px;
  padding: 0.05rem 0.12rem;
  transition: all 0.15s ease;
}

.reader-word:hover {
  background: rgba(225, 29, 72, 0.25);
  color: #FDA4AF;
}

.reader-word.spoken-correct {
  background: rgba(16, 185, 129, 0.3) !important;
  color: #34D399 !important;
  font-weight: 700;
  text-shadow: 0 0 8px rgba(16, 185, 129, 0.5);
}

/* Reader Toolbar Controls */
.reader-controls-card {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 1.4rem;
  margin-bottom: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.reader-actions-row {
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
  align-items: center;
}

.reader-stats-banner {
  display: flex;
  gap: 1.2rem;
  align-items: center;
  flex-wrap: wrap;
  padding: 0.8rem 1.2rem;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 10px;
  font-size: 0.88rem;
}

.reader-stat-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.reader-stat-val {
  font-weight: 800;
  color: #FFFFFF;
}

.reader-quiz-card {
  background: linear-gradient(135deg, rgba(30, 27, 75, 0.85) 0%, rgba(15, 23, 42, 0.95) 100%);
  border: 1px solid rgba(139, 92, 246, 0.35);
  border-radius: var(--radius-md);
  padding: 1.8rem;
  margin-top: 2rem;
}

.reading-card.locked-card {
  opacity: 0.9;
  border-color: rgba(225, 29, 72, 0.3);
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.95) 0%, rgba(25, 18, 38, 0.95) 100%);
  position: relative;
}

.reading-card.locked-card:hover {
  border-color: rgba(225, 29, 72, 0.6);
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(225, 29, 72, 0.2);
}

.reading-card.locked-card::before {
  content: "🔒";
  position: absolute;
  top: 1rem;
  right: 1rem;
  font-size: 1.1rem;
  opacity: 0.85;
}

/* ==========================================================================
   FULL-SCREEN GOOGLE SIGN-IN GATEKEEPER WALL
   ========================================================================== */
.auth-wall-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100vw;
  height: 100vh;
  z-index: 99999;
  background: radial-gradient(circle at 50% 15%, #1e1b4b 0%, #0a0f1d 75%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  overflow-y: auto;
  backdrop-filter: blur(20px);
}

.auth-wall-overlay.hidden {
  display: none !important;
}

.auth-wall-card {
  width: 100%;
  max-width: 520px;
  background: rgba(18, 25, 44, 0.96);
  border: 1px solid rgba(253, 164, 175, 0.22);
  border-radius: var(--radius-lg);
  padding: 2.5rem 2rem;
  text-align: center;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.65), 0 0 40px rgba(225, 29, 72, 0.2);
  animation: authWallFadeIn 0.35s ease-out forwards;
}

@keyframes authWallFadeIn {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.auth-wall-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: rgba(225, 29, 72, 0.15);
  border: 1px solid rgba(225, 29, 72, 0.35);
  color: var(--brand-rose-soft);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.8px;
  padding: 0.35rem 0.9rem;
  border-radius: 50px;
  margin-bottom: 1.2rem;
  text-transform: uppercase;
}

.auth-wall-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 0.8rem;
}

.auth-wall-app-logo {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  box-shadow: 0 4px 14px rgba(225, 29, 72, 0.35);
}

.auth-wall-title {
  font-size: 1.9rem;
  font-weight: 900;
  color: #FFFFFF;
  letter-spacing: -0.5px;
}

.auth-wall-tagline {
  font-size: 0.96rem;
  color: var(--text-muted);
  line-height: 1.55;
  margin: 0 auto 1.5rem;
  max-width: 420px;
}

.auth-wall-tagline strong {
  color: #FFFFFF;
  font-weight: 600;
}

.auth-wall-pillars {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  margin-bottom: 1.8rem;
  text-align: left;
}

.pillar-chip {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.07);
  padding: 0.65rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  color: #E2E8F0;
  font-weight: 500;
}

.pillar-chip .pillar-icon {
  font-size: 1.15rem;
  flex-shrink: 0;
}

.auth-wall-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  margin-bottom: 1.2rem;
}

.wall-google-btn-wrap {
  width: 100%;
  display: flex;
  justify-content: center;
}

.auth-wall-error-banner {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #fca5a5;
  padding: 0.7rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  margin-bottom: 1rem;
}

.auth-wall-footer-options {
  margin-bottom: 1.2rem;
}

.btn-link-subtle {
  background: transparent;
  border: none;
  color: var(--brand-rose-soft);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0.4rem 0.8rem;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.btn-link-subtle:hover {
  text-decoration: underline;
  color: #FFFFFF;
}

.auth-wall-trust {
  font-size: 0.76rem;
  color: var(--text-muted);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 1rem;
  letter-spacing: 0.2px;
}

@media (max-width: 600px) {
  .auth-wall-card {
    padding: 2rem 1.25rem;
    border-radius: var(--radius-md);
  }
  .auth-wall-title {
    font-size: 1.6rem;
  }
  .auth-wall-tagline {
    font-size: 0.9rem;
  }
}

/* In-App Browser (Instagram / Facebook) Warning Card */
.iab-notice-card {
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.4);
  border-radius: var(--radius-md);
  padding: 1rem 1.2rem;
  margin-bottom: 1.2rem;
  text-align: left;
}

.iab-notice-card.hidden {
  display: none !important;
}

.iab-notice-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 0.95rem;
  color: #fbbf24;
  margin-bottom: 0.4rem;
}

.iab-notice-desc {
  font-size: 0.86rem;
  color: #e2e8f0;
  line-height: 1.5;
  margin: 0 0 0.8rem 0;
}

.btn-iab-chrome {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.8rem 1rem;
  border-radius: 50px;
  background: linear-gradient(135deg, #38bdf8 0%, #0284c7 100%);
  color: #ffffff;
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(56, 189, 248, 0.35);
  box-sizing: border-box;
}

.btn-iab-chrome:hover {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  transform: translateY(-1px);
}

.btn-iab-chrome.hidden {
  display: none !important;
}


