/* ═══════════════════════════════════════════════════════════════
   Edu Prime  — Unified Design System
   Merged: batch.css + style.css
   System-adaptive theme: Dark (violet glow) + Light (indigo glow)
   ═══════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,400;0,14..32,500;0,14..32,600;0,14..32,700;1,14..32,400&family=JetBrains+Mono:wght@400;500;600;700&family=Poppins:wght@500;600;700;800&display=swap');

/* ══════════════════════════════════════════════════════════════
   CSS VARIABLES
   ══════════════════════════════════════════════════════════════ */
:root {
  /* ── Backgrounds ── */
  --bg-primary:      #0a0a0f;
  --bg-secondary:    #0f0f1a;
  --bg-card:         #0f0f1a;
  --bg-card-hover:   rgba(255, 255, 255, 0.04);
  --bg-elevated:     #141420;
  --bg-overlay:      rgba(0, 0, 0, 0.7);

  /* ── Borders ── */
  --border-subtle:   rgba(255, 255, 255, 0.06);
  --border-default:  rgba(255, 255, 255, 0.08);
  --border-hover:    rgba(255, 255, 255, 0.15);
  --border-active:   rgba(139, 92, 246, 0.3);

  /* ── Text ── */
  --text-primary:    rgba(255, 255, 255, 0.9);
  --text-secondary:  rgba(255, 255, 255, 0.6);
  --text-tertiary:   rgba(255, 255, 255, 0.4);
  --text-muted:      rgba(255, 255, 255, 0.3);
  --text-ghost:      rgba(255, 255, 255, 0.15);

  /* ── Purple / Violet palette ── */
  --violet-500:      #8b5cf6;
  --violet-600:      #7c3aed;
  --violet-700:      #6d28d9;
  --violet-glow:     rgba(139, 92, 246, 0.08);
  --violet-glow-strong: rgba(139, 92, 246, 0.3);
  --purple-1:        #5b3df0;
  --purple-2:        #6f4cf5;
  --purple-3:        #5b3df0;
  --purple-4:        #8c74f7;

  /* ── Semantic colors ── */
  --red-500:         #ef4444;
  --red-glow:        rgba(239, 68, 68, 0.5);
  --emerald-500:     #10b981;
  --emerald-glow:    rgba(16, 185, 129, 0.2);
  --amber-500:       #f59e0b;
  --orange-500:      #f97316;
  --pink:            #ec4899;

  /* ── Accent ── */
  --accent:          #ff3366;
  --accent-hover:    #ff0040;

  /* ── Gradients ── */
  --grad-purple:     linear-gradient(135deg, #6a3df5 0%, #5b3df0 100%);
  --grad-glass:      linear-gradient(135deg, rgba(255,255,255,.5) 0%, rgba(255,255,255,0) 100%);
  --grad-skeleton:   linear-gradient(90deg, rgba(255,255,255,.04) 25%, rgba(255,255,255,.08) 50%, rgba(255,255,255,.04) 75%);

  /* ── Glow ── */
  --glow-sm:         0 0 0 4px rgba(91, 61, 240, 0.12);
  --glow-md:         0 0 0 6px rgba(91, 61, 240, 0.14);
  --glow-lg:         0 8px 28px rgba(91, 61, 240, 0.22);

  /* ── Shadows ── */
  --shadow-card:     0 4px 24px rgba(0, 0, 0, 0.3);
  --shadow-elevated: 0 10px 40px rgba(0, 0, 0, 0.5);
  --shadow-glow:     0 0 40px rgba(0, 0, 0, 0.45);
  --shadow-btn:      0 4px 14px rgba(91, 61, 240, 0.28);
  --shadow-modal:    0 24px 80px rgba(0, 0, 0, 0.65);

  /* ── Typography ── */
  --ff-display:      'Poppins', sans-serif;
  --ff-body:         'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --ff-mono:         'JetBrains Mono', monospace;

  /* ── Radii ── */
  --radius-sm:       8px;
  --radius-md:       12px;
  --radius-lg:       16px;
  --radius-xl:       20px;
  --radius-2xl:      24px;
  --radius-full:     9999px;
  --r-xs:            6px;
  --r-sm:            10px;
  --r-md:            16px;
  --r-lg:            18px;
  --r-xl:            28px;
  --r-pill:          50px;

  /* ── Layout sizes ── */
  --header-h:        60px;
  --ann-h:           42px;
  --bnav-h:          66px;
  --pheader-bg:      rgba(10,10,15,0.92);
  --pheader-glow:    0 1px 0 rgba(0,0,0,.55), 0 4px 18px rgba(0,0,0,.40);

  /* ── Transitions ── */
  --transition-fast:   150ms ease;
  --transition-default: 200ms ease;
  --transition-slow:   300ms ease;
  --transition-spring: 350ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --ease-spring:       cubic-bezier(.34, 1.56, .64, 1);
  --ease-out:          cubic-bezier(.16, 1, .3, 1);
  --ease-in:           cubic-bezier(.4, 0, 1, 1);
}

/* ══════════════════════════════════════════════════════════════
   LIGHT MODE — System preference override
   ══════════════════════════════════════════════════════════════ */


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

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: var(--ff-body);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100dvh;
  line-height: 1.5;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
ul { list-style: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; font-size: inherit; }
input, select, textarea { font-family: inherit; border: none; background: none; color: inherit; outline: none; }

::selection { background: rgba(139, 92, 246, 0.3); }

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: rgba(255, 255, 255, 0.03); }
::-webkit-scrollbar-thumb { background: var(--violet-500); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.2); }

.custom-scrollbar::-webkit-scrollbar { height: 6px; }
.custom-scrollbar::-webkit-scrollbar-track { background: rgba(255, 255, 255, 0.05); border-radius: 10px; }
.custom-scrollbar::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.2); border-radius: 10px; }

/* ── Page body padding by page type ── */
body.page-home,
body.page-batch {
  padding-top: calc(var(--header-h) + var(--ann-h));
  padding-bottom: var(--bnav-h);
}
body.page-study { padding: 0; }
body.page-admin { padding: 0; }

/* Pages that use the sticky in-flow .page-header (Settings, Batch detail, etc.)
   don't have the fixed site-header + ann-bar, so they don't need that
   reserved top space — without this, a large empty gap appears above
   the header on those pages. */
body.page-batch:has(.page-header) {
  padding-top: 0;
}

/* ══════════════════════════════════════════════════════════════
   LAYOUT
   ══════════════════════════════════════════════════════════════ */
.page-wrapper {
  min-height: 100vh;
  background: var(--bg-primary);
  color: white;
  padding-bottom: 6rem;
}

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1rem;
}
.container-narrow { max-width: 768px; margin: 0 auto; padding: 0 1rem; }
.container-mid    { max-width: 896px; margin: 0 auto; padding: 0 1rem; }

.main-content {
  max-width: 560px;
  margin: 0 auto;
  padding: 18px 14px 10px;
}

/* ══════════════════════════════════════════════════════════════
   HEADER
   ══════════════════════════════════════════════════════════════ */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 16px;
  
  border-bottom: 1px solid var(--border-subtle);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
}

.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  height: 56px;
  align-items: center;
  padding: 0 1rem;
  gap: 12px;
}

.header-logo { height: 32px; width: auto; border-radius: 6px; }

