/* ============================================
   ZERO GRAVITY — Global Design System v1.0
   Font: Inter
   Accents: Blue / Purple / Orange
   Themes: Light + Dark
   ============================================ */

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

/* ── Accent: Blue (Default) ── */
:root,
html[data-accent="blue"] {
  --accent:        #4F46E5;
  --accent-soft:   rgba(79, 70, 229, 0.11);
  --accent-border: rgba(79, 70, 229, 0.28);
  --accent-contrast: #FFFFFF;
}

html[data-accent="neon"] {
  --accent:        #A3FF12;
  --accent-soft:   rgba(163, 255, 18, 0.15);
  --accent-border: rgba(163, 255, 18, 0.30);
  --accent-contrast: #000000;
}

html[data-accent="orange"] {
  --accent:        #F97316;
  --accent-soft:   rgba(249, 115, 22, 0.10);
  --accent-border: rgba(249, 115, 22, 0.25);
  --accent-contrast: #FFFFFF;
}

/* ── Light Theme ── */
:root,
html[data-theme="light"] {
  --bg-primary:    #F6F8FC;
  --bg-secondary:  #EEF2F7;
  --bg-card:       #FFFFFF;
  --bg-card2:      #F8FAFC;

  --text-primary:  #111827;
  --text-secondary:#5B667A;
  --text-muted:    #8A94A6;

  --border:        #DDE3EC;
  --border-soft:   #E8EDF5;

  --nav-bg:        #FFFFFF;
  --nav-border:    #DDE3EC;

  --success:       #16A34A;
  --error:         #EF4444;
  --warning:       #F59E0B;
  --info:          #3B82F6;

  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.10);

  --radius-sm:   6px;
  --radius-md:   8px;
  --radius-lg:   12px;
  --radius-xl:   16px;
  --radius-2xl:  24px;
  --radius-full: 9999px;

  --font-family: 'Inter', system-ui, -apple-system, sans-serif;

  /* Glassmorphism ── */
  --glass-bg:      rgba(0, 0, 0, 0.03);
  --glass-border:  rgba(0, 0, 0, 0.08);
  --glass-shadow:  0 4px 16px rgba(0, 0, 0, 0.08);
  --glass-blur:    12px;
  --bg-gradient:   linear-gradient(135deg, #F7F7F7 0%, #EFEFEF 100%);

  /* Legacy support — old pages jo primary use karte hain */
  --primary:       #4F46E5;
  --primary-hover: #4338CA;
  --primary-dim:   rgba(79, 70, 229, 0.11);
}

/* ── Dark Theme ── */
html[data-theme="dark"] {
  --bg-primary:    #0A0A0A;
  --bg-secondary:  #111111;
  --bg-card:       #1C1C1C;
  --bg-card2:      #242424;

  --text-primary:  #F0F0F0;
  --text-secondary:#9CA3AF;
  --text-muted:    #6B7280;

  --border:        #2A2A2A;
  --border-soft:   #1F1F1F;

  --nav-bg:        #111111;
  --nav-border:    #2A2A2A;

  --success:       #22C55E;
  --error:         #EF4444;
  --warning:       #F59E0B;
  --info:          #3B82F6;

  --shadow-sm: 0 1px 3px rgba(0,0,0,0.30);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.40);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.50);

  /* Glassmorphism ── */
  --glass-bg:      rgba(255, 255, 255, 0.05);
  --glass-border:  rgba(255, 255, 255, 0.1);
  --glass-shadow:  0 8px 32px rgba(0, 0, 0, 0.3);
  --glass-blur:    12px;
  --bg-gradient:   linear-gradient(135deg, #0A0A0A 0%, #111111 100%);

  --radius-sm:   6px;
  --radius-md:   8px;
  --radius-lg:   12px;
  --radius-xl:   16px;
  --radius-2xl:  24px;
  --radius-full: 9999px;

  --font-family: 'Inter', system-ui, -apple-system, sans-serif;

  /* Premium Scrollbars: Standard & Minimal ── */
  ::-webkit-scrollbar { width: 4px; height: 4px; }
  ::-webkit-scrollbar-track { background: transparent; }
  ::-webkit-scrollbar-thumb { 
    background: rgba(128, 128, 128, 0.4); 
    border-radius: 10px; 
    border: 1px solid transparent;
  }
  ::-webkit-scrollbar-thumb:hover { background: var(--accent); }

  /* Haptic Micro-Animations ── */
  .card, .subject-card, .chapter-card, .action-card, .btn, .nav-item, .back-btn, .top-bar-btn {
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s ease, opacity 0.2s ease;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }

  .card:active, .subject-card:active, .chapter-card:active, .action-card:active, .btn:active, .nav-item:active, .back-btn:active, .haptic-effect:active {
    transform: scale(0.96);
    opacity: 0.85;
  }
  .haptic-effect { transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1); cursor: pointer; }

  /* Legacy support */
  --primary:       #4F46E5;
  --primary-hover: #4338CA;
  --primary-dim:   rgba(79, 70, 229, 0.11);
}

