/* ═══════════════════════════════════════════════════════════
   FluentFlow v3.0 — Design System (Dark Glassmorphism)
   ═══════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

:root {
  --bg-primary: #0a0a1a;
  --bg-secondary: #111128;
  --bg-card: rgba(25, 25, 55, 0.65);
  --bg-card-hover: rgba(35, 35, 75, 0.75);
  --bg-glass: rgba(255, 255, 255, 0.04);
  --bg-glass-border: rgba(255, 255, 255, 0.08);
  --bg-input: rgba(255, 255, 255, 0.06);
  --text-primary: #f0f0f5;
  --text-secondary: #9d9db5;
  --text-muted: #5e5e7a;
  --accent: #7c5cfc;
  --accent-glow: rgba(124, 92, 252, 0.35);
  --accent-light: #a78bfa;
  --success: #34d399;
  --success-glow: rgba(52, 211, 153, 0.25);
  --warning: #fbbf24;
  --danger: #f87171;
  --cyan: #06b6d4;
  --gradient-1: linear-gradient(135deg, #7c5cfc 0%, #a78bfa 50%, #c084fc 100%);
  --gradient-2: linear-gradient(135deg, #06b6d4 0%, #7c5cfc 100%);
  --gradient-fire: linear-gradient(135deg, #ff6b35 0%, #ff4500 50%, #ffd700 100%);
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 20px rgba(0,0,0,0.4);
  --shadow-lg: 0 8px 40px rgba(0,0,0,0.5);
  --shadow-glow: 0 0 30px var(--accent-glow);
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --nav-height: 72px;
  --app-content-gutter: 16px;
  --bottom-nav-clearance: calc(var(--nav-height) + 48px + env(safe-area-inset-bottom));
  --blur: 20px;
}

[data-theme="light"] {
  --bg-primary: #f5f5ff;
  --bg-secondary: #eeeef8;
  --bg-card: rgba(255, 255, 255, 0.75);
  --bg-card-hover: rgba(255, 255, 255, 0.9);
  --bg-glass: rgba(255, 255, 255, 0.5);
  --bg-glass-border: rgba(0, 0, 0, 0.08);
  --bg-input: rgba(0, 0, 0, 0.04);
  --text-primary: #1a1a2e;
  --text-secondary: #555577;
  --text-muted: #9999bb;
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 20px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 40px rgba(0,0,0,0.1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; -webkit-tap-highlight-color: transparent; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  transition: background 0.4s ease, color 0.4s ease;
  padding-bottom: 0;
}

body::before, body::after {
  content: ''; position: fixed; border-radius: 50%;
  filter: blur(120px); opacity: 0.15; z-index: 0; pointer-events: none;
}
body::before { width: 500px; height: 500px; background: #7c5cfc; top: -100px; left: -100px; }
body::after { width: 400px; height: 400px; background: #06b6d4; bottom: 100px; right: -80px; }

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--text-muted); border-radius: 3px; }

/* ── Loading Screen ── */
#loading-screen {
  position: fixed; inset: 0; background: var(--bg-primary);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  z-index: 10000; transition: opacity 0.5s, visibility 0.5s;
}
#loading-screen.hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.loader-logo { font-size: 2.5rem; font-weight: 800; background: var(--gradient-1); -webkit-background-clip: text; -webkit-text-fill-color: transparent; margin-bottom: 24px; animation: pulse-glow 2s ease-in-out infinite; }
.loader-spinner { width: 40px; height: 40px; border: 3px solid var(--bg-glass-border); border-top-color: var(--accent); border-radius: 50%; animation: spin 0.8s linear infinite; }
.loader-text { margin-top: 16px; color: var(--text-secondary); font-size: 0.85rem; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse-glow { 0%,100%{ filter: brightness(1); } 50%{ filter: brightness(1.3); } }
@keyframes pulse { 0%,100%{ opacity:0.3; transform:scale(0.8); } 50%{ opacity:1; transform:scale(1.2); } }

/* ── Auth Screen (Multi-User) ── */
.auth-screen {
  position: fixed; inset: 0; background: var(--bg-primary);
  display: flex; align-items: flex-start; justify-content: center;
  z-index: 9000; padding: 20px 16px; overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.auth-screen::before {
  content: ''; position: absolute; top: 10%; left: 50%; transform: translateX(-50%);
  width: 350px; height: 350px; background: var(--accent); border-radius: 50%;
  filter: blur(150px); opacity: 0.12; pointer-events: none;
}
.auth-container {
  width: 100%; max-width: 420px; position: relative; z-index: 1;
  animation: fadeSlideUp 0.5s ease; margin: auto; padding: 10px 0 24px;
}
.auth-logo { text-align: center; font-size: 2.4rem; font-weight: 800; background: var(--gradient-1); -webkit-background-clip: text; -webkit-text-fill-color: transparent; margin-bottom: 4px; }
.auth-tagline { text-align: center; color: var(--text-muted); font-size: 0.85rem; margin-bottom: 24px; }
.auth-card {
  background: var(--bg-card); border: 1px solid var(--bg-glass-border);
  border-radius: var(--radius-lg); padding: 28px; backdrop-filter: blur(var(--blur));
  box-shadow: var(--shadow-lg);
}
.auth-card-title { font-size: 1.25rem; font-weight: 700; margin-bottom: 6px; text-align: center; }
.auth-card-sub { font-size: 0.85rem; color: var(--text-secondary); text-align: center; margin-bottom: 20px; }
.auth-link { text-align: center; margin-top: 16px; font-size: 0.82rem; color: var(--accent-light); cursor: pointer; transition: color 0.2s; }
.auth-link:hover { color: var(--accent); text-decoration: underline; }
.auth-error { text-align: center; margin-top: 12px; font-size: 0.82rem; color: var(--danger); min-height: 1.2em; font-weight: 500; }
.auth-otp-sent { animation: fadeSlideUp 0.3s ease; margin-top: 16px; }

/* ── App Container ── */
#app { position: relative; z-index: 1; max-width: 520px; margin: 0 auto; padding: 16px var(--app-content-gutter) 0; }
#app::after { content: none; }

.top-bar { 
  display: flex; 
  align-items: center; 
  justify-content: space-between; 
  padding: 10px 4px; 
  margin-bottom: 8px; 
  gap: 6px;
}
.top-bar-brand { 
  font-size: 1.35rem; 
  font-weight: 800; 
  background: var(--gradient-1); 
  -webkit-background-clip: text; 
  -webkit-text-fill-color: transparent; 
  white-space: nowrap;
  flex-shrink: 0;
}
.top-bar-actions { 
  display: flex; 
  gap: 6px; 
  align-items: center; 
  flex-shrink: 0;
}

.icon-btn {
  width: 36px; height: 36px; display: flex; align-items: center; justify-content: center;
  border-radius: 10px; border: 1px solid var(--bg-glass-border); background: var(--bg-glass);
  color: var(--text-secondary); cursor: pointer; font-size: 1.05rem; flex-shrink: 0;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1); backdrop-filter: blur(10px);
  box-shadow: 0 2px 6px rgba(0,0,0,0.15), inset 0 1px 0 rgba(255,255,255,0.06);
  user-select: none;
}
.icon-btn:hover { background: var(--bg-card-hover); color: var(--text-primary); border-color: rgba(124, 92, 252, 0.35); transform: translateY(-1px); }
.icon-btn:active { transform: translateY(2px) scale(0.94); box-shadow: inset 0 2px 4px rgba(0,0,0,0.3) !important; }
.notif-icon-btn { position: relative; }
.notif-setup-dot { display: none; position: absolute; top: 5px; right: 5px; width: 8px; height: 8px; border-radius: 50%; background: #fb7185; border: 1.5px solid var(--bg-card); box-shadow: 0 0 10px rgba(251,113,133,0.85); }
.notif-setup-dot.show { display: block; }

/* ── Pages ── */
.page { display: none; padding-bottom: var(--bottom-nav-clearance); }
.page.active { display: block; animation: pageFadeIn 0.2s ease both; }
#page-read { padding-bottom: calc(var(--bottom-nav-clearance) + 40px); }
@keyframes pageFadeIn { from { opacity:0; } to { opacity:1; } }

/* ── Glass Card ── */
.glass-card {
  background: linear-gradient(145deg, rgba(30, 30, 45, 0.7) 0%, rgba(15, 15, 25, 0.9) 100%);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 20px; padding: 16px; position: relative;
  overflow: hidden; box-shadow: 0 10px 30px rgba(0,0,0,0.4);
  backdrop-filter: blur(20px); transition: all 0.3s ease; margin-bottom: 12px;
}
.glass-card:hover { box-shadow: var(--shadow-md); }
.card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.card-title { font-size: 1.05rem; font-weight: 700; display: flex; align-items: center; gap: 6px; }
.card-badge { font-size: 0.7rem; font-weight: 600; padding: 3px 10px; border-radius: 20px; background: var(--accent-glow); color: var(--accent-light); }

/* ── Greeting ── */
.greeting-card {
  background: radial-gradient(circle at 100% -20%, rgba(124, 92, 252, 0.4) 0%, rgba(20, 20, 35, 0.95) 100%);
  border: 1px solid rgba(124, 92, 252, 0.3); padding: 24px 20px;
  border-radius: 24px; position: relative; overflow: hidden; box-shadow: 0 15px 40px rgba(124, 92, 252, 0.15);
}
.greeting-card::before { content: ''; position: absolute; top: -50%; right: -30%; width: 200px; height: 200px; background: rgba(255,255,255,0.04); border-radius: 50%; filter: blur(30px); }
.greeting-emoji { font-size: 1.8rem; margin-bottom: 4px; filter: drop-shadow(0 4px 10px rgba(0,0,0,0.4)); }
.greeting-text { font-size: 1.6rem; font-weight: 900; letter-spacing: -0.5px; background: linear-gradient(135deg, #ffffff 0%, #d8b4fe 100%); -webkit-background-clip: text; -webkit-text-fill-color: transparent; line-height: 1.2; }
.greeting-sub { font-size: 0.9rem; color: #a1a1aa; margin-top: 4px; font-weight: 500; }

/* ── Stats ── */
.stats-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 16px; }
.stat-card {
  background: linear-gradient(145deg, rgba(35, 35, 65, 0.75) 0%, rgba(18, 18, 38, 0.9) 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px; padding: 14px 8px; text-align: center;
  backdrop-filter: blur(var(--blur));
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
  user-select: none;
}
.stat-card:hover { transform: translateY(-3px); border-color: rgba(124, 92, 252, 0.45); box-shadow: 0 8px 24px rgba(124, 92, 252, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.15); }
.stat-card:active { transform: translateY(1px) scale(0.975); box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3); }
.stat-icon { font-size: 1.6rem; margin-bottom: 6px; filter: drop-shadow(0 4px 6px rgba(0,0,0,0.3)); }
.stat-value { font-size: 1.6rem; font-weight: 900; background: var(--gradient-1); -webkit-background-clip: text; -webkit-text-fill-color: transparent; letter-spacing: -0.5px; }
.stat-value.fire-text { background: var(--gradient-fire); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.stat-label { font-size: 0.68rem; color: #71717a; text-transform: uppercase; letter-spacing: 0.5px; margin-top: 4px; font-weight: 700; }

/* ── Quote Card ── */
.quote-card { text-align: center; padding: 28px 24px; border-left: none; border-radius: 24px; background: linear-gradient(180deg, rgba(20, 20, 35, 0.6) 0%, rgba(10, 10, 20, 0.8) 100%); border: 1px solid rgba(255,255,255,0.04); position: relative; }
.quote-card::before { content: '"'; position: absolute; top: 10px; left: 20px; font-size: 4rem; color: rgba(255,255,255,0.05); font-family: serif; font-weight: 900; line-height: 1; }
.quote-text { font-size: 1rem; font-style: italic; color: #d4d4d8; line-height: 1.7; position: relative; z-index: 1; font-weight: 500; }
.quote-author { font-size: 0.8rem; color: var(--accent-light); margin-top: 12px; font-weight: 700; letter-spacing: 0.5px; text-transform: uppercase; }

/* ── Chart ── */
.chart-container { position: relative; height: 180px; width: 100%; }
.chart-toggle-group { display: flex; gap: 6px; }
.chart-toggle {
  padding: 4px 12px; border-radius: 20px; border: 1px solid var(--bg-glass-border);
  background: transparent; color: var(--text-secondary); font-size: 0.75rem; font-weight: 600;
  cursor: pointer; transition: all 0.2s; font-family: 'Inter', sans-serif;
}
.chart-toggle.active { background: var(--accent); color: #fff; border-color: var(--accent); }

/* ── 2026 Fluid Neo-Tactile Daily Fuel Gauge ── */
.cl-hero-gauge {
  background: linear-gradient(135deg, rgba(26, 26, 62, 0.85) 0%, rgba(17, 17, 40, 0.95) 100%);
  border: 1px solid rgba(124, 92, 252, 0.3);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  margin-bottom: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(16px);
  position: relative;
  overflow: hidden;
}
.cl-hero-gauge::before {
  content: '';
  position: absolute;
  top: -30%;
  left: 20%;
  width: 60%;
  height: 50%;
  background: radial-gradient(circle, rgba(124, 92, 252, 0.22), transparent 70%);
  pointer-events: none;
}
.cl-hero-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.cl-hero-label {
  font-size: 0.68rem;
  font-weight: 800;
  color: var(--accent-light);
  letter-spacing: 0.8px;
  text-transform: uppercase;
}
.cl-hero-title {
  font-size: 1.12rem;
  font-weight: 800;
  color: #ffffff;
  margin-top: 2px;
}
.cl-shield-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--text-secondary);
  transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  user-select: none;
}
.cl-shield-badge.shield-locked {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.22), rgba(6, 182, 212, 0.18));
  border-color: rgba(52, 211, 153, 0.6);
  color: #34d399;
  box-shadow: 0 0 16px rgba(16, 185, 129, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  animation: shieldPulse 2.5s infinite;
}
@keyframes shieldPulse {
  0%, 100% { box-shadow: 0 0 14px rgba(16, 185, 129, 0.3); }
  50% { box-shadow: 0 0 24px rgba(52, 211, 153, 0.6); }
}
.cl-hero-bar {
  width: 100%;
  height: 9px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.06);
  overflow: hidden;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.5);
  position: relative;
}
.cl-hero-fill {
  height: 100%;
  border-radius: 6px;
  background: linear-gradient(90deg, #7c5cfc 0%, #06b6d4 55%, #10b981 100%);
  transition: width 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
}
.cl-hero-fill-glow {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 12px;
  background: #ffffff;
  box-shadow: 0 0 12px #fff, 0 0 20px #34d399;
  border-radius: 6px;
  opacity: 0.8;
}
.cl-hero-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 10px;
  font-size: 0.76rem;
}
.cl-hero-msg {
  color: var(--text-secondary);
  font-weight: 500;
  flex: 1;
  padding-right: 8px;
}
.cl-hero-pct {
  font-weight: 800;
  color: var(--cyan);
  font-size: 0.82rem;
}

/* ── 2026 Fluid Neo-Tactile Checklist ── */
.checklist-item {
  display: flex; align-items: center; gap: 14px; padding: 14px 16px;
  border-radius: var(--radius-sm); background: var(--bg-glass);
  border: 1px solid var(--bg-glass-border); margin-bottom: 9px;
  cursor: pointer; transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1); user-select: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
.checklist-item:hover {
  background: var(--bg-card-hover);
  border-color: rgba(124, 92, 252, 0.3);
  transform: translateY(-1px);
}
.checklist-item:active {
  transform: translateY(1px) scale(0.985);
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.25);
}
.checklist-item.checked {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.14) 0%, rgba(6, 182, 212, 0.08) 100%);
  border-color: rgba(52, 211, 153, 0.45);
  box-shadow: 0 4px 18px rgba(16, 185, 129, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  transform: translateY(-1px);
}
.checklist-item.checked .cl-text {
  text-decoration: none;
  color: #f0fdf4;
  font-weight: 700;
  text-shadow: 0 0 12px rgba(52, 211, 153, 0.25);
}
.checklist-item.checked .cl-desc {
  color: rgba(167, 243, 208, 0.85);
}
.checklist-item.checked .cl-icon {
  transform: scale(1.18);
  filter: drop-shadow(0 2px 8px rgba(52, 211, 153, 0.4));
}
.cl-checkbox {
  width: 26px; height: 26px; flex-shrink: 0; border-radius: 9px;
  border: 2px solid var(--text-muted); display: flex; align-items: center; justify-content: center;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1); font-size: 0.85rem; font-weight: 800; color: transparent;
  background: rgba(0, 0, 0, 0.25);
}
.checklist-item.checked .cl-checkbox {
  background: linear-gradient(135deg, #10b981, #059669);
  border-color: #34d399;
  color: #fff;
  box-shadow: 0 0 14px rgba(52, 211, 153, 0.5), inset 0 1px 1px rgba(255, 255, 255, 0.4);
  transform: scale(1.08);
}
.cl-icon { font-size: 1.25rem; transition: transform 0.3s ease; }
.cl-info { flex: 1; min-width: 0; }
.cl-text { font-size: 0.92rem; font-weight: 600; transition: all 0.25s ease; color: var(--text-primary); }
.cl-desc { font-size: 0.73rem; color: var(--text-muted); margin-top: 2px; transition: color 0.25s ease; }

.timer-badge-btn {
  padding: 5px 11px; border-radius: 12px; border: 1px solid var(--accent);
  background: var(--accent-glow); color: var(--accent-light); font-size: 0.75rem;
  font-weight: 700; cursor: pointer; transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}
.timer-badge-btn:hover { background: var(--accent); color: #fff; transform: scale(1.05); box-shadow: 0 4px 12px var(--accent-glow); }
.timer-badge-btn:active { transform: translateY(1px) scale(0.96); }

.checklist-progress-bar { width: 100%; height: 6px; border-radius: 3px; background: var(--bg-glass); margin-top: 12px; overflow: hidden; }
.checklist-progress-fill { height: 100%; border-radius: 3px; background: var(--gradient-1); transition: width 0.5s cubic-bezier(0.4,0,0.2,1); }
.checklist-status { text-align: center; margin-top: 10px; font-size: 0.8rem; color: var(--text-secondary); font-weight: 500; }

/* ── Forms ── */
.form-group { margin-bottom: 14px; }
.form-label { display: block; font-size: 0.78rem; font-weight: 600; color: var(--text-secondary); margin-bottom: 6px; text-transform: uppercase; letter-spacing: 0.5px; }
.form-input, .form-textarea {
  width: 100%; padding: 12px 16px; border-radius: var(--radius-sm);
  border: 1px solid var(--bg-glass-border); background: var(--bg-input);
  color: var(--text-primary); font-family: 'Inter', sans-serif; font-size: 0.9rem;
  transition: all 0.3s ease; outline: none;
}
.form-input:focus, .form-textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }
.form-textarea { min-height: 80px; resize: vertical; }

/* ── 2026 Neo-Tactile Buttons ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 24px; border-radius: var(--radius-sm); border: none;
  font-family: 'Inter', sans-serif; font-size: 0.9rem; font-weight: 600;
  cursor: pointer; transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1); position: relative; overflow: hidden;
  user-select: none;
}
.btn:active {
  transform: translateY(2px) scale(0.985);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3) !important;
}
.btn-primary {
  background: var(--gradient-1);
  color: #fff;
  box-shadow: 0 4px 14px var(--accent-glow), 0 2px 0 rgba(99, 102, 241, 0.5);
}
.btn-primary:hover {
  box-shadow: 0 6px 22px var(--accent-glow), 0 3px 0 rgba(99, 102, 241, 0.6);
  transform: translateY(-1px);
}
.btn-primary:active {
  transform: translateY(2px) scale(0.985);
  box-shadow: 0 1px 4px var(--accent-glow), inset 0 2px 4px rgba(0, 0, 0, 0.3) !important;
}
.btn-secondary {
  background: var(--bg-glass);
  color: var(--text-primary);
  border: 1px solid var(--bg-glass-border);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}
.btn-secondary:hover {
  background: var(--bg-card-hover);
  border-color: rgba(124, 92, 252, 0.4);
  transform: translateY(-1px);
}
.btn-secondary:active {
  transform: translateY(2px) scale(0.985);
}
.btn-success { background: var(--success); color: #fff; box-shadow: 0 4px 14px var(--success-glow), 0 2px 0 rgba(5, 150, 105, 0.6); }
.btn-danger { background: var(--danger); color: #fff; box-shadow: 0 4px 14px rgba(248, 113, 113, 0.3), 0 2px 0 rgba(220, 38, 38, 0.6); }
.btn-sm { padding: 8px 16px; font-size: 0.8rem; }
.btn-block { width: 100%; }
.btn-icon { width: 44px; height: 44px; padding: 0; border-radius: 12px; font-size: 1.1rem; }

/* ── Animated Soundwave for Voice / AI Chat ── */
.chat-soundwave {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  height: 22px;
  padding: 0 6px;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(52, 211, 153, 0.3);
  border-radius: 12px;
}
.sw-bar {
  width: 3px;
  border-radius: 3px;
  background: linear-gradient(180deg, #34d399, #06b6d4);
  animation: wavePulse 0.9s ease-in-out infinite alternate;
}
.sw-bar.bar1 { height: 6px; animation-delay: 0.0s; }
.sw-bar.bar2 { height: 16px; animation-delay: 0.2s; }
.sw-bar.bar3 { height: 10px; animation-delay: 0.4s; }
.sw-bar.bar4 { height: 14px; animation-delay: 0.1s; }
@keyframes wavePulse {
  0% { height: 4px; opacity: 0.5; }
  100% { height: 18px; opacity: 1; filter: drop-shadow(0 0 4px #34d399); }
}

/* ── Revision & Audio Cards ── */
.revision-card {
  background: var(--bg-card); border: 1px solid var(--bg-glass-border);
  border-radius: var(--radius-md); padding: 16px; margin-bottom: 10px;
  transition: all 0.3s ease; position: relative; overflow: hidden;
}
.revision-card::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--gradient-1); border-radius: 0 4px 4px 0; }
.rev-header { display: flex; align-items: center; justify-content: space-between; padding-left: 8px; }
.rev-word { font-size: 1.15rem; font-weight: 700; }
.rev-hindi { font-size: 0.85rem; color: var(--accent-light); margin-top: 4px; padding-left: 8px; }
.rev-example { font-size: 0.8rem; color: var(--text-secondary); font-style: italic; margin-top: 6px; padding-left: 8px; }
.rev-actions { display: flex; gap: 8px; margin-top: 12px; padding-left: 8px; }
.revision-empty { text-align: center; padding: 24px; color: var(--text-muted); font-size: 0.85rem; }
.revision-empty-icon { font-size: 2.5rem; margin-bottom: 8px; }

/* ── Word List (Expandable Cards) ── */
.vault-search { width: 100%; padding: 10px 14px; background: var(--bg-input); border: 1px solid var(--bg-glass-border); border-radius: var(--radius-sm); color: var(--text-primary); font-family: inherit; font-size: 0.88rem; margin-bottom: 12px; outline: none; transition: border-color 0.3s; }
.vault-search:focus { border-color: var(--accent); }
.vault-search::placeholder { color: var(--text-muted); }
.word-card {
  background: var(--bg-glass);
  border: 1px solid var(--bg-glass-border);
  border-radius: var(--radius-sm);
  padding: 14px;
  margin-bottom: 10px;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
.word-card:hover {
  background: var(--bg-card-hover);
  border-color: rgba(124, 92, 252, 0.35);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
.word-card:active {
  transform: translateY(1px) scale(0.985);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.25);
}
.word-card-header { display: flex; align-items: center; justify-content: space-between; }
.word-card-left { flex: 1; min-width: 0; }
.wl-word { font-weight: 700; font-size: 0.95rem; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.wl-hindi { font-size: 0.82rem; color: var(--accent-light); margin-top: 3px; }
.wl-meta { display: flex; align-items: center; gap: 8px; margin-top: 4px; flex-wrap: wrap; }
.wl-date { font-size: 0.68rem; color: var(--text-muted); }
.wl-reviews { font-size: 0.68rem; font-weight: 600; background: var(--accent-glow); color: var(--accent-light); padding: 2px 8px; border-radius: 12px; }
.wl-next-review { font-size: 0.68rem; color: var(--cyan); }
.word-card-actions { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.word-card-detail { max-height: 0; overflow: hidden; transition: max-height 0.35s ease, padding 0.35s ease; padding: 0 0; }
.word-card.expanded .word-card-detail { max-height: 800px; padding: 10px 0 0; }
.wl-example { font-size: 0.84rem; color: var(--text-secondary); font-style: italic; line-height: 1.5; padding: 8px 12px; background: rgba(124,92,252,0.06); border-left: 3px solid var(--accent); border-radius: 0 8px 8px 0; }
.wl-example-empty { font-size: 0.8rem; color: var(--text-muted); font-style: italic; }
.btn-delete { background: rgba(248,113,113,0.12); color: var(--danger); border: 1px solid rgba(248,113,113,0.25); border-radius: 8px; padding: 4px 8px; font-size: 0.72rem; cursor: pointer; transition: all 0.2s; }
.btn-delete:hover { background: var(--danger); color: #fff; }
.speed-toggle { background: var(--bg-input); border: 1px solid var(--bg-glass-border); color: var(--text-secondary); padding: 3px 8px; border-radius: 6px; font-size: 0.7rem; cursor: pointer; font-family: inherit; transition: all 0.2s; }
.speed-toggle:active { background: var(--accent-glow); color: var(--accent); }

/* ── Brain Freeze & AI Cards ── */
.bottleneck-item { background: var(--bg-glass); border: 1px solid var(--bg-glass-border); border-radius: var(--radius-sm); padding: 16px; margin-bottom: 12px; }
.bn-hindi { font-size: 0.92rem; font-weight: 600; margin-bottom: 8px; color: var(--text-primary); }
.bn-ai-box { background: rgba(124, 92, 252, 0.08); border: 1px solid rgba(124, 92, 252, 0.2); border-radius: 12px; padding: 12px; margin: 8px 0; }
.bn-pill { display: inline-block; font-size: 0.68rem; font-weight: 700; text-transform: uppercase; padding: 2px 8px; border-radius: 6px; margin-bottom: 4px; }
.bn-pill.casual { background: rgba(52, 211, 153, 0.15); color: var(--success); }
.bn-pill.formal { background: rgba(6, 182, 212, 0.15); color: var(--cyan); }
.bn-text { font-size: 0.88rem; color: var(--text-primary); margin-bottom: 6px; }
.bn-tips { font-size: 0.76rem; color: var(--warning); font-style: italic; }
.bn-meta { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; }
.bn-date { font-size: 0.7rem; color: var(--text-muted); }
.bn-status { font-size: 0.7rem; font-weight: 600; padding: 2px 10px; border-radius: 12px; background: var(--success-glow); color: var(--success); }

.voice-btn {
  width: 48px; height: 48px; border-radius: 50%; border: 2px solid var(--danger);
  background: rgba(248,113,113,0.1); color: var(--danger); font-size: 1.2rem;
  cursor: pointer; transition: all 0.3s ease; display: flex; align-items: center; justify-content: center;
}
.voice-btn.recording { background: var(--danger); color: #fff; animation: pulse-ring 1.5s ease-out infinite; box-shadow: 0 0 20px rgba(248,113,113,0.5); }
@keyframes pulse-ring { 0%{ box-shadow: 0 0 0 0 rgba(248,113,113,0.5); } 70%{ box-shadow: 0 0 0 12px rgba(248,113,113,0); } 100%{ box-shadow: 0 0 0 0 rgba(248,113,113,0); } }

/* ── 🏆 Leaderboard ── */
.leaderboard-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px; border-radius: var(--radius-sm); background: var(--bg-glass);
  border: 1px solid var(--bg-glass-border); margin-bottom: 8px; transition: all 0.2s;
}
.leaderboard-row:hover { background: var(--bg-card-hover); transform: translateX(3px); }
.lb-rank { width: 32px; font-weight: 800; font-size: 1.1rem; text-align: center; }
.lb-rank.gold { color: #ffd700; text-shadow: 0 0 10px rgba(255,215,0,0.5); }
.lb-rank.silver { color: #e0e0e0; }
.lb-rank.bronze { color: #cd7f32; }
.lb-user { flex: 1; padding-left: 12px; }
.lb-name { font-weight: 600; font-size: 0.92rem; }
.lb-badge { font-size: 0.7rem; font-weight: 600; margin-top: 2px; }
.lb-streak { display: flex; align-items: center; gap: 4px; font-weight: 800; font-size: 1.1rem; background: var(--gradient-fire); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }

/* ── ⏱️ Timer Modal ── */
.timer-modal-card {
  width: 100%; max-width: 400px; background: var(--bg-card);
  border: 1px solid var(--bg-glass-border); border-radius: var(--radius-lg);
  padding: 28px 24px; text-align: center; backdrop-filter: blur(var(--blur));
  box-shadow: var(--shadow-lg); animation: slideUp 0.3s ease;
}
.timer-display-container { position: relative; width: 180px; height: 180px; margin: 20px auto; }
.timer-circle-svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.timer-circle-bg { fill: none; stroke: var(--bg-glass-border); stroke-width: 10; }
.timer-circle-progress {
  fill: none; stroke: url(#gradient-timer); stroke-width: 10; stroke-linecap: round;
  stroke-dasharray: 552; stroke-dashoffset: 0; transition: stroke-dashoffset 1s linear;
}
.timer-digits {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-size: 2.4rem; font-weight: 800; font-family: 'Inter', monospace;
  background: var(--gradient-1); -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.timer-sub-text { font-size: 0.85rem; color: var(--text-secondary); margin-bottom: 24px; }
.timer-btn-group { display: flex; gap: 12px; justify-content: center; }

/* ── Resources ── */
.resource-category { font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: var(--accent-light); margin: 16px 0 8px; display: flex; align-items: center; gap: 8px; }
.resource-link {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px;
  border-radius: var(--radius-sm); background: var(--bg-glass);
  border: 1px solid var(--bg-glass-border); margin-bottom: 8px;
  text-decoration: none; color: var(--text-primary); transition: all 0.3s ease;
}
.resource-link:hover { background: var(--bg-card-hover); transform: translateX(4px); border-color: var(--accent); }
.res-icon { font-size: 1.5rem; }
.res-info { flex: 1; }
.res-title { font-weight: 600; font-size: 0.88rem; }
.res-desc { font-size: 0.75rem; color: var(--text-muted); margin-top: 2px; }
.res-arrow { color: var(--text-muted); font-size: 1.1rem; }

/* ── Section Headers ── */
.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; margin-top: 8px; }
.section-title { font-size: 1.1rem; font-weight: 700; display: flex; align-items: center; gap: 8px; }

/* ── 2026 Fluid Neo-Tactile Tabs ── */
.tab-group {
  display: flex;
  gap: 6px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  padding: 5px;
  margin-bottom: 16px;
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.45);
}
.tab-btn {
  flex: 1;
  padding: 10px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--text-secondary);
  font-family: 'Inter', sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
}
.tab-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}
.tab-btn:active {
  transform: scale(0.96);
}
.tab-btn.active {
  background: linear-gradient(135deg, #7c5cfc 0%, #6366f1 100%);
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 3px 12px var(--accent-glow), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}
.tab-pane { display: none; animation: fadeSlideUp 0.3s ease; }
.tab-pane.active { display: block; }

.practice-tab-strip {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px !important;
  overflow: visible;
  white-space: normal;
  padding: 6px;
  margin: 0 -2px 16px;
  background: rgba(255,255,255,0.035);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 18px;
}
.practice-tab-strip::-webkit-scrollbar { display: none; }
.practice-tab-strip .tab-btn {
  flex: none !important;
  min-width: 0;
  width: 100%;
  padding: 10px 8px !important;
  border-radius: 14px;
  background: rgba(255,255,255,0.035);
  font-size: 0.76rem !important;
}
.practice-tab-strip .tab-btn.active {
  background: linear-gradient(135deg, #7c5cfc, #a78bfa);
  box-shadow: 0 10px 24px rgba(124,92,252,0.28);
}

/* ── Bottom Nav ── */
.bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0; height: var(--nav-height);
  background: rgba(14, 14, 30, 0.94); border-top: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(30px); -webkit-backdrop-filter: blur(30px);
  display: flex; align-items: center; justify-content: space-around;
  z-index: 1000; padding-bottom: env(safe-area-inset-bottom);
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.5);
}
[data-theme="light"] .bottom-nav {
  background: rgba(245, 245, 255, 0.96);
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08);
}
.nav-item {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  flex: 1; min-width: 0; padding: 6px 2px;
  color: var(--text-muted); cursor: pointer; transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  border-radius: 12px; font-size: 1.05rem; position: relative;
  user-select: none; text-align: center;
}
.nav-item span {
  font-size: 0.58rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.2px;
  transition: color 0.2s ease; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.nav-item.active { color: #ffffff; }
.nav-item.active span { color: var(--accent-light); }
.nav-item.active::after {
  content: ''; position: absolute; top: -1px; left: 50%; transform: translateX(-50%);
  width: 24px; height: 3px; background: linear-gradient(90deg, #06b6d4, #7c5cfc);
  border-radius: 0 0 4px 4px; box-shadow: 0 2px 8px var(--accent-glow);
}
.nav-item:active { transform: translateY(2px) scale(0.92); }

/* ── Toast ── */
.toast-container { position: fixed; top: 20px; left: 50%; transform: translateX(-50%); z-index: 9999999; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; }
.toast {
  background: linear-gradient(135deg, rgba(28, 28, 55, 0.9) 0%, rgba(16, 16, 32, 0.95) 100%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-md); padding: 12px 20px; backdrop-filter: blur(20px);
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.15);
  display: flex; align-items: center; gap: 10px;
  font-size: 0.86rem; font-weight: 600; color: var(--text-primary);
  animation: toastIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards; pointer-events: auto; max-width: 360px;
}
.toast.toast-out { animation: toastOut 0.3s ease forwards; }
.toast-icon { font-size: 1.2rem; }
.toast.success { border-left: 3px solid var(--success); }
.toast.error { border-left: 3px solid var(--danger); }
.toast.info { border-left: 3px solid var(--accent); }
@keyframes toastIn { from { opacity: 0; transform: translateY(-20px) scale(0.95); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes toastOut { from { opacity: 1; } to { opacity: 0; transform: translateY(-20px) scale(0.95); } }

/* ── Modals ── */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(14px); z-index: 8000;
  display: flex; align-items: center; justify-content: center;
  padding: 16px; animation: fadeIn 0.2s ease;
}
.modal-card {
  width: 100%; max-width: 480px; max-height: 85vh; overflow-y: auto;
  background: linear-gradient(145deg, rgba(28, 28, 55, 0.95) 0%, rgba(16, 16, 32, 0.98) 100%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-lg); padding: 24px;
  backdrop-filter: blur(var(--blur)); animation: slideUp 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.14);
}
.modal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.settings-section { margin-bottom: 16px; }
.settings-label { font-size: 0.82rem; font-weight: 700; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 12px; }
.settings-divider { height: 1px; background: var(--bg-glass-border); margin: 20px 0; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* ── Confetti ── */
.confetti-overlay { position: fixed; inset: 0; pointer-events: none; z-index: 9998; }

/* ── Streak Fire ── */
.fire-anim { display: inline-block; animation: fireWiggle 0.6s ease-in-out infinite alternate; }
@keyframes fireWiggle { from { transform: rotate(-3deg) scale(1); } to { transform: rotate(3deg) scale(1.1); } }

/* ── Empty State ── */
.empty-state { text-align: center; padding: 40px 20px; color: var(--text-muted); }
.empty-state-icon { font-size: 3rem; margin-bottom: 12px; }
.empty-state-text { font-size: 0.9rem; }

/* ── Utils ── */
.mt-8 { margin-top: 8px; } .mt-16 { margin-top: 16px; }
.mb-8 { margin-bottom: 8px; } .mb-16 { margin-bottom: 16px; }
.text-center { text-align: center; } .text-muted { color: var(--text-muted); }
.text-sm { font-size: 0.8rem; } .hidden { display: none !important; }

@media (max-width: 400px) {
  #app { --app-content-gutter: 12px; padding: 10px var(--app-content-gutter) 0; }
  .greeting-text { font-size: 1.3rem; }
  .stats-row { gap: 8px; }
  .stat-card { padding: 12px 8px; }
  .stat-value { font-size: 1.3rem; }
}
/* -- Reading Room & Bottom Sheet -- */
.tappable { border-bottom: 1px dashed var(--accent); cursor: pointer; transition: 0.2s; padding: 0 2px; }
.tappable:active { background: var(--accent-glow); border-radius: 4px; }
.bottom-sheet-card { position: fixed; bottom: 0; left: 0; right: 0; background: var(--bg-glass); border-top: 1px solid var(--bg-glass-border); padding: 24px; border-radius: 24px 24px 0 0; backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); transform: translateY(100%); transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); z-index: 1000; box-shadow: 0 -10px 40px rgba(0,0,0,0.5); }
.bottom-sheet-card.show { transform: translateY(0); }
.article-body p { margin-bottom: 16px; }

.premium-name {
  background: linear-gradient(90deg, #ffd700, #ff8c00);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 800;
}

/* ── Video Modal Landscape & Fullscreen ── */
@media (orientation: landscape) and (max-height: 550px) {
  #video-modal { padding: 0 !important; }
  #video-modal .modal-content {
    max-width: 100vw !important; width: 100vw !important;
    height: 100vh !important; max-height: 100vh !important;
    border-radius: 0 !important; padding: 8px 14px !important;
    overflow-y: auto !important;
  }
  #video-container { width: 100% !important; padding-bottom: 45% !important; }
}

/* ── Pronunciation Check Modern Compact Chips ── */
.word-chip { display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; margin: 2px 3px; border-radius: 6px; font-size: 0.8rem; font-weight: 600; line-height: 1.3; }
.word-chip.match { background: rgba(52,211,153,0.14); color: #34d399; border: 1px solid rgba(52,211,153,0.3); }
.word-chip.miss { background: rgba(248,113,113,0.14); color: #f87171; border: 1px solid rgba(248,113,113,0.3); }
.word-chip .expected-tag { color: #34d399; font-weight: 700; background: rgba(52,211,153,0.18); padding: 1px 4px; border-radius: 4px; font-size: 0.72rem; margin-left: 2px; }
.word-chip.extra { background: rgba(251,191,36,0.14); color: #fbbf24; border: 1px solid rgba(251,191,36,0.3); }

/* ── Video In-App Cinema Fullscreen ── */
#video-modal.cinema-fullscreen {
  padding: 0 !important;
  background: #000 !important;
  z-index: 999999 !important;
}
#video-modal.cinema-fullscreen .modal-content {
  width: 100vw !important;
  max-width: 100vw !important;
  height: 100vh !important;
  max-height: 100vh !important;
  border-radius: 0 !important;
  padding: 10px !important;
  background: #000 !important;
  display: flex !important;
  flex-direction: column !important;
}
#video-modal.cinema-fullscreen #video-container {
  width: 100% !important;
  height: 100% !important;
  padding-bottom: 0 !important;
  flex: 1 !important;
  border-radius: 0 !important;
}
#video-modal.cinema-fullscreen .cinema-hide {
  display: none !important;
}

/* ── 15-Minute Daily Guided Workout Wizard ── */
.workout-progress-bar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; position: relative; }
.workout-progress-bar::before { content: ''; position: absolute; top: 50%; left: 0; right: 0; height: 2px; background: var(--bg-glass-border); z-index: 1; transform: translateY(-50%); }
.workout-step-node { width: 32px; height: 32px; border-radius: 50%; background: var(--bg-secondary); border: 2px solid var(--bg-glass-border); display: flex; align-items: center; justify-content: center; font-size: 0.78rem; font-weight: 700; color: var(--text-muted); z-index: 2; transition: all 0.3s ease; }
.workout-step-node.active { border-color: var(--accent); color: #fff; background: var(--accent); box-shadow: 0 0 12px var(--accent-glow); transform: scale(1.1); }
.workout-step-node.completed { border-color: var(--success); background: rgba(52,211,153,0.2); color: var(--success); }

/* ── Digital Fluency Certificate ── */
.certificate-frame {
  background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 50%, #0f172a 100%);
  border: 2px solid #fbbf24;
  border-radius: 16px;
  padding: 24px 20px;
  text-align: center;
  position: relative;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5), inset 0 0 30px rgba(251,191,36,0.08);
}
.cert-seal {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, #fbbf24, #d97706);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin: 0 auto 12px auto;
  box-shadow: 0 4px 15px rgba(251,191,36,0.4);
}
.cert-name { font-size: 1.4rem; font-weight: 800; color: #fff; margin: 8px 0 4px 0; letter-spacing: 0.5px; }
.cert-level-badge { display: inline-block; padding: 4px 14px; border-radius: 20px; font-weight: 700; font-size: 0.85rem; background: rgba(124,92,252,0.3); border: 1px solid var(--accent); color: var(--accent-light); margin-bottom: 12px; }

/* ── Microphone Pulse Animation ── */
@keyframes mic-pulse {
  0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(239,68,68,0.7); }
  70% { transform: scale(1.05); box-shadow: 0 0 0 10px rgba(239,68,68,0); }
  100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(239,68,68,0); }
}
/* ── 3D Flashcard Flip Animation for Guided Workout ── */
.workout-card-scene { perspective: 1000px; width: 100%; min-height: 250px; margin-bottom: 14px; cursor: pointer; }
.workout-card-3d { width: 100%; height: 100%; min-height: 250px; position: relative; transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1); transform-style: preserve-3d; }
.workout-card-3d.flipped { transform: rotateY(180deg); }
.workout-card-face { position: absolute; width: 100%; height: 100%; min-height: 250px; backface-visibility: hidden; -webkit-backface-visibility: hidden; border-radius: 16px; padding: 20px; display: flex; flex-direction: column; justify-content: space-between; border: 1px solid var(--accent); box-shadow: 0 8px 24px rgba(0,0,0,0.3); overflow-y: auto; }
.workout-card-front { background: linear-gradient(135deg, rgba(30,27,75,0.9), rgba(15,23,42,0.95)); }
.workout-card-back { background: linear-gradient(135deg, rgba(15,23,42,0.95), rgba(30,27,75,0.9)); transform: rotateY(180deg); border-color: var(--cyan); }

/* ── Inline Reading Bite Tap-to-Translate ── */
.workout-trans-word { display: inline; padding: 0 2px; border-bottom: 1px dashed rgba(6,182,212,0.5); cursor: pointer; transition: all 0.2s; user-select: text; -webkit-user-select: text; }
.workout-trans-word:hover, .workout-trans-word:active { color: var(--cyan); background: rgba(6,182,212,0.15); border-radius: 3px; }
.workout-inline-chip { background: linear-gradient(135deg, rgba(6,182,212,0.15), rgba(124,92,252,0.15)); border: 1px solid var(--cyan); padding: 12px 14px; border-radius: 10px; margin-top: 12px; animation: fadeIn 0.3s ease; }





/* ── World-Class Live Voice Studio & Waveform Visualizer ── */
.voice-studio-overlay {
  position: fixed; left: 0; right: 0; bottom: 0; top: 0;
  background: transparent; pointer-events: none;
  display: flex; align-items: flex-end; justify-content: center;
  z-index: 9999999; padding: 0 0 10px 0;
  animation: fadeIn 0.2s ease;
}
.voice-studio-card {
  pointer-events: auto;
  background: var(--bg-secondary);
  border: 2px solid var(--cyan); border-radius: 24px 24px 16px 16px;
  padding: 20px 18px 16px; max-width: 500px; width: 96%; text-align: center;
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.8), 0 0 20px rgba(6, 182, 212, 0.25);
  animation: slideUp 0.25s ease;
}
@keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
.voice-studio-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.voice-studio-badge {
  display: inline-flex; align-items: center; gap: 6px; font-size: 0.75rem; font-weight: 700;
  padding: 4px 10px; border-radius: 12px; background: rgba(16, 185, 129, 0.18);
  color: #34d399; border: 1px solid rgba(16, 185, 129, 0.35); text-transform: uppercase;
}
.voice-studio-badge .pulse-dot {
  width: 8px; height: 8px; border-radius: 50%; background: #10b981;
  animation: pulseDot 1s infinite alternate;
}
@keyframes pulseDot { from { opacity: 0.3; transform: scale(0.8); } to { opacity: 1; transform: scale(1.3); } }

.voice-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  align-self: flex-start;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.35px;
  text-transform: uppercase;
  background: rgba(16,185,129,0.14);
  color: #34d399;
  border: 1px solid rgba(16,185,129,0.34);
}
.voice-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 10px rgba(16,185,129,0.75);
  animation: pulseDot 0.9s infinite alternate;
}
.voice-status-pill.paused {
  background: rgba(251,191,36,0.14);
  color: #fbbf24;
  border-color: rgba(251,191,36,0.34);
}
.voice-status-pill.paused .voice-status-dot {
  background: #fbbf24;
  box-shadow: 0 0 8px rgba(251,191,36,0.55);
  animation: none;
}
.voice-status-pill.keyboard {
  background: rgba(167,139,250,0.14);
  color: #c4b5fd;
  border-color: rgba(167,139,250,0.34);
}
.voice-status-pill.keyboard .voice-status-dot {
  background: #a78bfa;
  box-shadow: 0 0 8px rgba(167,139,250,0.55);
  animation: none;
}
.voice-status-pill.processing {
  background: rgba(6,182,212,0.14);
  color: #67e8f9;
  border-color: rgba(6,182,212,0.34);
}

.voice-wave-container {
  display: flex; align-items: center; justify-content: center; gap: 5px; height: 56px; margin: 18px 0;
}
.voice-wave-bar {
  width: 4.5px; height: 14px; background: linear-gradient(180deg, #06b6d4, #7c5cfc);
  border-radius: 4px; animation: voiceWavePulse 1.1s ease-in-out infinite;
}
.voice-wave-bar:nth-child(1) { animation-delay: 0.1s; height: 12px; }
.voice-wave-bar:nth-child(2) { animation-delay: 0.25s; height: 22px; }
.voice-wave-bar:nth-child(3) { animation-delay: 0.4s; height: 34px; }
.voice-wave-bar:nth-child(4) { animation-delay: 0.15s; height: 46px; }
.voice-wave-bar:nth-child(5) { animation-delay: 0.35s; height: 54px; }
.voice-wave-bar:nth-child(6) { animation-delay: 0.2s; height: 46px; }
.voice-wave-bar:nth-child(7) { animation-delay: 0.45s; height: 34px; }
.voice-wave-bar:nth-child(8) { animation-delay: 0.3s; height: 22px; }
.voice-wave-bar:nth-child(9) { animation-delay: 0.12s; height: 12px; }

@keyframes voiceWavePulse {
  0%, 100% { transform: scaleY(0.25); opacity: 0.4; }
  50% { transform: scaleY(1.3); opacity: 1; filter: drop-shadow(0 0 10px #06b6d4); }
}

.voice-live-text {
  font-size: 1rem; font-weight: 600; color: #ffffff; min-height: 52px;
  background: rgba(0, 0, 0, 0.35); border-radius: 12px; padding: 12px 14px;
  border: 1px dashed rgba(6, 182, 212, 0.5); line-height: 1.5; text-align: left;
  max-height: 120px; overflow-y: auto; -webkit-overflow-scrolling: touch;
}
.voice-target-hint {
  font-size: 0.85rem; color: #fef08a; font-weight: 700; margin-bottom: 8px; text-align: left;
  background: rgba(254, 240, 138, 0.1); border-left: 3px solid #fef08a; padding: 6px 10px; border-radius: 0 8px 8px 0;
}
.voice-btn-done {
  width: 100%; padding: 12px; margin-top: 14px; font-weight: 700; font-size: 0.95rem;
  border-radius: 12px; border: none; background: linear-gradient(135deg, #10b981, #059669);
  color: #fff; cursor: pointer; box-shadow: 0 4px 16px rgba(16, 185, 129, 0.4);
}

.chat-mic-btn {
  width: 42px;
  height: 42px;
  border: 1px solid rgba(6,182,212,0.38);
  border-radius: 50%;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  cursor: pointer;
  color: #e0f2fe;
  background:
    radial-gradient(circle at 35% 25%, rgba(255,255,255,0.28), transparent 24%),
    linear-gradient(145deg, rgba(6,182,212,0.24), rgba(124,92,252,0.18));
  box-shadow:
    0 8px 22px rgba(6,182,212,0.16),
    inset 0 1px 0 rgba(255,255,255,0.12);
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}
.chat-mic-btn span {
  font-size: 1.08rem;
  filter: drop-shadow(0 2px 6px rgba(6,182,212,0.4));
}
.chat-mic-btn:active {
  transform: scale(0.94);
  box-shadow: 0 4px 14px rgba(124,92,252,0.22);
}
.chat-mic-btn:hover,
.chat-mic-btn:focus-visible {
  border-color: rgba(52,211,153,0.52);
  outline: none;
}

.shadow-tool-row {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  margin-bottom: 10px;
}
.shadow-tool-row h4 {
  margin: 0;
  color: var(--accent-light);
  font-size: 0.96rem;
  line-height: 1.25;
}
.shadow-tool-buttons {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}
.shadow-tool-buttons .btn {
  min-width: 0;
  padding: 7px 5px !important;
  font-size: 0.7rem !important;
  line-height: 1.15;
  white-space: normal;
  border-radius: 12px;
}

.ff-focus-card {
  background:
    radial-gradient(circle at 86% 5%, rgba(167,139,250,0.38), transparent 32%),
    radial-gradient(circle at 8% 100%, rgba(6,182,212,0.24), transparent 38%),
    linear-gradient(145deg, rgba(9, 24, 44, 0.95), rgba(15, 16, 34, 0.98));
  border: 1px solid rgba(6, 182, 212, 0.36);
  border-radius: 22px;
  overflow: hidden;
  position: relative;
  box-shadow: 0 18px 40px rgba(0,0,0,0.38), inset 0 1px 0 rgba(255,255,255,0.08);
}
.ff-focus-glow {
  position: absolute;
  inset: -40% -30% auto auto;
  width: 190px;
  height: 190px;
  background: conic-gradient(from 90deg, rgba(6,182,212,0.0), rgba(124,92,252,0.45), rgba(52,211,153,0.35), rgba(6,182,212,0.0));
  filter: blur(26px);
  opacity: 0.72;
  animation: ffOrbit 8s linear infinite;
}
@keyframes ffOrbit {
  to { transform: rotate(360deg); }
}
.ff-focus-progress {
  height: 7px;
  background: rgba(255,255,255,0.07);
  border-radius: 999px;
  overflow: hidden;
  margin-top: 14px;
  position: relative;
  z-index: 1;
}
.ff-focus-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #34d399, #06b6d4, #a78bfa);
  box-shadow: 0 0 18px rgba(6,182,212,0.42);
  transition: width 0.6s ease;
}

.ff-mini-metric {
  background: linear-gradient(145deg, rgba(255,255,255,0.1), rgba(255,255,255,0.035));
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 14px;
  padding: 11px 8px;
  text-align: center;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08), 0 8px 18px rgba(0,0,0,0.18);
}
.ff-mini-metric span {
  display: block;
  font-size: 1.28rem;
  font-weight: 900;
  color: var(--text-primary);
}
.ff-mini-metric small {
  display: block;
  margin-top: 2px;
  font-size: 0.66rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.ff-fire span { color: #ff7a45; text-shadow: 0 0 16px rgba(255,106,53,0.35); }
.ff-book span { color: #a78bfa; text-shadow: 0 0 16px rgba(167,139,250,0.35); }
.ff-check span { color: #34d399; text-shadow: 0 0 16px rgba(52,211,153,0.35); }

.ff-quick-action,
.ff-ai-card {
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.055);
  color: var(--text-primary);
  border-radius: 12px;
  padding: 10px 8px;
  font-family: inherit;
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}
.ff-quick-action:active,
.ff-ai-card:active {
  transform: scale(0.98);
}
.ff-quick-action {
  font-size: 0.8rem;
  font-weight: 800;
}
.ff-ai-card {
  min-height: 92px;
  text-align: left;
}
.ff-ai-card span {
  display: block;
  font-size: 0.88rem;
  font-weight: 900;
  line-height: 1.15;
}
.ff-ai-card small {
  display: block;
  margin-top: 6px;
  color: var(--text-secondary);
  font-size: 0.72rem;
  line-height: 1.3;
}
.ff-ai-card:hover,
.ff-quick-action:hover {
  background: rgba(6, 182, 212, 0.1);
  border-color: rgba(6, 182, 212, 0.35);
}

.ff-ai-card.ff-ai-loading,
button.ff-ai-loading {
  opacity: 0.9;
  cursor: wait !important;
  border-color: rgba(6,182,212,0.5) !important;
  background:
    linear-gradient(110deg, rgba(124,92,252,0.18), rgba(6,182,212,0.22), rgba(124,92,252,0.18)) !important;
  background-size: 220% 100% !important;
  animation: ffLoadingSweep 1.1s ease-in-out infinite;
}

@keyframes ffLoadingSweep {
  0% { background-position: 0% 50%; }
  100% { background-position: 220% 50%; }
}

@media (max-width: 380px) {
  .ff-ai-card {
    padding: 9px 7px;
  }
  .ff-ai-card span {
    font-size: 0.8rem;
  }
}

/* ── FluentFlow Premium Polish Layer ── */
.ff-premium-polish {
  background:
    radial-gradient(circle at 50% -12%, rgba(124,92,252,0.22), transparent 34%),
    radial-gradient(circle at 100% 18%, rgba(6,182,212,0.11), transparent 28%),
    linear-gradient(180deg, #070713 0%, var(--bg-primary) 46%, #080814 100%);
}

/* One shared app shell: the header remains in normal flow, while becoming a
   legible glass surface only when content scrolls underneath it. */
.ff-premium-polish .top-bar {
  position: sticky;
  top: 0;
  z-index: 900;
  margin: calc(-1 * var(--app-content-gutter)) calc(-1 * var(--app-content-gutter)) 12px;
  padding: calc(10px + env(safe-area-inset-top)) calc(var(--app-content-gutter) + 2px) 10px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  background: linear-gradient(180deg, rgba(12,12,29,0.90) 0%, rgba(12,12,29,0.72) 68%, rgba(12,12,29,0.20) 100%);
  backdrop-filter: blur(20px) saturate(1.15);
  -webkit-backdrop-filter: blur(20px) saturate(1.15);
}

/* All inner pages share exactly the same start point. Page-specific negative
   offsets are deliberately avoided: they cause sections to sit under the
   sticky header and make touch targets unreliable on Android. */
body.ff-inner-page.ff-premium-polish .page.active > .section-header:first-child {
  margin-top: 4px;
  margin-bottom: 12px;
}

body.ff-inner-page.ff-premium-polish .page.active {
  margin-top: 0;
}

body.ff-inner-page.ff-premium-polish #page-practice .practice-tab-strip {
  margin-bottom: 12px;
  position: relative;
  z-index: 2;
  pointer-events: auto;
}

body.ff-inner-page.ff-premium-polish #page-practice .practice-tab-strip .tab-btn {
  position: relative;
  z-index: 1;
  pointer-events: auto;
}

.ff-premium-polish .top-bar-brand {
  font-size: 1.55rem;
  letter-spacing: -0.8px;
  filter: drop-shadow(0 8px 20px rgba(124,92,252,0.28));
}

.ff-premium-polish .glass-card {
  border-color: rgba(255,255,255,0.09);
  box-shadow:
    0 18px 45px rgba(0,0,0,0.34),
    inset 0 1px 0 rgba(255,255,255,0.07);
}

.ff-premium-polish .greeting-card {
  min-height: 150px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background:
    radial-gradient(circle at 86% 16%, rgba(255,255,255,0.16), transparent 22%),
    radial-gradient(circle at 95% -6%, rgba(124,92,252,0.72), transparent 42%),
    linear-gradient(135deg, rgba(19,18,45,0.98), rgba(54,39,120,0.88));
  box-shadow: 0 22px 55px rgba(82,56,190,0.28), inset 0 1px 0 rgba(255,255,255,0.12);
}

.ff-journey-card {
  overflow: hidden;
  background:
    radial-gradient(circle at 12% 12%, rgba(52,211,153,0.18), transparent 30%),
    radial-gradient(circle at 95% 0%, rgba(124,92,252,0.28), transparent 38%),
    linear-gradient(145deg, rgba(19,23,43,0.96), rgba(9,11,24,0.98));
  border: 1px solid rgba(255,255,255,0.1);
}

.ff-journey-shine {
  position: absolute;
  top: -40%;
  left: -30%;
  width: 120px;
  height: 220px;
  transform: rotate(28deg);
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.12), transparent);
  animation: ffShineSweep 6.5s ease-in-out infinite;
  pointer-events: none;
}

@keyframes ffShineSweep {
  0%, 45% { transform: translateX(-120px) rotate(28deg); opacity: 0; }
  55% { opacity: 1; }
  100% { transform: translateX(620px) rotate(28deg); opacity: 0; }
}

.ff-journey-head {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.ff-eyebrow {
  font-size: 0.68rem;
  color: var(--cyan);
  text-transform: uppercase;
  letter-spacing: 0.9px;
  font-weight: 900;
}

.ff-journey-title {
  margin-top: 4px;
  font-size: 1.1rem;
  font-weight: 950;
  letter-spacing: -0.4px;
  color: var(--text-primary);
}

.ff-journey-sub {
  margin-top: 5px;
  font-size: 0.78rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

.ff-streak-orb {
  width: 76px;
  min-width: 76px;
  height: 76px;
  border-radius: 24px;
  display: grid;
  place-items: center;
  text-align: center;
  background:
    radial-gradient(circle at 35% 18%, rgba(255,255,255,0.16), transparent 24%),
    linear-gradient(145deg, rgba(255,107,53,0.24), rgba(124,92,252,0.14));
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.1), 0 12px 24px rgba(0,0,0,0.22);
}

.ff-streak-orb span {
  display: block;
  margin-top: 8px;
  font-size: 1.2rem;
  font-weight: 950;
  color: #fff;
}

.ff-streak-orb small {
  display: block;
  margin-top: -14px;
  font-size: 0.58rem;
  color: rgba(255,255,255,0.62);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.ff-path-rail {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 9px;
  margin-top: 14px;
}

.ff-path-step {
  min-height: 84px;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 18px;
  color: var(--text-primary);
  background: linear-gradient(145deg, rgba(255,255,255,0.085), rgba(255,255,255,0.025));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.07), 0 8px 20px rgba(0,0,0,0.18);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  font-family: inherit;
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.ff-path-step span { font-size: 1.35rem; }
.ff-path-step b { font-size: 0.9rem; }
.ff-path-step small {
  font-size: 0.64rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  font-weight: 800;
}
.ff-path-step.done {
  border-color: rgba(52,211,153,0.38);
  background: linear-gradient(145deg, rgba(52,211,153,0.18), rgba(6,182,212,0.08));
}
.ff-path-step.done b { color: var(--success); }
.ff-path-step:active { transform: scale(0.97); }

.ff-writing-card {
  background:
    radial-gradient(circle at 92% 8%, rgba(6,182,212,0.2), transparent 32%),
    linear-gradient(145deg, rgba(18,22,43,0.95), rgba(10,10,23,0.98));
}

.ff-writing-result-card {
  background: rgba(255,255,255,0.045);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  padding: 12px;
}

.ff-writing-block {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 13px;
  padding: 10px 11px;
  margin-bottom: 9px;
}

.ff-writing-block b {
  display: block;
  color: var(--cyan);
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 5px;
}

.ff-writing-block p {
  color: var(--text-primary);
  font-size: 0.88rem;
  line-height: 1.55;
  white-space: pre-wrap;
}

.ff-writing-best {
  background: linear-gradient(135deg, rgba(52,211,153,0.12), rgba(6,182,212,0.07));
  border-color: rgba(52,211,153,0.26);
}

.ff-writing-quick-tools {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  padding: 10px 2px 0;
  scrollbar-width: none;
}
.ff-writing-quick-tools::-webkit-scrollbar { display: none; }
.ff-writing-quick-tools button {
  flex: 0 0 auto;
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: 999px;
  background: rgba(255,255,255,0.055);
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 8px 11px;
}
.ff-writing-quick-tools button:active {
  transform: scale(0.96);
}

.shadow-tool-row {
  align-items: stretch !important;
  gap: 8px;
}
.shadow-tool-row h4 {
  min-width: 0;
  line-height: 1.25;
}
.shadow-tool-buttons {
  flex: 1;
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px !important;
}
.shadow-tool-buttons .btn {
  justify-content: center;
  width: 100%;
  border-radius: 999px;
  min-height: 38px;
}

.ff-quest-item {
  border-radius: 18px;
  background:
    linear-gradient(145deg, rgba(255,255,255,0.075), rgba(255,255,255,0.025));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05);
}
.ff-quest-note {
  font-size: 0.68rem;
  color: var(--cyan);
  margin-top: 4px;
  font-weight: 700;
  opacity: 0.88;
}
.ff-quest-item.checked .ff-quest-note {
  color: var(--success);
}

.ff-premium-polish .bottom-nav {
  height: calc(var(--nav-height) + 2px);
  width: min(520px, calc(100% - 20px));
  left: 50%;
  right: auto;
  bottom: max(10px, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: 26px;
  background: rgba(17,17,40,0.78);
  box-shadow: 0 18px 45px rgba(0,0,0,0.34), inset 0 1px 0 rgba(255,255,255,0.07);
}

.ff-premium-polish .nav-item.active {
  color: #fff;
  background: linear-gradient(145deg, rgba(124,92,252,0.26), rgba(6,182,212,0.12));
}

.ff-premium-polish .nav-item.active::after {
  top: -7px;
  width: 26px;
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, #7c5cfc, #06b6d4);
  box-shadow: 0 0 18px rgba(6,182,212,0.45);
}

.ff-tap-pop {
  animation: ffTapPop 0.24s ease;
}
@keyframes ffTapPop {
  0% { transform: scale(1); }
  45% { transform: scale(0.965); }
  100% { transform: scale(1); }
}

/* ═══════════ Top 0.1% Executive Intellectual Styles ═══════════ */
.quiz-option-btn:hover:not(:disabled) {
  background: rgba(124, 92, 252, 0.16) !important;
  border-color: var(--accent) !important;
  transform: translateY(-1px);
}
.quiz-option-btn:active:not(:disabled) {
  transform: scale(0.985);
}
#top01-category-bar .tab-btn.active {
  background: linear-gradient(135deg, rgba(124, 92, 252, 0.3), rgba(6, 182, 212, 0.25));
  border-color: var(--accent-light);
  color: #fff;
  box-shadow: 0 0 12px rgba(124, 92, 252, 0.35);
}
.top01-badge-pill {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 3px 10px;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(124, 92, 252, 0.2), rgba(6, 182, 212, 0.15));
  border: 1px solid rgba(124, 92, 252, 0.35);
  color: var(--cyan);
}
.top01-vocab-pill:hover {
  background: rgba(124, 92, 252, 0.35) !important;
  border-color: var(--cyan) !important;
  transform: translateY(-1px);
}
.top01-vocab-pill:active {
  transform: scale(0.96);
}

/* Real-Time Karaoke Teleprompter Word Highlight - Zero Layout Shift */
.speaking-sentence-highlight {
  background: rgba(6, 182, 212, 0.12) !important;
  border-radius: 4px !important;
  transition: background 0.2s ease !important;
}
.speaking-word-highlight {
  background: linear-gradient(135deg, #06b6d4, #7c5cfc) !important;
  color: #ffffff !important;
  font-weight: inherit !important;
  border-radius: 3px !important;
  box-shadow: 0 0 10px rgba(6, 182, 212, 0.85) !important;
  text-shadow: 0 0 4px rgba(255, 255, 255, 0.9) !important;
  padding: 1px 0px !important;
  margin: 0 !important;
  display: inline !important;
  transform: none !important;
  box-decoration-break: clone !important;
  -webkit-box-decoration-break: clone !important;
}

/* ═══════════════════════════════════════════════════════════
   FluentFlow Viral Sharing, QR Poster & 1-Click Install System
   ═══════════════════════════════════════════════════════════ */

/* Top Bar Share Button */
.share-top-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  background: linear-gradient(135deg, rgba(124, 92, 252, 0.28), rgba(6, 182, 212, 0.22)) !important;
  border: 1px solid rgba(124, 92, 252, 0.5) !important;
  color: #ffffff !important;
  border-radius: 10px;
  height: 36px;
  padding: 0 10px;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  flex-shrink: 0;
  box-shadow: 0 0 12px rgba(124, 92, 252, 0.3);
  animation: pulse-share-glow 2.5s infinite alternate;
  transition: all 0.25s ease;
  -webkit-appearance: none;
  appearance: none;
  outline: none;
  font-family: inherit;
}
.share-top-btn:hover {
  transform: translateY(-1px) scale(1.03);
  box-shadow: 0 0 18px rgba(124, 92, 252, 0.6);
  border-color: rgba(6, 182, 212, 0.8) !important;
}
.share-top-btn:active {
  transform: scale(0.96);
}
@keyframes pulse-share-glow {
  0% { box-shadow: 0 0 8px rgba(124, 92, 252, 0.3); border-color: rgba(124, 92, 252, 0.4); }
  100% { box-shadow: 0 0 18px rgba(6, 182, 212, 0.6); border-color: rgba(6, 182, 212, 0.8); }
}

/* Mobile compact responsiveness for Top Bar */
@media (max-width: 480px) {
  .top-bar { padding: 6px 2px; }
  .top-bar-brand { font-size: 1.2rem; }
  .top-bar-actions { gap: 4px; }
  .share-top-btn { padding: 0 8px; width: 34px; height: 34px; border-radius: 9px; }
  .share-top-btn span { display: none; } /* On mobile, only 🎁 icon shows, saving 42px of width! */
  .icon-btn { width: 34px; height: 34px; font-size: 0.95rem; border-radius: 9px; }
}

/* Dashboard Share Banner */
.dash-share-card {
  background: linear-gradient(135deg, rgba(124, 92, 252, 0.18) 0%, rgba(6, 182, 212, 0.14) 50%, rgba(20, 20, 45, 0.95) 100%) !important;
  border: 1px solid rgba(124, 92, 252, 0.35) !important;
  border-radius: var(--radius-lg);
  padding: 16px;
  margin-bottom: 14px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
}
.dash-share-card::after {
  content: '🎁';
  position: absolute;
  right: -10px;
  top: -10px;
  font-size: 5rem;
  opacity: 0.07;
  pointer-events: none;
}

/* Share Modal Tabs */
.share-tabs-nav {
  display: flex;
  gap: 4px;
  background: rgba(0, 0, 0, 0.35);
  padding: 3px;
  border-radius: 12px;
  margin-bottom: 12px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}
.share-nav-btn {
  flex: 1;
  padding: 7px 3px;
  font-size: 0.77rem;
  font-weight: 700;
  border-radius: 9px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  white-space: nowrap;
}
.share-nav-btn.active {
  background: linear-gradient(135deg, var(--accent), #906ffa);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(124, 92, 252, 0.4);
}

/* Message Template Selector Cards */
.msg-template-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--bg-glass-border);
  border-radius: 12px;
  padding: 10px 12px;
  margin-bottom: 9px;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}
.msg-template-card:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(124, 92, 252, 0.35);
}
.msg-template-card.active {
  background: rgba(124, 92, 252, 0.13);
  border-color: var(--accent);
  box-shadow: 0 0 16px rgba(124, 92, 252, 0.22);
}
.msg-template-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}
.msg-template-title-wrap {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}
.msg-template-title {
  font-weight: 700;
  font-size: 0.85rem;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.msg-template-badge {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 8px;
  background: rgba(124, 92, 252, 0.2);
  color: var(--accent-light);
  display: inline-block;
  width: fit-content;
}
.btn-card-instant-share {
  background: linear-gradient(135deg, #25d366, #128c7e);
  color: #ffffff;
  border: none;
  border-radius: 9px;
  font-size: 0.74rem;
  font-weight: 800;
  padding: 6px 11px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(37, 211, 102, 0.35);
  transition: all 0.15s ease;
  white-space: nowrap;
  flex-shrink: 0;
}
.btn-card-instant-share:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(37, 211, 102, 0.55);
  filter: brightness(1.08);
}
.btn-card-instant-share:active {
  transform: scale(0.95);
}
.msg-template-card.active .btn-card-instant-share {
  box-shadow: 0 0 14px rgba(37, 211, 102, 0.6);
  animation: pulseShareBtn 2.2s infinite ease-in-out;
}
@keyframes pulseShareBtn {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.04); }
}
.msg-template-text {
  font-size: 0.79rem;
  line-height: 1.4;
  color: var(--text-primary);
  max-height: 48px;
  overflow-y: hidden;
  white-space: pre-line;
  background: rgba(0, 0, 0, 0.22);
  padding: 6px 8px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.04);
}