.header-title {
  flex: 1;
  min-width: 0;
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.site-logo {
  flex: 1;
  text-align: left;
  font-family: var(--ff-display);
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: .01em;
  color: var(--text-primary);
}

.header-btn,
.header-back {
  height: 36px;
  width: 36px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: all var(--transition-default);
}
.header-btn:hover,
.header-back:hover {
  color: white;
  background: rgba(255, 255, 255, 0.08);
}
.header-btn:active,
.header-back:active { transform: scale(0.9); }

/* Hamburger */
.hamburger {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 38px; height: 38px;
  padding: 6px;
  border-radius: var(--r-sm);
  flex-shrink: 0;
  transition: background .15s;
}
.hamburger:hover { background: rgba(255,255,255,0.08); }
.hamburger span {
  display: block;
  width: 22px; height: 3px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: transform .25s var(--ease-out), opacity .2s;
}
.hamburger.open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger.open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* YouTube button */
.yt-btn {
  width: 42px; height: 34px;
  border-radius: 9px;
  background: #ff0000;
  display: flex; align-items: center; justify-content: center;
  color: #fff; flex-shrink: 0;
  transition: transform .2s var(--ease-spring), filter .2s;
}
.yt-btn:hover  { transform: scale(1.06); filter: brightness(1.08); }
.yt-btn:active { transform: scale(.95); }
.yt-btn svg    { width: 20px; height: 20px; fill: currentColor; }

/* Loading bar */
.loading-bar {
  position: absolute; bottom: 0; left: 0;
  height: 2px; background: rgba(255,255,255,0.2);
  width: 100%; overflow: hidden;
}
.loading-bar-inner {
  width: 50%; height: 100%;
  background: white;
  animation: shimmer 1s infinite;
}

/* ══════════════════════════════════════════════════════════════
   ANNOUNCEMENT BAR
   ══════════════════════════════════════════════════════════════ */
.ann-bar {
  position: fixed;
  top: var(--header-h);
  left: 0; right: 0;
  z-index: 199;
  height: var(--ann-h);
  border-bottom: 1px solid var(--border-subtle);
  display: flex; align-items: center;
  overflow: hidden;
  padding: 0 14px;
  backdrop-filter: blur(24px);
}
/* Fixed box — sirf text scroll hoga, box nahi */
.ann-box {
  width: 100%;
  border: 1.5px solid var(--border-default);
  border-radius: var(--r-pill);
  padding: 7px 16px;
  overflow: hidden;
  display: flex;
  align-items: center;
  position: relative;
}
.ann-track {
  display: flex; align-items: center; gap: 8px;
  white-space: nowrap;
  animation: marquee 30s linear infinite;
  font-size: .85rem; color: var(--text-secondary);
}
@keyframes marquee {
  0%   { transform: translateX(100%); }
  100% { transform: translateX(-100%); }
}
.ann-track .ann-icon { color: var(--text-primary); flex-shrink: 0; font-size: .85rem; }
.ann-track span { color: var(--text-secondary); }

/* ══════════════════════════════════════════════════════════════
   SIDEBAR / DRAWER
   ══════════════════════════════════════════════════════════════ */
.overlay {
  position: fixed; inset: 0; z-index: 298;
  background: rgba(0, 0, 0, .75); backdrop-filter: blur(4px);
  opacity: 0; pointer-events: none;
  transition: opacity .3s;
}
.overlay.show { opacity: 1; pointer-events: all; }

.sidebar {
  position: fixed; top: 0; left: 0; bottom: 0; z-index: 299;
  width: min(80vw, 300px);
  background: var(--bg-secondary);
  border-right: 1px solid var(--border-default);
  display: flex; flex-direction: column;
  transform: translateX(-100%);
  transition: transform .3s var(--ease-out);
  overflow: hidden;
}
.sidebar.open { transform: translateX(0); }

.sidebar-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 20px 16px;
  border-bottom: 1px solid var(--border-default);
}
.sidebar-brand {
  font-family: var(--ff-display);
  font-size: 1.1rem; font-weight: 800;
  background: var(--grad-purple);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.sidebar-close {
  width: 32px; height: 32px;
  border-radius: var(--r-xs);
  color: var(--text-secondary); font-size: 1rem;
  display: flex; align-items: center; justify-content: center;
  transition: background .15s, color .15s;
}
.sidebar-close:hover { background: rgba(255,255,255,0.08); color: var(--text-primary); }

.sidebar-nav { flex: 1; padding: 12px 10px; overflow-y: auto; }
.sidebar-nav a {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; border-radius: var(--r-sm);
  color: var(--text-secondary); font-size: .92rem; font-weight: 500;
  transition: background .15s, color .15s;
  margin-bottom: 2px;
}
.sidebar-nav a:hover { background: rgba(255,255,255,0.06); color: var(--text-primary); }
.sidebar-nav a.active { background: rgba(124,58,237,.18); color: var(--violet-500); }
.sidebar-nav a .nav-icon { font-size: 1.1rem; width: 22px; text-align: center; }

.sidebar-footer {
  padding: 16px 20px 28px;
  border-top: 1px solid var(--border-default);
}

/* Dark toggle */
.dark-toggle-wrap {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px; border-radius: var(--r-sm);
  background: rgba(255,255,255,0.04);
}
.dark-toggle-label { font-size: .85rem; color: var(--text-secondary); }
.toggle-switch { position: relative; width: 42px; height: 24px; }
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute; inset: 0; border-radius: var(--r-pill);
  background: rgba(255,255,255,0.12); cursor: pointer;
  transition: background .3s;
}
.toggle-slider::before {
  content: ''; position: absolute;
  width: 18px; height: 18px; border-radius: 50%;
  left: 3px; top: 3px;
  background: #fff; transition: transform .3s var(--ease-spring);
}
.toggle-switch input:checked + .toggle-slider { background: var(--violet-600); }
.toggle-switch input:checked + .toggle-slider::before { transform: translateX(18px); }

/* ══════════════════════════════════════════════════════════════
   BOTTOM NAV
   ══════════════════════════════════════════════════════════════ */
.bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 200;
  height: var(--bnav-h);
  border-top: 1px solid var(--border-subtle);
  display: flex; align-items: stretch;
  backdrop-filter: blur(24px);
  box-shadow: 0 -2px 12px rgba(0,0,0,0.3);
}
.bn-item {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 3px;
  color: var(--text-muted); font-size: .62rem; font-weight: 600;
  letter-spacing: .04em; text-transform: uppercase;
  transition: color .2s;
}
.bn-item .bn-icon { font-size: 1.25rem; line-height: 1; transition: transform .2s var(--ease-spring); }
.bn-item.active { color: var(--violet-500); }
.bn-item.active .bn-icon { transform: scale(1.15); }

/* ══════════════════════════════════════════════════════════════
   GRID SYSTEMS
   ══════════════════════════════════════════════════════════════ */
/* Batch/subject grid */
.grid-batches {
  display: grid;
  gap: 20px;
  grid-template-columns: 1fr;
}
@media (min-width: 640px) {
  .grid-batches { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
  .grid-batches { grid-template-columns: repeat(3, 1fr); }
}

/* App grid (2-col compact) */
.app-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

/* Batch grid */
.batch-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  padding: 0 14px 14px;
  max-width: 560px;
  margin: 0 auto;
}
@media (min-width: 640px) {
  .batch-grid { grid-template-columns: 1fr 1fr; }
}

/* ══════════════════════════════════════════════════════════════
   CARDS — General
   ══════════════════════════════════════════════════════════════ */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-xl);
  overflow: hidden;
  transition: all var(--transition-slow);
  display: flex;
  flex-direction: column;
}
.card:hover {
  border-color: rgba(139, 92, 246, 0.3);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.08),
    0 0 40px rgba(0, 0, 0, 0.55),
    0 8px 24px rgba(0, 0, 0, 0.45);
}

.card-image-wrap {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #080810;
}
.card-image-wrap img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 500ms ease;
}
.card:hover .card-image-wrap img { transform: scale(1.05); }

.card-image-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(15,15,26,0.8), transparent, transparent);
  opacity: 0;
  transition: opacity var(--transition-slow);
}
.card:hover .card-image-overlay { opacity: 1; }

.card-body {
  padding: 1rem;
  flex: 1; display: flex; flex-direction: column;
}

.card-title {
  font-weight: 700;
  font-size: 0.9375rem;
  color: var(--text-primary);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color var(--transition-default);
}
.card:hover .card-title { color: white; }

.card-meta {
  display: flex; align-items: center; gap: 12px;
  margin-top: 8px;
  font-size: 0.75rem;
  color: var(--text-muted);
}
.card-meta span { display: flex; align-items: center; gap: 4px; }

.card-actions {
  margin-top: auto;
  padding-top: 1rem;
  display: flex; gap: 8px;
}

/* ── App Card (home grid) ── */
.app-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  border-radius: var(--r-lg);
  padding: 18px 14px 16px;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  cursor: pointer; overflow: hidden;
  transition: transform .22s var(--ease-spring), border-color .2s, box-shadow .2s;
}
.app-card:hover {
  transform: translateY(-3px);
  border-color: rgba(139, 92, 246, 0.35);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.08),
    0 0 32px rgba(0, 0, 0, 0.55),
    0 8px 24px rgba(0, 0, 0, 0.45);
}
.app-card:active { transform: scale(.97); }

.app-logo-wrap {
  width: 72px; height: 72px; border-radius: var(--r-md);
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border-default);
  box-shadow: var(--shadow-card);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; margin-top: 6px; flex-shrink: 0;
}
.app-logo-wrap img { width: 78%; height: 78%; object-fit: contain; }
.app-logo-wrap .logo-fallback { font-size: 1.8rem; }

