@font-face {
  font-family: 'Vazirmatn';
  src: url('../fonts/vazirmatn.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --font-family: 'Vazirmatn', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "IRANSans", Tahoma, Arial, sans-serif !important;
  
  /* ==========================================================================
     Farazistia Unified Premium Dark EdTech Design Tokens
     ========================================================================== */
  --bg-body: #090D16;          /* Deepest obsidian background */
  --surface: #111827;          /* Secondary dark slate surface */
  --surface-card: #151D2B;     /* Card canvas */
  --surface-elevated: #1E293B; /* Modals, dropdowns, popovers */
  --surface-alt: #1E293B;      /* Secondary interactive backgrounds */
  
  /* Borders */
  --border: #273449;
  --border-light: rgba(255, 255, 255, 0.08);
  --border-subtle: rgba(255, 255, 255, 0.05);

  /* Typography Colors */
  --text-main: #F5F7FB;        /* Primary crisp text */
  --text-secondary: #9AA8BC;   /* Secondary descriptive text */
  --text-muted: #64748B;       /* Hints, metadata, captions */
  --text-light: #475569;       /* Subtle decorative text */

  /* Accents & Brand Colors */
  --primary: #6366F1;          /* Electric Indigo */
  --primary-hover: #4F46E5;
  --primary-light: rgba(99, 102, 241, 0.15);
  --primary-glow: rgba(99, 102, 241, 0.28);
  
  --cyan: #06B6D4;             /* Bio-Cyan */
  --cyan-light: rgba(6, 182, 212, 0.15);
  
  --emerald: #10B981;          /* Bio-Emerald / Success */
  --emerald-hover: #059669;
  --emerald-light: rgba(16, 185, 129, 0.15);
  --emerald-glow: rgba(16, 185, 129, 0.25);

  --amber: #F59E0B;            /* Amber / Konkur Focus */
  --amber-light: rgba(245, 158, 11, 0.15);
  
  --rose: #EF4444;             /* Negative Mark / Error */
  --rose-light: rgba(239, 68, 68, 0.15);

  /* Radius Scale */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-full: 9999px;

  /* Elevation Shadows */
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 8px 24px -4px rgba(0, 0, 0, 0.55);
  --shadow-lg: 0 20px 45px -10px rgba(0, 0, 0, 0.75);
  --shadow-glow: 0 0 30px rgba(99, 102, 241, 0.25);

  --transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  overflow-x: clip;
  width: 100%;
  max-width: 100%;
}

body {
  font-family: var(--font-family) !important;
  background-color: var(--bg-body);
  color: var(--text-main);
  direction: rtl;
  text-align: right;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
  width: 100%;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition);
}

ul {
  list-style: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

button, input, select, textarea {
  font-family: inherit;
}

/* Container */
.container {
  width: 100%;
  max-width: 1240px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 20px;
  padding-right: 20px;
}

@media (max-width: 640px) {
  .container {
    padding-left: 14px;
    padding-right: 14px;
  }
}

/* Glassmorphism Classes */
.glass-panel {
  background: var(--surface-card);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  color: var(--text-main);
}

.glass-nav {
  background: rgba(9, 13, 22, 0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-light);
  position: -webkit-sticky;
  position: sticky;
  top: 0 !important;
  z-index: 990;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  transition: background-color 0.2s ease, box-shadow 0.2s ease;
}

/* Navbar */
.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 62px;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 7px;
  font-weight: 700;
  font-size: 0.96rem;
  color: var(--text-main);
  text-decoration: none;
  white-space: nowrap;
  line-height: 1;
}

.brand-text {
  font-size: 0.96rem;
  font-weight: 700;
  color: #f8fafc;
  letter-spacing: -0.01em;
  line-height: 1;
}

.brand-icon {
  width: 28px;
  height: 28px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--emerald) 100%);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  box-shadow: 0 2px 8px var(--primary-glow);
}

