/* =====================================================
   CLASSNOW — MAIN STYLESHEET v2
   Deep 3D Futuristic Aesthetic
   ===================================================== */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #020810;
  --bg2: #050d1a;
  --surface: #0a1525;
  --surface2: #0e1c30;
  --border: rgba(0,180,255,0.12);
  --border2: rgba(0,180,255,0.28);
  --accent: #00c6ff;
  --accent2: #7c3aed;
  --accent3: #ff6b35;
  --text: #e8f0fe;
  --text2: #8ba4c4;
  --text3: #3d5a7a;
  --radius: 16px;
  --radius-sm: 10px;
  --font-display: 'Orbitron', sans-serif;
  --font-body: 'Rajdhani', sans-serif;
  --font-text: 'Inter', sans-serif;
  --transition: 0.3s cubic-bezier(0.4,0,0.2,1);
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
  /* NO perspective on body — breaks fixed elements */
}

/* SCROLLBAR */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: linear-gradient(var(--accent), var(--accent2)); border-radius: 3px; }

/* PARTICLES */
#particles {
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 0;
}

/* ===== NAVBAR ===== */
.navbar {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 1000;
  background: rgba(2,8,16,0.75);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border-bottom: 1px solid var(--border);
  transition: var(--transition);
}
.navbar.scrolled {
  background: rgba(2,8,16,0.95);
  box-shadow: 0 4px 40px rgba(0,0,0,0.6), 0 1px 0 rgba(0,198,255,0.1);
}
.nav-inner {
  max-width: 1280px; margin: auto;
  padding: 0 24px; height: 70px;
  display: flex; align-items: center; gap: 32px;
}
.nav-logo {
  display: flex; align-items: center; gap: 12px;
  text-decoration: none; flex-shrink: 0;
}
.logo-icon {
  width: 42px; height: 42px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 18px rgba(0,198,255,0.5), inset 0 1px 0 rgba(255,255,255,0.2);
  font-family: var(--font-display); font-weight: 800; font-size: 14px; color: #fff; overflow: hidden;
}
.brand { font-family: var(--font-display); font-size: 1.3rem; font-weight: 800; color: var(--text); letter-spacing: 1px; }
.brand .accent { color: var(--accent); }
.nav-links { display: flex; list-style: none; gap: 4px; margin-left: auto; }
.nav-link {
  padding: 8px 16px; color: var(--text2); text-decoration: none;
  font-family: var(--font-body); font-weight: 500; font-size: 0.95rem;
  border-radius: var(--radius-sm); transition: var(--transition); letter-spacing: 0.5px;
}
.nav-link:hover, .nav-link.active { color: var(--accent); background: rgba(0,198,255,0.08); }
.watch-btn {
  background: linear-gradient(135deg, var(--accent), var(--accent2)) !important;
  color: #fff !important; font-weight: 600 !important;
  box-shadow: 0 0 16px rgba(0,198,255,0.35);
}
.watch-btn:hover { box-shadow: 0 0 28px rgba(0,198,255,0.55); transform: translateY(-2px) !important; }
.nav-auth { display: flex; align-items: center; gap: 10px; }
.nav-user { display: flex; align-items: center; gap: 12px; }
.user-greeting { font-family: var(--font-body); font-size: 0.9rem; color: var(--text2); }
.user-greeting span { color: var(--accent); font-weight: 600; }
.btn-ghost {
  padding: 8px 18px; border: 1px solid var(--border2); background: transparent;
  color: var(--text); border-radius: var(--radius-sm); cursor: pointer;
  font-family: var(--font-body); font-size: 0.9rem; text-decoration: none;
  transition: var(--transition); font-weight: 500;
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); background: rgba(0,198,255,0.05); }
.btn-primary-sm {
  padding: 8px 20px; background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #fff; border: none; border-radius: var(--radius-sm); cursor: pointer;
  font-family: var(--font-body); font-size: 0.9rem; text-decoration: none;
  font-weight: 600; transition: var(--transition); box-shadow: 0 0 15px rgba(0,198,255,0.3);
}
.btn-primary-sm:hover { box-shadow: 0 0 28px rgba(0,198,255,0.5); transform: translateY(-2px); }
.hamburger { display: none; background: none; border: none; color: var(--text); font-size: 1.5rem; cursor: pointer; margin-left: auto; }
.mobile-menu { background: var(--surface); border-top: 1px solid var(--border); padding: 16px 24px; display: flex; flex-direction: column; gap: 12px; }
.mobile-menu a { color: var(--text2); text-decoration: none; font-family: var(--font-body); font-size: 1rem; padding: 10px 0; border-bottom: 1px solid var(--border); }
.mobile-menu a:hover { color: var(--accent); }
.hidden { display: none !important; }

/* ===== HERO ===== */
.hero {
  min-height: 100vh;
  display: flex; align-items: center;
  padding: 100px 24px 60px;
  position: relative; overflow: hidden;
}

/* Animated background mesh */
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 20% 50%, rgba(0,198,255,0.08), transparent),
    radial-gradient(ellipse 50% 60% at 80% 40%, rgba(124,58,237,0.08), transparent),
    radial-gradient(ellipse 40% 40% at 50% 100%, rgba(255,107,53,0.04), transparent);
  animation: meshShift 8s ease-in-out infinite alternate;
  pointer-events: none; z-index: 0;
}
@keyframes meshShift {
  from { opacity: 0.7; transform: scale(1) rotate(0deg); }
  to { opacity: 1; transform: scale(1.05) rotate(1deg); }
}

