/* =============================================
   VidyaVerse UI Redesign v2.0
   Premium EdTech Design System
   Load AFTER app.css — overrides and extends
   ============================================= */

/* ─── GOOGLE FONTS (loaded via index.php <link>) ─── */
/* Primary: Plus Jakarta Sans (modern, geometric, warm)
   Display: Outfit (bold headlines, distinctive) */

/* ─── DESIGN TOKENS ──────────────────────────── */
:root {
  /* ── Spacing Scale (8px grid) ── */
  --sp-1: 4px;  --sp-2: 8px;  --sp-3: 12px;
  --sp-4: 16px; --sp-5: 20px; --sp-6: 24px;
  --sp-8: 32px; --sp-10: 40px; --sp-12: 48px;
  --sp-16: 64px; --sp-20: 80px; --sp-24: 96px;

  /* ── Typography Scale ── */
  --fs-xs: 0.75rem;    /* 12px */
  --fs-sm: 0.875rem;   /* 14px */
  --fs-base: 1rem;     /* 16px */
  --fs-lg: 1.125rem;   /* 18px */
  --fs-xl: 1.25rem;    /* 20px */
  --fs-2xl: 1.5rem;    /* 24px */
  --fs-3xl: 2rem;      /* 32px */
  --fs-4xl: 2.5rem;    /* 40px */
  --fs-5xl: 3.5rem;    /* 56px */
  --fs-display: clamp(2.5rem, 6vw, 4.5rem);

  /* ── Border Radius ── */
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 20px;
  --r-2xl: 24px;
  --r-full: 9999px;

  /* ── Timing Functions ── */
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out-back: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-spring: cubic-bezier(0.175, 0.885, 0.32, 1.275);
  --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);

  /* ── Shadows ── */
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.07), 0 2px 4px rgba(0,0,0,0.04);
  --shadow-lg: 0 12px 32px rgba(0,0,0,0.1), 0 4px 8px rgba(0,0,0,0.04);
  --shadow-xl: 0 24px 64px rgba(0,0,0,0.14), 0 8px 16px rgba(0,0,0,0.06);
  --shadow-glow: 0 0 40px rgba(249, 115, 22, 0.15);
  --shadow-card-hover: 0 16px 40px rgba(0,0,0,0.12), 0 4px 12px rgba(0,0,0,0.06);

  /* ── Glass ── */
  --glass-bg: rgba(255, 255, 255, 0.72);
  --glass-border: rgba(255, 255, 255, 0.3);
  --glass-blur: 16px;

  /* ── Brand Gradient ── */
  --grad-brand: linear-gradient(135deg, #F97316 0%, #FB923C 50%, #FDBA74 100%);
  --grad-brand-vivid: linear-gradient(135deg, #EA580C 0%, #F97316 100%);
  --grad-hero: linear-gradient(160deg, #FFF7ED 0%, #FEFDFB 30%, #FFF1E6 100%);
  --grad-cta: linear-gradient(135deg, #F97316 0%, #E11D48 100%);
}

/* ─── LIGHT THEME (refined) ──────────────────── */
:root, [data-theme="light"] {
  --bg-primary: #FEFDFB;
  --bg-secondary: #FFF7ED;
  --bg-tertiary: #F8F5F0;
  --bg-card: #FFFFFF;
  --bg-card-hover: #FFFBF7;
  --text-primary: #1C1917;
  --text-secondary: #57534E;
  --text-muted: #A8A29E;
  --text-on-brand: #FFFFFF;
  --border-default: rgba(28, 25, 23, 0.08);
  --border-strong: rgba(28, 25, 23, 0.15);
  --accent: #F97316;
  --accent-hover: #EA580C;
  --accent-subtle: #FFF7ED;
  --accent-muted: rgba(249, 115, 22, 0.1);
  --success: #16A34A;
  --success-bg: #F0FDF4;
  --warning: #D97706;
  --danger: #DC2626;
  --info: #2563EB;
  --skeleton-base: #F3F0EB;
  --skeleton-shimmer: #E8E4DF;
  --nav-bg: rgba(254, 253, 251, 0.85);
  --overlay: rgba(28, 25, 23, 0.5);
}

/* ─── DARK THEME (refined navy) ──────────────── */
[data-theme="dark"] {
  --bg-primary: #0B1121;
  --bg-secondary: #111827;
  --bg-tertiary: #1E293B;
  --bg-card: #162032;
  --bg-card-hover: #1C2A42;
  --text-primary: #F1F5F9;
  --text-secondary: #94A3B8;
  --text-muted: #64748B;
  --text-on-brand: #FFFFFF;
  --border-default: rgba(241, 245, 249, 0.08);
  --border-strong: rgba(241, 245, 249, 0.15);
  --accent: #FB923C;
  --accent-hover: #F97316;
  --accent-subtle: rgba(251, 146, 60, 0.1);
  --accent-muted: rgba(251, 146, 60, 0.08);
  --success: #4ADE80;
  --success-bg: rgba(74, 222, 128, 0.1);
  --warning: #FBBF24;
  --danger: #F87171;
  --info: #60A5FA;
  --skeleton-base: #1E293B;
  --skeleton-shimmer: #334155;
  --nav-bg: rgba(11, 17, 33, 0.9);
  --overlay: rgba(0, 0, 0, 0.6);
  --glass-bg: rgba(22, 32, 50, 0.75);
  --glass-border: rgba(241, 245, 249, 0.08);
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.2);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.25);
  --shadow-lg: 0 12px 32px rgba(0,0,0,0.35);
  --shadow-xl: 0 24px 64px rgba(0,0,0,0.4);
  --shadow-glow: 0 0 40px rgba(251, 146, 60, 0.12);
  --grad-hero: linear-gradient(160deg, #0B1121 0%, #111827 50%, #0F172A 100%);
}

/* ─── PASTEL THEME ───────────────────────────── */
[data-theme="pastel"] {
  --bg-primary: #FDF2F8;
  --bg-secondary: #FCE7F3;
  --bg-tertiary: #FBCFE8;
  --bg-card: #FFFFFF;
  --bg-card-hover: #FFF1F7;
  --text-primary: #831843;
  --text-secondary: #9D174D;
  --text-muted: #BE185D;
  --accent: #EC4899;
  --accent-hover: #DB2777;
  --accent-subtle: #FDF2F8;
  --accent-muted: rgba(236, 72, 153, 0.1);
  --border-default: rgba(131, 24, 67, 0.08);
  --border-strong: rgba(131, 24, 67, 0.15);
  --skeleton-base: #FCE7F3;
  --skeleton-shimmer: #FBCFE8;
  --nav-bg: rgba(253, 242, 248, 0.88);
  --grad-hero: linear-gradient(160deg, #FDF2F8 0%, #FFFFFF 30%, #FCE7F3 100%);
  --grad-brand: linear-gradient(135deg, #EC4899 0%, #F472B6 100%);
}

/* ─── SLATE THEME ────────────────────────────── */
[data-theme="slate"] {
  --bg-primary: #F1F5F9;
  --bg-secondary: #E2E8F0;
  --bg-tertiary: #CBD5E1;
  --bg-card: #FFFFFF;
  --bg-card-hover: #F8FAFC;
  --text-primary: #0F172A;
  --text-secondary: #475569;
  --text-muted: #94A3B8;
  --accent: #6366F1;
  --accent-hover: #4F46E5;
  --accent-subtle: #EEF2FF;
  --accent-muted: rgba(99, 102, 241, 0.1);
  --border-default: rgba(15, 23, 42, 0.08);
  --border-strong: rgba(15, 23, 42, 0.15);
  --skeleton-base: #E2E8F0;
  --skeleton-shimmer: #CBD5E1;
  --nav-bg: rgba(241, 245, 249, 0.88);
  --grad-hero: linear-gradient(160deg, #F1F5F9 0%, #FFFFFF 30%, #EEF2FF 100%);
  --grad-brand: linear-gradient(135deg, #6366F1 0%, #818CF8 100%);
}


/* ─── GLOBAL RESET OVERRIDES ─────────────────── */
* {
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6, .heading {
  font-family: 'Outfit', 'Plus Jakarta Sans', sans-serif;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
}


/* ─── GLASS MORPHISM UTILITY ─────────────────── */
.glass {
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
}


/* ─── CARDS — UNIVERSAL UPGRADE ──────────────── */
.card, .topic-card, .subject-card, .chapter-card,
.plan-card, .class-card, .stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  border-radius: var(--r-2xl);
  box-shadow: var(--shadow-sm);
  transition: transform 0.35s var(--ease-out-expo),
              box-shadow 0.35s var(--ease-out-expo),
              border-color 0.35s ease;
  will-change: transform;
  position: relative;
  overflow: hidden;
}

.card:hover, .topic-card:hover, .subject-card:hover,
.chapter-card:hover, .class-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card-hover);
  border-color: var(--accent);
}

.card:active, .topic-card:active, .subject-card:active,
.chapter-card:active, .class-card:active {
  transform: translateY(-2px) scale(0.985);
  transition-duration: 0.1s;
}

/* Subtle shine effect on card hover */
.card::before, .subject-card::before, .chapter-card::before,
.class-card::before {
  content: '';
  position: absolute;
  top: 0; left: -75%;
  width: 50%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.06), transparent);
  transform: skewX(-20deg);
  transition: left 0.6s var(--ease-out-expo);
  pointer-events: none;
  z-index: 1;
}

.card:hover::before, .subject-card:hover::before,
.chapter-card:hover::before, .class-card:hover::before {
  left: 125%;
}


/* ─── BUTTONS — SPRING PHYSICS ───────────────── */
.btn, button[type="submit"], .cta-btn, .primary-btn {
  position: relative;
  border-radius: var(--r-md);
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s var(--ease-spring),
              box-shadow 0.2s ease;
  overflow: hidden;
  -webkit-user-select: none;
  user-select: none;
}

.btn:hover, button[type="submit"]:hover, .cta-btn:hover {
  transform: translateY(-1px);
}

.btn:active, button[type="submit"]:active, .cta-btn:active {
  transform: scale(0.95) translateY(0);
  transition-duration: 0.08s;
}

/* Ripple effect base */
.btn-ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.35);
  transform: scale(0);
  pointer-events: none;
}