.brand-text span {
  background: linear-gradient(135deg, var(--primary) 0%, #7c3aed 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-badge {
  font-size: 0.68rem;
  background: var(--primary-light);
  color: var(--primary);
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-weight: 600;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-link {
  font-weight: 600;
  color: var(--text-muted);
  font-size: 0.94rem;
  position: relative;
  padding: 8px 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.nav-link:hover, .nav-link.active {
  color: var(--primary);
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2.5px;
  background: var(--primary);
  border-radius: 4px;
}

/* Navigation Dropdown */
.nav-item-dropdown {
  position: relative;
  display: inline-flex;
  align-items: center;
  height: 100%;
}

.dropdown-trigger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  padding: 10px 0;
  user-select: none;
}

.dropdown-trigger .dropdown-arrow {
  width: 12px;
  height: 12px;
  transition: transform 0.25s ease;
}

.nav-item-dropdown:hover .dropdown-arrow,
.nav-item-dropdown.is-open .dropdown-arrow,
.nav-item-dropdown.active .dropdown-arrow {
  transform: rotate(180deg);
}

.nav-dropdown-menu {
  position: absolute;
  top: 100%;
  right: 0;
  width: 260px;
  background: rgba(15, 23, 42, 0.96);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  box-shadow: 0 16px 36px -6px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(255, 255, 255, 0.04);
  padding: 6px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: opacity 0.18s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.18s cubic-bezier(0.16, 1, 0.3, 1),
              visibility 0.18s;
  z-index: 1000;
  pointer-events: none;
}

/* Hover Bridge: zero gap between nav item and dropdown */
.nav-dropdown-menu::before {
  content: '';
  position: absolute;
  top: -12px;
  left: 0;
  right: 0;
  height: 14px;
  background: transparent;
  display: block;
}

.nav-item-dropdown:hover .nav-dropdown-menu,
.nav-item-dropdown.is-open .nav-dropdown-menu,
.nav-item-dropdown:focus-within .nav-dropdown-menu {
  opacity: 1 !important;
  visibility: visible !important;
  transform: translateY(2px) !important;
  pointer-events: auto !important;
}

.dropdown-items-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.dropdown-item-compact {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 9px;
  color: #cbd5e1;
  font-size: 0.84rem;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 0.16s ease, color 0.16s ease, transform 0.16s ease;
  background: transparent;
  border: none;
  width: 100%;
}

.dropdown-item-compact:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #ffffff;
  transform: translateX(-2px);
}

.dropdown-item-icon {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.16s ease;
}

.dropdown-item-compact:hover .dropdown-item-icon {
  transform: scale(1.08);
}

.dropdown-item-icon svg,
.dropdown-item-icon i {
  width: 14px;
  height: 14px;
}

/* Thematic Color Accents */
.icon-grade-10 { background: rgba(16, 185, 129, 0.14); color: #34d399; }
.icon-grade-11 { background: rgba(14, 165, 233, 0.14); color: #38bdf8; }
.icon-grade-12 { background: rgba(168, 85, 247, 0.14); color: #c084fc; }
.icon-concur-exams { background: rgba(245, 158, 11, 0.14); color: #fbbf24; }
.icon-live { background: rgba(239, 68, 68, 0.14); color: #f87171; }
.icon-more { background: rgba(99, 102, 241, 0.14); color: #818cf8; }

.icon-quiz { background: rgba(6, 182, 212, 0.14); color: #22d3ee; }
.icon-flashcards { background: rgba(168, 85, 247, 0.14); color: #c084fc; }
.icon-calculator { background: rgba(16, 185, 129, 0.14); color: #34d399; }
.icon-parents { background: rgba(14, 165, 233, 0.14); color: #38bdf8; }

.icon-instructors { background: rgba(99, 102, 241, 0.14); color: #818cf8; }
.icon-about { background: rgba(168, 85, 247, 0.14); color: #c084fc; }
.icon-faq { background: rgba(245, 158, 11, 0.14); color: #fbbf24; }
.icon-contact { background: rgba(16, 185, 129, 0.14); color: #34d399; }

.icon-dash { background: rgba(99, 102, 241, 0.14); color: #818cf8; }
.icon-courses { background: rgba(16, 185, 129, 0.14); color: #34d399; }
.icon-results { background: rgba(168, 85, 247, 0.14); color: #c084fc; }
.icon-ai { background: rgba(244, 114, 182, 0.14); color: #f472b6; }
.icon-cert { background: rgba(245, 158, 11, 0.14); color: #fbbf24; }
.icon-logout { background: rgba(239, 68, 68, 0.14); color: #f87171; }

.dropdown-item-title {
  flex: 1;
  text-align: right;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 0.83rem;
  letter-spacing: -0.15px;
}

.dropdown-item-arrow {
  width: 13px;
  height: 13px;
  color: #64748b;
  opacity: 0.6;
  transition: opacity 0.16s ease, transform 0.16s ease;
}

.dropdown-item-compact:hover .dropdown-item-arrow {
  opacity: 1;
  color: #cbd5e1;
  transform: translateX(-2px);
}

.dropdown-live-pulse {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ef4444;
  animation: pulse 1.8s infinite;
  flex-shrink: 0;
}

.dropdown-mini-chip {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(6, 182, 212, 0.15);
  color: #22d3ee;
  border: 1px solid rgba(6, 182, 212, 0.28);
  white-space: nowrap;
}

.dropdown-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.06);
  margin: 4px 2px;
}

.dropdown-item-more {
  color: #818cf8;
  font-weight: 700;
}
.dropdown-item-more:hover {
  background: rgba(99, 102, 241, 0.1);
  color: #a5b4fc;
}

/* User Specific Menu Tuning */
.user-dropdown .nav-dropdown-menu {
  right: auto !important;
  left: 0 !important;
  width: 210px !important;
}

.user-dropdown-header {
  padding: 8px 10px 7px;
  margin-bottom: 3px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.user-dropdown-name {
  font-weight: 800;
  font-size: 0.86rem;
  color: white;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-dropdown-phone {
  font-size: 0.72rem;
  color: #94a3b8;
  direction: ltr;
  text-align: right;
  margin-top: 1px;
}

.mobile-hamburger {
  display: none;
  width: 32px;
  height: 32px;
  min-width: 32px;
  min-height: 32px;
  padding: 0;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  cursor: pointer;
  color: var(--text-main);
  border-radius: var(--radius-md);
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-sizing: border-box;
  transition: var(--transition);
}

.mobile-hamburger:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--primary);
  color: var(--primary);
}

/* Mobile Off-canvas Drawer */
.mobile-drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(6px);
  z-index: 1200;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.mobile-drawer-backdrop.open {
  opacity: 1;
  visibility: visible;
}

.mobile-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: 300px;
  height: 100%;
  background: #090D16;
  border-left: 1px solid var(--border);
  z-index: 1210;
  box-shadow: -10px 0 30px rgba(0, 0, 0, 0.7);
  display: flex;
  flex-direction: column;
  transform: translateX(110%);
  visibility: hidden;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.3s;
  overflow-y: auto;
}

.mobile-drawer.open {
  transform: translateX(0);
  visibility: visible;
}

.mobile-drawer-header {
  padding: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-light);
}

.mobile-drawer-close {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  padding: 6px;
  border-radius: 8px;
}

.mobile-drawer-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex-grow: 1;
}

.mobile-nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-weight: 600;
  font-size: 0.94rem;
  transition: var(--transition);
}

.mobile-nav-link:hover, .mobile-nav-link.active {
  background: var(--primary-light);
  color: var(--primary);
}

.mobile-sub-menu {
  padding-right: 20px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 4px;
  margin-bottom: 8px;
}

.mobile-sub-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.86rem;
  color: var(--text-muted);
}

.mobile-sub-link:hover {
  background: var(--surface-alt);
  color: var(--primary);
}

.mobile-drawer-footer {
  padding: 18px 20px;
  border-top: 1px solid var(--border-light);
  padding-bottom: max(20px, env(safe-area-inset-bottom, 20px));
}

.nav-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-shrink: 0;
  flex-wrap: nowrap;
}

/* Buttons - Standard, Modern, Refined Sizing */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 16px;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.84rem;
  cursor: pointer;
  border: 1px solid transparent;
  transition: var(--transition);
  text-align: center;
  line-height: 1.4;
  text-decoration: none;
}

.btn svg, .btn i[data-lucide] {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, #4338ca 100%);
  color: white;
  box-shadow: 0 3px 12px var(--primary-glow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 16px var(--primary-glow);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-main);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.25);
  color: white;
}

.btn-emerald {
  background: linear-gradient(135deg, var(--emerald) 0%, #047857 100%);
  color: white;
  box-shadow: 0 3px 12px var(--emerald-glow);
}

.btn-emerald:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 16px var(--emerald-glow);
}

.btn-sm {
  height: 30px;
  padding: 0 10px;
  font-size: 0.76rem;
  border-radius: var(--radius-md);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  box-sizing: border-box;
  white-space: nowrap;
}

.btn-sm svg, .btn-sm i[data-lucide] {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
}

.btn-lg {
  padding: 9px 20px;
  font-size: 0.88rem;
  font-weight: 700;
  border-radius: var(--radius-lg);
  gap: 7px;
}

.btn-lg svg, .btn-lg i[data-lucide] {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

/* Square Icon Buttons (Logout, PWA Install, Actions) */
.btn-icon {
  width: 32px;
  height: 32px;
  min-width: 32px;
  min-height: 32px;
  padding: 0 !important;
  border-radius: var(--radius-md);
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  cursor: pointer;
  box-sizing: border-box;
  transition: var(--transition);
}

.btn-icon svg, .btn-icon i {
  display: flex;
  align-items: center;
  justify-content: center;
}

#pwa-install-btn {
  border-color: rgba(99, 102, 241, 0.35);
  color: #a5b4fc;
  background: rgba(99, 102, 241, 0.12);
}

#pwa-install-btn:hover {
  background: rgba(99, 102, 241, 0.22);
  border-color: var(--primary);
  color: white;
  transform: translateY(-1px);
}

/* User Menu Pill */
.user-menu-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 8px 0 3px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  font-size: 0.80rem;
  font-weight: 600;
  color: var(--text-main);
  box-sizing: border-box;
  text-decoration: none;
  white-space: nowrap;
  transition: var(--transition);
}

.user-menu-pill:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--primary);
  color: white;
  box-shadow: 0 4px 14px var(--primary-glow);
}

.user-menu-pill span {
  display: inline-block;
  max-width: 95px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-avatar-circle {
  width: 24px;
  height: 24px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--emerald) 100%);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  flex-shrink: 0;
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 600;
  border: 1px solid transparent;
}

.badge-emerald { 
  background: rgba(16, 185, 129, 0.15); 
  color: #34d399; 
  border-color: rgba(16, 185, 129, 0.3);
}
.badge-indigo { 
  background: rgba(99, 102, 241, 0.15); 
  color: #a5b4fc; 
  border-color: rgba(99, 102, 241, 0.3);
}
.badge-purple { 
  background: rgba(168, 85, 247, 0.15); 
  color: #c084fc; 
  border-color: rgba(168, 85, 247, 0.3);
}
.badge-amber { 
  background: rgba(245, 158, 11, 0.15); 
  color: #fbbf24; 
  border-color: rgba(245, 158, 11, 0.3);
}
.badge-cyan {
  background: rgba(6, 182, 212, 0.15);
  color: #22d3ee;
  border-color: rgba(6, 182, 212, 0.3);
}

/* ==========================================================================
   Hero Section (Minimalist, Chic, Modern SaaS & High Utility)
   ========================================================================== */
.hero-section {
  position: relative;
  overflow: hidden;
  padding: 64px 0 76px;
  background: radial-gradient(ellipse 75% 55% at 50% -12%, rgba(99, 102, 241, 0.13) 0%, rgba(16, 185, 129, 0.04) 50%, transparent 80%);
}

.hero-ambient-glow {
  position: absolute;
  top: -100px;
  left: 50%;
  transform: translateX(-50%);
  width: 900px;
  height: 480px;
  background: radial-gradient(circle, rgba(79, 70, 229, 0.10) 0%, rgba(0,0,0,0) 70%);
  pointer-events: none;
  z-index: 0;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.12fr 0.88fr;
  gap: 52px;
  align-items: center;
  position: relative;
  z-index: 1;
}

/* Minimalist Pill */
.hero-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  color: #cbd5e1;
  margin-bottom: 22px;
  width: fit-content;
  text-decoration: none;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  transition: all 0.25s ease;
}

.hero-chip:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(99, 102, 241, 0.35);
  color: #ffffff;
}

.chip-pulse {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 10px #10b981;
  display: inline-block;
  animation: pulseDot 2s infinite ease-in-out;
}

@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

.chip-highlight {
  color: #a5b4fc;
  font-weight: 700;
}

.chip-author {
  color: #94a3b8;
  font-size: 0.78rem;
}

/* Typography */
.hero-title {
  font-size: 2.6rem;
  font-weight: 900;
  line-height: 1.34;
  color: #f8fafc;
  margin-bottom: 18px;
  letter-spacing: -0.025em;
}

.hero-title .gradient-text {
  background: linear-gradient(135deg, #818cf8 0%, #34d399 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-desc {
  font-size: 1.02rem;
  line-height: 1.85;
  color: #94a3b8;
  margin-bottom: 28px;
  max-width: 530px;
}

/* Actions */
.hero-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 30px;
}

.hero-btn-primary {
  height: 46px;
  padding: 0 22px;
  font-size: 0.9rem;
  font-weight: 700;
  border-radius: 12px;
  background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 10px 25px -5px rgba(99, 102, 241, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
  border: none;
  cursor: pointer;
}

.hero-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px -5px rgba(99, 102, 241, 0.55);
  color: #ffffff;
}

.hero-btn-video {
  height: 46px;
  padding: 0 18px;
  font-size: 0.9rem;
  font-weight: 700;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #f1f5f9;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition: all 0.25s ease;
  text-decoration: none;
}

.hero-btn-video:hover {
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(99, 102, 241, 0.4);
  color: #ffffff;
  transform: translateY(-2px);
}

.btn-play-icon {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(99, 102, 241, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #818cf8;
}

.hero-bale-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.84rem;
  color: #94a3b8;
  padding: 8px 12px;
  border-radius: 10px;
  transition: all 0.2s ease;
  text-decoration: none;
}

.hero-bale-link:hover {
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.08);
}

/* Minimalist Unified Trust Strip */
.hero-trust-strip {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 8px 16px;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 999px;
  flex-wrap: wrap;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.trust-pill-group {
  display: flex;
  align-items: center;
  margin-left: 2px;
}

.grade-pill {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid #0f172a;
  margin-left: -6px;
  background: linear-gradient(135deg, #4f46e5, #06b6d4);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.64rem;
  font-weight: 800;
}

.grade-pill:nth-child(2) { background: linear-gradient(135deg, #10b981, #059669); }
.grade-pill:nth-child(3) { background: linear-gradient(135deg, #f59e0b, #d97706); }

.trust-item {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.8rem;
  color: #cbd5e1;
}

.trust-val {
  font-weight: 800;
  color: #f8fafc;
  font-size: 0.86rem;
}

.trust-lbl {
  color: #94a3b8;
  font-size: 0.76rem;
}

.trust-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
}

.trust-rating {
  gap: 4px;
}

/* Visual Card Showcase */
.hero-visual-card {
  position: relative;
  cursor: pointer;
  outline: none;
}

.card-glass-frame {
  border-radius: 18px;
  background: #090d16;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.75), 0 0 35px -10px rgba(99, 102, 241, 0.2);
  overflow: hidden;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.hero-visual-card:hover .card-glass-frame,
.hero-visual-card:focus-visible .card-glass-frame {
  transform: translateY(-4px);
  box-shadow: 0 30px 70px -15px rgba(0, 0, 0, 0.85), 0 0 45px -5px rgba(99, 102, 241, 0.35);
  border-color: rgba(99, 102, 241, 0.35);
}

.card-frame-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 16px;
  background: rgba(15, 23, 42, 0.8);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.74rem;
}

.frame-window-dots {
  display: flex;
  gap: 5px;
}

.dot-red {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #ef4444;
  opacity: 0.85;
}

.dot-amber {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #f59e0b;
  opacity: 0.85;
}

.dot-green {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
  opacity: 0.85;
}

.frame-title {
  font-weight: 700;
  color: #cbd5e1;
  font-size: 0.76rem;
}

.frame-badge-hd {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #34d399;
  padding: 1px 7px;
  border-radius: 5px;
  font-weight: 700;
  font-size: 0.68rem;
}

.hero-image-frame {
  position: relative;
  aspect-ratio: 16 / 10.5;
  overflow: hidden;
  background: #000;
}

.hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s ease;
}

.hero-visual-card:hover .hero-img {
  transform: scale(1.04);
}

.hero-img-gradient {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, transparent 35%, rgba(9, 13, 22, 0.6) 100%);
  pointer-events: none;
}

.hero-play-trigger {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  z-index: 2;
  pointer-events: none;
}

.play-pulse-circle {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.6), 0 0 25px rgba(99, 102, 241, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hero-visual-card:hover .play-pulse-circle {
  transform: scale(1.1);
  background: rgba(99, 102, 241, 0.9);
  border-color: rgba(255, 255, 255, 0.4);
  box-shadow: 0 12px 35px rgba(99, 102, 241, 0.6);
}

.play-trigger-label {
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 5px 12px;
  border-radius: 999px;
  color: #e2e8f0;
  font-size: 0.76rem;
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
  transition: all 0.25s ease;
}

.hero-visual-card:hover .play-trigger-label {
  background: #0f172a;
  color: #ffffff;
  border-color: rgba(99, 102, 241, 0.45);
}

.card-frame-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 16px;
  background: rgba(15, 23, 42, 0.85);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.75rem;
}

.footer-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #cbd5e1;
}

.footer-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #818cf8;
}

.footer-author {
  color: #94a3b8;
  font-size: 0.72rem;
}

/* Responsive Media Queries */
@media (max-width: 992px) {
  .hero-section {
    padding: 40px 0 52px;
  }
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 34px;
    text-align: center;
  }
  .hero-chip {
    margin-left: auto;
    margin-right: auto;
  }
  .hero-title {
    font-size: 2.1rem;
  }
  .hero-desc {
    margin-left: auto;
    margin-right: auto;
    font-size: 0.96rem;
  }
  .hero-actions {
    justify-content: center;
  }
  .hero-trust-strip {
    margin: 0 auto;
    justify-content: center;
  }
  .hero-visual-card {
    max-width: 540px;
    margin: 0 auto;
  }
}

@media (max-width: 576px) {
  .hero-title {
    font-size: 1.68rem;
    line-height: 1.35;
  }
  .hero-actions {
    flex-direction: column;
    width: 100%;
  }
  .hero-btn-primary, .hero-btn-video {
    width: 100%;
    justify-content: center;
  }
  .hero-trust-strip {
    flex-direction: column;
    gap: 8px;
    border-radius: 16px;
    padding: 12px 14px;
    width: 100%;
    box-sizing: border-box;
  }
  .trust-dot {
    display: none;
  }
}

/* Course Card */
.course-card {
  background: var(--surface-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  overflow: hidden;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  position: relative;
  min-width: 0;
  max-width: 100%;
}

.course-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 36px -8px rgba(0, 0, 0, 0.6);
  border-color: rgba(99, 102, 241, 0.4);
}

.course-card-thumb {
  height: 200px;
  background: linear-gradient(135deg, #1e1b4b 0%, #312e81 50%, #064e3b 100%);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  text-align: center;
  overflow: hidden;
}

.course-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

.course-card:hover .course-thumb-img {
  transform: scale(1.06);
}

.course-card-thumb .dna-illustration {
  font-size: 3rem;
  opacity: 0.85;
}

.course-card-thumb::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.05) 0%, rgba(15, 23, 42, 0.35) 100%);
  pointer-events: none;
}

.course-card-badge {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
}

.course-card-body {
  padding: 22px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.course-card-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text-main);
  line-height: 1.5;
}