/* Sticky Action Footer for Share Modal */
.share-modal-sticky-actions {
  position: sticky;
  bottom: -20px;
  margin: 14px -20px -20px -20px;
  padding: 12px 20px 16px;
  background: linear-gradient(180deg, rgba(22, 22, 42, 0.88) 0%, rgba(16, 16, 32, 0.98) 35%, rgba(13, 13, 26, 1) 100%);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  z-index: 20;
  box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.45);
}

/* Poster Generation & Preview */
.poster-preview-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-bottom: 12px;
}
.poster-canvas-wrap {
  width: 100%;
  max-width: 260px;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.6), 0 0 20px rgba(124, 92, 252, 0.25);
  border: 1px solid rgba(124, 92, 252, 0.4);
  background: #0d0d1e;
  margin: 0 auto 10px;
}
#share-poster-canvas {
  width: 100%;
  height: auto;
  display: block;
}

/* Install Guide Step Cards */
.install-step-card {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--bg-glass-border);
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 8px;
}
.install-step-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--cyan));
  color: #fff;
  font-weight: 800;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.install-step-body {
  flex: 1;
}
.install-step-title {
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--text-primary);
  margin-bottom: 3px;
}
.install-step-desc {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

/* Auth Screen Referral VIP Banner */
.auth-referral-banner {
  background: linear-gradient(135deg, rgba(124, 92, 252, 0.22), rgba(6, 182, 212, 0.22));
  border: 1px solid rgba(124, 92, 252, 0.45);
  border-radius: 14px;
  padding: 10px 16px;
  margin-bottom: 16px;
  text-align: center;
  box-shadow: 0 4px 18px rgba(124, 92, 252, 0.2);
  animation: slideUp 0.3s ease;
}

/* ── Terms & Privacy Modal Styles ── */
.terms-modal-card {
  width: 100%;
  max-width: 520px;
  max-height: 85vh;
  background: var(--bg-card);
  position: relative;
  z-index: 100006;
  border: 1px solid var(--bg-glass-border);
  border-radius: var(--radius-lg);
  padding: 22px;
  backdrop-filter: blur(var(--blur));
  display: flex;
  flex-direction: column;
}
.terms-content-box {
  flex: 1;
  overflow-y: auto;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 16px;
  margin-top: 12px;
  margin-bottom: 14px;
  font-size: 0.84rem;
  line-height: 1.6;
  color: var(--text-secondary);
}
.terms-section-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-top: 14px;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.terms-section-title:first-child {
  margin-top: 0;
}
.terms-badge {
  font-size: 0.7rem;
  padding: 2px 7px;
  border-radius: 6px;
  background: rgba(124, 92, 252, 0.2);
  color: var(--accent-light);
  font-weight: 600;
}

/* ══════════════════════════════════════════════════════ */
/* 👑 WORLD-CLASS PRACTICAL ENGLISH MASTERY ARENA STYLES  */
/* ══════════════════════════════════════════════════════ */

/* HUD & Motivation Bar */
.mastery-hud-card {
  background: linear-gradient(135deg, rgba(124, 92, 252, 0.18), rgba(6, 182, 212, 0.12), rgba(20, 20, 45, 0.9));
  border: 1px solid rgba(124, 92, 252, 0.35);
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 14px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
  position: relative;
  overflow: hidden;
}
.mastery-hud-card::before {
  content: '';
  position: absolute;
  top: -40px;
  right: -40px;
  width: 110px;
  height: 110px;
  background: radial-gradient(circle, rgba(124, 92, 252, 0.25) 0%, transparent 70%);
  pointer-events: none;
}

/* Diagnostic Filter Strip */
.diagnostic-status-bar {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 6px;
  margin-bottom: 12px;
  scrollbar-width: none;
}
.status-pill {
  flex-shrink: 0;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid var(--bg-glass-border);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 6px;
}
.status-pill.active {
  border-color: var(--accent);
  background: rgba(124, 92, 252, 0.25);
  color: var(--text-primary);
  box-shadow: 0 0 12px rgba(124, 92, 252, 0.3);
}

/* Mastery Progress Indicator & Health */
.mastery-health-container {
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  overflow: hidden;
  margin-top: 4px;
}
.mastery-health-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.4s ease;
}
.health-green { background: linear-gradient(90deg, #10b981, #34d399); }
.health-yellow { background: linear-gradient(90deg, #f59e0b, #fbbf24); }
.health-red { background: linear-gradient(90deg, #ef4444, #f87171); }

/* Start Drill Hero Button */
.btn-start-drill {
  background: linear-gradient(135deg, #7c5cfc, #06b6d4);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 10px 16px;
  font-size: 0.86rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(124, 92, 252, 0.4);
  transition: all 0.25s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
}
.btn-start-drill:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(124, 92, 252, 0.6);
}
.btn-start-drill:active {
  transform: translateY(1px);
}

/* ═══════════════════════════════════════════════════════════
   Mastery Arena Modal: Ultra-Modern Gamified Experience (v3.2)
   ═══════════════════════════════════════════════════════════ */
#mastery-arena-modal {
  position: fixed !important;
  inset: 0 !important;
  z-index: 100010 !important;
  background: radial-gradient(circle at 50% 10%, rgba(124, 92, 252, 0.22), transparent 55%),
              radial-gradient(circle at 90% 85%, rgba(6, 182, 212, 0.16), transparent 50%),
              rgba(5, 5, 16, 0.88) !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  overflow: hidden !important;
  padding: 0 !important;
  box-sizing: border-box !important;
}

#mastery-arena-modal.hidden {
  display: none !important;
}

.arena-modal-card {
  background: #0d0d22;
  border: 1px solid rgba(124, 92, 252, 0.4);
  border-radius: 24px;
  width: 96%;
  max-width: 520px;
  max-height: 92vh;
  overflow-y: auto;
  padding: 20px;
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.85), 0 0 50px rgba(124, 92, 252, 0.25);
  position: relative;
  box-sizing: border-box;
}

.arena-modal-card.arena-structured {
  padding: 0 !important;
  width: 100% !important;
  max-width: 520px !important;
  height: 100dvh !important;
  max-height: 100dvh !important;
  margin: 0 auto !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
  border-radius: 0 !important;
  background: radial-gradient(circle at 50% -10%, rgba(35, 28, 70, 0.85), rgba(8, 8, 22, 0.96) 65%) !important;
  border: 1px solid rgba(124, 92, 252, 0.25) !important;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.9), 0 0 60px rgba(124, 92, 252, 0.2) !important;
}

@media (min-width: 560px) {
  .arena-modal-card.arena-structured {
    height: auto !important;
    max-height: calc(100dvh - 36px) !important;
    border-radius: 24px !important;
  }
}

/* ── Arena Sticky Modern HUD Header ── */
.arena-modal-header {
  flex-shrink: 0;
  padding: 12px 16px 10px;
  background: rgba(12, 12, 28, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  position: relative;
  z-index: 20;
}

.arena-header-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.arena-topic-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--accent-light);
  background: rgba(124, 92, 252, 0.14);
  border: 1px solid rgba(124, 92, 252, 0.3);
  padding: 3px 10px;
  border-radius: 16px;
}

.live-pulse-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 8px #34d399;
  animation: pulse 1.8s infinite;
}