.app-name {
  font-family: var(--ff-display); font-size: .9rem; font-weight: 700;
  text-align: center; line-height: 1.3; color: var(--text-primary);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.app-desc {
  font-size: .74rem; color: var(--text-secondary);
  text-align: center; line-height: 1.35;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

/* ── Batch Card ── */
.batch-card {
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  border-radius: var(--r-lg);
  overflow: hidden;
  transition: transform .22s var(--ease-spring), border-color .2s, box-shadow .2s;
}
.batch-card:hover {
  transform: translateY(-3px);
  border-color: rgba(139, 92, 246, 0.35);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.08),
    0 0 32px rgba(0, 0, 0, 0.55),
    0 8px 24px rgba(0, 0, 0, 0.45);
}

.batch-thumb {
  position: relative; width: 100%; padding-top: 40%;
  overflow: hidden; background: var(--bg-elevated);
}
.batch-thumb img {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover;
}
.thumb-placeholder {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 2.5rem;
}

.featured-badge {
  position: absolute; top: 10px; left: 10px;
  background: var(--grad-purple); color: #fff;
  font-size: .62rem; font-weight: 700; letter-spacing: .06em;
  padding: 4px 10px; border-radius: var(--r-pill);
  box-shadow: var(--shadow-btn);
}
.price-tag {
  position: absolute; top: 10px; right: 10px;
  background: rgba(0,0,0,.7); backdrop-filter: blur(8px);
  color: #fff; font-size: .72rem; font-weight: 700;
  padding: 4px 10px; border-radius: var(--r-pill);
  border: 1px solid rgba(255,255,255,.15);
}

.batch-info { padding: 14px 14px 12px; }
.batch-info-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.batch-name {
  font-family: var(--ff-display); font-size: .95rem; font-weight: 700;
  line-height: 1.3; flex: 1; color: var(--text-primary);
}
.batch-desc {
  font-size: .78rem; color: var(--text-secondary); line-height: 1.5; margin-top: 6px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

.heart-btn {
  width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--border-default); background: rgba(255,255,255,0.04);
  transition: background .15s, border-color .2s, transform .2s var(--ease-spring);
}
.heart-btn:hover { background: rgba(239,68,68,.12); border-color: var(--red-500); transform: scale(1.1); }
.heart-btn.active svg { stroke: var(--red-500); fill: var(--red-500); }
.heart-btn svg { width: 16px; height: 16px; stroke: var(--text-secondary); fill: none; stroke-width: 2.5; }

/* ══════════════════════════════════════════════════════════════
   BADGES
   ══════════════════════════════════════════════════════════════ */
.badge {
  display: inline-flex;
  align-items: center; gap: 4px;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.6875rem; font-weight: 700;
  letter-spacing: 0.02em;
  position: absolute; z-index: 5;
}

.badge-trending {
  top: 10px; left: 10px;
  background: rgba(249, 115, 22, 0.9);
  backdrop-filter: blur(8px); color: white;
  box-shadow: 0 2px 8px rgba(249, 115, 22, 0.3);
}
.badge-enrolled {
  top: 10px; right: 10px;
  background: rgba(16, 185, 129, 0.9);
  backdrop-filter: blur(8px); color: white;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}
.badge-live {
  background: var(--red-500); color: white;
  animation: pulse-badge 2s infinite;
  box-shadow: 0 0 15px rgba(220, 38, 38, 0.4);
}
.badge-ended { background: rgba(255,255,255,0.1); color: rgba(255,255,255,0.7); }
.badge-upcoming { background: white; color: black; font-weight: 800; }

.badge-popular {
  display: inline-block; padding: 2px 8px; border-radius: var(--r-pill);
  background: rgba(239,68,68,.18); color: var(--red-500);
  font-size: .65rem; font-weight: 700;
}
.badge-featured {
  display: inline-block; padding: 2px 8px; border-radius: var(--r-pill);
  background: rgba(124,58,237,.18); color: var(--violet-500);
  font-size: .65rem; font-weight: 700;
}

.card-badge {
  position: absolute; top: 14px; left: 0;
  background: var(--red-500); color: #fff;
  font-size: .62rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  padding: 6px 16px 6px 12px;
  border-radius: 0 var(--r-pill) var(--r-pill) 0;
}

/* ══════════════════════════════════════════════════════════════
   BUTTONS
   ══════════════════════════════════════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center; justify-content: center;
  gap: 6px; padding: 10px 16px;
  border-radius: var(--radius-md);
  font-size: 0.875rem; font-weight: 600;
  transition: all var(--transition-default);
  white-space: nowrap;
}
.btn:active { transform: scale(0.95); }

.btn-primary {
  flex: 1;
  background: var(--violet-600); color: white;
  box-shadow: 0 2px 12px var(--violet-glow-strong);
}
.btn-primary:hover { background: var(--violet-500); }

.btn-secondary {
  flex: 1; border: 1px solid rgba(245, 158, 11, 0.3);
  color: #fbbf24; background: transparent;
}
.btn-secondary:hover { background: rgba(245, 158, 11, 0.1); }

.btn-danger {
  flex: 1; border: 1px solid rgba(239, 68, 68, 0.3);
  color: #f87171; background: transparent;
}
.btn-danger:hover { background: rgba(239, 68, 68, 0.1); }

.btn-ghost {
  border: 1px solid var(--border-default);
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.05);
}
.btn-ghost:hover {
  border-color: var(--border-hover);
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.08);
}

.btn-white { background: white; color: black; font-weight: 700; }
.btn-white:hover { background: #e5e5e5; }
.btn-white:disabled { background: rgba(255,255,255,0.1); color: rgba(255,255,255,0.3); cursor: not-allowed; }

.btn-accent {
  background: var(--accent); color: white;
  font-weight: 700; width: 100%; padding: 12px 24px; font-size: 1rem;
}
.btn-accent:hover { background: var(--accent-hover); transform: translateY(-2px); }

.btn-outline {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.7);
  width: 100%; padding: 12px 24px;
}
.btn-outline:hover { background: rgba(255,255,255,0.05); border-color: rgba(255,255,255,0.3); }

.btn-icon {
  flex: 1; display: flex; align-items: center; justify-content: center;
  gap: 8px; padding: 12px;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-default);
  background: #0a0a0a; color: rgba(255,255,255,0.8);
  font-size: 0.875rem; font-weight: 600;
  transition: all var(--transition-default);
}
.btn-icon:hover { background: rgba(255,255,255,0.05); border-color: rgba(255,255,255,0.3); color: white; }
.btn-icon:active { transform: scale(0.95); }
.btn-icon svg { transition: transform var(--transition-default); }
.btn-icon:hover svg { transform: scale(1.1); }

/* Purple gradient buttons */
.btn-study,
.btn-batch-study,
.btn-add,
.btn-login,
.btn-open-tab,
.btn-save {
  background: var(--grad-purple); color: #fff; font-weight: 700;
  border-radius: var(--r-pill);
  transition: filter .2s, transform .15s var(--ease-spring);
}
.btn-study { width: 100%; padding: 12px 0; font-size: .85rem; letter-spacing: .01em; text-align: center; }
.btn-batch-study { display: block; width: 100%; padding: 11px 0; margin-top: 12px; font-size: .85rem; letter-spacing: .04em; text-align: center; box-shadow: var(--shadow-btn); }
.btn-add { padding: 7px 16px; font-size: .78rem; box-shadow: 0 2px 12px rgba(124,58,237,.35); white-space: nowrap; }
.btn-login { width: 100%; padding: 12px 0; margin-top: 6px; font-size: .9rem; box-shadow: var(--shadow-btn); }
.btn-open-tab { padding: 12px 28px; font-size: .9rem; box-shadow: var(--shadow-btn); }
.btn-save { padding: 9px 20px; font-size: .82rem; box-shadow: 0 2px 12px rgba(124,58,237,.35); }

.btn-study:hover, .btn-batch-study:hover, .btn-add:hover, .btn-login:hover,
.btn-open-tab:hover, .btn-save:hover { filter: brightness(1.1); transform: scale(1.02); }
.btn-study:active, .btn-batch-study:active, .btn-login:active { transform: scale(.98); }

.btn-study.btn-dark { background: var(--bg-elevated); }

.btn-cancel {
  padding: 9px 18px; border-radius: var(--r-pill);
  background: rgba(255,255,255,0.06); color: var(--text-secondary);
  font-size: .82rem; font-weight: 600;
  border: 1px solid var(--border-default);
  transition: background .15s;
}
.btn-cancel:hover { background: rgba(255,255,255,0.10); }

.btn-export {
  padding: 9px 18px; border-radius: var(--r-pill);
  font-size: .82rem; font-weight: 600;
  border: 1px solid var(--border-default);
  display: flex; align-items: center; gap: 6px;
  transition: background .15s, border-color .2s, transform .15s;
}
.btn-export:hover { background: rgba(255,255,255,0.06); border-color: var(--border-hover); transform: scale(1.03); }
.btn-export .export-icon { font-size: 1rem; }

.btn-edit, .btn-delete {
  padding: 5px 12px; border-radius: var(--r-xs);
  font-size: .72rem; font-weight: 600;
  transition: filter .2s, transform .15s;
}
.btn-edit { background: rgba(124,58,237,.2); color: var(--violet-500); }
.btn-edit:hover { filter: brightness(1.2); }
.btn-delete { background: rgba(239,68,68,.15); color: var(--red-500); }
.btn-delete:hover { filter: brightness(1.2); }

/* Back button */
.back-btn {
  width: 36px; height: 36px; border-radius: var(--r-sm);
  background: rgba(255,255,255,0.06); color: var(--text-primary);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; transition: background .15s, transform .2s;
  flex-shrink: 0;
}
.back-btn:hover { background: rgba(255,255,255,0.10); transform: translateX(-2px); }

/* Favorites button */
.fav-btn {
  width: 44px; height: 44px; border-radius: var(--r-sm);
  background: rgba(255,255,255,0.05); border: 1px solid var(--border-default);
  display: flex; align-items: center; justify-content: center;
  position: relative; flex-shrink: 0;
  transition: background .15s, border-color .2s;
}
.fav-btn:hover { background: rgba(255,255,255,0.08); border-color: var(--border-hover); }
.fav-btn svg { width: 20px; height: 20px; stroke: var(--text-secondary); fill: none; stroke-width: 2; }
.fav-count {
  position: absolute; top: -4px; right: -4px;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--violet-600); color: #fff;
  font-size: .58rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}

/* Fullscreen button */
.fullscreen-btn {
  width: 36px; height: 36px; border-radius: var(--r-sm);
  background: rgba(255,255,255,0.06); color: var(--text-primary);
  display: flex; align-items: center; justify-content: center;
  transition: background .15s;
}
.fullscreen-btn:hover { background: rgba(255,255,255,0.10); }
.fullscreen-btn svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2; }