.course-card-sub {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 18px;
  line-height: 1.6;
  flex-grow: 1;
}

.course-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  border-top: 1px solid var(--border-light);
  font-size: 0.85rem;
  color: var(--text-muted);
}

.course-price-wrap {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.course-old-price {
  font-size: 0.78rem;
  color: var(--text-light);
  text-decoration: line-through;
}

.course-main-price {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--primary);
}

/* Category Filter Chips */
.filter-chips {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 30px;
}

.chip {
  padding: 8px 20px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.chip:hover {
  background: rgba(255, 255, 255, 0.1);
  color: white;
  border-color: rgba(255, 255, 255, 0.2);
}

.chip.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
  box-shadow: 0 4px 14px var(--primary-glow);
}

/* ==========================================================================
   Modern Cinema Study Room Layout & Student Controls
   ========================================================================== */
.study-room-wrapper {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 350px;
  height: calc(100vh - 74px);
  min-height: calc(100vh - 74px);
  max-width: 100vw;
  background: #090d16;
  color: #f1f5f9;
  position: relative;
  overflow: hidden;
  transition: grid-template-columns 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.study-room-wrapper.sidebar-collapsed {
  grid-template-columns: minmax(0, 1fr) 0px;
}

.study-room-wrapper.sidebar-collapsed .study-sidebar {
  display: none !important;
}

.study-main {
  padding: 16px 28px 50px;
  overflow-y: auto;
  overflow-x: hidden;
  height: 100%;
  min-width: 0;
  max-width: 100%;
  scroll-behavior: smooth;
}

.study-sidebar {
  background: #0c121e;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  overflow-y: auto;
  overflow-x: hidden;
  height: 100%;
  min-width: 0;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
}

.study-sidebar::-webkit-scrollbar {
  width: 5px;
}

.study-sidebar::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 999px;
}