.arena-close-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-secondary);
  font-size: 1rem;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}
.arena-close-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  transform: scale(1.08);
}

.arena-header-title {
  font-size: 0.96rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.35;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Multi-Step Glowing Progress Segments */
.arena-step-dots {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
}

.arena-dot {
  flex: 1;
  height: 5px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 4px;
  transition: all 0.35s ease;
}

.arena-dot.completed {
  background: linear-gradient(90deg, #10b981, #34d399);
  box-shadow: 0 0 10px rgba(52, 211, 153, 0.6);
}

.arena-dot.active {
  background: linear-gradient(90deg, #7c5cfc, #a78bfa);
  box-shadow: 0 0 12px rgba(124, 92, 252, 0.9);
  height: 6px;
}

.arena-hud-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.72rem;
}

.arena-level-pill {
  color: var(--cyan);
  font-weight: 800;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.arena-xp-pill {
  color: #fbbf24;
  font-weight: 800;
  background: rgba(251, 191, 36, 0.14);
  border: 1px solid rgba(251, 191, 36, 0.3);
  padding: 1px 8px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

/* ── Arena Scrollable Body ── */
.arena-modal-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch;
  padding: 14px 16px 95px !important;
  scroll-behavior: smooth;
}

/* Hide bottom navigation bar completely while Arena modal is open */
body.has-arena-modal-open .bottom-nav,
body:has(#mastery-arena-modal:not(.hidden)) .bottom-nav {
  display: none !important;
}

/* ── Hero Challenge Stage Canvas ── */
.arena-stage-card {
  background: rgba(22, 22, 46, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  padding: 14px;
  margin-bottom: 12px;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.arena-mission-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 10px;
  background: rgba(6, 182, 212, 0.14);
  color: var(--cyan);
  border: 1px solid rgba(6, 182, 212, 0.3);
  text-transform: uppercase;
  margin-bottom: 8px;
}

.arena-mission-cue {
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.45;
  margin-bottom: 12px;
}

/* ── Sentence Studio Box ── */
.arena-sentence-box {
  background: rgba(10, 10, 24, 0.78);
  border: 1px solid rgba(124, 92, 252, 0.32);
  border-radius: 16px;
  padding: 14px 12px;
  margin-bottom: 12px;
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.6), 0 6px 20px rgba(0, 0, 0, 0.3);
  position: relative;
}

.sentence-box-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.sentence-box-tag {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.btn-audio-listen {
  background: rgba(124, 92, 252, 0.2);
  border: 1px solid rgba(124, 92, 252, 0.45);
  border-radius: 14px;
  padding: 3px 10px;
  color: var(--accent-light);
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.2s ease;
}
.btn-audio-listen:hover {
  background: rgba(124, 92, 252, 0.35);
  color: #fff;
  transform: translateY(-1px);
}
.btn-audio-listen:active {
  transform: translateY(1px);
}

/* ── Modern 3D Tactile Word Chips (Duolingo Grade) ── */
.word-chips-pool {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin: 10px 0 6px;
}

.word-chip {
  background: rgba(28, 28, 54, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-bottom: 3.5px solid rgba(124, 92, 252, 0.6);
  padding: 10px 16px;
  border-radius: 14px;
  color: #ffffff;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  user-select: none;
  transition: all 0.15s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.word-chip:hover {
  background: rgba(42, 38, 80, 0.95);
  border-color: var(--accent-light);
  border-bottom-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(124, 92, 252, 0.35);
}

.word-chip:active {
  transform: translateY(2px);
  border-bottom-width: 1.5px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

.word-chip.spot-wrong {
  background: linear-gradient(135deg, #059669, #10b981) !important;
  border-color: #34d399 !important;
  border-bottom: 3.5px solid #047857 !important;
  color: #ffffff !important;
  box-shadow: 0 0 24px rgba(52, 211, 153, 0.75) !important;
  transform: scale(1.05) !important;
  pointer-events: none;
}

.word-chip.spot-false-alarm {
  background: rgba(239, 68, 68, 0.28) !important;
  border-color: #ef4444 !important;
  border-bottom-color: #b91c1c !important;
  color: #fca5a5 !important;
  animation: shakeX 0.4s ease;
}

.word-chip.assembled {
  opacity: 0.35;
  pointer-events: none;
  transform: scale(0.92);
  border-bottom-width: 1px;
}

/* ── Sentence Assembler Target Slot ── */
.assembly-target-slot {
  min-height: 56px;
  background: rgba(10, 10, 24, 0.65);
  border: 2px dashed rgba(124, 92, 252, 0.45);
  border-radius: 14px;
  padding: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: center;
  margin: 12px 0;
  transition: all 0.2s ease;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.4);
}

/* ── Rule Anchor & Hindi Insight Card ── */
.arena-anchor-card {
  background: rgba(124, 92, 252, 0.08);
  border: 1px solid rgba(124, 92, 252, 0.24);
  border-left: 3.5px solid var(--accent);
  border-radius: 12px;
  padding: 12px 14px;
  margin-top: 10px;
}

.anchor-formula-tag {
  font-size: 0.76rem;
  color: var(--accent-light);
  font-weight: 800;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.anchor-rule-text {
  font-size: 0.82rem;
  color: var(--text-primary);
  line-height: 1.45;
  font-weight: 600;
}

.anchor-hindi-why {
  font-size: 0.76rem;
  color: var(--cyan);
  margin-top: 6px;
  line-height: 1.4;
  font-weight: 600;
}

/* ── Speed Reflex Timer Bar & Badges (Level 3) ── */
.speed-timer-bar-track {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  overflow: hidden;
  margin: 10px 0 14px;
}

.speed-timer-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #10b981, #f59e0b, #ef4444);
  width: 100%;
  border-radius: 6px;
  transition: width 0.1s linear;
}

.arena-speed-choice {
  background: rgba(26, 26, 52, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-bottom: 3px solid rgba(124, 92, 252, 0.45);
  border-radius: 12px;
  padding: 12px 14px;
  color: var(--text-primary);
  font-size: 0.88rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s ease;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
}
.arena-speed-choice:hover {
  background: rgba(38, 34, 75, 0.95);
  border-color: var(--accent);
  transform: translateY(-2px);
}
.arena-speed-choice:active {
  transform: translateY(1px);
}

/* ── Voice Microphone Pulsing Ring (Level 4) ── */
.voice-mic-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 10px 0 8px;
}

.voice-mic-btn {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: linear-gradient(135deg, #7c5cfc, #06b6d4);
  border: none;
  color: white;
  font-size: 1.8rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 25px rgba(124, 92, 252, 0.6);
  position: relative;
  transition: all 0.25s ease;
}

.voice-mic-btn.listening {
  background: linear-gradient(135deg, #ef4444, #f59e0b);
  animation: micPulse 1.2s infinite;
  box-shadow: 0 0 35px rgba(239, 68, 68, 0.8);
}

@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 20px rgba(239, 68, 68, 0); }
  100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

@keyframes shakeX {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-6px); }
  40%, 80% { transform: translateX(6px); }
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes pulseGlow {
  0%, 100% { opacity: 0.7; }
  50% { opacity: 1; filter: drop-shadow(0 0 4px var(--cyan)); }
}

/* ── Modern Bottom Action Dock & Feedback Sheet ── */
.arena-dock-hint {
  text-align: center;
  font-size: 0.76rem;
  color: var(--text-muted);
  font-weight: 600;
  padding: 6px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  animation: pulseGlow 2s infinite ease-in-out;
}

.arena-feedback-sheet {
  border-radius: 14px;
  padding: 12px 14px;
  margin-top: 10px;
  animation: slideUp 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  font-size: 0.84rem;
  line-height: 1.45;
}

.arena-feedback-sheet.success {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.2), rgba(5, 150, 105, 0.28));
  border: 1px solid rgba(52, 211, 153, 0.5);
  color: #6ee7b7;
}

.arena-feedback-sheet.error {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.2), rgba(185, 28, 28, 0.28));
  border: 1px solid rgba(239, 68, 68, 0.5);
  color: #fca5a5;
}

.arena-feedback-sheet.warning {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(217, 119, 6, 0.28));
  border: 1px solid rgba(245, 158, 11, 0.5);
  color: #fde68a;
}

#arena-action-btn.btn-arena-next {
  background: linear-gradient(135deg, #7c5cfc 0%, #9061f9 45%, #06b6d4 100%) !important;
  border: none !important;
  border-radius: 14px !important;
  padding: 13px 16px !important;
  font-size: 0.95rem !important;
  font-weight: 800 !important;
  color: #fff !important;
  box-shadow: 0 6px 25px rgba(124, 92, 252, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.25) !important;
  text-transform: uppercase !important;
  letter-spacing: 0.5px !important;
  transition: all 0.2s ease !important;
  cursor: pointer !important;
  display: block;
  width: 100%;
}
#arena-action-btn.btn-arena-next:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(124, 92, 252, 0.7) !important;
}
#arena-action-btn.btn-arena-next:active {
  transform: translateY(1px);
}