/* Primary CTA Button */
.cta-primary {
  background: var(--grad-brand-vivid);
  color: var(--text-on-brand);
  padding: var(--sp-3) var(--sp-6);
  font-size: var(--fs-base);
  border: none;
  box-shadow: 0 4px 16px rgba(249, 115, 22, 0.3);
}

.cta-primary:hover {
  box-shadow: 0 6px 24px rgba(249, 115, 22, 0.45);
}

/* Secondary/Ghost Button */
.cta-secondary {
  background: transparent;
  color: var(--accent);
  padding: var(--sp-3) var(--sp-6);
  font-size: var(--fs-base);
  border: 2px solid var(--accent);
}

.cta-secondary:hover {
  background: var(--accent-muted);
}


/* ─── LANDING PAGE: HERO ─────────────────────── */
.vv-hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--sp-16) var(--sp-6);
  background: var(--grad-hero);
  overflow: hidden;
}

/* Animated gradient orbs background */
.vv-hero-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: 0;
  pointer-events: none;
}

.vv-hero-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.4;
  animation: orbFloat 20s ease-in-out infinite;
}

.vv-hero-orb-1 {
  width: 500px; height: 500px;
  background: radial-gradient(circle, #F97316 0%, transparent 70%);
  top: -10%; right: -10%;
  animation-delay: 0s;
}

.vv-hero-orb-2 {
  width: 400px; height: 400px;
  background: radial-gradient(circle, #3B82F6 0%, transparent 70%);
  bottom: -15%; left: -5%;
  animation-delay: -7s;
}

.vv-hero-orb-3 {
  width: 300px; height: 300px;
  background: radial-gradient(circle, #A855F7 0%, transparent 70%);
  top: 40%; left: 50%;
  animation-delay: -14s;
}

@keyframes orbFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  25% { transform: translate(30px, -40px) scale(1.05); }
  50% { transform: translate(-20px, 20px) scale(0.95); }
  75% { transform: translate(15px, 30px) scale(1.02); }
}

/* 3D canvas holder in hero */
.vv-hero-3d {
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: 0.25;
  pointer-events: none;
}

.vv-hero-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
}

.vv-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-1) var(--sp-4);
  background: var(--accent-muted);
  border: 1px solid rgba(249, 115, 22, 0.2);
  border-radius: var(--r-full);
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--accent);
  margin-bottom: var(--sp-6);
  opacity: 0;
  transform: translateY(20px);
}