/* Study Room Top Navigation Bar */
.study-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.study-breadcrumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.86rem;
  color: #94a3b8;
  flex-wrap: wrap;
}

.study-breadcrumbs a {
  color: #cbd5e1;
  transition: var(--transition);
}

.study-breadcrumbs a:hover {
  color: var(--primary-light);
}

.study-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.study-action-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #cbd5e1;
  padding: 6px 13px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.study-action-pill:hover {
  background: rgba(255, 255, 255, 0.1);
  color: white;
  border-color: rgba(255, 255, 255, 0.2);
}

.study-action-pill.active {
  background: rgba(79, 70, 229, 0.2);
  border-color: var(--primary);
  color: #a5b4fc;
}

.study-action-pill.pomodoro-pill {
  border-color: rgba(245, 158, 11, 0.3);
  color: #fbbf24;
}

.study-action-pill.pomodoro-pill.running {
  background: rgba(245, 158, 11, 0.15);
  border-color: #f59e0b;
  animation: pulseAmber 2s infinite;
}

@keyframes pulseAmber {
  0%, 100% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.4); }
  50% { box-shadow: 0 0 0 6px rgba(245, 158, 11, 0); }
}

/* Video Player Wrapper & Compact Container */
.video-player-wrapper {
  display: flex;
  justify-content: center;
  width: 100%;
  margin-bottom: 14px;
}

.video-player-container {
  position: relative;
  width: 100%;
  max-width: 960px;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 16px 36px -10px rgba(0, 0, 0, 0.7), 0 0 30px -10px rgba(79, 70, 229, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 0;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.video-player-container.player-wide {
  max-width: 100%;
  box-shadow: 0 20px 45px -15px rgba(0, 0, 0, 0.8), 0 0 40px -10px rgba(79, 70, 229, 0.25);
}

.video-player-container iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

/* Sub-Video Action & Navigation Bar */
.study-sub-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: #111827;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 10px 18px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.study-sub-left, .study-sub-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* Cinema Mode */
body.cinema-mode-active .navbar {
  transform: translateY(-100%);
  transition: transform 0.3s ease;
}

body.cinema-mode-active .study-room-wrapper {
  grid-template-columns: 1fr;
  background: #020408;
}

body.cinema-mode-active .study-sidebar {
  display: none;
}

body.cinema-mode-active .study-main {
  padding: 16px 40px 40px;
  max-width: 1400px;
  margin: 0 auto;
}

body.cinema-mode-active .video-player-container {
  max-width: 100% !important;
  aspect-ratio: 16 / 9;
  max-height: calc(100vh - 140px);
  box-shadow: 0 25px 60px -10px rgba(0, 0, 0, 0.9), 0 0 80px -10px rgba(99, 102, 241, 0.25);
}

.exit-cinema-btn {
  display: none;
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 1000;
  background: rgba(15, 23, 42, 0.9);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.25);
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 700;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(8px);
  cursor: pointer;
}

body.cinema-mode-active .exit-cinema-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

/* Modern Study Tabs */
.study-tabs-nav {
  display: flex;
  gap: 8px;
  background: #111827;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  padding: 6px;
  margin-bottom: 20px;
  overflow-x: auto;
  scrollbar-width: none;
}

.study-tabs-nav::-webkit-scrollbar {
  display: none;
}

.study-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  font-weight: 700;
  color: #94a3b8;
  background: transparent;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
  user-select: none;
}

.study-tab-btn:hover {
  color: white;
  background: rgba(255, 255, 255, 0.04);
}

.study-tab-btn.active {
  color: white;
  background: var(--primary);
  box-shadow: 0 4px 14px var(--primary-glow);
}

.tab-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.15);
  color: white;
  font-weight: 800;
}

.study-tab-btn.active .tab-badge {
  background: rgba(255, 255, 255, 0.25);
}

.study-tab-panel {
  display: none;
  background: #111827;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  padding: 26px;
  animation: fadeInTab 0.25s ease forwards;
}

.study-tab-panel.active {
  display: block;
}

@keyframes fadeInTab {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Notes Workspace */
.notes-form-card {
  background: #090d16;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
  padding: 18px;
  margin-bottom: 24px;
}

.note-input-textarea {
  width: 100%;
  min-height: 95px;
  background: transparent;
  border: none;
  color: white;
  font-family: inherit;
  font-size: 0.94rem;
  line-height: 1.7;
  resize: vertical;
  outline: none;
}

.note-input-textarea::placeholder {
  color: #64748b;
}

.notes-form-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  flex-wrap: wrap;
}

.note-timestamp-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(99, 102, 241, 0.15);
  border: 1px solid rgba(99, 102, 241, 0.3);
  color: #a5b4fc;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.8rem;
  cursor: pointer;
  user-select: none;
}