/* ══════════════════════════════════════════════════════════════
   FILTER BAR
   ══════════════════════════════════════════════════════════════ */
.filter-bar {
  display: flex; flex-wrap: wrap; align-items: center;
  gap: 8px; margin-bottom: 24px;
}

.filter-btn {
  display: flex; align-items: center; gap: 8px;
  height: 36px; padding: 0 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-default);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-secondary); font-size: 0.875rem; font-weight: 500;
  transition: all var(--transition-default);
  position: relative;
}
.filter-btn:active { transform: scale(0.95); }
.filter-btn:hover { border-color: var(--border-hover); color: var(--text-primary); }
.filter-btn.active { border-color: rgba(139,92,246,0.5); background: rgba(139,92,246,0.1); color: #c4b5fd; }

.filter-count {
  margin-left: 4px; background: var(--violet-500); color: white;
  padding: 2px 6px; border-radius: var(--radius-full);
  font-size: 0.6875rem; font-weight: 700;
}

.filter-dropdown {
  position: absolute; top: 44px; left: 0; width: 256px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-elevated);
  z-index: 50; padding: 16px; display: none;
}
.filter-dropdown.open { display: block; animation: fadeSlideDown 150ms ease; }
.filter-dropdown-title {
  font-size: 0.75rem; font-weight: 600; color: var(--text-tertiary);
  text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 12px;
}
.filter-options { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-bottom: 16px; }
.filter-option {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 12px; border-radius: var(--radius-md);
  cursor: pointer; border: 1px solid var(--border-default);
  background: rgba(255,255,255,0.04); color: var(--text-secondary);
  font-size: 0.875rem; transition: all var(--transition-default);
}
.filter-option:hover { border-color: var(--border-hover); }
.filter-option.selected { border-color: rgba(139,92,246,0.5); background: rgba(139,92,246,0.1); color: #c4b5fd; }
.filter-option input[type="checkbox"] { display: none; }
.filter-checkbox {
  width: 16px; height: 16px; border-radius: 6px;
  border: 2px solid rgba(255,255,255,0.2);
  display: flex; align-items: center; justify-content: center;
  transition: all var(--transition-default); flex-shrink: 0;
}
.filter-option.selected .filter-checkbox { border-color: var(--violet-500); background: var(--violet-500); }
.filter-actions { display: flex; gap: 8px; padding-top: 12px; border-top: 1px solid var(--border-default); }
.filter-actions button {
  flex: 1; padding: 8px; font-size: 0.875rem;
  border-radius: var(--radius-md); transition: all var(--transition-default);
}

/* ══════════════════════════════════════════════════════════════
   SEARCH
   ══════════════════════════════════════════════════════════════ */
.search-fav-bar {
  display: flex; gap: 10px; padding: 14px 14px 10px;
  max-width: 560px; margin: 0 auto;
}
.search-wrap { flex: 1; position: relative; }
.search-wrap .search-icon {
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  color: var(--text-tertiary); font-size: .9rem; pointer-events: none;
}
.search-input {
  width: 100%; padding: 10px 14px 10px 36px;
  background: rgba(255,255,255,0.05); border: 1px solid var(--border-default);
  border-radius: var(--r-pill); color: var(--text-primary); font-size: .88rem;
  outline: none; transition: border-color .2s, box-shadow .2s;
}
.search-input:focus { border-color: var(--border-hover); box-shadow: var(--glow-sm); }
.search-input::placeholder { color: var(--text-muted); }

/* ══════════════════════════════════════════════════════════════
   SECTION HEADERS
   ══════════════════════════════════════════════════════════════ */
.section-header {
  display: flex; align-items: center; gap: 8px; margin-bottom: 16px;
}
.section-label {
  font-family: var(--ff-display); font-size: .7rem; font-weight: 700;
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--text-secondary); margin-bottom: 14px; padding-left: 2px;
}
.section-dot {
  width: 6px; height: 20px; border-radius: var(--radius-full);
}
.section-dot-red    { background: var(--red-500); box-shadow: 0 0 10px var(--red-glow); }
.section-dot-white  { background: white; box-shadow: 0 0 10px rgba(255,255,255,0.5); }
.section-dot-violet { background: var(--violet-500); box-shadow: 0 0 10px var(--violet-glow-strong); }
.section-dot-gray   { background: #6b7280; }
.section-title { font-weight: 700; font-size: 1.125rem; color: white; }

/* ══════════════════════════════════════════════════════════════
   LIST ITEMS
   ══════════════════════════════════════════════════════════════ */
.list-item {
  width: 100%; display: flex; align-items: center; gap: 12px;
  padding: 16px; border-radius: var(--radius-xl);
  border: 1px solid var(--border-default);
  background: #0a0a0a;
  transition: all var(--transition-default);
  text-align: left; cursor: pointer;
}
.list-item:hover { border-color: var(--border-hover); background: rgba(255,255,255,0.05); }
.list-item:active { transform: scale(0.99); }

.list-item-icon {
  width: 40px; height: 40px; border-radius: var(--radius-md);
  background: rgba(255,255,255,0.05); border: 1px solid var(--border-default);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; flex-shrink: 0;
}
.list-item-icon img { width: 24px; height: 24px; object-fit: contain; opacity: 0.8; }
.list-item:hover .list-item-icon img { opacity: 1; }

.list-item-content { flex: 1; min-width: 0; }
.list-item-title { font-weight: 700; color: rgba(0, 0, 0, 1); transition: color var(--transition-default); }
.list-item:hover .list-item-title { color: black; }

.list-item-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 6px; }
.list-item-meta span {
  display: flex; align-items: center; gap: 4px;
  font-size: 0.75rem; color: var(--text-tertiary);
  transition: color var(--transition-default);
}
.list-item:hover .list-item-meta span { color: var(--text-secondary); }

.list-item-arrow { color: var(--text-ghost); transition: all var(--transition-default); flex-shrink: 0; }
.list-item:hover .list-item-arrow { color: var(--text-tertiary); transform: translateX(4px); }