.vv-hero h1 {
  font-size: var(--fs-display);
  color: var(--text-primary);
  margin-bottom: var(--sp-6);
  opacity: 0;
  transform: translateY(30px);
}

.vv-hero h1 .text-gradient {
  background: var(--grad-brand-vivid);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.vv-hero-subtitle {
  font-size: var(--fs-lg);
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto var(--sp-10);
  line-height: 1.7;
  opacity: 0;
  transform: translateY(20px);
}

.vv-hero-actions {
  display: flex;
  gap: var(--sp-4);
  justify-content: center;
  flex-wrap: wrap;
  opacity: 0;
  transform: translateY(20px);
}

.vv-hero-stats {
  display: flex;
  gap: var(--sp-10);
  justify-content: center;
  margin-top: var(--sp-12);
  opacity: 0;
  transform: translateY(20px);
}

.vv-hero-stat {
  text-align: center;
}

.vv-hero-stat-number {
  font-family: 'Outfit', sans-serif;
  font-size: var(--fs-3xl);
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
}

.vv-hero-stat-label {
  font-size: var(--fs-sm);
  color: var(--text-muted);
  margin-top: var(--sp-1);
}

/* Scroll indicator */
.vv-scroll-indicator {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: var(--fs-xs);
  opacity: 0;
  animation: fadeInUp 0.6s var(--ease-out-expo) 2s forwards;
}

.vv-scroll-mouse {
  width: 24px;
  height: 38px;
  border: 2px solid var(--text-muted);
  border-radius: 12px;
  position: relative;
}

.vv-scroll-mouse::after {
  content: '';
  position: absolute;
  top: 6px;
  left: 50%;
  width: 4px;
  height: 8px;
  background: var(--text-muted);
  border-radius: 4px;
  transform: translateX(-50%);
  animation: scrollBounce 2s ease-in-out infinite;
}

@keyframes scrollBounce {
  0%, 100% { top: 6px; opacity: 1; }
  50% { top: 16px; opacity: 0.3; }
}


/* ─── LANDING: FEATURE SHOWCASE ──────────────── */
.vv-features {
  padding: var(--sp-24) var(--sp-6);
  max-width: 1200px;
  margin: 0 auto;
}

.vv-section-title {
  text-align: center;
  margin-bottom: var(--sp-16);
}

.vv-section-title h2 {
  font-size: var(--fs-4xl);
  margin-bottom: var(--sp-4);
}

.vv-section-title p {
  font-size: var(--fs-lg);
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
}

.vv-features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: var(--sp-8);
}