.note-card-item {
  background: #090d16;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  margin-bottom: 12px;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.note-card-item:hover {
  border-color: rgba(99, 102, 241, 0.3);
  transform: translateY(-1px);
}

.note-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.note-badge-time {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 700;
}

.note-date-txt {
  font-size: 0.74rem;
  color: #64748b;
}

.note-card-content {
  font-size: 0.92rem;
  color: #e2e8f0;
  line-height: 1.8;
  white-space: pre-wrap;
  margin-bottom: 12px;
}

.note-card-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.note-action-btn {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 0.78rem;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.note-action-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: white;
}

.note-action-btn.btn-delete-note:hover {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
}

/* Pomodoro Display */
.pomodoro-card {
  background: #090d16;
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: var(--radius-xl);
  padding: 30px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.pomodoro-card::before {
  content: '';
  position: absolute;
  top: -60px;
  left: 50%;
  transform: translateX(-50%);
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.15), transparent 70%);
  pointer-events: none;
}

.pomodoro-display {
  font-size: 4rem;
  font-weight: 900;
  letter-spacing: 4px;
  color: #f59e0b;
  font-variant-numeric: tabular-nums;
  margin: 16px 0;
  text-shadow: 0 0 25px rgba(245, 158, 11, 0.3);
}

/* Attachments Grid Cards */
.attachments-tab-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 16px;
}

.attachments-tab-grid > * {
  min-width: 0;
  max-width: 100%;
}

@media (max-width: 640px) {
  .attachments-tab-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}

.attachment-card {
  background: #090d16;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  transition: all 0.2s ease;
}

.attachment-card:hover {
  border-color: rgba(99, 102, 241, 0.35);
  transform: translateY(-2px);
  box-shadow: 0 10px 20px -5px rgba(0, 0, 0, 0.4);
}

.attachment-icon-box {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* Curriculum Accordion & Search */
.curriculum-search-box {
  padding: 12px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.curriculum-search-input {
  width: 100%;
  background: #090d16;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  padding: 8px 12px;
  color: white;
  font-family: inherit;
  font-size: 0.84rem;
  outline: none;
}

.curriculum-search-input:focus {
  border-color: var(--primary);
}

.curriculum-lesson {
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.curriculum-lesson-header {
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #111827;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.92rem;
  color: #f1f5f9;
}

.curriculum-topic-item {
  padding: 12px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.86rem;
  color: #94a3b8;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  transition: var(--transition);
  text-decoration: none;
}

.curriculum-topic-item:hover {
  background: rgba(255, 255, 255, 0.04);
  color: white;
}

.curriculum-topic-item.active {
  background: rgba(79, 70, 229, 0.15);
  color: white;
  border-right: 4px solid var(--primary);
}

/* Mobile Bottom Dock */
.mobile-study-dock {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 62px;
  background: rgba(15, 23, 42, 0.96);
  backdrop-filter: blur(16px);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  z-index: 850;
  padding: 0 6px;
  align-items: center;
  justify-content: space-around;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.4);
}

.mobile-dock-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 0.68rem;
  font-family: inherit;
  font-weight: 700;
  padding: 6px 10px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  flex: 1;
}

.mobile-dock-btn.active, .mobile-dock-btn:active {
  color: var(--primary-light);
}

/* ==========================================================================
   Mobile Curriculum Bar & Slide-up Bottom-Sheet Drawer
   ========================================================================== */
.mobile-curriculum-bar {
  display: none;
}

.study-drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(8px);
  z-index: 1100;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.study-drawer-backdrop.open {
  opacity: 1;
  visibility: visible;
}

.study-curriculum-drawer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  max-height: 84vh;
  background: #0f172a;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 24px 24px 0 0;
  z-index: 1150;
  display: flex;
  flex-direction: column;
  transform: translateY(105%);
  transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.65);
  overflow: hidden;
}

.study-curriculum-drawer.open {
  transform: translateY(0);
}

.drawer-drag-handle {
  width: 40px;
  height: 4px;
  background: rgba(255, 255, 255, 0.25);
  border-radius: 999px;
  margin: 10px auto 4px;
}

.drawer-header {
  padding: 12px 20px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.drawer-close-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #94a3b8;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.drawer-close-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  color: white;
}

.drawer-topics-scroll {
  flex-grow: 1;
  overflow-y: auto;
  max-height: calc(84vh - 160px);
  padding-bottom: 30px;
  scrollbar-width: thin;
}

/* Study Modal Backdrop & Content */
.study-modal-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(6px);
  z-index: 1050;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.study-modal-backdrop.open {
  display: flex;
}

.study-modal-box {
  background: #111827;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-xl);
  max-width: 520px;
  width: 100%;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
  overflow: hidden;
  animation: modalScale 0.2s ease forwards;
}

@keyframes modalScale {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

/* Quiz Interface */
.quiz-card {
  background: var(--surface-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  padding: 30px;
  box-shadow: var(--shadow-md);
  margin-bottom: 24px;
  color: var(--text-main);
}

.quiz-option {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  margin-bottom: 12px;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.02);
  transition: var(--transition);
  color: var(--text-main);
}

.quiz-option:hover {
  background: rgba(99, 102, 241, 0.08);
  border-color: var(--primary);
}

.quiz-option.selected {
  background: rgba(99, 102, 241, 0.16);
  border-color: var(--primary);
  box-shadow: 0 0 0 1px var(--primary);
  font-weight: 700;
}

/* Form Inputs & Controls */
input[type="text"], input[type="password"], input[type="search"], textarea, select {
  background: #090D16;
  border: 1px solid var(--border);
  color: var(--text-main);
  border-radius: var(--radius-md);
  font-family: inherit;
  transition: var(--transition);
}

input[type="text"]:focus, input[type="password"]:focus, input[type="search"]:focus, textarea:focus, select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
  outline: none;
}

/* Bento Grid System */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 20px;
}

.bento-card {
  background: var(--surface-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 26px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  color: var(--text-main);
}

.bento-card:hover {
  border-color: rgba(99, 102, 241, 0.4);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* Skeleton Shimmer Loading */
.skeleton {
  background: linear-gradient(90deg, #151D2B 25%, #1E293B 50%, #151D2B 75%);
  background-size: 200% 100%;
  animation: skeletonShimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}

@keyframes skeletonShimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Study Streak Pill & Gamification Elements */
.streak-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.3);
  color: #fbbf24;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 0.84rem;
  font-weight: 700;
  user-select: none;
}

.streak-pill.pulse {
  animation: pulseAmber 2.5s infinite;
}

/* Toast Notifications (Unified Luxury Dark Style) */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 999999;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 440px;
  pointer-events: none;
}

.toast {
  padding: 14px 20px;
  border-radius: var(--radius-xl);
  background: rgba(15, 23, 42, 0.96) !important;
  color: #F8FAFC !important;
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.75), 0 0 1px 1px rgba(255, 255, 255, 0.1);
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.5;
  display: flex;
  align-items: center;
  gap: 12px;
  animation: toastSlideUp 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  pointer-events: auto;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.toast span,
.toast .toast-message {
  color: #F8FAFC !important;
  font-weight: 600;
}

.toast-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.toast-success {
  border-right: 4px solid #10B981 !important;
  box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.75), 0 0 24px rgba(16, 185, 129, 0.22);
}
.toast-success i,
.toast-success .toast-icon {
  color: #34D399 !important;
}

.toast-error,
.toast-danger {
  border-right: 4px solid #F43F5E !important;
  box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.75), 0 0 24px rgba(244, 63, 94, 0.22);
}
.toast-error i,
.toast-danger i,
.toast-error .toast-icon,
.toast-danger .toast-icon {
  color: #FB7185 !important;
}