.hero-grid {
  position: absolute; inset: 0; pointer-events: none; z-index: 0;
  background-image:
    linear-gradient(rgba(0,198,255,0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,198,255,0.035) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 20%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 20%, transparent 80%);
  animation: gridDrift 20s linear infinite;
}
@keyframes gridDrift {
  from { background-position: 0 0; }
  to { background-position: 60px 60px; }
}

.hero-content {
  position: relative; z-index: 2;
  max-width: 640px;
  margin-left: max(24px, calc(50vw - 640px));
  animation: fadeInUp 0.9s cubic-bezier(0.22,1,0.36,1) both;
}
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(50px); }
  to { opacity: 1; transform: translateY(0); }
}

.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 20px;
  background: rgba(0,198,255,0.08);
  border: 1px solid rgba(0,198,255,0.25);
  border-radius: 100px;
  font-family: var(--font-body); font-size: 0.9rem; color: var(--accent);
  margin-bottom: 28px; letter-spacing: 0.5px;
  animation: fadeInUp 0.9s 0.1s cubic-bezier(0.22,1,0.36,1) both;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 5.5vw, 4.8rem);
  font-weight: 900; line-height: 1.08;
  margin-bottom: 24px; color: #fff;
  animation: fadeInUp 0.9s 0.2s cubic-bezier(0.22,1,0.36,1) both;
  text-shadow: 0 0 80px rgba(0,198,255,0.15);
}

/* GLITCH */
.glitch { position: relative; color: var(--accent); display: inline-block; }
.glitch::before, .glitch::after {
  content: attr(data-text); position: absolute; top: 0; left: 0; width: 100%;
}
.glitch::before {
  color: #ff6b35; animation: glitch1 4s infinite;
  clip-path: polygon(0 0,100% 0,100% 38%,0 38%);
}
.glitch::after {
  color: #7c3aed; animation: glitch2 4s infinite;
  clip-path: polygon(0 62%,100% 62%,100% 100%,0 100%);
}
@keyframes glitch1 {
  0%,90%,100% { transform: translate(0); opacity: 0; }
  91%,93% { transform: translate(-4px,2px); opacity: 0.9; }
  92%,94% { transform: translate(4px,-1px); opacity: 0.9; }
}
@keyframes glitch2 {
  0%,90%,100% { transform: translate(0); opacity: 0; }
  91.5%,93.5% { transform: translate(4px,2px); opacity: 0.9; }
  92.5%,94.5% { transform: translate(-4px,-2px); opacity: 0.9; }
}

.hero-desc {
  font-family: var(--font-text); font-size: 1.05rem; color: var(--text2);
  max-width: 540px; margin-bottom: 36px; line-height: 1.85;
  animation: fadeInUp 0.9s 0.3s cubic-bezier(0.22,1,0.36,1) both;
}
.hero-cta { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 52px; animation: fadeInUp 0.9s 0.4s cubic-bezier(0.22,1,0.36,1) both; }

.btn-hero {
  padding: 16px 36px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #fff; text-decoration: none; border-radius: var(--radius);
  font-family: var(--font-display); font-size: 0.82rem; font-weight: 700; letter-spacing: 1.5px;
  transition: all 0.3s ease;
  box-shadow: 0 8px 32px rgba(0,198,255,0.4), 0 0 0 1px rgba(0,198,255,0.2), inset 0 1px 0 rgba(255,255,255,0.2);
  position: relative; overflow: hidden;
}
.btn-hero::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.18), transparent);
  opacity: 0; transition: opacity 0.3s;
}
.btn-hero:hover { transform: translateY(-4px) scale(1.02); box-shadow: 0 16px 48px rgba(0,198,255,0.55), 0 0 0 1px rgba(0,198,255,0.4); }
.btn-hero:hover::after { opacity: 1; }

.btn-hero-outline {
  padding: 16px 36px;
  border: 1.5px solid rgba(0,198,255,0.3); color: var(--text); text-decoration: none;
  border-radius: var(--radius); font-family: var(--font-display); font-size: 0.82rem; font-weight: 700;
  letter-spacing: 1.5px; transition: all 0.3s ease; backdrop-filter: blur(10px);
  background: rgba(255,255,255,0.02);
}
.btn-hero-outline:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-4px); box-shadow: 0 12px 36px rgba(0,0,0,0.4), inset 0 0 20px rgba(0,198,255,0.05); }

.hero-stats { display: flex; align-items: center; gap: 32px; animation: fadeInUp 0.9s 0.5s cubic-bezier(0.22,1,0.36,1) both; }
.stat { display: flex; flex-direction: column; }
.stat-num { font-family: var(--font-display); font-size: 1.9rem; font-weight: 800; color: var(--accent); line-height: 1; }
.stat-label { font-size: 0.75rem; color: var(--text3); letter-spacing: 1.5px; text-transform: uppercase; margin-top: 4px; }
.stat-divider { width: 1px; height: 40px; background: linear-gradient(transparent, var(--border2), transparent); }