.vv-feature-card {
  padding: var(--sp-10);
  border-radius: var(--r-2xl);
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  box-shadow: var(--shadow-sm);
  transition: all 0.4s var(--ease-out-expo);
  opacity: 0;
  transform: translateY(40px);
}

.vv-feature-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: var(--accent);
}

.vv-feature-icon {
  width: 64px;
  height: 64px;
  border-radius: var(--r-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  margin-bottom: var(--sp-6);
  background: var(--accent-muted);
}

.vv-feature-card h3 {
  font-size: var(--fs-xl);
  margin-bottom: var(--sp-3);
}

.vv-feature-card p {
  color: var(--text-secondary);
  line-height: 1.7;
}


/* ─── LANDING: CLASS SELECTOR ────────────────── */
.vv-class-grid {
  padding: var(--sp-20) var(--sp-6);
  max-width: 1200px;
  margin: 0 auto;
}

.vv-classes {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: var(--sp-4);
}

.vv-class-tile {
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-xl);
  background: var(--bg-card);
  border: 2px solid var(--border-default);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: all 0.3s var(--ease-out-expo);
  gap: var(--sp-2);
  opacity: 0;
  transform: scale(0.9);
}

.vv-class-tile:hover {
  transform: translateY(-4px) scale(1.03);
  border-color: var(--accent);
  box-shadow: var(--shadow-lg), var(--shadow-glow);
}