.list-item-violet { border-color: rgba(139,92,246,0.25); background: rgba(139,92,246,0.08); }
.list-item-violet:hover { background: rgba(139,92,246,0.12); border-color: rgba(139,92,246,0.4); }
.list-item-violet .list-item-title { color: #c4b5fd; }
.list-item-violet .section-dot { background: var(--violet-500); }

/* ══════════════════════════════════════════════════════════════
   TABS
   ══════════════════════════════════════════════════════════════ */
.tabs {
  display: flex;
  border-bottom: 1px solid var(--border-default);
  margin-bottom: 24px; gap: 0;
}
.tab-btn {
  flex: 1; padding: 14px 16px;
  font-size: 0.875rem; font-weight: 700;
  color: var(--text-muted);
  transition: all var(--transition-default);
  border-bottom: 2px solid transparent;
  text-align: center;
}
.tab-btn:hover { color: var(--text-secondary); }
.tab-btn.active { color: white; border-bottom-color: var(--violet-500); }

/* ══════════════════════════════════════════════════════════════
   TAG PILL
   ══════════════════════════════════════════════════════════════ */
.tag-pill {
  display: inline-flex; align-items: center;
  font-size: 0.6875rem; font-weight: 600;
  color: rgba(139, 92, 246, 0.7);
  background: rgba(139, 92, 246, 0.1);
  padding: 2px 8px; border-radius: 6px;
}

/* ══════════════════════════════════════════════════════════════
   PAGE HEADER (Batch page)
   ══════════════════════════════════════════════════════════════ */
.page-header {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px 12px;
  border-bottom: 1px solid var(--border-subtle);
  background: var(--pheader-bg);
  box-shadow: var(--pheader-glow);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  position: sticky; top: 0; z-index: 100;
}
.page-header-title {
  flex: 1; font-family: var(--ff-display); font-size: 1rem; font-weight: 700;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  color: var(--text-primary);
}

/* ══════════════════════════════════════════════════════════════
   FAV PAGE
   ══════════════════════════════════════════════════════════════ */
.fav-page { padding: 14px; max-width: 560px; margin: 0 auto; }
.fav-page-header { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.fav-page-title { font-family: var(--ff-display); font-size: 1rem; font-weight: 700; color: var(--text-primary); }

/* ══════════════════════════════════════════════════════════════
   STUDY PAGE
   ══════════════════════════════════════════════════════════════ */
.study-page { height: 100dvh; display: flex; flex-direction: column; background: #000; }

.study-bar {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px;
  background: rgba(10,10,15,0.95); border-bottom: 1px solid var(--border-subtle);
  flex-shrink: 0; backdrop-filter: blur(20px);
}
.study-title {
  flex: 1; font-size: .9rem; font-weight: 600;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  color: var(--text-primary);
}
.study-frame-wrap { flex: 1; position: relative; background: #000; }
.study-iframe { width: 100%; height: 100%; border: none; display: block; }

.study-loader {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px;
  background: var(--bg-primary); z-index: 10;
}
.loader-spinner {
  width: 48px; height: 48px; border-radius: 50%;
  border: 3px solid rgba(255,255,255,0.1);
  border-top-color: var(--violet-500);
  animation: spin .8s linear infinite;
}
.loader-text { font-size: .85rem; color: var(--text-secondary); }

.blocked-overlay {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px;
  background: var(--bg-primary); padding: 24px; text-align: center; z-index: 11;
}
.blocked-icon { font-size: 3rem; }
.blocked-title { font-family: var(--ff-display); font-size: 1.1rem; font-weight: 700; color: var(--text-primary); }
.blocked-desc { font-size: .85rem; color: var(--text-secondary); line-height: 1.6; }

/* ══════════════════════════════════════════════════════════════
   ADMIN PANEL
   ══════════════════════════════════════════════════════════════ */
.admin-layout { display: flex; min-height: 100dvh; }

.admin-sidebar {
  width: 240px; flex-shrink: 0;
  background: var(--bg-secondary);
  border-right: 1px solid var(--border-default);
  display: flex; flex-direction: column;
  position: fixed; top: 0; bottom: 0; left: 0; z-index: 50;
  transition: transform .3s var(--ease-out);
}
@media (max-width: 768px) {
  .admin-sidebar { transform: translateX(-100%); }
  .admin-sidebar.open { transform: translateX(0); }
}

.admin-sidebar-head { padding: 20px 20px 16px; border-bottom: 1px solid var(--border-default); }
.admin-brand {
  font-family: var(--ff-display); font-size: 1rem; font-weight: 800;
  background: var(--grad-purple);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.admin-role { font-size: .7rem; color: var(--text-tertiary); margin-top: 2px; }

.admin-nav { flex: 1; padding: 10px 8px; overflow-y: auto; }
.admin-nav a {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: var(--r-sm);
  color: var(--text-secondary); font-size: .85rem; font-weight: 500;
  transition: background .15s, color .15s; margin-bottom: 2px;
}
.admin-nav a:hover { background: rgba(255,255,255,0.06); color: var(--text-primary); }
.admin-nav a.active { background: rgba(124,58,237,.2); color: var(--violet-500); }
.admin-nav a .a-icon { font-size: 1rem; width: 20px; text-align: center; }
.admin-nav .nav-section-label {
  font-size: .6rem; font-weight: 700; letter-spacing: .12em;
  color: var(--text-tertiary); text-transform: uppercase;
  padding: 12px 12px 4px;
}

.admin-main { flex: 1; margin-left: 240px; display: flex; flex-direction: column; min-height: 100dvh; }
@media (max-width: 768px) { .admin-main { margin-left: 0; } }

.admin-topbar {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 20px;
  background: rgba(10,10,15,0.9); backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-subtle);
  position: sticky; top: 0; z-index: 40;
}
.admin-menu-btn {
  display: none; width: 36px; height: 36px; border-radius: var(--r-sm);
  background: rgba(255,255,255,0.06); align-items: center; justify-content: center;
  font-size: 1.2rem; color: var(--text-primary);
}
@media (max-width: 768px) { .admin-menu-btn { display: flex; } }
.admin-topbar-title { flex: 1; font-family: var(--ff-display); font-size: 1rem; font-weight: 700; color: var(--text-primary); }
.admin-user { font-size: .78rem; color: var(--text-secondary); }
.admin-content { padding: 20px; flex: 1; }

/* Admin stat cards */
.admin-stats {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 14px;
  margin-bottom: 24px;
}
.stat-card {
  background: var(--bg-card); border: 1px solid var(--border-default);
  border-radius: var(--r-md); padding: 16px;
  transition: border-color .2s, box-shadow .2s;
}
.stat-card:hover { border-color: var(--border-hover); box-shadow: var(--glow-sm); }
.stat-icon { font-size: 1.5rem; margin-bottom: 8px; }
.stat-label { font-size: .7rem; color: var(--text-secondary); text-transform: uppercase; letter-spacing: .08em; }
.stat-value {
  font-family: var(--ff-display); font-size: 1.6rem; font-weight: 700;
  background: var(--grad-purple);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Admin sections & table */
.admin-section { margin-bottom: 28px; }
.admin-section-title {
  font-family: var(--ff-display); font-size: .9rem; font-weight: 700;
  margin-bottom: 14px; color: var(--text-primary);
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
}

.table-wrap {
  background: var(--bg-card); border: 1px solid var(--border-default);
  border-radius: var(--r-md);
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
}
.data-table { width: 100%; min-width: 560px; border-collapse: collapse; }
.data-table th {
  text-align: left; padding: 10px 14px;
  font-size: .68rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: var(--text-tertiary); background: var(--bg-elevated);
  border-bottom: 1px solid var(--border-default);
}
.data-table td {
  padding: 11px 14px; font-size: .82rem; color: var(--text-secondary);
  border-bottom: 1px solid var(--border-subtle); vertical-align: middle;
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: rgba(124,58,237,.05); }
.table-actions { display: flex; gap: 8px; }

/* ══════════════════════════════════════════════════════════════
   MODAL
   ══════════════════════════════════════════════════════════════ */
.modal-overlay {
  position: fixed; inset: 0; z-index: 500;
  background: rgba(0,0,0,.80); backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center; padding: 16px;
  opacity: 0; pointer-events: none; transition: opacity .25s;
}
.modal-overlay.show { opacity: 1; pointer-events: all; }
.modal {
  background: var(--bg-secondary); border: 1px solid var(--border-default);
  border-radius: var(--r-xl); padding: 24px;
  width: 100%; max-width: 480px; max-height: 90dvh; overflow-y: auto;
  box-shadow: var(--shadow-modal);
  transform: scale(.94) translateY(20px);
  transition: transform .3s var(--ease-spring), opacity .25s;
}
.modal-overlay.show .modal { transform: scale(1) translateY(0); }
.modal-title {
  font-family: var(--ff-display); font-size: 1rem; font-weight: 700;
  margin-bottom: 20px; padding-bottom: 14px;
  border-bottom: 1px solid var(--border-default);
  color: var(--text-primary);
}
.modal-actions { display: flex; gap: 10px; margin-top: 20px; justify-content: flex-end; }

/* Forms inside modal */
.form-group { margin-bottom: 14px; }
.form-label {
  display: block; font-size: .75rem; font-weight: 600;
  color: var(--text-secondary); margin-bottom: 6px;
  text-transform: uppercase; letter-spacing: .06em;
}
.form-input {
  width: 100%; padding: 10px 14px;
  background: var(--bg-elevated); border: 1px solid var(--border-default);
  border-radius: var(--r-sm); color: var(--text-primary); font-size: .88rem;
  outline: none; transition: border-color .2s, box-shadow .2s;
}
.form-input:focus { border-color: var(--border-hover); box-shadow: var(--glow-sm); }
.form-input::placeholder { color: var(--text-muted); }
.form-check { display: flex; align-items: center; gap: 8px; font-size: .85rem; color: var(--text-secondary); }
.form-check input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--violet-600); }

/* ══════════════════════════════════════════════════════════════
   AUTH GATE
   ══════════════════════════════════════════════════════════════ */
.auth-gate {
  min-height: 100dvh; display: flex; align-items: center; justify-content: center; padding: 24px;
}
.auth-card {
  width: 100%; max-width: 360px;
  background: var(--bg-secondary); border: 1px solid var(--border-default);
  border-radius: var(--r-xl); padding: 32px 28px;
  box-shadow: var(--shadow-card);
}
.auth-logo {
  font-family: var(--ff-display); font-size: 1.4rem; font-weight: 800;
  background: var(--grad-purple);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text; text-align: center; margin-bottom: 6px;
}
.auth-subtitle { font-size: .82rem; color: var(--text-tertiary); text-align: center; margin-bottom: 24px; }
.auth-error {
  padding: 10px 14px; border-radius: var(--r-sm);
  background: rgba(239,68,68,.12); border: 1px solid rgba(239,68,68,.3);
  color: #fca5a5; font-size: .8rem; margin-bottom: 14px; display: none;
}

/* ══════════════════════════════════════════════════════════════
   ANNOUNCEMENT EDITOR
   ══════════════════════════════════════════════════════════════ */
.ann-editor {
  background: var(--bg-card); border: 1px solid var(--border-default);
  border-radius: var(--r-md); padding: 20px;
}
.ann-textarea {
  width: 100%; min-height: 80px; resize: vertical;
  padding: 12px 14px;
  background: var(--bg-elevated); border: 1px solid var(--border-default);
  border-radius: var(--r-sm); color: var(--text-primary); font-size: .88rem;
  outline: none; transition: border-color .2s; margin-bottom: 12px;
}
.ann-textarea:focus { border-color: var(--border-hover); }

/* ══════════════════════════════════════════════════════════════
   SKELETON LOADING
   ══════════════════════════════════════════════════════════════ */
.skeleton {
  background: rgba(255,255,255,0.05) !important;
  border-color: transparent !important;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-subtle);
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
  overflow: hidden;
  position: relative;
  pointer-events: none;
}
.skeleton::before {
  content: ''; position: absolute; inset: 0;
  background: var(--grad-skeleton);
  background-size: 200% 100%;
  animation: shimmerSlide 1.6s infinite;
}
.skeleton-card { height: 220px; border-radius: var(--r-lg); }
.skeleton-image { aspect-ratio: 16 / 9; background: rgba(255,255,255,0.05); }
.skeleton-line { height: 12px; background: rgba(255,255,255,0.08); border-radius: 6px; }
.skeleton-line-sm { width: 25%; }
.skeleton-line-md { width: 50%; }
.skeleton-line-lg { width: 75%; }
.skeleton-card-body { padding: 1rem; display: flex; flex-direction: column; gap: 12px; }
.skeleton-btn { height: 36px; background: rgba(255,255,255,0.08); border-radius: var(--radius-md); flex: 1; }
.skeleton-list-item {
  height: 76px; border-radius: var(--radius-xl);
  border: 1px solid var(--border-subtle); background: rgba(255,255,255,0.03);
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* ══════════════════════════════════════════════════════════════
   LIVE CLASS CARDS
   ══════════════════════════════════════════════════════════════ */
.live-scroll {
  display: flex; gap: 16px; overflow-x: auto;
  padding-bottom: 16px;
  scroll-snap-type: x mandatory;
}
.live-card {
  width: 280px; flex-shrink: 0;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-default);
  background: #0a0a0a; overflow: hidden;
  transition: border-color var(--transition-slow);
  display: flex; flex-direction: column;
  scroll-snap-align: start;
}
.live-card:hover { border-color: var(--border-hover); }
@media (min-width: 640px) { .live-card { width: 320px; } }

.live-card-image {
  position: relative; width: 100%; aspect-ratio: 16 / 9;
  background: #050505; overflow: hidden;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.live-card-image img { width: 100%; height: 100%; object-fit: contain; transition: transform 500ms ease; }
.live-card:hover .live-card-image img { transform: scale(1.05); }
.live-card-gradient {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.8), transparent, transparent);
  opacity: 0.8;
}
.live-card-tag {
  position: absolute; top: 12px; right: 12px;
  font-size: 10px; font-weight: 800; text-transform: uppercase;
  letter-spacing: 0.05em; padding: 4px 10px; border-radius: 6px; z-index: 5;
}
.live-card-body { padding: 1rem; display: flex; flex-direction: column; flex: 1; }
.live-card-subject {
  font-size: 0.6875rem; font-weight: 700; color: var(--text-tertiary);
  text-transform: uppercase; letter-spacing: 0.05em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.live-card-topic {
  font-weight: 700; color: var(--text-primary); font-size: 0.875rem;
  margin-top: 6px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  line-height: 1.4;
}
.live-card-time {
  display: flex; align-items: center; gap: 6px;
  font-size: 0.75rem; font-weight: 600; color: var(--text-tertiary); margin-top: 12px;
}

/* ══════════════════════════════════════════════════════════════
   ANALYTICS
   ══════════════════════════════════════════════════════════════ */
.analytics-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 14px;
  margin-bottom: 20px;
}
.chart-wrap {
  background: var(--bg-card); border: 1px solid var(--border-default);
  border-radius: var(--r-md); padding: 16px; margin-bottom: 16px;
}
.chart-title {
  font-family: var(--ff-display); font-size: .82rem; font-weight: 700;
  margin-bottom: 14px; color: var(--text-secondary);
}
.bar-chart { display: flex; align-items: flex-end; gap: 8px; height: 80px; }
.bar-item { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.bar {
  width: 100%; border-radius: 4px 4px 0 0;
  background: var(--grad-purple); min-height: 4px;
  transition: height .6s var(--ease-out);
}
.bar-label { font-size: .58rem; color: var(--text-tertiary); }

.activity-feed { display: flex; flex-direction: column; gap: 8px; max-height: 320px; overflow-y: auto; }
.activity-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: var(--r-sm);
  background: var(--bg-elevated);
}
.activity-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--violet-500); flex-shrink: 0; }
.activity-info { flex: 1; }
.activity-name { font-size: .8rem; color: var(--text-primary); font-weight: 500; }
.activity-meta { font-size: .68rem; color: var(--text-tertiary); margin-top: 1px; }
.activity-time { font-size: .65rem; color: var(--text-tertiary); flex-shrink: 0; }