/* ── Victory Screen ── */
.arena-victory-card {
  text-align: center;
  padding: 24px 12px;
  animation: slideUp 0.4s ease;
}
.arena-victory-trophy {
  font-size: 3.8rem;
  margin-bottom: 12px;
  animation: micPulse 2s infinite ease-in-out;
  display: inline-block;
}
.arena-victory-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(52, 211, 153, 0.16);
  border: 1px solid rgba(52, 211, 153, 0.4);
  color: #34d399;
  font-size: 0.74rem;
  font-weight: 800;
  padding: 3px 12px;
  border-radius: 20px;
  margin-bottom: 8px;
  text-transform: uppercase;
}

/* Accordion Deep Dive */
.accordion-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
  transition: background 0.2s ease;
}
.accordion-header:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
}
.accordion-body {
  padding: 10px;
  font-size: 0.8rem;
  line-height: 1.5;
  color: var(--text-secondary);
  background: rgba(0, 0, 0, 0.2);
  border-radius: 0 0 8px 8px;
  margin-top: -2px;
}

/* ═══════════════════════════════════════════════════════════
   FluentFlow Anti-Theft Content Protection (Non-Admin)
   ═══════════════════════════════════════════════════════════ */
/* 1. Practice Learning Pathway: Disable text selection completely for non-admins */
body:not(.is-admin) #master-submode-path,
body:not(.is-admin) #mastery-cards-container,
body:not(.is-admin) .mastery-card,
body:not(.is-admin) #mastery-arena-modal {
  -webkit-user-select: none !important;
  -moz-user-select: none !important;
  -ms-user-select: none !important;
  user-select: none !important;
  -webkit-touch-callout: none !important;
}