.vv-class-tile:active {
  transform: scale(0.97);
}

.vv-class-number {
  font-family: 'Outfit', sans-serif;
  font-size: var(--fs-3xl);
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
}

.vv-class-label {
  font-size: var(--fs-sm);
  color: var(--text-secondary);
  font-weight: 500;
}


/* ─── LANDING: PRICING ───────────────────────── */
.vv-pricing {
  padding: var(--sp-24) var(--sp-6);
  max-width: 1000px;
  margin: 0 auto;
}

.vv-pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--sp-6);
  align-items: center;
}

.vv-plan-card {
  padding: var(--sp-8);
  border-radius: var(--r-2xl);
  background: var(--bg-card);
  border: 2px solid var(--border-default);
  box-shadow: var(--shadow-md);
  text-align: center;
  transition: all 0.4s var(--ease-out-expo);
  position: relative;
  opacity: 0;
  transform: translateY(40px);
}

.vv-plan-card.featured {
  border-color: var(--accent);
  box-shadow: var(--shadow-xl), var(--shadow-glow);
  transform: scale(1.05) translateY(0);
  z-index: 2;
}

.vv-plan-card.featured .vv-plan-badge {
  display: block;
}

.vv-plan-badge {
  display: none;
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--grad-brand-vivid);
  color: white;
  padding: var(--sp-1) var(--sp-5);
  border-radius: var(--r-full);
  font-size: var(--fs-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.vv-plan-price {
  font-family: 'Outfit', sans-serif;
  font-size: var(--fs-4xl);
  font-weight: 800;
  color: var(--text-primary);
  margin: var(--sp-4) 0;
}

.vv-plan-price span {
  font-size: var(--fs-base);
  font-weight: 400;
  color: var(--text-muted);
}

.vv-plan-features {
  list-style: none;
  padding: 0;
  margin: var(--sp-6) 0;
  text-align: left;
}

.vv-plan-features li {
  padding: var(--sp-2) 0;
  color: var(--text-secondary);
  font-size: var(--fs-sm);
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}

.vv-plan-features li::before {
  content: '✓';
  color: var(--success);
  font-weight: 700;
  flex-shrink: 0;
}


/* ─── LANDING: TESTIMONIALS ──────────────────── */
.vv-testimonials {
  padding: var(--sp-20) var(--sp-6);
  background: var(--bg-secondary);
}

.vv-testimonial-card {
  max-width: 600px;
  margin: 0 auto;
  padding: var(--sp-8);
  background: var(--bg-card);
  border-radius: var(--r-2xl);
  box-shadow: var(--shadow-md);
  text-align: center;
  position: relative;
}

.vv-testimonial-card::before {
  content: '"';
  font-family: 'Outfit', serif;
  font-size: 6rem;
  color: var(--accent-muted);
  position: absolute;
  top: -10px;
  left: 24px;
  line-height: 1;
}

.vv-testimonial-text {
  font-size: var(--fs-lg);
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: var(--sp-6);
  font-style: italic;
}

.vv-testimonial-author {
  font-weight: 600;
  color: var(--text-primary);
}


/* ─── LANDING: FAQ ACCORDION ─────────────────── */
.vv-faq {
  padding: var(--sp-24) var(--sp-6);
  max-width: 800px;
  margin: 0 auto;
}

.vv-faq-item {
  border-bottom: 1px solid var(--border-default);
  overflow: hidden;
}

.vv-faq-question {
  width: 100%;
  background: none;
  border: none;
  padding: var(--sp-5) 0;
  text-align: left;
  font-size: var(--fs-lg);
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: inherit;
  transition: color 0.2s;
}

.vv-faq-question:hover {
  color: var(--accent);
}

.vv-faq-arrow {
  transition: transform 0.3s var(--ease-out-expo);
  font-size: var(--fs-xl);
  flex-shrink: 0;
}

.vv-faq-item.active .vv-faq-arrow {
  transform: rotate(180deg);
}

.vv-faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s var(--ease-out-expo),
              padding 0.3s var(--ease-out-expo);
}