/* ── Reset ── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  background-color: var(--bg-primary);
  transition: background-color 0.3s ease;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* ── Layout & Navigation ── */
.zg-app-layout {
  display: flex;
  min-height: 100vh;
  background: var(--bg-primary);
}

.app-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  height: 64px;
}

.top-bar-left {
  display: flex;
  align-items: center;
  gap: 12px;
  white-space: nowrap;
}

.logo-text {
  font-family: 'Inter', sans-serif;
  font-weight: 800;
  font-size: 1.2rem;
  color: var(--text-primary);
  letter-spacing: -0.5px;
}

.logo-text span { color: var(--accent); }

.hamburger-btn {
  background: transparent;
  border: none;
  color: var(--text-primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  border-radius: var(--radius-md);
  transition: background 0.2s;
}
.hamburger-btn:hover { background: var(--bg-secondary); }

/* ── Typography ── */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Inter', system-ui, sans-serif;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.25;
}

h1 { font-size: clamp(1.6rem, 4vw, 2.2rem); }
h2 { font-size: clamp(1.3rem, 3vw, 1.7rem); }
h3 { font-size: clamp(1.1rem, 2.5vw, 1.3rem); }
h4 { font-size: 1rem; }

p, span, label, input, textarea, button, select {
  font-family: 'Inter', system-ui, sans-serif;
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: var(--radius-lg);
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.1s ease, opacity 0.2s ease;
}
.btn:active { transform: scale(0.97); }

.btn-primary {
  background: var(--accent);
  color: var(--accent-contrast);
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover { opacity: 0.88; }

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border);
}
.btn-ghost:hover {
  background: var(--bg-card);
  color: var(--text-primary);
}