/* 2. Read Section: Non-article UI chrome is not selectable */
body:not(.is-admin) #page-read .section-header,
body:not(.is-admin) #page-read .tab-group,
body:not(.is-admin) #page-read .reading-meta-bar {
  -webkit-user-select: none !important;
  user-select: none !important;
}

/* 3. Print protection: Hide proprietary learning & reading sections if user tries to Print to PDF */
@media print {
  body:not(.is-admin) #master-submode-path,
  body:not(.is-admin) #page-read,
  body:not(.is-admin) #mastery-arena-modal {
    display: none !important;
    visibility: hidden !important;
  }
  body:not(.is-admin)::before {
    content: "Protected Educational Content • FluentFlow Intellectual Property";
    font-size: 1.5rem;
    color: #444;
    text-align: center;
    display: block;
    padding: 40px;
  }
}

/* ══════════════════════════════════════════════════════════════════════════ */
/* 👑 WORLD'S BEST ENGLISH MASTERY ENGINE: HIGHWAY, SUTRAS & MULTI-MODAL GYM */
/* ══════════════════════════════════════════════════════════════════════════ */

/* 1. 30-Day Step-by-Step Fluency Highway Widget */
.fluency-highway-card {
  background: linear-gradient(135deg, rgba(124, 92, 252, 0.22), rgba(6, 182, 212, 0.16), rgba(15, 23, 42, 0.95));
  border: 1px solid rgba(124, 92, 252, 0.4);
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 14px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  position: relative;
  overflow: hidden;
}
.highway-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}
.highway-stepper {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 8px 4px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.highway-node {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 800;
  cursor: pointer;
  border: 2px solid rgba(255, 255, 255, 0.15);
  background: rgba(0, 0, 0, 0.35);
  color: var(--text-muted);
  transition: all 0.2s ease;
}
.highway-node.completed {
  background: rgba(52, 211, 153, 0.2);
  border-color: var(--success);
  color: var(--success);
}
.highway-node.current {
  background: linear-gradient(135deg, #7c5cfc, #06b6d4);
  border-color: #fff;
  color: #fff;
  box-shadow: 0 0 16px rgba(124, 92, 252, 0.6);
  transform: scale(1.12);
}
.highway-node.locked {
  opacity: 0.5;
  cursor: not-allowed;
}

/* 2. Master Professor Sutras & Cognitive Cheat Codes */
.sutra-card {
  background: linear-gradient(135deg, rgba(20, 20, 38, 0.85), rgba(30, 27, 75, 0.75));
  border: 1px solid rgba(124, 92, 252, 0.35);
  border-radius: 14px;
  padding: 16px;
  position: relative;
  overflow: hidden;
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.sutra-card:hover {
  border-color: var(--accent-light);
  transform: translateY(-2px);
}
.sutra-golden-formula {
  background: rgba(124, 92, 252, 0.14);
  border-left: 4px solid var(--accent);
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 0.86rem;
  color: #c4b5fd;
  font-weight: 700;
  line-height: 1.45;
  margin: 10px 0;
}
.sutra-hack-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: #fbbf24;
  font-size: 0.72rem;
  padding: 3px 8px;
  border-radius: 12px;
  font-weight: 700;
  margin-bottom: 6px;
}
.sutra-micro-quiz {
  background: rgba(0, 0, 0, 0.35);
  border: 1px dashed rgba(6, 182, 212, 0.3);
  border-radius: 10px;
  padding: 12px;
  margin-top: 10px;
}

/* 3. Multi-Modal Quiz Styles: Word Scramble & Blunder Spotter */
.quiz-mode-bar {
  display: flex;
  gap: 4px;
  background: rgba(0, 0, 0, 0.3);
  padding: 4px;
  border-radius: 10px;
  margin-bottom: 10px;
}
.scramble-assembled-zone {
  min-height: 50px;
  background: rgba(0, 0, 0, 0.4);
  border: 2px dashed rgba(124, 92, 252, 0.4);
  border-radius: 10px;
  padding: 8px 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin-bottom: 12px;
}
.scramble-chip-pool {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}
.scramble-chip {
  background: rgba(124, 92, 252, 0.2);
  border: 1px solid rgba(124, 92, 252, 0.45);
  color: #e0e7ff;
  font-size: 0.84rem;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}
.scramble-chip:hover {
  background: rgba(124, 92, 252, 0.35);
  border-color: var(--accent);
  transform: translateY(-1px);
}
.scramble-chip.used {
  opacity: 0.25;
  pointer-events: none;
}
.spotter-token-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 14px 12px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  margin-bottom: 12px;
  font-size: 0.98rem;
  line-height: 1.8;
}
.spotter-word-token {
  padding: 3px 8px;
  border-radius: 6px;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid transparent;
  transition: all 0.15s ease;
}
.spotter-word-token:hover {
  background: rgba(6, 182, 212, 0.2);
  border-color: var(--cyan);
  color: #fff;
}
.spotter-word-token.error-highlight {
  background: rgba(248, 113, 113, 0.25) !important;
  border-color: var(--danger) !important;
  color: #f87171 !important;
  font-weight: 700;
}
.spotter-word-token.correct-highlight {
  background: rgba(52, 211, 153, 0.25) !important;
  border-color: var(--success) !important;
  color: #34d399 !important;
  font-weight: 700;
}

/* 4. Rule Card Examples Box */
.rule-example-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 10px 0 12px 0;
}
.rule-example-item {
  background: rgba(0, 0, 0, 0.25);
  border-radius: 8px;
  padding: 8px 10px;
  border-left: 3px solid rgba(255, 255, 255, 0.15);
}
.rule-wrong-line {
  color: #f87171;
  font-size: 0.82rem;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.rule-right-line {
  color: #34d399;
  font-size: 0.84rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ═══════════════════════════════════════════════════════
   🩻 FLUENCY BLIND-SPOT RADAR & REALITY METER STYLES
   ═══════════════════════════════════════════════════════ */
.blind-spot-radar-card {
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.88), rgba(30, 41, 59, 0.88));
  border: 1px solid rgba(124, 92, 252, 0.35);
  border-radius: 16px;
  padding: 14px 16px;
  margin-bottom: 14px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(12px);
  position: relative;
  overflow: hidden;
}
.radar-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  flex-wrap: wrap;
  gap: 8px;
}
.radar-title-box {
  display: flex;
  align-items: center;
  gap: 10px;
}
.radar-icon-badge {
  font-size: 1.5rem;
  background: rgba(124, 92, 252, 0.15);
  border: 1px solid rgba(124, 92, 252, 0.4);
  border-radius: 12px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.radar-main-title {
  font-size: 0.95rem;
  font-weight: 800;
  color: #f8fafc;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 6px;
}
.radar-tagline {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin: 0;
}
.reality-score-badge {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  padding: 4px 10px;
}
.reality-score-num {
  font-size: 1.15rem;
  font-weight: 900;
  color: #38bdf8;
  line-height: 1.1;
}
.reality-tier-title {
  font-size: 0.65rem;
  font-weight: 700;
  color: #fbbf24;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.reality-bar-wrapper {
  margin-bottom: 12px;
}
.reality-bar-track {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  overflow: hidden;
  position: relative;
}
.reality-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #38bdf8, #818cf8, #a855f7, #10b981);
  border-radius: 6px;
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}
.radar-matrix-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}
@media (max-width: 600px) {
  .radar-matrix-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
.radar-bucket-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 8px 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}
.radar-bucket-card:hover, .radar-bucket-card.active {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}
.bucket-unexplored { border-color: rgba(148, 163, 184, 0.3); }
.bucket-unexplored.active { border-color: #94a3b8; background: rgba(148, 163, 184, 0.12); }
.bucket-atrisk { border-color: rgba(248, 113, 113, 0.4); }
.bucket-atrisk.active { border-color: #f87171; background: rgba(248, 113, 113, 0.15); }
.bucket-training { border-color: rgba(251, 191, 36, 0.4); }
.bucket-training.active { border-color: #fbbf24; background: rgba(251, 191, 36, 0.15); }
.bucket-mastered { border-color: rgba(52, 211, 153, 0.4); }
.bucket-mastered.active { border-color: #34d399; background: rgba(52, 211, 153, 0.15); }

.bucket-count {
  font-size: 1.1rem;
  font-weight: 800;
  line-height: 1;
}
.bucket-label {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--text-muted);
  display: block;
  line-height: 1.2;
}
.ai-doctor-panel {
  background: rgba(124, 92, 252, 0.1);
  border: 1px solid rgba(124, 92, 252, 0.3);
  border-radius: 12px;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.doctor-meta-box {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 240px;
}
.doctor-icon-pulse {
  font-size: 1.4rem;
  animation: pulse-glow 2s infinite ease-in-out;
}
@keyframes pulse-glow {
  0%, 100% { transform: scale(1); opacity: 0.9; }
  50% { transform: scale(1.15); opacity: 1; }
}
.doctor-prescription-text {
  font-size: 0.78rem;
  color: #e2e8f0;
  line-height: 1.35;
}
.btn-doctor-fix {
  background: linear-gradient(135deg, #7c5cfc, #6366f1);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 8px 14px;
  font-size: 0.78rem;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 4px 14px rgba(124, 92, 252, 0.4);
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 6px;
}
.btn-doctor-fix:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(124, 92, 252, 0.6);
}
.sutra-discovery-strip {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}
.discovery-top-row {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.btn-surprise-hack {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(239, 68, 68, 0.2));
  border: 1px solid rgba(245, 158, 11, 0.5);
  color: #fbbf24;
  border-radius: 10px;
  padding: 7px 12px;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}
.btn-surprise-hack:hover {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.35), rgba(239, 68, 68, 0.35));
  transform: translateY(-1px);
}
.sutra-tab-pill-bar {
  display: flex;
  gap: 5px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 2px;
}
.sutra-tab-pill {
  padding: 5px 11px;
  font-size: 0.72rem;
  font-weight: 700;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}
.sutra-tab-pill.active, .sutra-tab-pill:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.card-mastery-status-pill {
  font-size: 0.65rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 8px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.status-pill-unexplored {
  background: rgba(148, 163, 184, 0.15);
  color: #cbd5e1;
  border: 1px solid rgba(148, 163, 184, 0.3);
}
.status-pill-atrisk {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.35);
}
.status-pill-training {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.35);
}
.status-pill-mastered {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.35);
}