.vv-faq-item.active .vv-faq-answer {
  max-height: 300px;
  padding-bottom: var(--sp-5);
}

.vv-faq-answer p {
  color: var(--text-secondary);
  line-height: 1.7;
}


/* ─── LANDING: FOOTER ────────────────────────── */
.vv-footer {
  padding: var(--sp-16) var(--sp-6) var(--sp-8);
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-default);
  text-align: center;
}

.vv-footer-brand {
  font-family: 'Outfit', sans-serif;
  font-size: var(--fs-2xl);
  font-weight: 800;
  color: var(--accent);
  margin-bottom: var(--sp-4);
}

.vv-footer-links {
  display: flex;
  gap: var(--sp-6);
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: var(--sp-6);
}

.vv-footer-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: var(--fs-sm);
  transition: color 0.2s;
}

.vv-footer-links a:hover {
  color: var(--accent);
}

.vv-footer-copy {
  font-size: var(--fs-xs);
  color: var(--text-muted);
}


/* ─── MOBILE BOTTOM NAV ─────────────────────── */
.vv-bottom-nav {
  display: none;
}

@media (max-width: 768px) {
  .vv-bottom-nav {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    background: var(--nav-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid var(--border-default);
    padding: var(--sp-2) 0;
    justify-content: space-around;
    align-items: center;
  }

  /* iOS safe area */
  @supports (padding-bottom: env(safe-area-inset-bottom)) {
    .vv-bottom-nav {
      padding-bottom: calc(var(--sp-2) + env(safe-area-inset-bottom));
    }
  }

  .vv-bottom-tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: var(--sp-1) var(--sp-3);
    border: none;
    background: none;
    cursor: pointer;
    color: var(--text-muted);
    font-size: 10px;
    font-weight: 600;
    font-family: inherit;
    transition: color 0.25s, transform 0.25s var(--ease-spring);
    position: relative;
    -webkit-tap-highlight-color: transparent;
  }

  .vv-bottom-tab.active {
    color: var(--accent);
  }

  .vv-bottom-tab:active {
    transform: scale(0.9);
  }

  .vv-bottom-icon {
    font-size: 22px;
    line-height: 1;
    transition: transform 0.3s var(--ease-spring);
  }

  .vv-bottom-tab.active .vv-bottom-icon {
    transform: scale(1.15) translateY(-2px);
  }

  /* Active indicator dot */
  .vv-bottom-tab.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    width: 4px;
    height: 4px;
    background: var(--accent);
    border-radius: 50%;
  }

  /* Pulsing live indicator */
  .vv-bottom-tab .vv-live-dot {
    position: absolute;
    top: 2px;
    right: 8px;
    width: 8px;
    height: 8px;
    background: #EF4444;
    border-radius: 50%;
    animation: livePulse 1.5s ease-in-out infinite;
  }

  @keyframes livePulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.3); }
  }

  /* Add bottom padding to body so content isn't hidden behind nav */
  body {
    padding-bottom: 72px;
  }

  /* Hide top navigation on mobile */
  .top-nav, .desktop-nav, header nav {
    display: none !important;
  }
}


/* ─── SKELETON LOADERS ───────────────────────── */
.vv-skeleton {
  position: relative;
  overflow: hidden;
  background: var(--skeleton-base);
  border-radius: var(--r-md);
}

.vv-skeleton::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg,
    transparent 0%,
    var(--skeleton-shimmer) 50%,
    transparent 100%
  );
  animation: shimmer 1.8s ease-in-out infinite;
  transform: translateX(-100%);
}

@keyframes shimmer {
  100% { transform: translateX(100%); }
}

.vv-skeleton-text {
  height: 14px;
  margin-bottom: 10px;
  width: 100%;
}

.vv-skeleton-text:last-child {
  width: 65%;
}

.vv-skeleton-title {
  height: 24px;
  width: 60%;
  margin-bottom: 16px;
}