.toast-warning {
  border-right: 4px solid #F59E0B !important;
  box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.75), 0 0 24px rgba(245, 158, 11, 0.22);
}
.toast-warning i,
.toast-warning .toast-icon {
  color: #FBBF24 !important;
}

.toast-info {
  border-right: 4px solid #6366F1 !important;
  box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.75), 0 0 24px rgba(99, 102, 241, 0.22);
}
.toast-info i,
.toast-info .toast-icon {
  color: #818CF8 !important;
}

@keyframes toastSlideUp {
  from {
    transform: translateY(20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@media (max-width: 640px) {
  .toast-container {
    bottom: 16px;
    right: 16px;
    left: 16px;
    max-width: none;
  }
  .toast {
    padding: 12px 16px;
    font-size: 0.86rem;
  }
}

/* Responsive */
@media (max-width: 992px) {
  .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .hero-desc {
    margin-left: auto;
    margin-right: auto;
  }
  .hero-stats-row {
    justify-content: center;
  }
  .study-room-wrapper {
    grid-template-columns: minmax(0, 1fr);
    height: auto;
    min-height: 100vh;
    overflow-x: hidden;
    padding-bottom: 74px; /* space for mobile dock */
  }
  .study-main {
    padding: 16px 14px 40px;
    height: auto;
    overflow-y: visible;
    overflow-x: hidden;
    max-height: none;
    min-width: 0;
    max-width: 100%;
  }
  .study-sidebar {
    display: none !important; /* On mobile/tablets, never push curriculum to the bottom! */
  }
  .mobile-curriculum-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: rgba(79, 70, 229, 0.1);
    border: 1px solid rgba(79, 70, 229, 0.28);
    border-radius: var(--radius-md);
    padding: 11px 15px;
    margin-bottom: 16px;
  }
  .mcb-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
  }
  .mcb-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.72rem;
    color: var(--primary-light);
    font-weight: 700;
  }
  .mcb-title {
    font-size: 0.88rem;
    font-weight: 700;
    color: white;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .mcb-btn {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    border-radius: 999px;
  }
  .study-sub-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
    padding: 14px;
  }
  .study-sub-left {
    width: 100%;
  }
  .study-sub-right {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: space-between;
  }
  .study-sub-right .btn {
    flex: 1 1 calc(50% - 6px);
    justify-content: center;
  }
  .study-tabs-nav {
    display: flex;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 6px;
  }
  .study-tab-btn {
    flex-shrink: 0;
    padding: 8px 14px;
    font-size: 0.82rem;
  }
  .mobile-study-dock {
    display: flex;
  }
  .video-player-container {
    border-radius: var(--radius-md);
    margin-bottom: 14px;
  }
  .nav-links {
    display: none;
  }
  .mobile-hamburger {
    display: inline-flex;
  }
}

@media (max-width: 576px) {
  .nav-actions {
    gap: 6px;
  }
  .user-menu-pill {
    padding: 0 8px 0 4px;
    font-size: 0.82rem;
  }
  .user-menu-pill span {
    max-width: 75px;
  }
  .btn-sm {
    padding: 0 12px;
    font-size: 0.82rem;
  }
  .brand-logo {
    font-size: 0.92rem;
    gap: 6px;
  }
  .brand-text {
    font-size: 0.92rem;
  }
  .brand-icon {
    width: 26px;
    height: 26px;
  }
  .study-top-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 12px;
  }
  .study-header-actions {
    width: 100%;
    overflow-x: auto;
    white-space: nowrap;
    scrollbar-width: none;
    padding-bottom: 4px;
  }
  .study-main {
    padding: 12px 10px 45px;
  }
  .pomodoro-display {
    font-size: 2.8rem;
  }
  .study-tab-panel {
    padding: 16px 14px;
  }
}

/* Safe Area Inset Support for Mobile Docks */
.quiz-mobile-dock,
.study-mobile-dock {
  padding-bottom: max(12px, env(safe-area-inset-bottom, 12px)) !important;
}

/* Accessibility: Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .floating-pill {
    animation: none !important;
  }
  .skeleton {
    animation: none !important;
  }
}

/* ==========================================================================
   Anti-Piracy Forensic Watermarking & Secure Player
   ========================================================================== */
.video-watermark-overlay {
  position: absolute;
  top: 18px;
  right: 22px;
  z-index: 15;
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
  color: rgba(255, 255, 255, 0.35);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  background: rgba(0, 0, 0, 0.28);
  padding: 4px 10px;
  border-radius: 6px;
  backdrop-filter: blur(2px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: all 1.8s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

/* ==========================================================================
   Modern Minimalist Locked Content Paywall (Study Room)
   ========================================================================== */
.locked-content-card {
  position: relative;
  overflow: hidden;
  background: linear-gradient(145deg, rgba(17, 24, 39, 0.92) 0%, rgba(15, 23, 42, 0.98) 100%);
  border: 1px solid rgba(99, 102, 241, 0.22);
  border-radius: var(--radius-xl);
  padding: 44px 28px 40px;
  text-align: center;
  margin-bottom: 26px;
  box-shadow: 0 16px 40px -10px rgba(0, 0, 0, 0.5), 0 0 35px rgba(99, 102, 241, 0.08);
  backdrop-filter: blur(16px);
  animation: lockedCardEntrance 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.locked-card-glow {
  position: absolute;
  top: -50px;
  left: 50%;
  transform: translateX(-50%);
  width: 320px;
  height: 120px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.18) 0%, rgba(99, 102, 241, 0) 70%);
  pointer-events: none;
  border-radius: 50%;
}

.locked-badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(99, 102, 241, 0.28);
  color: #a5b4fc;
  padding: 5px 14px;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 700;
  margin-bottom: 18px;
}

.locked-pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #818cf8;
  box-shadow: 0 0 8px #818cf8;
  animation: pulseDot 2s infinite;
}

@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.8); }
}

.locked-icon-wrapper {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.18) 0%, rgba(147, 51, 234, 0.12) 100%);
  border: 1.5px solid rgba(129, 140, 248, 0.35);
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #c7d2fe;
  margin: 0 auto 18px;
  animation: lockFloat 3.2s ease-in-out infinite;
}

@keyframes lockFloat {
  0%, 100% {
    transform: translateY(0);
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.25);
  }
  50% {
    transform: translateY(-4px);
    box-shadow: 0 14px 28px rgba(129, 140, 248, 0.4);
  }
}

.locked-title {
  font-size: 1.45rem;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 8px;
  letter-spacing: -0.3px;
}

.locked-desc {
  color: #94a3b8;
  font-size: 0.94rem;
  max-width: 520px;
  margin: 0 auto 20px;
  line-height: 1.7;
}

.locked-features-row {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 24px;
}

.locked-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #cbd5e1;
  padding: 5px 12px;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  transition: all 0.2s ease;
}

.locked-chip:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(99, 102, 241, 0.3);
  color: #ffffff;
}

.locked-chip i,
.locked-chip svg {
  width: 14px;
  height: 14px;
  color: #34d399;
}

.locked-actions-row {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.locked-cta-btn {
  padding: 10px 24px;
  font-size: 0.92rem;
  font-weight: 700;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 18px var(--primary-glow);
  transition: all 0.25s ease;
}

.locked-cta-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px var(--primary-glow);
}

.locked-details-btn {
  padding: 10px 20px;
  font-size: 0.88rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #cbd5e1;
  transition: all 0.2s ease;
}

.locked-details-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

.locked-free-preview-hint {
  margin-top: 18px;
  font-size: 0.82rem;
  color: var(--text-light);
}

.locked-free-preview-hint a {
  color: #38bdf8;
  font-weight: 700;
  text-decoration: none;
  transition: color 0.2s ease;
}