/* ── Cards ── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 16px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}
.card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--accent-border);
}

/* ── Input Fields ── */
.input-field {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 12px 16px;
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  color: var(--text-primary);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.input-field::placeholder { color: var(--text-muted); }
.input-field:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

/* ── Chips ── */
.chip {
  display: inline-flex;
  align-items: center;
  padding: 5px 14px;
  border-radius: var(--radius-full);
  font-family: 'Inter', sans-serif;
  font-size: 0.8rem;
  font-weight: 500;
  background: var(--bg-card);
  color: var(--text-secondary);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}
.chip.active,
.chip:hover {
  background: var(--accent-soft);
  color: var(--accent);
  border-color: var(--accent-border);
}

/* ── Progress Bar ── */
.progress-track {
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 2px;
  transition: width 0.4s ease;
}

/* ── Badge ── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border-radius: var(--radius-full);
  font-family: 'Inter', sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
}
.badge-accent {
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid var(--accent-border);
}
[data-accent="neon"] .badge-accent { color: #5B8C00; } /* Darker green for contrast in neon mode */
.badge-success {
  background: rgba(22,163,74,0.10);
  color: var(--success);
}
.badge-error {
  background: rgba(239,68,68,0.10);
  color: var(--error);
}

/* ── Divider ── */
.divider {
  height: 1px;
  background: var(--border);
  margin: 16px 0;
}

/* ── Utilities ── */
.text-accent   { color: var(--accent); }
.text-primary  { color: var(--text-primary); }
.text-secondary{ color: var(--text-secondary); }
.text-muted    { color: var(--text-muted); }
.text-success  { color: var(--success); }
.text-error    { color: var(--error); }
.text-center   { text-align: center; }
.text-white    { color: #FFFFFF; }
.hidden        { display: none !important; }
.bg-card       { background: var(--bg-card); }

/* ── Scrollbar: Standard & Minimal ── */
::-webkit-scrollbar       { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: rgba(128, 128, 128, 0.4);
  border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* ── Toast Notifications ── */
.toast-container {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10000;
  width: 90%;
  max-width: 400px;
  pointer-events: none;
}
.toast {
  background: var(--bg-card2);
  border: 1px solid var(--border);
  color: var(--text-primary);
  padding: 12px 16px;
  border-radius: var(--radius-lg);
  margin-bottom: 8px;
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.9rem;
  pointer-events: auto;
  animation: toastIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
@keyframes toastIn {
  from { opacity: 0; transform: translateY(-20px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Bottom Drawer ── */
.bottom-drawer {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: var(--bg-card);
  border-top-left-radius: var(--radius-2xl);
  border-top-right-radius: var(--radius-2xl);
  box-shadow: 0 -4px 20px rgba(0,0,0,0.15);
  padding: 20px;
  transform: translateY(100%);
  transition: transform 0.3s ease;
  z-index: 200;
}
.bottom-drawer.open { transform: translateY(0); }

.bottom-drawer-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.5);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 199;
}
.bottom-drawer-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

/* ── Chemistry & Math Utilities ── */
.sn-arrow-inline {
  display: inline-block;
  vertical-align: middle;
  margin: 0 4px;
  color: var(--info);
  font-weight: 500;
}
.sn-delta {
  display: inline-block;
  vertical-align: baseline;
  color: var(--warning);
  font-weight: 700;
  margin: 0 2px;
}
.sn-math {
  font-weight: bold;
  margin: 0 4px;
  vertical-align: middle;
  color: var(--text-secondary);
}
sub {
  display: inline-block;
  font-size: 0.75em;
  line-height: 0;
  vertical-align: baseline;
  transform: translateY(0.35em);
}
sup {
  display: inline-block;
  font-size: 0.75em;
  line-height: 0;
  vertical-align: baseline;
  transform: translateY(-0.4em);
}
.sn-arrow-complex {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  vertical-align: middle;
  margin: 0 8px;
  min-width: 50px;
  position: relative;
  top: -0.1em;
}
.sn-arrow-label {
  font-size: 0.6rem;
  color: var(--text-secondary);
  line-height: 1.2;
  text-align: center;
}
.sn-arrow-label.top    { margin-bottom: -2px; }
.sn-arrow-label.bottom { margin-top: -2px; }
.sn-arrow-main {
  width: 100%;
  height: 1.5px;
  background: var(--info);
  position: relative;
  margin: 4px 0;
  display: block;
}
.sn-arrow-main::after {
  content: '';
  position: absolute;
  right: 0;
  top: 50%;
  width: 6px;
  height: 6px;
  border-top: 1.5px solid var(--info);
  border-right: 1.5px solid var(--info);
  transform: translateY(-50%) rotate(45deg);
}

/* ── Placeholder Pages ── */
.placeholder-container {
  padding: 60px 20px;
  text-align: center;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-2xl);
  margin: 20px;
  animation: fadeIn 0.6s ease;
}
.placeholder-icon {
  font-size: 4rem;
  margin-bottom: 24px;
  display: block;
}
.placeholder-title {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text-primary);
  font-family: 'Inter', sans-serif;
}
.placeholder-text {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 30px;
  max-width: 300px;
  margin-left: auto;
  margin-right: auto;
}
.placeholder-btn {
  padding: 12px 24px;
  background: var(--accent);
  color: white;
  border: none;
  border-radius: var(--radius-lg);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  display: inline-block;
}
.placeholder-btn:active { transform: scale(0.98); }

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

/* ── Layout Core ── */
.zg-app-layout {
  display: flex;
  min-height: 100vh;
  width: 100%;
  background: var(--bg-primary);
}

.app-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  position: relative;
  overflow-y: auto;
  overflow-x: hidden;
  height: 100vh;
  -webkit-overflow-scrolling: touch;
}

.zg-container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ── ZG Side Drawer (Sidebar) ── */
.sn-drawer {
  position: fixed;
  top: 0; left: 0;
  width: 248px; height: 100vh;
  background: rgba(17, 19, 23, 0.94);
  border-right: 1px solid rgba(255,255,255,0.08);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sn-drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(4px);
  z-index: 999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

/* Desktop behavior: Persistent Sidebar */
@media (min-width: 1024px) {
  .sn-drawer {
    position: sticky;
    transform: none !important;
    flex-shrink: 0;
  }
  .sn-drawer-overlay { display: none !important; }
  .hamburger-btn#snDrawerOpen { display: none !important; }
}

/* Mobile/Tablet behavior: Hidden Drawer */
@media (max-width: 1023px) {
  .sn-drawer { transform: translateX(-100%); }
  .sn-drawer.open { transform: translateX(0); }
  .sn-drawer-overlay.open { opacity: 1; pointer-events: auto; }
}

.sn-drawer-header {
  padding: 18px 18px 14px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
}

.sn-drawer-nav {
  padding: 10px 0 12px;
  flex: 1;
  overflow: hidden;
}

.sn-drawer-link {
  display: flex; align-items: center; gap: 12px;
  padding: 9px 12px; margin: 2px 10px;
  border-radius: 12px;
  color: var(--text-secondary);
  text-decoration: none; font-weight: 650; font-size: 0.84rem;
  transition: all 0.2s ease;
  min-height: 38px;
}
.sn-drawer-link:hover { background: var(--bg-secondary); color: var(--text-primary); }
.sn-drawer-link.active {
  background: linear-gradient(135deg, var(--accent-soft), rgba(20,184,166,0.08));
  color: #fff;
  border: 1px solid var(--accent-border);
}

.sn-drawer-icon {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
  stroke: currentColor;
  stroke-width: 2.2;
  fill: none;
  transition: transform 0.2s ease;
}
.sn-drawer-link:hover .sn-drawer-icon {
  transform: scale(1.08);
}

.drawer-logo {
  font-family: 'Inter', sans-serif !important;
  font-weight: 850 !important;
  font-size: 20px !important;
  display: flex;
  align-items: center;
  gap: 10px !important;
  letter-spacing: -0.04em;
}

.drawer-logo span {
  color: var(--accent);
}

.drawer-logo-icon {
  width: 34px;
  height: 34px;
  object-fit: contain;
  border-radius: 12px;
  flex: 0 0 auto;
  filter: drop-shadow(0 0 12px rgba(79,70,229,0.38));
}

.sn-drawer-header .text-xsmall {
  font-size: 0.76rem;
  line-height: 1.2;
  margin-top: 5px;
}

/* ── Sidebar Appearance Card ── */
.drawer-appearance {
  margin: 10px;
  padding: 10px 12px;
  background: rgba(255,255,255,0.035);
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.08);
}
.appearance-title {
  font-size: 0.6rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 7px;
  letter-spacing: 0.5px;
}
.appearance-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 7px;
}
.appearance-row:last-child { margin-bottom: 0; }
.appearance-label { font-size: 0.76rem; font-weight: 600; color: var(--text-secondary); }

/* ── Dashboard Content ── */
.dashboard-main { display: flex; flex-direction: column; gap: 40px; }
.dashboard-aside { display: flex; flex-direction: column; gap: 32px; }

/* ── Hero Card & Ring ── */
.hero-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-2xl);
  padding: 32px;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.hero-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }

.hero-top { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.hero-left { flex: 1; }
.hero-label { font-size: 0.85rem; color: var(--text-secondary); font-weight: 600; margin-bottom: 4px; }
.hero-pct { font-size: 2.8rem; font-weight: 800; font-family: 'Inter', sans-serif; color: var(--text-primary); line-height: 1; margin-bottom: 12px; }
.hero-msg { font-size: 0.9rem; color: var(--text-muted); }

.hero-ring {
  position: relative;
  width: 90px; height: 90px;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.hero-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.hero-ring-bg { fill: none; stroke: var(--bg-secondary); stroke-width: 8; }
.hero-ring-fill { fill: none; stroke: var(--accent); stroke-width: 8; stroke-linecap: round; transition: stroke-dashoffset 0.8s ease; }
.hero-ring-text { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); font-size: 24px; }

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}
.hero-stat { text-align: center; }
.hero-stat-num { font-size: 1.1rem; font-weight: 700; color: var(--text-primary); font-family: 'Inter', sans-serif; }
.hero-stat-lbl { font-size: 0.72rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; margin-top: 4px; }

/* ── Streak Pill ── */
.streak-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
}
.streak-fire { font-size: 22px; }
.streak-num { font-weight: 800; font-size: 1.2rem; font-family: 'Inter'; color: var(--text-primary); }