.vv-skeleton-card {
  height: 200px;
  border-radius: var(--r-2xl);
}

.vv-skeleton-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
}

/* Card skeleton layout */
.vv-skeleton-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--sp-6);
}


/* ─── PAGE TRANSITIONS ───────────────────────── */
.vv-page-enter {
  opacity: 0;
  transform: translateY(12px);
}

.vv-page-active {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.35s var(--ease-out-expo),
              transform 0.35s var(--ease-out-expo);
}

.vv-page-exit {
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 0.2s ease,
              transform 0.2s ease;
}


/* ─── TOAST NOTIFICATIONS (upgraded) ─────────── */
.vv-toast {
  position: fixed;
  top: -80px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10002;
  padding: var(--sp-3) var(--sp-6);
  border-radius: var(--r-lg);
  font-size: var(--fs-sm);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  box-shadow: var(--shadow-lg);
  transition: top 0.5s var(--ease-out-back);
  max-width: 90vw;
  white-space: nowrap;
}

.vv-toast.visible {
  top: 24px;
}

.vv-toast-success {
  background: var(--success);
  color: white;
}

.vv-toast-error {
  background: var(--danger);
  color: white;
}

.vv-toast-info {
  background: var(--info);
  color: white;
}


/* ─── AVATAR / USER INITIALS ─────────────────── */
.vv-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: var(--fs-sm);
  color: var(--text-on-brand);
  background: var(--grad-brand);
  flex-shrink: 0;
  text-transform: uppercase;
}


/* ─── PROGRESS BAR (animated gradient) ───────── */
.vv-progress-bar {
  width: 100%;
  height: 8px;
  background: var(--skeleton-base);
  border-radius: var(--r-full);
  overflow: hidden;
  position: relative;
}

.vv-progress-fill {
  height: 100%;
  border-radius: var(--r-full);
  background: var(--grad-brand);
  background-size: 200% 100%;
  animation: progressGradient 3s linear infinite;
  transition: width 0.6s var(--ease-out-expo);
}

@keyframes progressGradient {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}


/* ─── AV PLAYER: GLASS CONTROLS ──────────────── */
.vv-player-controls {
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  border-radius: var(--r-xl);
  padding: var(--sp-4);
  margin-top: var(--sp-4);
}

.vv-play-btn {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--grad-brand-vivid);
  border: none;
  color: white;
  font-size: 1.4rem;
  cursor: pointer;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(249, 115, 22, 0.35);
  transition: transform 0.2s var(--ease-spring),
              box-shadow 0.2s;
}

.vv-play-btn:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 28px rgba(249, 115, 22, 0.5);
}

.vv-play-btn:active {
  transform: scale(0.93);
}

/* Pulse ring around play button */
.vv-play-btn::before {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 2px solid var(--accent);
  opacity: 0;
  animation: playPulse 2s ease-out infinite;
}

@keyframes playPulse {
  0% { transform: scale(1); opacity: 0.6; }
  100% { transform: scale(1.4); opacity: 0; }
}

/* Speed dial */
.vv-speed-dial {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 2px solid var(--border-default);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--fs-sm);
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s var(--ease-spring);
}

.vv-speed-dial:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* AI Panel slide-up sheet */
.vv-ai-sheet {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9998;
  background: var(--bg-card);
  border-top-left-radius: var(--r-2xl);
  border-top-right-radius: var(--r-2xl);
  box-shadow: 0 -8px 40px rgba(0,0,0,0.15);
  transform: translateY(100%);
  transition: transform 0.45s var(--ease-out-expo);
  max-height: 70vh;
  overflow-y: auto;
  padding: var(--sp-6);
}

.vv-ai-sheet.open {
  transform: translateY(0);
}

.vv-ai-sheet-handle {
  width: 40px;
  height: 4px;
  background: var(--border-strong);
  border-radius: var(--r-full);
  margin: 0 auto var(--sp-4);
}


/* ─── CONFETTI CANVAS ────────────────────────── */
#vv-confetti-canvas {
  position: fixed;
  inset: 0;
  z-index: 100000;
  pointer-events: none;
}