.locked-free-preview-hint a:hover {
  color: #7dd3fc;
  text-decoration: underline;
}

@keyframes lockedCardEntrance {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (max-width: 640px) {
  .locked-content-card {
    padding: 32px 18px 28px;
  }
  .locked-title {
    font-size: 1.25rem;
  }
  .locked-desc {
    font-size: 0.86rem;
    margin-bottom: 16px;
  }
  .locked-features-row {
    gap: 6px;
    margin-bottom: 20px;
  }
  .locked-chip {
    padding: 4px 10px;
    font-size: 0.74rem;
  }
  .locked-actions-row {
    flex-direction: column;
    width: 100%;
  }
  .locked-cta-btn,
  .locked-details-btn {
    width: 100%;
    justify-content: center;
  }
}



/* =========================================================================
   Mobile Bottom Navigation Bar (Dock) & Mobile UX Refinements
   ========================================================================= */
* {
  -webkit-tap-highlight-color: transparent;
}

button, a, input, select, textarea {
  touch-action: manipulation;
}

@media (max-width: 768px) {
  input, select, textarea {
    font-size: 16px !important; /* Prevents iOS Safari viewport auto-zoom */
  }
}

.mobile-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 58px;
  background: rgba(9, 13, 22, 0.94);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 -4px 25px rgba(0, 0, 0, 0.55);
  z-index: 850;
  padding-bottom: env(safe-area-inset-bottom, 0px);
  align-items: center;
  justify-content: space-around;
  box-sizing: content-box;
}

@media (max-width: 992px) {
  .mobile-bottom-nav {
    display: flex;
  }
  body:not(.in-study-room) {
    padding-bottom: calc(64px + env(safe-area-inset-bottom, 0px)) !important;
  }
}

body.in-study-room .mobile-bottom-nav,
body.in-quiz-runner .mobile-bottom-nav,
body:has(#study-room-wrapper) .mobile-bottom-nav,
body:has(.quiz-runner-wrapper) .mobile-bottom-nav {
  display: none !important;
}

.mobile-nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  height: 100%;
  color: #94a3b8;
  font-size: 0.68rem;
  font-weight: 700;
  text-decoration: none;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 4px 0;
  transition: color 0.18s ease, transform 0.12s ease;
  user-select: none;
  -webkit-user-select: none;
}

.mobile-nav-item:active {
  transform: scale(0.92);
}

.mobile-nav-item .mobile-nav-icon,
.mobile-nav-item svg {
  width: 20px;
  height: 20px;
  stroke-width: 2.1;
  transition: transform 0.18s ease, color 0.18s ease;
}

.mobile-nav-item.active {
  color: #38bdf8;
  font-weight: 800;
}

.mobile-nav-item.active .mobile-nav-icon,
.mobile-nav-item.active svg {
  color: #38bdf8;
  transform: translateY(-1px);
}

.mobile-nav-highlight {
  position: relative;
}

.mobile-nav-highlight-icon {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--emerald) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  box-shadow: 0 4px 14px var(--primary-glow);
  margin-top: -12px;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.mobile-nav-highlight-icon svg {
  width: 19px;
  height: 19px;
  stroke-width: 2.2;
}

.mobile-nav-highlight:active .mobile-nav-highlight-icon {
  transform: scale(0.92);
  box-shadow: 0 2px 8px var(--primary-glow);
}

.mobile-nav-highlight.active .mobile-nav-highlight-icon {
  border: 2px solid #ffffff;
}

/* Fast tap micro-interactions on mobile */
@media (max-width: 768px) {
  .btn:active {
    transform: scale(0.97) !important;
  }
  .chip:active, .filter-pill:active, .dash-tool-card:active {
    transform: scale(0.96) !important;
  }
}


/* ==========================================================================
   FARAZISTIA PREMIER MOBILE & ERGONOMIC RESPONSIVE SUITE
   ========================================================================== */

/* 1. Slim Top Announcement Bar on Mobile */
@media (max-width: 640px) {
  #top-announcement-bar {
    padding: 5px 0 !important;
    font-size: 0.75rem !important;
  }
  #top-announcement-bar .badge {
    display: none !important;
  }
  #top-announcement-bar .container {
    padding: 0 12px !important;
    gap: 8px !important;
    flex-wrap: nowrap !important;
    justify-content: space-between !important;
  }
  #top-announcement-bar span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 220px;
  }
  #top-announcement-bar a {
    font-size: 0.72rem !important;
    white-space: nowrap;
  }
}

/* 2. Responsive About Page */
.about-spotlight-panel {
  padding: 45px 40px;
}
.about-portrait-grid {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 40px;
  align-items: center;
}
.about-features-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.about-pillars-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 50px;
}
.about-portrait-grid > *, .about-features-grid > *, .about-pillars-grid > * {
  min-width: 0;
  max-width: 100%;
}

@media (max-width: 860px) {
  .about-spotlight-panel {
    padding: 24px 18px !important;
  }
  .about-portrait-grid {
    grid-template-columns: 1fr;
    gap: 24px;
    text-align: center;
  }
  .about-portrait-grid picture img {
    max-width: 220px;
    margin: 0 auto;
  }
}

@media (max-width: 768px) {
  .about-pillars-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

@media (max-width: 560px) {
  .about-features-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }
}

/* 3. Responsive Contact Page */
.contact-main-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 40px;
  align-items: start;
}
.contact-form-panel {
  padding: 40px;
}
.contact-inputs-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 18px;
}
.contact-main-grid > *, .contact-inputs-grid > * {
  min-width: 0;
  max-width: 100%;
}

@media (max-width: 860px) {
  .contact-main-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .contact-form-panel {
    padding: 24px 16px !important;
  }
}

@media (max-width: 560px) {
  .contact-inputs-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}

/* 4. Enhanced Mobile Bottom Nav Elevation & Polish */
.mobile-bottom-nav {
  box-shadow: 0 -4px 25px rgba(0, 0, 0, 0.45), 0 -1px 0 rgba(255, 255, 255, 0.08) !important;
}

/* 5. Mobile Flashcards Shelves 2-Column Balance */
@media (max-width: 480px) {
  .leitner-shelves-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}


/* ==========================================================================
   Farazistia Phase B: Design System Tokens & Responsive Component Library
   ========================================================================== */

:root {
  /* Gamification Tokens */
  --streak-orange: #f97316;
  --streak-light: rgba(249, 115, 22, 0.15);
  --streak-glow: rgba(249, 115, 22, 0.25);
  --xp-purple: #8b5cf6;
  --xp-light: rgba(139, 92, 246, 0.15);
  --xp-glow: rgba(139, 92, 246, 0.25);
  --rank-gold: #f59e0b;
  --rank-silver: #94a3b8;
  --rank-bronze: #d97706;

  /* Mistake Notebook & Diagnostic Tokens */
  --mistake-rose: #ef4444;
  --mistake-bg: rgba(239, 68, 68, 0.08);
  --mistake-border: rgba(239, 68, 68, 0.22);

  /* Biology Atlas & Interactive Media Tokens */
  --atlas-teal: #14b8a6;
  --atlas-light: rgba(20, 184, 166, 0.15);
  --atlas-glow: rgba(20, 184, 166, 0.25);

  /* Touch Target Minimum (WCAG 2.2 Level AA) */
  --touch-target-min: 44px;
}

/* 1. Gamification Component Styles */
.streak-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--streak-light);
  border: 1px solid rgba(249, 115, 22, 0.35);
  color: #fb923c;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 800;
  box-shadow: 0 0 12px var(--streak-glow);
  user-select: none;
}

.xp-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--xp-light);
  border: 1px solid rgba(139, 92, 246, 0.35);
  color: #c084fc;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 800;
  box-shadow: 0 0 12px var(--xp-glow);
  user-select: none;
}