/* ══════════════════════════════════════════════════════════════
   IMPORT / EXPORT
   ══════════════════════════════════════════════════════════════ */
.export-btns { display: flex; flex-wrap: wrap; gap: 10px; }

.import-drop {
  border: 2px dashed var(--border-default); border-radius: var(--r-md);
  padding: 32px; text-align: center; cursor: pointer;
  transition: border-color .2s, background .2s;
}
.import-drop:hover { border-color: var(--border-hover); background: rgba(124,58,237,.05); }
.import-icon { font-size: 2.5rem; margin-bottom: 10px; }
.import-label { font-size: .88rem; color: var(--text-secondary); line-height: 1.6; }
.import-label strong { color: var(--violet-500); }
.import-preview {
  margin-top: 14px; padding: 12px; border-radius: var(--r-sm);
  background: var(--bg-elevated); font-size: .75rem; color: var(--text-secondary);
  white-space: pre-wrap; word-break: break-all; max-height: 150px; overflow-y: auto;
  display: none;
}

/* ══════════════════════════════════════════════════════════════
   TOAST NOTIFICATIONS
   ══════════════════════════════════════════════════════════════ */
.toast-container {
  position: fixed; bottom: calc(var(--bnav-h) + 12px); left: 50%; z-index: 999;
  transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  pointer-events: none;
}
.toast {
  position: fixed; top: 16px; left: 50%; transform: translateX(-50%);
  z-index: 200; padding: 12px 20px;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-elevated);
  font-size: 0.875rem; font-weight: 600;
  display: flex; align-items: center; gap: 8px;
  backdrop-filter: blur(16px);
  opacity: 0; transform: translateX(-50%) translateY(8px) scale(.95);
  transition: opacity .3s, transform .3s var(--ease-spring);
  pointer-events: none; white-space: nowrap;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
.toast-success, .toast.success {
  background: rgba(16, 185, 129, 0.2); border: 1px solid rgba(16, 185, 129, 0.3); color: #6ee7b7;
}
.toast-error, .toast.error {
  background: rgba(239, 68, 68, 0.2); border: 1px solid rgba(239, 68, 68, 0.3); color: #fca5a5;
}

/* ══════════════════════════════════════════════════════════════
   INFO BAR / ABOUT SECTION
   ══════════════════════════════════════════════════════════════ */
.info-bar {
  margin-left: auto; display: flex; align-items: center; gap: 12px;
  font-size: 0.8125rem; color: var(--text-muted);
}
.info-bar span { display: flex; align-items: center; gap: 6px; }

.about-section {
  border-radius: var(--radius-xl); border: 1px solid var(--border-default);
  background: #0a0a0a; padding: 20px;
}
.about-section .description { color: var(--text-secondary); font-size: 0.875rem; line-height: 1.7; }
.about-section .description a { color: var(--violet-500); }
.about-section .description strong { color: var(--text-primary); }

/* ══════════════════════════════════════════════════════════════
   EMPTY STATES
   ══════════════════════════════════════════════════════════════ */
.empty-state {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 56px 24px; text-align: center;
  color: var(--text-tertiary);
}
.empty-state .empty-icon { font-size: 3rem; margin-bottom: 12px; }
.empty-state h3 { font-size: 1rem; color: var(--text-secondary); margin-bottom: 6px; }
.empty-state p { font-size: .85rem; line-height: 1.6; }
.empty-state-icon {
  width: 64px; height: 64px; border-radius: var(--radius-xl);
  background: rgba(255,255,255,0.05); border: 1px solid var(--border-default);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 20px; color: var(--text-ghost);
}
.empty-state-title { color: var(--text-secondary); font-weight: 500; }
.empty-state-subtitle { color: var(--text-muted); font-size: 0.875rem; margin-top: 4px; }

/* ══════════════════════════════════════════════════════════════
   INSTAGRAM FLOATING BUTTON
   ══════════════════════════════════════════════════════════════ */
.ig-floating-btn {
  position: fixed; bottom: 24px; right: 24px;
  width: 56px; height: 56px;
  background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: white;
  box-shadow: 0 4px 12px rgba(220, 39, 67, 0.4);
  z-index: 1000;
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s;
  animation: pulse-ig 2s infinite;
  text-decoration: none;
}
.ig-floating-btn:hover { transform: scale(1.1) rotate(-5deg); box-shadow: 0 6px 16px rgba(220, 39, 67, 0.6); animation: none; }
.ig-floating-btn svg { width: 28px; height: 28px; }

/* ══════════════════════════════════════════════════════════════
   UTILITY CLASSES
   ══════════════════════════════════════════════════════════════ */