/* ===== 3D CUBE — HERO RIGHT ===== */
.hero-visual {
  position: absolute; right: 6%; top: 50%;
  transform: translateY(-50%);
  z-index: 2;
}
.scene {
  width: 220px; height: 220px;
  perspective: 600px;
  perspective-origin: 50% 50%;
}
.cube {
  width: 160px; height: 160px;
  position: relative;
  transform-style: preserve-3d;
  animation: rotateCube 14s infinite linear;
  margin: 30px auto;
}
@keyframes rotateCube {
  from { transform: rotateX(-25deg) rotateY(0deg); }
  to   { transform: rotateX(-25deg) rotateY(360deg); }
}
.face {
  position: absolute; width: 160px; height: 160px;
  border: 1.5px solid rgba(0,198,255,0.5);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-size: 1.6rem; font-weight: 800;
  color: rgba(0,198,255,0.95);
  background: rgba(0,198,255,0.03);
  backdrop-filter: blur(4px);
  box-shadow: inset 0 0 40px rgba(0,198,255,0.08), 0 0 20px rgba(0,198,255,0.1);
}
.face.front  { transform: translateZ(80px); }
.face.back   { transform: rotateY(180deg) translateZ(80px); }
.face.left   { transform: rotateY(-90deg) translateZ(80px); }
.face.right  { transform: rotateY(90deg) translateZ(80px); }
.face.top    { transform: rotateX(90deg) translateZ(80px); }
.face.bottom { transform: rotateX(-90deg) translateZ(80px); }

/* Floating rings around cube */
.cube-ring {
  position: absolute; top: 50%; left: 50%;
  border-radius: 50%;
  border: 1px solid rgba(0,198,255,0.15);
  transform-style: preserve-3d;
}
.cube-ring-1 {
  width: 240px; height: 240px;
  margin: -120px 0 0 -120px;
  animation: ringRotate1 8s linear infinite;
  border-color: rgba(0,198,255,0.12);
}
.cube-ring-2 {
  width: 200px; height: 200px;
  margin: -100px 0 0 -100px;
  animation: ringRotate2 6s linear infinite reverse;
  border-color: rgba(124,58,237,0.15);
}
@keyframes ringRotate1 { from { transform: rotateX(70deg) rotateZ(0deg); } to { transform: rotateX(70deg) rotateZ(360deg); } }
@keyframes ringRotate2 { from { transform: rotateX(30deg) rotateZ(0deg); } to { transform: rotateX(30deg) rotateZ(360deg); } }

/* ===== SECTION COMMONS ===== */
.section-inner { max-width: 1280px; margin: auto; padding: 100px 24px; position: relative; z-index: 2; }
.section-header { text-align: center; margin-bottom: 64px; }
.section-label {
  display: inline-block; padding: 6px 20px;
  background: rgba(0,198,255,0.07); border: 1px solid rgba(0,198,255,0.22);
  border-radius: 100px; font-size: 0.82rem; color: var(--accent);
  font-family: var(--font-body); font-weight: 600; letter-spacing: 1.5px;
  text-transform: uppercase; margin-bottom: 16px;
}
.section-title { font-family: var(--font-display); font-size: clamp(1.8rem, 4vw, 2.8rem); font-weight: 800; color: #fff; margin-bottom: 12px; letter-spacing: 0.5px; }
.section-sub { color: var(--text2); font-family: var(--font-text); font-size: 1rem; }

/* ===== INTERACTIVE 3D CARD ===== */
.tilt-card {
  transform-style: preserve-3d;
  transform: perspective(1000px) rotateX(0deg) rotateY(0deg);
  transition: transform 0.15s ease, box-shadow 0.3s ease;
  will-change: transform;
  cursor: default;
}
.tilt-card .card-shine {
  position: absolute; inset: 0; border-radius: inherit;
  background: radial-gradient(circle at 50% 50%, rgba(255,255,255,0.06), transparent 60%);
  opacity: 0; transition: opacity 0.3s;
  pointer-events: none; z-index: 3;
}
.tilt-card:hover .card-shine { opacity: 1; }

/* ===== ABOUT ===== */
.about-section { position: relative; z-index: 2; background: var(--bg2); }
.about-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 24px; padding: 48px;
  display: flex; gap: 40px; align-items: flex-start;
  position: relative; overflow: visible;
}
.about-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent2), var(--accent3));
}
.about-card::after {
  content: ''; position: absolute; inset: 0;
  border-radius: 24px;
  background: radial-gradient(ellipse 60% 60% at 30% 30%, rgba(0,198,255,0.04), transparent);
  pointer-events: none; z-index: 0;
}
.about-icon { font-size: 4rem; flex-shrink: 0; filter: drop-shadow(0 0 12px rgba(0,198,255,0.5)); position: relative; z-index: 1; }
.about-text { position: relative; z-index: 1; }
.about-text h2 { font-family: var(--font-display); font-size: 1.8rem; font-weight: 800; color: #fff; margin-bottom: 16px; }
.about-text p { font-family: var(--font-text); color: var(--text2); margin-bottom: 16px; line-height: 1.85; font-size: 0.95rem; }
.about-tags { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.tag {
  padding: 6px 16px; border: 1px solid var(--border2); border-radius: 100px;
  font-size: 0.85rem; color: var(--accent); background: rgba(0,198,255,0.05);
  font-family: var(--font-body); font-weight: 500; transition: var(--transition);
}
.tag:hover { background: rgba(0,198,255,0.12); border-color: var(--accent); transform: translateY(-2px); }

/* ===== RECENT CLASSES ===== */
.recent-section { position: relative; z-index: 2; }
.recent-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 24px; }
.recent-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: visible; cursor: pointer;
  position: relative; transform-style: preserve-3d;
}
.recent-card-inner {
  border-radius: var(--radius); overflow: hidden;
  position: relative;
}
.recent-card-inner::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  transform: scaleX(0); transform-origin: left; transition: transform 0.35s ease; z-index: 2;
}
.recent-card:hover .recent-card-inner::before { transform: scaleX(1); }
.recent-thumb { width: 100%; height: 180px; background: var(--surface2); position: relative; overflow: hidden; }
.recent-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; display: block; }
.recent-card:hover .recent-thumb img { transform: scale(1.06); }
.thumb-play {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,0.45); opacity: 0; transition: var(--transition);
}
.thumb-play span { font-size: 3.5rem; filter: drop-shadow(0 0 16px rgba(0,198,255,0.8)); }
.recent-card:hover .thumb-play { opacity: 1; }
.recent-body { padding: 20px; }
.recent-badge {
  display: inline-block; padding: 3px 10px;
  background: rgba(0,198,255,0.1); border: 1px solid rgba(0,198,255,0.3);
  border-radius: 100px; font-size: 0.7rem; color: var(--accent);
  font-weight: 600; letter-spacing: 1px; text-transform: uppercase; margin-bottom: 10px;
}
.new-badge { background: rgba(255,107,53,0.15); border-color: rgba(255,107,53,0.4); color: var(--accent3); }
.recent-title { font-family: var(--font-body); font-weight: 600; font-size: 1rem; color: var(--text); margin-bottom: 8px; line-height: 1.5; }
.recent-meta { font-size: 0.8rem; color: var(--text3); font-family: var(--font-text); }