.level-bar {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-full);
  overflow: hidden;
  position: relative;
}

.level-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #6366f1 0%, #a855f7 100%);
  border-radius: var(--radius-full);
  transition: width 0.5s ease;
}

.leaderboard-rank-pill {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 0.88rem;
}
.leaderboard-rank-1 {
  background: rgba(245, 158, 11, 0.2);
  border: 1px solid #f59e0b;
  color: #fbbf24;
}
.leaderboard-rank-2 {
  background: rgba(148, 163, 184, 0.2);
  border: 1px solid #94a3b8;
  color: #e2e8f0;
}
.leaderboard-rank-3 {
  background: rgba(217, 119, 6, 0.2);
  border: 1px solid #d97706;
  color: #f59e0b;
}

/* 2. Mistake Notebook & Diagnostic Tokens */
.mistake-card {
  background: var(--surface-card);
  border: 1px solid var(--mistake-border);
  border-right: 4px solid var(--mistake-rose);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  margin-bottom: 14px;
  transition: var(--transition);
}
.mistake-card:hover {
  border-color: rgba(239, 68, 68, 0.45);
  box-shadow: 0 8px 24px -4px rgba(239, 68, 68, 0.15);
}

.mistake-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--mistake-bg);
  border: 1px solid var(--mistake-border);
  color: #f87171;
  padding: 3px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.76rem;
  font-weight: 700;
}

.difficulty-chip {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 700;
}
.difficulty-chip.easy {
  background: rgba(16, 185, 129, 0.12);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.25);
}
.difficulty-chip.medium {
  background: rgba(245, 158, 11, 0.12);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.25);
}
.difficulty-chip.hard {
  background: rgba(239, 68, 68, 0.12);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.25);
}
.difficulty-chip.konkur {
  background: rgba(99, 102, 241, 0.15);
  color: #818cf8;
  border: 1px solid rgba(99, 102, 241, 0.35);
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #cbd5e1;
  padding: 8px 16px;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  user-select: none;
  min-height: 38px;
}
.filter-chip:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #f8fafc;
}
.filter-chip.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
  box-shadow: 0 4px 14px var(--primary-glow);
}

/* 3. Biology Atlas & Interactive Media Styles */
.interactive-media-box {
  position: relative;
  background: #000000;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.video-checkpoint-pill {
  position: absolute;
  top: 16px;
  left: 16px;
  background: rgba(15, 23, 42, 0.88);
  backdrop-filter: blur(8px);
  border: 1px solid var(--atlas-teal);
  color: #2dd4bf;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  z-index: 10;
  box-shadow: 0 4px 15px var(--atlas-glow);
}

.video-bookmark-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
  font-size: 0.86rem;
  color: #e2e8f0;
}
.video-bookmark-item:hover {
  background: rgba(99, 102, 241, 0.12);
  border-color: rgba(99, 102, 241, 0.3);
  color: #ffffff;
}

/* 4. Six-Tier Viewport Responsive Utilities */

/* Tier 1: Compact Mobile (<= 320px) */
@media (max-width: 320px) {
  html, body {
    font-size: 13.5px;
  }
  .container {
    padding-left: 10px !important;
    padding-right: 10px !important;
  }
  .btn {
    padding: 8px 12px !important;
    font-size: 0.82rem !important;
  }
  .mobile-bottom-nav span {
    font-size: 0.65rem !important;
  }
}

/* Tier 2: Standard Android (321px - 360px) */
@media (min-width: 321px) and (max-width: 360px) {
  html, body {
    font-size: 14px;
  }
  .container {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  .btn {
    padding: 9px 14px;
  }
}

/* Tier 3: Modern iOS / iPhone (361px - 390px) */
@media (min-width: 361px) and (max-width: 390px) {
  .container {
    padding-left: 14px !important;
    padding-right: 14px !important;
  }
}

/* Tier 4: Tablet Portrait (391px - 768px) */
@media (max-width: 768px) {
  /* Enforce touch-friendly tap targets */
  .btn, .filter-chip, .mobile-nav-item, input[type="text"], input[type="tel"], input[type="password"] {
    min-height: var(--touch-target-min);
  }
}

/* Tier 5: Tablet Landscape / Small Laptop (769px - 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
  .container {
    max-width: 960px;
  }
}

/* Tier 6: Desktop & Ultra-Wide (>= 1025px) */
@media (min-width: 1025px) {
  .container {
    max-width: 1240px;
  }
}
@media (min-width: 1441px) {
  .container {
    max-width: 1360px;
  }
}


/* ==========================================================================
   Phase D & New Sections Responsive Harmonization (320px - 1440px)
   ========================================================================== */

.mistake-notebook-page,
.quiz-builder-section,
.quiz-analytics-page {
  animation: fadeIn 0.3s ease-out;
}

@media (max-width: 640px) {
  .mistake-notebook-page .glass-panel,
  .quiz-builder-section .glass-panel,
  .quiz-analytics-page .glass-panel {
    padding: 20px 14px !important;
    border-radius: var(--radius-lg) !important;
  }

  .source-card {
    padding: 14px 12px !important;
  }

  .count-pill {
    flex-grow: 1;
    text-align: center;
    padding: 10px 8px !important;
    font-size: 0.8rem !important;
  }

  .filter-chip {
    padding: 6px 12px !important;
    font-size: 0.78rem !important;
  }

  .mistake-card .question-header {
    flex-direction: column;
    align-items: flex-start !important;
    gap: 8px;
  }

  .quiz-result-section .glass-panel {
    padding: 24px 16px !important;
  }
}

@media (max-width: 360px) {
  .source-card {
    padding: 12px 10px !important;
  }

  .count-pill {
    font-size: 0.74rem !important;
    padding: 8px 4px !important;
  }

  .filter-chip {
    padding: 5px 10px !important;
    font-size: 0.74rem !important;
  }
}


/* Minimalist & Responsive Navbar Styles */
#spotlight-search-trigger {
  transition: all 0.2s ease;
}

#spotlight-search-trigger:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(99, 102, 241, 0.4);
  color: #f8fafc;
}

@media (max-width: 768px) {
  #spotlight-search-trigger {
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
    padding: 0 !important;
    justify-content: center !important;
    border-radius: var(--radius-full) !important;
  }
  .spotlight-txt,
  .spotlight-kbd {
    display: none !important;
  }
}

@media (max-width: 576px) {
  .navbar {
    height: 56px;
  }
  .nav-actions {
    gap: 6px !important;
    flex-shrink: 0;
  }
  .user-menu-pill {
    padding: 0 4px !important;
    height: 32px !important;
    gap: 0 !important;
    border-radius: var(--radius-full) !important;
    min-width: 32px !important;
    justify-content: center !important;
  }
  .user-menu-pill .user-avatar-circle {
    width: 22px !important;
    height: 22px !important;
  }
  .user-menu-pill .user-name-text,
  .user-menu-pill .dropdown-arrow {
    display: none !important;
  }
  .btn-open-auth-modal {
    padding: 0 10px !important;
    height: 32px !important;
    font-size: 0.76rem !important;
  }
  .brand-logo {
    font-size: 0.94rem !important;
    gap: 6px !important;
    flex-shrink: 0;
  }
  .brand-text {
    font-size: 0.94rem !important;
  }
  .brand-logo img {
    width: 26px !important;
    height: 26px !important;
  }
}

@media (max-width: 360px) {
  .btn-open-auth-modal .auth-btn-text {
    display: none !important;
  }
  .btn-open-auth-modal {
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
    padding: 0 !important;
    justify-content: center !important;
    border-radius: var(--radius-full) !important;
  }
}