/* ─── ONBOARDING FLOW ────────────────────────── */
.vv-onboarding {
  position: fixed;
  inset: 0;
  z-index: 10003;
  background: var(--bg-primary);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--sp-6);
}

.vv-onboarding-step {
  text-align: center;
  max-width: 500px;
  width: 100%;
  opacity: 0;
  transform: translateX(40px);
}

.vv-onboarding-step.active {
  opacity: 1;
  transform: translateX(0);
  transition: all 0.5s var(--ease-out-expo);
}

.vv-onboarding-emoji {
  font-size: 4rem;
  margin-bottom: var(--sp-6);
}

.vv-onboarding h2 {
  font-size: var(--fs-3xl);
  margin-bottom: var(--sp-3);
}

.vv-onboarding p {
  color: var(--text-secondary);
  margin-bottom: var(--sp-8);
}

.vv-onboarding-dots {
  display: flex;
  gap: var(--sp-2);
  justify-content: center;
  margin-top: var(--sp-8);
}

.vv-onboarding-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--border-strong);
  transition: all 0.3s var(--ease-spring);
}

.vv-onboarding-dot.active {
  background: var(--accent);
  width: 28px;
  border-radius: 5px;
}

.vv-onboarding-skip {
  position: absolute;
  top: var(--sp-6);
  right: var(--sp-6);
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: var(--fs-sm);
  font-weight: 600;
  cursor: pointer;
  padding: var(--sp-2) var(--sp-4);
  font-family: inherit;
}


/* ─── LIVE CLASS INDICATOR (Pulsing) ─────────── */
.vv-live-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-1);
  padding: var(--sp-1) var(--sp-3);
  background: #FEE2E2;
  color: #DC2626;
  border-radius: var(--r-full);
  font-size: var(--fs-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.vv-live-badge::before {
  content: '';
  width: 8px;
  height: 8px;
  background: #DC2626;
  border-radius: 50%;
  animation: livePulse 1.5s ease-in-out infinite;
}

[data-theme="dark"] .vv-live-badge {
  background: rgba(220, 38, 38, 0.15);
}


/* ─── GENERAL ANIMATIONS ─────────────────────── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(30px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-30px); }
  to { opacity: 1; transform: translateX(0); }
}

/* Stagger helper classes */
.stagger-1 { animation-delay: 0.1s; }
.stagger-2 { animation-delay: 0.2s; }
.stagger-3 { animation-delay: 0.3s; }
.stagger-4 { animation-delay: 0.4s; }
.stagger-5 { animation-delay: 0.5s; }
.stagger-6 { animation-delay: 0.6s; }


/* ─── RESPONSIVE REFINEMENTS ─────────────────── */
@media (max-width: 768px) {
  .vv-hero {
    min-height: 90vh;
    padding: var(--sp-12) var(--sp-4);
  }

  .vv-hero h1 {
    font-size: clamp(2rem, 8vw, 3rem);
  }

  .vv-hero-stats {
    gap: var(--sp-6);
  }

  .vv-hero-stat-number {
    font-size: var(--fs-2xl);
  }

  .vv-features-grid {
    grid-template-columns: 1fr;
  }

  .vv-classes {
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: var(--sp-3);
  }

  .vv-pricing-grid {
    grid-template-columns: 1fr;
  }

  .vv-plan-card.featured {
    transform: none;
    order: -1;
  }

  .vv-section-title h2 {
    font-size: var(--fs-3xl);
  }

  /* Reduce animations on mobile for performance */
  .vv-hero-orb {
    display: none;
  }
}

@media (max-width: 400px) {
  .vv-hero-actions {
    flex-direction: column;
    width: 100%;
  }

  .vv-hero-actions .cta-primary,
  .vv-hero-actions .cta-secondary {
    width: 100%;
    text-align: center;
  }
}


/* ─── PRINT: HIDE NON-ESSENTIAL ──────────────── */
@media print {
  .vv-bottom-nav, .vv-hero-bg, .vv-hero-3d,
  #vv-confetti-canvas, .vv-scroll-indicator {
    display: none !important;
  }
}