.flex        { display: flex; }
.flex-col    { flex-direction: column; }
.flex-wrap   { flex-wrap: wrap; }
.items-center{ align-items: center; }
.justify-center  { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-2       { gap: 8px; }
.gap-3       { gap: 12px; }
.gap-4       { gap: 16px; }
.gap-5       { gap: 20px; }
.mt-2        { margin-top: 8px; }
.mt-3        { margin-top: 12px; }
.mt-4        { margin-top: 16px; }
.mt-6        { margin-top: 24px; }
.mb-4        { margin-bottom: 16px; }
.mb-6        { margin-bottom: 24px; }
.pt-6        { padding-top: 24px; }
.text-center { text-align: center; }
.truncate    { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hidden      { display: none !important; }
.w-full      { width: 100%; }
.space-y-3 > * + * { margin-top: 12px; }
.space-y-8 > * + * { margin-top: 32px; }

/* ══════════════════════════════════════════════════════════════
   ANIMATIONS & KEYFRAMES
   ══════════════════════════════════════════════════════════════ */
@keyframes shimmer {
  0%   { transform: translateX(-100%); }
  100% { transform: translateX(200%); }
}
@keyframes shimmerSlide {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.5; }
}
@keyframes pulse-badge {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.7; }
}
@keyframes pulse-ig {
  0%   { box-shadow: 0 0 0 0 rgba(220, 39, 67, 0.7); }
  70%  { box-shadow: 0 0 0 15px rgba(220, 39, 67, 0); }
  100% { box-shadow: 0 0 0 0 rgba(220, 39, 67, 0); }
}
@keyframes fadeSlideDown {
  from { opacity: 0; transform: translateX(-50%) translateY(-12px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}
@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.96); }
  to   { opacity: 1; transform: scale(1); }
}
@keyframes marquee {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Animation utility classes */
.animate-fadeIn       { animation: fadeIn 300ms ease; }
.animate-fadeSlideUp  { animation: fadeSlideUp 350ms cubic-bezier(0.25, 0.46, 0.45, 0.94); }
.animate-scaleIn      { animation: scaleIn 200ms ease; }

/* Staggered entrance */
.stagger > * { animation: fadeSlideUp 350ms cubic-bezier(0.25, 0.46, 0.45, 0.94) both; }
.stagger > *:nth-child(1)    { animation-delay: 0ms; }
.stagger > *:nth-child(2)    { animation-delay: 40ms; }
.stagger > *:nth-child(3)    { animation-delay: 80ms; }
.stagger > *:nth-child(4)    { animation-delay: 120ms; }
.stagger > *:nth-child(5)    { animation-delay: 160ms; }
.stagger > *:nth-child(6)    { animation-delay: 200ms; }
.stagger > *:nth-child(7)    { animation-delay: 240ms; }
.stagger > *:nth-child(8)    { animation-delay: 280ms; }
.stagger > *:nth-child(9)    { animation-delay: 320ms; }
.stagger > *:nth-child(n+10) { animation-delay: 360ms; }

/* ══════════════════════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════════════════════ */
@media (min-width: 480px) {
  .app-grid    { gap: 16px; }
  .main-content{ padding: 24px 20px 12px; }
}
@media (min-width: 640px) {
  .batch-grid  { grid-template-columns: 1fr 1fr; }
  .live-card   { width: 320px; }
}
@media (min-width: 1024px) {
  .grid-batches { grid-template-columns: repeat(3, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}

/* ══════════════════════════════════════════════════════════════
   LIGHT MODE OVERRIDE — placed LAST so it correctly wins the
   cascade when the system is in light mode (same specificity,
   later source order = takes priority). DO NOT move this block
   above the default/dark rules again.
   ══════════════════════════════════════════════════════════════ */
@media (prefers-color-scheme: light) {
  :root {
    /* ── Backgrounds ── */
    --bg-primary:      #f4f4f8;
    --bg-secondary:    #ecedf5;
    --bg-card:         #ffffff;
    --bg-card-hover:   rgba(99, 74, 237, 0.04);
    --bg-elevated:     #f8f8fc;
    --bg-overlay:      rgba(0, 0, 0, 0.35);
    --pheader-bg:      rgba(255,255,255,0.90);
    --pheader-glow:    0 1px 0 rgba(255,255,255,.9), 0 4px 20px rgba(255,255,255,.65);

    /* ── Borders ── */
    --border-subtle:   rgba(99, 74, 237, 0.08);
    --border-default:  rgba(99, 74, 237, 0.12);
    --border-hover:    rgba(99, 74, 237, 0.28);
    --border-active:   rgba(99, 74, 237, 0.45);

    /* ── Text ── */
    --text-primary:    rgba(18, 10, 40, 0.92);
    --text-secondary:  rgba(18, 10, 40, 0.60);
    --text-tertiary:   rgba(18, 10, 40, 0.40);
    --text-muted:      rgba(18, 10, 40, 0.30);
    --text-ghost:      rgba(18, 10, 40, 0.15);

    /* ── Glow — light mode uses soft indigo/violet ── */
    --glow-sm:         0 0 0 4px rgba(99, 74, 237, 0.10);
    --glow-md:         0 0 0 6px rgba(99, 74, 237, 0.14);
    --glow-lg:         0 8px 28px rgba(99, 74, 237, 0.18);

    /* ── Shadows ── */
    --shadow-card:     0 2px 16px rgba(99, 74, 237, 0.10), 0 1px 4px rgba(0,0,0,0.06);
    --shadow-elevated: 0 8px 32px rgba(99, 74, 237, 0.14), 0 2px 8px rgba(0,0,0,0.08);
    --shadow-glow:     0 0 32px rgba(255, 255, 255, 0.55);
    --shadow-btn:      0 4px 14px rgba(99, 74, 237, 0.28);
    --shadow-modal:    0 24px 80px rgba(255, 255, 255, 0.45);

    /* ── Violet stays the same — it pops on white too ── */
    --violet-glow:        rgba(99, 74, 237, 0.10);
    --violet-glow-strong: rgba(99, 74, 237, 0.25);

    /* ── Gradient for skeleton/shimmer ── */
    --grad-skeleton: linear-gradient(90deg, rgba(99,74,237,.04) 25%, rgba(99,74,237,.09) 50%, rgba(99,74,237,.04) 75%);
  }

  /* Body & page in light mode */
  body { background-color: var(--bg-primary); color: var(--text-primary); }

  /* Header / ann-bar / bottom-nav glass */
  .site-header,
  .ann-bar {
    
    border-bottom-color: var(--border-subtle);
  }
  .bottom-nav {
    background: rgba(244, 244, 248, 0.95);
    border-top-color: var(--border-subtle);
    box-shadow: 0 -2px 12px rgba(99, 74, 237, 0.08);
  }

  /* Sidebar */
  .sidebar {
    background: #ffffff;
    border-right-color: var(--border-default);
  }
  .dark-toggle-wrap { background: rgba(99, 74, 237, 0.05); }
  .toggle-slider     { background: rgba(99, 74, 237, 0.16); }

  /* Scrollbar */
  ::-webkit-scrollbar-track { background: rgba(99, 74, 237, 0.04); }
  ::-webkit-scrollbar-thumb { background: var(--violet-500); }

  /* Text selection */
  ::selection { background: rgba(99, 74, 237, 0.18); }

  /* ── Cards — beautiful glow on white ── */
  .card {
    background: #ffffff;
    border-color: var(--border-default);
    box-shadow: var(--shadow-card);
  }
  .card:hover {
    border-color: rgba(99, 74, 237, 0.30);
    box-shadow:
      0 0 0 2px rgba(255, 255, 255, 0.55),
      0 8px 32px rgba(255, 255, 255, 0.70),
      0 2px 8px rgba(0,0,0,0.06);
  }

  .app-card {
    background: #ffffff;
    border-color: var(--border-default);
    box-shadow: var(--shadow-card);
  }
  .app-card:hover {
    border-color: rgba(99, 74, 237, 0.30);
    box-shadow:
      0 0 0 2px rgba(255, 255, 255, 0.55),
      0 8px 28px rgba(255, 255, 255, 0.65),
      0 2px 6px rgba(0,0,0,0.05);
  }

  .batch-card {
    background: #ffffff;
    border-color: var(--border-default);
    box-shadow: var(--shadow-card);
  }
  .batch-card:hover {
    border-color: rgba(99, 74, 237, 0.30);
    box-shadow:
      0 0 0 2px rgba(255, 255, 255, 0.55),
      0 8px 28px rgba(255, 255, 255, 0.65),
      0 2px 6px rgba(0,0,0,0.05);
  }

  /* List items */
  .list-item {
    background: #ffffff;
    border-color: var(--border-default);
    box-shadow: 0 1px 6px rgba(99, 74, 237, 0.06);
  }
  .list-item:hover {
    border-color: var(--border-hover);
    background: rgba(99, 74, 237, 0.03);
    box-shadow: 0 4px 16px rgba(99, 74, 237, 0.12);
  }

  /* App logo wrap */
  .app-logo-wrap {
    background: rgba(99, 74, 237, 0.06);
    border-color: var(--border-default);
  }

  /* Filter buttons */
  .filter-btn {
    background: rgba(99, 74, 237, 0.05);
    border-color: var(--border-default);
  }
  .filter-btn:hover { border-color: var(--border-hover); }
  .filter-btn.active { background: rgba(99, 74, 237, 0.10); border-color: rgba(99,74,237,0.4); color: var(--violet-600); }

  /* Search input */
  .search-input {
    background: #ffffff;
    border-color: var(--border-default);
    box-shadow: 0 1px 6px rgba(99, 74, 237, 0.06);
  }
  .search-input:focus {
    border-color: var(--border-hover);
    box-shadow: 0 0 0 3px rgba(99, 74, 237, 0.12);
  }

  /* Filter dropdown */
  .filter-dropdown { background: #ffffff; }
  .filter-option { background: rgba(99,74,237,0.04); border-color: var(--border-default); }

  /* About section */
  .about-section { background: #ffffff; border-color: var(--border-default); }

  /* Buttons */
  .btn-ghost {
    background: rgba(99,74,237,0.05);
    border-color: var(--border-default);
  }
  .btn-ghost:hover {
    background: rgba(99,74,237,0.08);
    border-color: var(--border-hover);
  }
  .btn-icon { background: #ffffff; border-color: var(--border-default); color: var(--text-primary); }
  .btn-icon:hover { background: rgba(99,74,237,0.06); }
  .btn-cancel { background: rgba(99,74,237,0.06); border-color: var(--border-default); }
  .btn-cancel:hover { background: rgba(99,74,237,0.10); }
  .btn-export { border-color: var(--border-default); }
  .btn-export:hover { background: rgba(99,74,237,0.06); }

  /* Back button / fav button */
  .back-btn { background: rgba(99,74,237,0.08); }
  .back-btn:hover { background: rgba(99,74,237,0.14); }
  .fav-btn  { background: rgba(99,74,237,0.05); border-color: var(--border-default); }
  .fav-btn:hover { background: rgba(99,74,237,0.10); }
  .heart-btn { background: rgba(99,74,237,0.05); }

  /* Batch thumb placeholder */
  .batch-thumb { background: var(--bg-elevated); }

  /* Price tag */
  .price-tag { background: rgba(255,255,255,0.85); color: var(--text-primary); border-color: var(--border-default); }

  /* Modals & overlays */
  .modal-box,
  .sheet-modal { background: #ffffff; }

  /* Toast */
  .toast-success, .toast.success { background: rgba(16,185,129,0.12); border-color: rgba(16,185,129,0.25); }
  .toast-error,   .toast.error   { background: rgba(239,68,68,0.12);  border-color: rgba(239,68,68,0.25); }

  /* Import drop zone */
  .import-drop { border-color: var(--border-default); }
  .import-drop:hover { background: rgba(99,74,237,0.04); }
  .import-preview { background: var(--bg-elevated); }

  /* Empty state */
  .empty-state-icon { background: rgba(99,74,237,0.06); border-color: var(--border-default); }
}


/* ═══════════════════════════════════════════════════════════════
   UI IMPROVEMENTS — YouTube btn, Header, App cards, CTA buttons
   ═══════════════════════════════════════════════════════════════ */

/* ── Improved YouTube Button ── */
.yt-btn {
  width: auto !important;
  height: 36px !important;
  padding: 0 12px 0 10px !important;
  border-radius: 12px !important;
  background: linear-gradient(135deg, #ff0000 0%, #cc0000 100%) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  color: #fff !important;
  font-family: var(--ff-display) !important;
  font-size: .72rem !important;
  font-weight: 700 !important;
  letter-spacing: .03em !important;
  text-decoration: none !important;
  box-shadow: 0 3px 12px rgba(255,0,0,0.40), 0 1px 0 rgba(255,255,255,0.15) inset !important;
  transition: transform .2s var(--ease-spring), box-shadow .2s, filter .2s !important;
  white-space: nowrap !important;
  flex-shrink: 0 !important;
}
.yt-btn::after {
  content: 'YouTube';
}
.yt-btn:hover {
  transform: scale(1.05) !important;
  box-shadow: 0 5px 18px rgba(255,0,0,0.55) !important;
  filter: brightness(1.08) !important;
}
.yt-btn:active { transform: scale(.95) !important; }
.yt-btn svg {
  width: 18px !important;
  height: 18px !important;
  fill: currentColor !important;
  flex-shrink: 0 !important;
}

/* ── Improved Site Header ── */
.site-header {
  background: rgba(10,10,15,0.88) !important;
  backdrop-filter: blur(28px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(28px) saturate(180%) !important;
  border-bottom: 1px solid rgba(139,92,246,0.12) !important;
  box-shadow: 0 1px 0 rgba(0,0,0,.6), 0 4px 24px rgba(0,0,0,.35) !important;
}

/* ── Improved Site Logo ── */
.site-logo {
  background: linear-gradient(135deg, #fff 30%, #c4b5fd 100%) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  background-clip: text !important;
  font-size: 1.25rem !important;
  font-weight: 800 !important;
  letter-spacing: -.01em !important;
}

/* ── Improved Hamburger Button ── */
.hamburger {
  width: 38px !important;
  height: 38px !important;
  border-radius: 10px !important;
  background: rgba(255,255,255,0.06) !important;
  border: 1px solid rgba(255,255,255,0.08) !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 5px !important;
  cursor: pointer !important;
  transition: background .2s, border-color .2s !important;
  flex-shrink: 0 !important;
}
.hamburger:hover {
  background: rgba(139,92,246,0.15) !important;
  border-color: rgba(139,92,246,0.3) !important;
}
.hamburger span {
  display: block !important;
  width: 16px !important;
  height: 1.5px !important;
  background: var(--text-primary) !important;
  border-radius: 2px !important;
  transition: transform .3s var(--ease-spring), opacity .2s !important;
}

/* ── Improved App Card ── */
.app-card {
  background: linear-gradient(145deg, rgba(20,20,32,1) 0%, rgba(15,13,26,1) 100%) !important;
  border: 1px solid rgba(255,255,255,0.07) !important;
  border-radius: 20px !important;
  box-shadow: 0 2px 16px rgba(0,0,0,0.3) !important;
  transition: transform .25s var(--ease-spring), border-color .2s, box-shadow .25s !important;
}
.app-card:hover {
  transform: translateY(-4px) !important;
  border-color: rgba(139,92,246,0.4) !important;
  box-shadow:
    0 0 0 1px rgba(139,92,246,0.15),
    0 12px 36px rgba(0,0,0,0.5),
    0 0 40px rgba(139,92,246,0.10) !important;
}

/* ── Improved App Logo ── */
.app-logo-wrap {
  width: 76px !important;
  height: 76px !important;
  border-radius: 18px !important;
  background: rgba(255,255,255,0.05) !important;
  border: 1px solid rgba(255,255,255,0.09) !important;
  box-shadow: 0 4px 16px rgba(0,0,0,0.3), 0 0 0 1px rgba(255,255,255,0.04) inset !important;
}

/* ── Improved CTA / Study Button ── */
.btn-study, .btn-batch-study {
  background: linear-gradient(135deg, #6a3df5 0%, #7c3aed 60%, #5b3df0 100%) !important;
  border-radius: 50px !important;
  font-weight: 700 !important;
  font-size: .82rem !important;
  letter-spacing: .04em !important;
  box-shadow: 0 4px 16px rgba(91,61,240,0.40), 0 1px 0 rgba(255,255,255,0.12) inset !important;
  transition: transform .2s var(--ease-spring), box-shadow .2s, filter .2s !important;
  position: relative !important;
  overflow: hidden !important;
}
.btn-study::before, .btn-batch-study::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.12) 0%, transparent 60%);
  pointer-events: none;
}
.btn-study:hover, .btn-batch-study:hover {
  transform: scale(1.03) translateY(-1px) !important;
  box-shadow: 0 6px 22px rgba(91,61,240,0.55), 0 1px 0 rgba(255,255,255,0.15) inset !important;
  filter: brightness(1.08) !important;
}
.btn-study:active, .btn-batch-study:active {
  transform: scale(.97) !important;
}
.btn-study.btn-dark {
  background: rgba(255,255,255,0.07) !important;
  border: 1px solid rgba(255,255,255,0.10) !important;
  box-shadow: none !important;
  color: var(--text-secondary) !important;
}
.btn-study.btn-dark:hover {
  background: rgba(255,255,255,0.11) !important;
  color: var(--text-primary) !important;
}

/* ── Improved Section Label ── */
.section-label {
  font-size: .68rem !important;
  font-weight: 800 !important;
  letter-spacing: .16em !important;
  text-transform: uppercase !important;
  color: var(--text-tertiary) !important;
  margin-bottom: 16px !important;
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
}
.section-label::before {
  content: '';
  display: inline-block;
  width: 3px;
  height: 14px;
  background: linear-gradient(180deg, var(--violet-500), transparent);
  border-radius: 2px;
  flex-shrink: 0;
}

/* ── Improved Bottom Nav ── */
.bottom-nav {
  background: rgba(10,10,15,0.92) !important;
  backdrop-filter: blur(28px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(28px) saturate(180%) !important;
  border-top: 1px solid rgba(139,92,246,0.10) !important;
  box-shadow: 0 -4px 24px rgba(0,0,0,0.4) !important;
}
.bn-item {
  position: relative !important;
  transition: color .2s !important;
}
.bn-item.active::before {
  content: '';
  position: absolute;
  top: 0; left: 50%;
  transform: translateX(-50%);
  width: 32px; height: 2px;
  background: var(--violet-500);
  border-radius: 0 0 4px 4px;
  box-shadow: 0 0 10px var(--violet-glow-strong);
}
.bn-item.active .bn-icon {
  color: var(--violet-500);
  filter: drop-shadow(0 0 6px rgba(139,92,246,0.5));
}

/* ── Improved Announcement Bar ── */
.ann-bar {
  background: linear-gradient(90deg, rgba(91,61,240,0.08) 0%, rgba(10,10,15,0.95) 30%, rgba(10,10,15,0.95) 70%, rgba(91,61,240,0.08) 100%) !important;
  border-bottom: 1px solid rgba(139,92,246,0.10) !important;
}