/* 👑 Guided Journey Hero Card & Power Gym Drawer */
.mastery-hero-guide-card {
  background: linear-gradient(135deg, rgba(124, 92, 252, 0.2), rgba(6, 182, 212, 0.14), rgba(15, 23, 42, 0.95));
  border: 1px solid rgba(124, 92, 252, 0.4);
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 12px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
  position: relative;
  overflow: hidden;
}

.hero-next-step-box {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 12px;
}

.power-gym-drawer {
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 8px 12px;
  margin-bottom: 12px;
  transition: all 0.3s ease;
}

.power-gym-toggle {
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  padding: 4px 2px;
  user-select: none;
}

.power-gym-toggle:hover {
  opacity: 0.92;
}

.power-gym-body {
  transition: all 0.3s ease;
}

/* 🏷️ Omni-Pillar Live Badge */
.pillar-live-badge {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--cyan);
  margin-left: 4px;
}

/* 🎛️ Dual-Mode Switcher Bar (3D Cyber-Segmented Control) */
.dual-mode-switcher-bar {
  display: flex;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(124, 92, 252, 0.3);
  padding: 4px;
  border-radius: 14px;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.5), 0 4px 16px rgba(0, 0, 0, 0.3);
  gap: 6px;
}

.dual-mode-btn {
  flex: 1;
  padding: 8px 10px;
  font-size: 0.78rem;
  font-weight: 700;
  border-radius: 10px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
}