/* ── Greeting Strip ── */
.greeting-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

/* ── Top Bar ── */
.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  height: 64px;
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 100;
}
.logo-text { font-family: 'Inter'; font-weight: 800; font-size: 1.2rem; }
.logo-text span { color: var(--accent); }

.top-bar-right {
  display: flex;
  align-items: center;
  gap: 15px;
  justify-content: flex-end;
  flex: 1;
}

/* ── Buttons/UI ── */
.hamburger-btn {
  background: transparent; border: none; color: var(--text-primary); cursor: pointer;
  width: 40px; height: 40px; display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-md); transition: background 0.2s;
}
.hamburger-btn:hover { background: var(--bg-secondary); }

/* ── Bottom Nav ── */
.bottom-nav {
  position: fixed; bottom: 0; left: 0; width: 100%; height: 64px;
  background: var(--nav-bg); border-top: 1px solid var(--nav-border);
  display: flex; justify-content: space-around; align-items: center; z-index: 900;
}
@media (min-width: 1024px) { .bottom-nav { display: none; } }

.nav-item {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  color: var(--text-muted); text-decoration: none; font-size: 18px;
  -webkit-tap-highlight-color: transparent;
  transition: all 0.15s ease;
}
.nav-item svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
  transition: transform 0.2s ease, stroke 0.2s ease;
}
.nav-item:active {
  transform: scale(0.92);
}
.nav-item span { font-size: 10px; font-weight: 600; }
.nav-item.active { color: var(--accent); }
.nav-item.active svg {
  stroke: var(--accent);
  filter: drop-shadow(0 0 6px var(--accent-soft));
}

/* ── Dashboard Layout ── */
.zg-dashboard-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  padding: 32px 0;
}

/* Mobile Scroll Fix */
@media (max-width: 1023px) {
  .zg-dashboard-layout {
    padding-bottom: 150px; /* Aggressive space for bottom nav */
  }
}

@media (min-width: 1024px) {
  .zg-dashboard-layout {
    grid-template-columns: 1fr 340px;
    padding: 40px 0;
  }
}

/* ── Premium Hero Card ── */
.hero-card {
  background: linear-gradient(135deg, var(--accent), #1c1c1c);
  border: none;
  border-radius: var(--radius-2xl);
  padding: 32px;
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  color: var(--accent-contrast) !important;
}
.hero-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }

.hero-card .hero-pct, 
.hero-card .hero-label, 
.hero-card .hero-msg, 
.hero-card .hero-stat-num, 
.hero-card .hero-stat-lbl,
.hero-card h1, .hero-card p { 
  color: var(--accent-contrast) !important; 
}
.hero-card .hero-stat-lbl { opacity: 0.7; }
.hero-card .hero-msg { opacity: 0.8; }
.hero-ring-bg { stroke: rgba(0,0,0,0.1); }
.hero-ring-fill { stroke: var(--accent-contrast); } 
[data-accent="blue"] .hero-ring-bg, [data-accent="orange"] .hero-ring-bg { stroke: rgba(255,255,255,0.15); }

/* ── Quick Actions Grid ── */
.quick-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