/* ===== COURSES ===== */
.courses-section { background: var(--bg2); position: relative; z-index: 2; }
.courses-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(350px, 1fr)); gap: 28px; }
.course-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 20px; overflow: hidden; position: relative;
  transform-style: preserve-3d;
}
.course-card::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.03), transparent 50%);
  pointer-events: none;
}
.course-header { padding: 28px 28px 20px; position: relative; }
.course-icon-wrap {
  width: 60px; height: 60px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.8rem; margin-bottom: 16px;
}
.course-title { font-family: var(--font-display); font-size: 1rem; font-weight: 700; color: #fff; margin-bottom: 10px; line-height: 1.4; }
.course-desc { font-family: var(--font-text); font-size: 0.85rem; color: var(--text2); line-height: 1.6; margin-bottom: 16px; }
.course-meta { display: flex; gap: 16px; }
.meta-item { font-size: 0.8rem; color: var(--text3); font-family: var(--font-body); display: flex; align-items: center; gap: 5px; }
.course-footer {
  padding: 20px 28px; border-top: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  background: rgba(0,0,0,0.25);
}
.price-wrap { display: flex; align-items: baseline; gap: 8px; }
.price-orig { font-size: 0.85rem; color: var(--text3); text-decoration: line-through; }
.price-now { font-family: var(--font-display); font-size: 1.3rem; font-weight: 800; color: var(--accent); }
.price-currency { font-size: 0.8rem; color: var(--text2); }
.btn-enroll {
  padding: 10px 22px; border-radius: var(--radius-sm); font-family: var(--font-body);
  font-size: 0.9rem; font-weight: 600; color: #fff; cursor: pointer; border: none;
  transition: all 0.3s ease; position: relative; overflow: hidden; text-decoration: none;
}
.btn-enroll::before {
  content: ''; position: absolute; inset: 0;
  background: rgba(255,255,255,0.15); opacity: 0; transition: opacity 0.3s;
}
.btn-enroll:hover { transform: translateY(-3px) scale(1.04); }
.btn-enroll:hover::before { opacity: 1; }

/* ===== CONTACT ===== */
.contact-section { position: relative; z-index: 2; }
.contact-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 24px; margin-bottom: 64px; }
.contact-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 32px 24px; text-align: center;
  position: relative; overflow: hidden;
}
.contact-card::before {
  content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  transform: scaleX(0); transition: transform 0.35s ease; transform-origin: center;
}
.contact-card:hover::before { transform: scaleX(1); }
.contact-icon { font-size: 2.5rem; margin-bottom: 16px; filter: drop-shadow(0 0 8px rgba(0,198,255,0.4)); }
.contact-card h3 { font-family: var(--font-display); font-size: 0.85rem; font-weight: 700; color: var(--text2); margin-bottom: 8px; letter-spacing: 1px; text-transform: uppercase; }
.contact-card p { color: var(--text); font-family: var(--font-body); font-weight: 500; }
.contact-link { color: var(--accent); text-decoration: none; font-family: var(--font-body); font-weight: 500; transition: var(--transition); }
.contact-link:hover { color: #fff; text-decoration: underline; }
.footer-note { text-align: center; color: var(--text3); font-family: var(--font-text); font-size: 0.9rem; padding-top: 32px; border-top: 1px solid var(--border); }

/* ===== FLOATING 3D ORBS (decorative) ===== */
.orb {
  position: fixed; border-radius: 50%; pointer-events: none; z-index: 0;
  filter: blur(80px);
  animation: orbFloat 10s ease-in-out infinite alternate;
}
.orb-1 { width: 400px; height: 400px; background: rgba(0,198,255,0.06); top: 10%; left: -10%; animation-delay: 0s; }
.orb-2 { width: 350px; height: 350px; background: rgba(124,58,237,0.06); top: 50%; right: -8%; animation-delay: -4s; }
.orb-3 { width: 300px; height: 300px; background: rgba(255,107,53,0.04); bottom: 10%; left: 30%; animation-delay: -7s; }
@keyframes orbFloat {
  from { transform: translate(0,0) scale(1); }
  to   { transform: translate(30px, -40px) scale(1.1); }
}

/* ===== AUTH PAGES ===== */
.auth-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 100px 24px 40px; position: relative; }
.auth-bg-glow {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(circle at 25% 50%, rgba(0,198,255,0.07), transparent 50%),
    radial-gradient(circle at 75% 50%, rgba(124,58,237,0.07), transparent 50%);
}
.auth-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 24px;
  padding: 48px; width: 100%; max-width: 460px; position: relative; z-index: 2;
  box-shadow: 0 40px 80px rgba(0,0,0,0.6), 0 0 0 1px rgba(0,198,255,0.05);
  transform-style: preserve-3d;
  transition: transform 0.2s ease, box-shadow 0.3s ease;
}
.auth-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; border-radius: 24px 24px 0 0;
  background: linear-gradient(90deg, var(--accent), var(--accent2), var(--accent3));
}
.auth-logo { text-align: center; margin-bottom: 32px; }
.auth-title { font-family: var(--font-display); font-size: 1.4rem; font-weight: 800; color: #fff; text-align: center; margin-bottom: 8px; }
.auth-sub { text-align: center; color: var(--text3); font-family: var(--font-text); font-size: 0.9rem; margin-bottom: 36px; }
.form-group { margin-bottom: 20px; }
.form-group label { display: block; margin-bottom: 8px; font-family: var(--font-body); font-weight: 600; font-size: 0.9rem; color: var(--text2); letter-spacing: 0.5px; }
.form-input {
  width: 100%; padding: 14px 18px; background: var(--bg2); border: 1.5px solid var(--border);
  border-radius: var(--radius-sm); color: var(--text); font-family: var(--font-text);
  font-size: 0.95rem; transition: var(--transition); outline: none;
}
.form-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(0,198,255,0.12), 0 0 20px rgba(0,198,255,0.05); }
.form-input::placeholder { color: var(--text3); }
.btn-submit {
  width: 100%; padding: 16px; background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #fff; border: none; border-radius: var(--radius-sm); font-family: var(--font-display);
  font-size: 0.9rem; font-weight: 700; letter-spacing: 1px; cursor: pointer;
  transition: all 0.3s ease; margin-top: 8px; box-shadow: 0 8px 25px rgba(0,198,255,0.35);
  position: relative; overflow: hidden;
}
.btn-submit::after { content: ''; position: absolute; inset: 0; background: rgba(255,255,255,0.1); opacity: 0; transition: opacity 0.3s; }
.btn-submit:hover { transform: translateY(-3px); box-shadow: 0 14px 40px rgba(0,198,255,0.5); }
.btn-submit:hover::after { opacity: 1; }
.btn-submit:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }
.auth-switch { text-align: center; margin-top: 24px; font-family: var(--font-text); font-size: 0.9rem; color: var(--text3); }
.auth-switch a { color: var(--accent); text-decoration: none; font-weight: 600; }
.auth-switch a:hover { text-decoration: underline; }
.form-error { background: rgba(255,80,80,0.08); border: 1px solid rgba(255,80,80,0.3); border-radius: var(--radius-sm); padding: 12px 16px; color: #ff8080; font-size: 0.9rem; font-family: var(--font-text); margin-bottom: 20px; display: none; }
.form-success { background: rgba(16,185,129,0.08); border: 1px solid rgba(16,185,129,0.3); border-radius: var(--radius-sm); padding: 12px 16px; color: #34d399; font-size: 0.9rem; font-family: var(--font-text); margin-bottom: 20px; display: none; }
.divider { display: flex; align-items: center; gap: 12px; margin: 24px 0; }
.divider-line { flex: 1; height: 1px; background: var(--border); }
.divider-text { font-size: 0.8rem; color: var(--text3); font-family: var(--font-text); }

/* ===== CLASSES PAGE ===== */
.classes-page { padding-top: 70px; min-height: 100vh; display: flex; flex-direction: column; }
.classes-header { background: var(--surface); border-bottom: 1px solid var(--border); padding: 24px; display: flex; align-items: center; gap: 24px; flex-wrap: wrap; position: sticky; top: 70px; z-index: 10; backdrop-filter: blur(20px); }
.classes-title { font-family: var(--font-display); font-size: 1.1rem; font-weight: 800; color: #fff; flex-shrink: 0; }
.course-selector { display: flex; gap: 8px; flex-wrap: wrap; }
.course-tab { padding: 8px 18px; border: 1px solid var(--border); border-radius: 100px; background: transparent; color: var(--text2); font-family: var(--font-body); font-size: 0.85rem; font-weight: 600; cursor: pointer; transition: var(--transition); }
.course-tab.active, .course-tab:hover { background: rgba(0,198,255,0.1); border-color: var(--accent); color: var(--accent); }
.classes-layout { flex: 1; display: flex; max-width: 1400px; width: 100%; margin: 0 auto; }

.video-main { flex: 1; padding: 28px; display: flex; flex-direction: column; gap: 20px; }
.video-player-wrap {
  width: 100%; aspect-ratio: 16/9; background: #000; border-radius: var(--radius);
  overflow: hidden; border: 1px solid var(--border);
  box-shadow: 0 20px 60px rgba(0,0,0,0.8), 0 0 0 1px rgba(0,198,255,0.05), 0 0 40px rgba(0,198,255,0.08);
  position: relative;
  transform-style: preserve-3d;
  transform: perspective(1200px) rotateX(2deg);
  transition: transform 0.4s ease;
}
.video-player-wrap:hover { transform: perspective(1200px) rotateX(0deg); box-shadow: 0 30px 80px rgba(0,0,0,0.9), 0 0 50px rgba(0,198,255,0.12); }
.video-player-wrap iframe { width: 100%; height: 100%; border: none; display: block; }
.video-placeholder { width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--text3); gap: 16px; }
.video-placeholder span { font-size: 4rem; filter: drop-shadow(0 0 20px rgba(0,198,255,0.3)); }
.video-info { padding: 4px 0; }
.video-now-title { font-family: var(--font-display); font-size: 1.1rem; font-weight: 700; color: #fff; margin-bottom: 8px; }
.video-now-meta { font-size: 0.85rem; color: var(--text3); font-family: var(--font-text); }

.playlist-sidebar {
  width: 360px; flex-shrink: 0; border-left: 1px solid var(--border); background: var(--surface);
  display: flex; flex-direction: column; height: calc(100vh - 140px); position: sticky; top: 140px; overflow: hidden;
}
.playlist-header { padding: 20px; border-bottom: 1px solid var(--border); font-family: var(--font-display); font-size: 0.82rem; font-weight: 700; color: var(--text2); letter-spacing: 1.5px; text-transform: uppercase; }
.playlist-count { font-family: var(--font-text); font-size: 0.8rem; color: var(--text3); font-weight: 400; text-transform: none; letter-spacing: 0; margin-top: 4px; }
.playlist-list { flex: 1; overflow-y: auto; padding: 12px; }
.playlist-list::-webkit-scrollbar { width: 4px; }
.playlist-list::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 2px; }
.playlist-item { padding: 14px 16px; border-radius: var(--radius-sm); cursor: pointer; transition: var(--transition); display: flex; gap: 14px; align-items: flex-start; margin-bottom: 4px; position: relative; border: 1px solid transparent; }
.playlist-item:hover { background: rgba(0,198,255,0.05); border-color: rgba(0,198,255,0.1); transform: translateX(4px); }
.playlist-item.active { background: rgba(0,198,255,0.08); border-color: rgba(0,198,255,0.2); }
.playlist-item.active::before { content: ''; position: absolute; left: 0; top: 50%; transform: translateY(-50%); width: 3px; height: 60%; background: linear-gradient(var(--accent), var(--accent2)); border-radius: 3px; }
.playlist-num { font-family: var(--font-display); font-size: 0.75rem; font-weight: 700; color: var(--text3); flex-shrink: 0; width: 24px; padding-top: 2px; text-align: center; }
.playlist-item.active .playlist-num { color: var(--accent); }
.playlist-item-title { font-family: var(--font-body); font-size: 0.9rem; color: var(--text2); line-height: 1.5; flex: 1; }
.playlist-item.active .playlist-item-title { color: var(--text); font-weight: 600; }
.playlist-play-icon { font-size: 0.65rem; flex-shrink: 0; color: var(--accent); opacity: 0; transition: var(--transition); padding-top: 4px; }
.playlist-item.active .playlist-play-icon { opacity: 1; }

/* LOCKED OVERLAY */
.locked-overlay {
  position: fixed; inset: 0; background: rgba(2,8,16,0.97);
  display: flex; align-items: center; justify-content: center; z-index: 999;
  flex-direction: column; gap: 24px; text-align: center; padding: 24px;
  backdrop-filter: blur(10px);
}
.lock-icon { font-size: 5rem; animation: lockPulse 2s ease-in-out infinite; }
@keyframes lockPulse { 0%,100% { transform: scale(1) rotate(0deg); } 50% { transform: scale(1.1) rotate(-5deg); } }
.lock-title { font-family: var(--font-display); font-size: 1.8rem; font-weight: 800; color: #fff; }
.lock-sub { color: var(--text2); font-family: var(--font-text); max-width: 380px; line-height: 1.7; }
.lock-buttons { display: flex; gap: 16px; justify-content: center; }

/* TOAST */
.toast {
  position: fixed; bottom: 24px; right: 24px;
  background: var(--surface2); border: 1px solid var(--border2);
  border-radius: var(--radius-sm); padding: 14px 20px; color: var(--text);
  font-family: var(--font-body); font-size: 0.9rem; z-index: 9999;
  display: flex; align-items: center; gap: 10px; box-shadow: 0 12px 40px rgba(0,0,0,0.6);
  transform: translateY(80px) scale(0.95); opacity: 0;
  transition: all 0.4s cubic-bezier(0.34,1.56,0.64,1); pointer-events: none;
}
.toast.show { transform: translateY(0) scale(1); opacity: 1; }
.toast.success { border-color: rgba(16,185,129,0.5); }
.toast.error { border-color: rgba(255,80,80,0.5); }

/* ===== LOGO ===== */
.nav-logo-img { height: 44px; width: 44px; object-fit: contain; border-radius: 10px; filter: invert(1) brightness(2); box-shadow: 0 0 15px rgba(0,198,255,0.4); flex-shrink: 0; transition: filter 0.3s ease; }
.nav-logo-img:hover { filter: invert(1) brightness(2.2) drop-shadow(0 0 8px rgba(0,198,255,0.9)); }
.auth-logo-img { display: block; width: 90px; height: 90px; object-fit: contain; border-radius: 16px; margin: 0 auto 16px; filter: invert(1) brightness(2); box-shadow: 0 0 25px rgba(0,198,255,0.3); }

/* ===== SCROLL REVEAL ===== */
.reveal { opacity: 0; transform: translateY(40px); transition: opacity 0.7s cubic-bezier(0.22,1,0.36,1), transform 0.7s cubic-bezier(0.22,1,0.36,1); }
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) { .hero-visual { display: none; } .playlist-sidebar { width: 300px; } }
@media (max-width: 768px) {
  .nav-links, .nav-auth { display: none; }
  .hamburger { display: block; }
  .about-card { flex-direction: column; padding: 28px; }
  .hero-stats { gap: 20px; }
  .classes-layout { flex-direction: column; }
  .playlist-sidebar { width: 100%; height: auto; position: static; border-left: none; border-top: 1px solid var(--border); }
  .playlist-list { max-height: 300px; }
  .auth-card { padding: 32px 24px; }
}
@media (max-width: 480px) {
  .hero-cta { flex-direction: column; }
  .btn-hero, .btn-hero-outline { text-align: center; }
  .courses-grid { grid-template-columns: 1fr; }
  .recent-grid { grid-template-columns: 1fr; }
}

/* =====================================================
   MOBILE FIXES v3
   ===================================================== */

/* --- HAMBURGER always visible on mobile --- */
@media (max-width: 768px) {
  .hamburger {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 42px; height: 42px;
    background: rgba(0,198,255,0.08);
    border: 1px solid rgba(0,198,255,0.25) !important;
    border-radius: 10px;
    color: var(--accent) !important;
    font-size: 1.3rem !important;
    cursor: pointer;
    margin-left: auto;
    flex-shrink: 0;
    z-index: 1001;
    transition: var(--transition);
  }
  .hamburger:hover { background: rgba(0,198,255,0.15); }

  /* Hide desktop nav items */
  .nav-links { display: none !important; }
  .nav-auth  { display: none !important; }
  .nav-user  { display: none !important; }

  /* Mobile menu panel */
  .mobile-menu {
    position: absolute;
    top: 70px; left: 0; right: 0;
    background: rgba(5,13,26,0.98);
    backdrop-filter: blur(24px);
    border-bottom: 1px solid var(--border2);
    padding: 16px 20px 24px;
    display: flex !important;
    flex-direction: column;
    gap: 4px;
    z-index: 999;
    box-shadow: 0 20px 40px rgba(0,0,0,0.6);
  }
  .mobile-menu.hidden { display: none !important; }

  .mobile-menu a {
    color: var(--text2);
    text-decoration: none;
    font-family: var(--font-body);
    font-size: 1.05rem;
    font-weight: 500;
    padding: 13px 16px;
    border-radius: var(--radius-sm);
    border-bottom: none !important;
    transition: var(--transition);
    display: flex; align-items: center; gap: 10px;
  }
  .mobile-menu a:hover {
    color: var(--accent);
    background: rgba(0,198,255,0.08);
  }
  .mobile-menu .mob-watch {
    background: linear-gradient(135deg, var(--accent), var(--accent2));
    color: #fff !important;
    font-weight: 600 !important;
    border-radius: var(--radius-sm);
    margin-top: 8px;
    text-align: center;
    justify-content: center;
  }
  .mobile-menu .mob-divider {
    height: 1px;
    background: var(--border);
    margin: 8px 0;
  }
  .mobile-menu .mob-login {
    border: 1px solid var(--border2);
    color: var(--text) !important;
    justify-content: center;
    margin-top: 4px;
  }
  .mobile-menu .mob-signup {
    background: rgba(0,198,255,0.1);
    border: 1px solid rgba(0,198,255,0.3);
    color: var(--accent) !important;
    font-weight: 600 !important;
    justify-content: center;
  }
  /* Logged-in mobile menu items */
  .mobile-menu .mob-user {
    color: var(--accent) !important;
    font-weight: 600 !important;
    font-size: 0.9rem;
    padding: 10px 16px;
    background: rgba(0,198,255,0.05);
    border-radius: var(--radius-sm);
  }
  .mobile-menu .mob-logout {
    border: 1px solid rgba(255,80,80,0.3);
    color: #ff8080 !important;
    justify-content: center;
  }

  /* Hero mobile */
  .hero { padding: 90px 16px 50px; }
  .hero-content { margin-left: 0; max-width: 100%; }
  .hero-title { font-size: clamp(1.9rem, 8vw, 3rem); }
  .hero-desc { font-size: 0.95rem; }
  .hero-stats { gap: 16px; flex-wrap: wrap; }
  .stat-num { font-size: 1.4rem; }

  /* Section padding */
  .section-inner { padding: 60px 16px; }

  /* About card */
  .about-card { flex-direction: column; padding: 24px 20px; gap: 20px; }
  .about-text h2 { font-size: 1.4rem; }

  /* Grids */
  .recent-grid { grid-template-columns: 1fr; gap: 16px; }
  .courses-grid { grid-template-columns: 1fr; gap: 16px; }
  .contact-grid { grid-template-columns: 1fr 1fr; gap: 16px; }

  /* Classes page mobile */
  .classes-header { padding: 14px 16px; gap: 12px; top: 70px; }
  .classes-title { font-size: 0.95rem; }
  .course-tab { padding: 6px 12px; font-size: 0.78rem; }
  .classes-layout { flex-direction: column; }
  .video-main { padding: 16px; }
  .playlist-sidebar {
    width: 100% !important;
    height: auto !important;
    position: static !important;
    border-left: none;
    border-top: 1px solid var(--border);
    max-height: 320px;
  }

  /* Auth cards */
  .auth-card { padding: 28px 20px; margin: 0 8px; }
  .auth-title { font-size: 1.2rem; }
}

@media (max-width: 400px) {
  .contact-grid { grid-template-columns: 1fr; }
  .hero-cta { flex-direction: column; }
  .btn-hero, .btn-hero-outline { text-align: center; width: 100%; }
  .stat-divider { display: none; }
}

/* ===== FRB FREE COURSE CARD ===== */
.frb-card {
  grid-column: 1 / -1 !important;
  border: 2px solid rgba(250,204,21,0.3) !important;
  box-shadow: 0 0 30px rgba(250,204,21,0.1) !important;
  overflow: hidden;
  transition: all 0.3s ease;
}
.frb-card:hover {
  border-color: rgba(250,204,21,0.6) !important;
  box-shadow: 0 0 50px rgba(250,204,21,0.2) !important;
  transform: translateY(-6px) scale(1.01);
}
.frb-img-wrap {
  position: relative; width: 100%; overflow: hidden;
}
.frb-img-wrap img {
  width: 100%; display: block; max-height: 320px;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.frb-card:hover .frb-img-wrap img {
  transform: scale(1.03);
}
.frb-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to right, rgba(2,8,16,0.5), transparent 50%, rgba(2,8,16,0.5));
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 40px;
  opacity: 0; transition: opacity 0.3s ease;
}
.frb-card:hover .frb-overlay { opacity: 1; }
.frb-badge {
  background: rgba(250,204,21,0.9);
  color: #000; font-family: var(--font-display);
  font-size: 1rem; font-weight: 800;
  padding: 10px 24px; border-radius: 100px;
  letter-spacing: 1px;
}
.frb-cta {
  font-family: var(--font-display); font-size: 1.1rem;
  font-weight: 700; color: #fff;
  text-shadow: 0 2px 10px rgba(0,0,0,0.8);
  letter-spacing: 1px;
}

@media (max-width: 768px) {
  .frb-img-wrap img { max-height: 180px; }
  .frb-overlay { padding: 0 16px; opacity: 1; background: rgba(2,8,16,0.4); }
  .frb-badge { font-size: 0.75rem; padding: 6px 14px; }
  .frb-cta { font-size: 0.8rem; }
}

/* ===== CLICKABLE TAGS ===== */
.tag-link {
  cursor: pointer !important;
  position: relative;
}
.tag-link:hover {
  background: rgba(0,198,255,0.15) !important;
  border-color: var(--accent) !important;
  transform: translateY(-3px) !important;
  box-shadow: 0 6px 20px rgba(0,198,255,0.2);
}
.tag-link::after {
  content: ' →';
  font-size: 0.75rem;
  opacity: 0;
  transition: opacity 0.2s;
}
.tag-link:hover::after { opacity: 1; }

/* ===== FRB OVERLAY ALWAYS VISIBLE ===== */
.frb-overlay-visible {
  opacity: 1 !important;
  background: linear-gradient(to right, rgba(2,8,16,0.6), rgba(2,8,16,0.1) 50%, rgba(2,8,16,0.6)) !important;
}
.frb-card:hover .frb-overlay-visible {
  background: linear-gradient(to right, rgba(2,8,16,0.7), rgba(2,8,16,0.2) 50%, rgba(2,8,16,0.7)) !important;
}

/* ===== ABOUT CARD BORDER RADIUS FIX (overflow:visible needs manual clip) ===== */
.about-card {
  clip-path: none;
}
.about-card::before {
  border-radius: 24px 24px 0 0;
  overflow: hidden;
}