.dual-mode-btn.active {
  background: linear-gradient(135deg, rgba(124, 92, 252, 0.35), rgba(6, 182, 212, 0.25));
  border-color: rgba(6, 182, 212, 0.5);
  color: #fff;
  box-shadow: 0 4px 14px rgba(6, 182, 212, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

/* 🚀 3D Focus Milestone Card */
.focus-milestone-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.7), rgba(15, 23, 42, 0.85));
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-left: 4px solid #64748b;
  border-radius: 12px;
  padding: 10px 14px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
  transition: all 0.22s ease;
  position: relative;
  overflow: hidden;
}

.focus-milestone-card:hover {
  border-color: rgba(6, 182, 212, 0.4);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.focus-milestone-card.milestone-certified {
  border-left-color: var(--success);
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.08), rgba(15, 23, 42, 0.85));
}

.focus-milestone-card.milestone-training {
  border-left-color: #fbbf24;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.08), rgba(15, 23, 42, 0.85));
}

.focus-milestone-card.milestone-atrisk {
  border-left-color: var(--danger);
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.08), rgba(15, 23, 42, 0.85));
}

.milestone-num-badge {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 800;
  background: linear-gradient(135deg, rgba(124, 92, 252, 0.25), rgba(6, 182, 212, 0.25));
  border: 1.5px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.milestone-num-badge.certified {
  background: rgba(16, 185, 129, 0.2);
  border-color: var(--success);
  color: var(--success);
}

.milestone-info-box {
  flex: 1;
  min-width: 0;
}

.milestone-title-text {
  font-size: 0.86rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.3;
  margin-bottom: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.milestone-sub-text {
  font-size: 0.72rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.milestone-action-btn {
  flex-shrink: 0;
  padding: 6px 12px;
  font-size: 0.74rem;
  font-weight: 800;
  border-radius: 8px;
  background: linear-gradient(135deg, #7c5cfc, #06b6d4);
  color: white;
  border: none;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(124, 92, 252, 0.35);
  transition: all 0.2s ease;
  white-space: nowrap;
}

.milestone-action-btn:hover {
  transform: scale(1.04);
  box-shadow: 0 4px 15px rgba(6, 182, 212, 0.5);
}

/* 🚀 Focus Player Modal Card */
.focus-player-card {
  width: 92%;
  max-width: 520px;
  max-height: 90vh;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.98), rgba(30, 41, 59, 0.98));
  border: 1px solid rgba(124, 92, 252, 0.4);
  border-radius: 18px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7), 0 0 30px rgba(124, 92, 252, 0.25);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: modalPopIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.focus-player-header {
  padding: 14px 16px 10px;
  background: rgba(0, 0, 0, 0.35);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.fp-stepper-bar {
  display: flex;
  gap: 6px;
}

.fp-step-segment {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 5px 8px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-muted);
  border: 1px solid transparent;
  transition: all 0.25s ease;
}

.fp-step-segment.active {
  background: rgba(6, 182, 212, 0.15);
  border-color: rgba(6, 182, 212, 0.5);
  color: var(--cyan);
}

.fp-step-segment.completed {
  background: rgba(16, 185, 129, 0.15);
  border-color: rgba(16, 185, 129, 0.4);
  color: var(--success);
}

.fp-seg-num {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
}

.focus-player-body {
  padding: 14px 16px 36px;
  overflow-y: auto;
  flex: 1;
  -webkit-overflow-scrolling: touch;
}

/* 🌟 Focus Player Dynamic Steps & 3D Interactive Elements */
.fp-content-step {
  animation: modalPopIn 0.25s ease;
}

.fp-golden-box {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.12), rgba(124, 92, 252, 0.12));
  border: 1px solid rgba(245, 158, 11, 0.4);
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.fp-contrast-card {
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 10px;
  transition: all 0.2s ease;
}

.fp-trap-card {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.1), rgba(15, 23, 42, 0.6));
  border: 1px solid rgba(239, 68, 68, 0.35);
}

.fp-correct-card {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.12), rgba(15, 23, 42, 0.6));
  border: 1.5px solid rgba(16, 185, 129, 0.45);
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.15);
}

.fp-quiz-opt-btn {
  width: 100%;
  text-align: left;
  padding: 12px 14px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1.5px solid rgba(255, 255, 255, 0.12);
  color: var(--text-primary);
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  user-select: none;
}

.fp-quiz-opt-btn:hover {
  background: rgba(124, 92, 252, 0.15);
  border-color: var(--accent);
  transform: translateY(-1px);
}

.fp-quiz-opt-btn:active {
  transform: translateY(2px) scale(0.985);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3) !important;
}

.fp-quiz-opt-btn.correct-choice {
  background: rgba(16, 185, 129, 0.25) !important;
  border-color: var(--success) !important;
  color: #34d399 !important;
  box-shadow: 0 0 16px rgba(16, 185, 129, 0.4);
}

.fp-quiz-opt-btn.wrong-choice {
  background: rgba(239, 68, 68, 0.25) !important;
  border-color: var(--danger) !important;
  color: #f87171 !important;
}

.fp-victory-box {
  text-align: center;
  padding: 16px 8px;
  animation: modalPopIn 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.fp-xp-burst {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(16, 185, 129, 0.2));
  border: 1px solid rgba(245, 158, 11, 0.5);
  color: #fbbf24;
  font-weight: 800;
  font-size: 0.85rem;
  margin-bottom: 12px;
}

/* ═══════════════════════════════════════════════════════════
   Accessibility: System Reduced Motion Preference
   ═══════════════════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  *, ::before, ::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ═══════════════════════════════════════════════════════════
   👑 WORLD-CLASS HIGH-CONVERTING PRICING MODAL STYLES
   ═══════════════════════════════════════════════════════════ */
.pricing-tiers-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 16px 0;
}

.pricing-tier-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--bg-glass-border);
  border-radius: 16px;
  padding: 16px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.pricing-tier-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent-light);
  box-shadow: 0 6px 20px rgba(124, 92, 252, 0.2);
}

.pricing-tier-card.selected {
  border: 2px solid var(--accent-light);
  background: linear-gradient(135deg, rgba(124, 92, 252, 0.15), rgba(20, 20, 48, 0.95));
  box-shadow: 0 0 24px rgba(124, 92, 252, 0.3);
}

.pricing-tier-card.highlight {
  border: 2px solid #f59e0b;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.12), rgba(124, 92, 252, 0.12), rgba(20, 20, 48, 0.95));
  box-shadow: 0 0 28px rgba(245, 158, 11, 0.25);
}