/* ── Accent Picker ── */
.accent-picker { display: flex; gap: 8px; align-items: center; padding: 4px 8px; background: var(--bg-card); border-radius: var(--radius-full); border: 1px solid var(--border); }
.accent-dot { width: 14px; height: 14px; border-radius: 50%; cursor: pointer; border: 2px solid transparent; transition: transform 0.2s ease; }
.accent-dot:hover { transform: scale(1.2); }
.accent-dot.active { border-color: #FFFFFF; box-shadow: 0 0 0 2px var(--accent); }
.dot-blue   { background: #4F46E5 !important; }
.dot-neon { background: #A3FF12 !important; }
.dot-orange { background: #F97316 !important; }

/* ── Responsive Spacing ── */
.scroll-content { padding: 24px 0; }

/* ── Animation ── */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes shimmer { 
  0% { background-position: 200% 0; } 
  100% { background-position: -200% 0; } 
}

/* ── Skeleton ── */
.skeleton {
  background: linear-gradient(90deg, var(--bg-card) 25%, var(--bg-card2) 50%, var(--bg-card) 75%);
  background-size: 200% 100%; animation: shimmer 1.5s infinite linear;
  border-radius: var(--radius-md);
}
.skeleton-subject { height: 100px; border-radius: var(--radius-xl); }

/* ── Subjects Grid ── */
.subject-grid { display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 640px) { .subject-grid { grid-template-columns: 1fr 1fr; } }

.subject-card {
  display: flex; align-items: center; gap: 16px; padding: 16px; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); text-decoration: none; transition: all 0.2s ease;
}
.subject-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.subject-icon-wrap { width: 50px; height: 50px; display: flex; align-items: center; justify-content: center; border-radius: var(--radius-md); font-size: 22px; }
.subject-icon-wrap svg {
  width: 1.1em;
  height: 1.1em;
  stroke: currentColor;
  stroke-width: 2.2;
  fill: none;
}
.subject-info { flex: 1; min-width: 0; }
.subject-name { font-weight: 700; color: var(--text-primary); }
.subject-chapters { font-size: 0.75rem; color: var(--text-muted); }
.subject-right { text-align: right; }
.subject-pct { font-family: 'Inter'; font-weight: 700; color: var(--accent); font-size: 1.1rem; }
.subject-arrow { color: var(--text-muted); font-size: 1.2rem; }

/* ── Continue Card ── */
.continue-card {
  display: flex; align-items: center; gap: 20px; background: var(--bg-card); padding: 24px; border-radius: var(--radius-xl); border: 1px solid var(--border); text-decoration: none; transition: all 0.2s ease;
}
.continue-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.continue-icon { width: 56px; height: 56px; background: var(--accent-soft); color: var(--accent); display: flex; align-items: center; justify-content: center; font-size: 24px; border-radius: var(--radius-lg); }
.continue-info { flex: 1; }
.continue-title { font-size: 1.1rem; color: var(--text-primary); margin: 4px 0; }
.continue-play { width: 44px; height: 44px; background: var(--accent); color: white; display: flex; align-items: center; justify-content: center; border-radius: 50%; box-shadow: var(--shadow-md); }

/* ── Weak Card ── */
.weak-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-xl); padding: 24px; }
.weak-header { display: flex; align-items: center; gap: 12px; }
.scroll-content {
  padding: 24px 0;
}


/* Zero Gravity App Light Theme v2: calm, readable, app-wide */
html[data-theme="light"] {
  --bg-primary: #F6F8FC;
  --bg-secondary: #EEF2F7;
  --bg-card: #FFFFFF;
  --bg-card2: #F8FAFC;
  --text-primary: #111827;
  --text-secondary: #5B667A;
  --text-muted: #8A94A6;
  --border: #DDE3EC;
  --border-soft: #E8EDF5;
  --glass-bg: rgba(255, 255, 255, 0.82);
  --glass-border: rgba(17, 24, 39, 0.08);
  --glass-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
  --bg-gradient: linear-gradient(135deg, #F6F8FC 0%, #EEF2F7 100%);
  --primary: #2563EB;
  --primary-hover: #1D4ED8;
  --primary-dim: rgba(37, 99, 235, 0.10);
}