.pricing-badge-corner {
  position: absolute;
  top: -10px;
  right: 14px;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 12px;
  letter-spacing: 0.4px;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.4);
  text-transform: uppercase;
}

.pricing-tier-left {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.pricing-plan-name {
  font-weight: 800;
  font-size: 0.98rem;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 6px;
}

.pricing-plan-sub {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.pricing-save-pill {
  display: inline-block;
  background: rgba(52, 211, 153, 0.18);
  border: 1px solid rgba(52, 211, 153, 0.4);
  color: #34d399;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 6px;
  margin-left: 6px;
}

.pricing-tier-right {
  text-align: right;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.pricing-rate-mo {
  font-size: 1.25rem;
  font-weight: 900;
  color: #fff;
  line-height: 1.1;
}

.pricing-rate-mo span {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-muted);
}

.pricing-total-billed {
  font-size: 0.74rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.pricing-original-strike {
  text-decoration: line-through;
  color: #94a3b8;
  font-size: 0.72rem;
  margin-right: 4px;
}

/* Trust Badges Row */
.trust-badges-bar {
  display: flex;
  justify-content: space-around;
  align-items: center;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 12px;
  padding: 10px 12px;
  margin: 14px 0;
  gap: 8px;
  font-size: 0.74rem;
  color: var(--text-muted);
  flex-wrap: wrap;
}

.trust-badge-item {
  display: flex;
  align-items: center;
  gap: 5px;
  font-weight: 600;
  color: #cbd5e1;
}

/* ═══════════════════════════════════════════════════════════
   👑 STICKY MODAL ARCHITECTURE & PULSE CTA (CONVERSION OPTIMIZED)
   ═══════════════════════════════════════════════════════════ */
.pricing-modal-dialog {
  background: var(--bg-card);
  border: 1px solid rgba(124, 92, 252, 0.35);
  border-radius: 24px;
  width: 100%;
  max-width: 500px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.7);
  animation: modalPopIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

.pricing-modal-body {
  flex: 1 1 auto;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 22px 20px 14px 20px;
  -webkit-overflow-scrolling: touch;
}

.pricing-modal-sticky-footer {
  flex-shrink: 0;
  padding: 12px 18px calc(12px + env(safe-area-inset-bottom, 0px)) 18px;
  background: linear-gradient(180deg, rgba(16, 16, 36, 0.94) 0%, rgba(10, 10, 24, 0.99) 100%);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid rgba(124, 92, 252, 0.28);
  box-shadow: 0 -8px 26px rgba(0, 0, 0, 0.45);
  display: flex;
  flex-direction: column;
  gap: 6px;
  z-index: 10;
}

.pricing-main-cta-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, #7c5cfc, #06b6d4);
  color: #fff;
  border: none;
  border-radius: 14px;
  font-weight: 800;
  font-size: 0.96rem;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(124, 92, 252, 0.45);
  text-align: center;
  transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

.pricing-main-cta-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(124, 92, 252, 0.6);
  filter: brightness(1.05);
}

.pricing-main-cta-btn:active {
  transform: scale(0.98);
}

@keyframes ctaPlanChangePulse {
  0% { transform: scale(1); box-shadow: 0 4px 20px rgba(124, 92, 252, 0.45); }
  50% { transform: scale(1.03); box-shadow: 0 0 28px rgba(6, 182, 212, 0.75); filter: brightness(1.15); }
  100% { transform: scale(1); box-shadow: 0 4px 20px rgba(124, 92, 252, 0.45); }
}

.pricing-main-cta-btn.cta-pulse {
  animation: ctaPlanChangePulse 0.35s ease-out;
}

.pricing-footer-subrow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2px 4px 0 4px;
}

.pricing-micro-guarantee {
  font-size: 0.7rem;
  color: #94a3b8;
  font-weight: 600;
}

.pricing-maybe-later-link {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.75rem;
  cursor: pointer;
  padding: 2px 4px;
  text-decoration: underline;
  opacity: 0.8;
}

.pricing-maybe-later-link:hover {
  opacity: 1;
  color: #fff;
}

/* ═══════════════════════════════════════════════════════════
   ❓ HELP & SUPPORT HUB MODAL STYLES
   ═══════════════════════════════════════════════════════════ */
.help-modal-card {
  width: 100%;
  max-width: 520px;
  max-height: 88vh;
  background: var(--bg-card);
  position: relative;
  z-index: 100006;
  border: 1px solid var(--bg-glass-border);
  border-radius: var(--radius-lg);
  padding: 22px;
  backdrop-filter: blur(var(--blur));
  display: flex;
  flex-direction: column;
}

.help-tab-strip {
  display: flex;
  gap: 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 8px;
  overflow-x: auto;
  scrollbar-width: none;
}

.help-tab-strip::-webkit-scrollbar {
  display: none;
}

.help-content-box {
  flex: 1;
  overflow-y: auto;
  margin-top: 12px;
  margin-bottom: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.faq-card-interactive {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 14px;
  transition: border-color 0.2s;
}

.faq-card-interactive:hover {
  border-color: rgba(124, 92, 252, 0.4);
}

.faq-card-interactive summary {
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--text-primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  outline: none;
}

.faq-solution-body {
  margin-top: 10px;
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.55;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.diagnostic-chip-bar {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 0.74rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.screenshot-upload-zone {
  border: 2px dashed rgba(124, 92, 252, 0.35);
  border-radius: 12px;
  padding: 16px;
  text-align: center;
  background: rgba(124, 92, 252, 0.04);
  cursor: pointer;
  transition: all 0.2s;
}

.screenshot-upload-zone:hover {
  border-color: var(--accent-light);
  background: rgba(124, 92, 252, 0.08);
}

.screenshot-preview-thumb {
  max-width: 100%;
  max-height: 140px;
  border-radius: 8px;
  margin-top: 10px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  display: none;
}

/* 🟢 Live Indicator & Rewards Wallet Animations */
@keyframes liveBlink {
  0% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
  100% { opacity: 1; transform: scale(1); }
}

.live-pulse {
  background: rgba(52, 211, 153, 0.15);
  border: 1px solid rgba(52, 211, 153, 0.35);
  border-radius: 12px;
  padding: 1px 8px;
  font-size: 0.72rem;
  font-weight: 800;
  color: #34d399;
}

.milestone-3d-card {
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s ease;
}

/* ═══════════════════════════════════════════════════════════
   P1 STYLES: PHONE CALL MODAL, RESUME ENGINE & MTI ACCENT LAB
   ═══════════════════════════════════════════════════════════ */

/* Phone Call Modal */
.phone-call-card {
  background: radial-gradient(circle at 50% 20%, #1a1a3a 0%, #0a0a1a 100%);
  border: 1px solid rgba(124, 92, 252, 0.4);
  border-radius: 32px;
  width: 100%;
  max-width: 400px;
  min-height: 520px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  padding: 32px 24px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8), 0 0 30px rgba(124, 92, 252, 0.2);
  position: relative;
  overflow: hidden;
  text-align: center;
}

.phone-avatar-wrap {
  position: relative;
  width: 110px;
  height: 110px;
  margin: 16px auto;
}

.phone-avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: linear-gradient(135deg, #7c5cfc, #06b6d4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  border: 3px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 8px 30px rgba(124, 92, 252, 0.5);
  position: relative;
  z-index: 2;
}

.phone-avatar-pulse {
  position: absolute;
  inset: -12px;
  border-radius: 50%;
  border: 2px solid rgba(6, 182, 212, 0.6);
  animation: callRingPulse 1.8s infinite ease-out;
  z-index: 1;
}

@keyframes callRingPulse {
  0% { transform: scale(0.9); opacity: 0.8; }
  50% { transform: scale(1.25); opacity: 0.3; }
  100% { transform: scale(1.5); opacity: 0; }
}

/* Sound Wave Animation */
.call-sound-wave {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  height: 40px;
  margin: 14px 0;
}

.call-sound-bar {
  width: 4px;
  height: 10px;
  background: linear-gradient(180deg, #38bdf8, #818cf8);
  border-radius: 4px;
  transform: scaleY(0.25);
  opacity: 0.35;
  transition: transform 0.25s, opacity 0.25s, background 0.25s;
}

/* Sound Wave activates ONLY when Priya or User speaks */
.call-sound-wave.speaking .call-sound-bar {
  opacity: 1;
  animation: soundBarWave 0.85s infinite ease-in-out alternate;
}

.call-sound-wave.speaking .call-sound-bar:nth-child(2) { animation-delay: 0.12s; height: 18px; }
.call-sound-wave.speaking .call-sound-bar:nth-child(3) { animation-delay: 0.24s; height: 32px; }
.call-sound-wave.speaking .call-sound-bar:nth-child(4) { animation-delay: 0.36s; height: 24px; }
.call-sound-wave.speaking .call-sound-bar:nth-child(5) { animation-delay: 0.48s; height: 14px; }

/* When User speaks into mic: energetic emerald-cyan ripple */
.call-sound-wave.user-speaking .call-sound-bar {
  background: linear-gradient(180deg, #34d399, #06b6d4);
  opacity: 1;
  animation: soundBarWave 0.75s infinite ease-in-out alternate;
}
.call-sound-wave.user-speaking .call-sound-bar:nth-child(2) { animation-delay: 0.10s; height: 20px; }
.call-sound-wave.user-speaking .call-sound-bar:nth-child(3) { animation-delay: 0.20s; height: 34px; }
.call-sound-wave.user-speaking .call-sound-bar:nth-child(4) { animation-delay: 0.30s; height: 26px; }
.call-sound-wave.user-speaking .call-sound-bar:nth-child(5) { animation-delay: 0.40s; height: 16px; }

@keyframes soundBarWave {
  0% { transform: scaleY(0.3); }
  100% { transform: scaleY(1.3); }
}

@keyframes callMicPulse {
  0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(6,182,212,0.7); }
  50% { transform: scale(1.08); box-shadow: 0 0 20px 8px rgba(6,182,212,0.4); }
  100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(6,182,212,0); }
}

.call-mic-waiting {
  animation: callMicPulse 1.4s infinite ease-in-out !important;
}

/* Call Control Buttons */
.call-btn-circle {
  width: 66px;
  height: 66px;
  border-radius: 50%;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
}

.call-btn-accept {
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

.call-btn-decline {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: white;
  box-shadow: 0 6px 20px rgba(239, 68, 68, 0.4);
}

.call-btn-circle:hover {
  transform: scale(1.08);
}

/* Resume Match Meter */
.resume-match-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 20px;
  font-weight: 800;
  font-size: 0.85rem;
}

.resume-match-high {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid #10b981;
  color: #34d399;
}

/* MTI Sound Pair Card */
.mti-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  padding: 14px;
  margin-bottom: 10px;
  transition: border-color 0.2s, background 0.2s;
}

.mti-card.active {
  background: rgba(124, 92, 252, 0.12);
  border-color: var(--accent);
}

.phone-call-container {
  width: 92%;
  max-width: 400px;
  background: radial-gradient(circle at 50% 15%, #1e1b4b 0%, #0a0a1a 100%);
  border: 1px solid rgba(124, 92, 252, 0.4);
  border-radius: 28px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.85), 0 0 40px rgba(124, 92, 252, 0.25);
  padding: 28px 20px 24px;
  text-align: center;
  position: relative;
  overflow: hidden;
  margin: auto;
}

.mti-pair-chip.active {
  background: linear-gradient(135deg, #7c5cfc, #06b6d4) !important;
  color: #fff !important;
  border-color: transparent !important;
  box-shadow: 0 4px 12px rgba(124, 92, 252, 0.4) !important;
}

/* ══════════════════════════════════════════════════════════════════
   🎙️ 2026 WORLD-CLASS VOICE RECORDING STATES & LIVE SOUND-REACTIVE VAD
   ══════════════════════════════════════════════════════════════════ */

/* Active Listening Button: Resting Baseline (Calm during pauses / silence) */
.mic-listening {
  position: relative !important;
  background: linear-gradient(135deg, #dc2626 0%, #ef4444 50%, #b91c1c 100%) !important;
  border: 1px solid rgba(254, 202, 202, 0.4) !important;
  color: #ffffff !important;
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.45) !important;
  overflow: hidden !important;
  z-index: 1;
  transition: transform 0.12s ease-out, box-shadow 0.12s ease-out, border-color 0.12s ease-out;
}

/* Gentle subtle laser during resting silence */
.mic-listening::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: conic-gradient(from 0deg, transparent 0deg, rgba(255, 255, 255, 0.2) 60deg, transparent 120deg);
  animation: laserSweepSlow 4s linear infinite;
  pointer-events: none;
  z-index: 0;
  opacity: 0.35;
  transition: opacity 0.15s ease;
}

.mic-listening > * {
  position: relative;
  z-index: 1;
}

/* ⚡ WHEN USER SPEAKS (Voice Active): Intense Laser sweep & Vibrant Glowing Aura! */
.mic-listening.mic-voice-active {
  box-shadow: 0 0 20px rgba(239, 68, 68, 0.95), 0 0 38px rgba(239, 68, 68, 0.55) !important;
  border-color: rgba(255, 255, 255, 0.9) !important;
  transform: scale(1.03);
}

.mic-listening.mic-voice-active::before {
  opacity: 1;
  animation: laserSweepFast 1.2s linear infinite;
}

@keyframes laserSweepSlow {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes laserSweepFast {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Embedded Micro Soundbars Visualizer inside active buttons */
.btn-sound-bars {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  height: 14px;
  vertical-align: middle;
  margin-right: 5px;
}

/* Resting State: Quiet flat baseline dots (Silence / Pause) */
.btn-sound-bars .b-bar {
  display: inline-block;
  width: 3px;
  height: 3px; /* Flat resting dot when user is silent or breathing */
  background: #ffffff;
  border-radius: 2px;
  opacity: 0.35;
  transition: height 0.06s ease-out, opacity 0.06s ease-out;
}

/* ⚡ When Voice is Active: Bars spring alive and glow */
.mic-voice-active .btn-sound-bars .b-bar {
  opacity: 1;
  background: #ffffff;
  box-shadow: 0 0 5px rgba(255, 255, 255, 0.85);
}

/* Coach Priya Big Circular Call Mic: Multi-Ring Sonic Aura Pulse */
.call-btn-recording {
  background: linear-gradient(135deg, #ef4444, #dc2626) !important;
  box-shadow: 0 0 16px rgba(239, 68, 68, 0.6);
  position: relative;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

/* When user speaks in Coach Priya Call: Sonic ripples surge */
.call-btn-recording.mic-voice-active {
  animation: callSonicPulse 1.1s infinite ease-in-out !important;
}

@keyframes callSonicPulse {
  0% {
    transform: scale(1.08);
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.85), 0 0 20px rgba(239, 68, 68, 0.6);
  }
  50% {
    transform: scale(1.16);
    box-shadow: 0 0 0 16px rgba(239, 68, 68, 0), 0 0 40px rgba(239, 68, 68, 0.9);
  }
  100% {
    transform: scale(1.08);
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0), 0 0 20px rgba(239, 68, 68, 0.6);
  }
}

/* Mastery Drill Card — Card Entry Animation */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes ff_spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}
