/* =============================================
   BEATEXAM - MASTER STYLESHEET
   Professional Exam Preparation Platform
   ============================================= */

/* --- Google Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&family=Nunito:wght@400;600;700;800&display=swap');

/* --- CSS Variables --- */
:root {
  --primary: #4f46e5;
  --primary-dark: #3730a3;
  --primary-light: #818cf8;
  --secondary: #7c3aed;
  --accent: #06b6d4;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --dark: #1e1b4b;
  --dark2: #312e81;
  --gray-50: #f8fafc;
  --gray-100: #f1f5f9;
  --gray-200: #e2e8f0;
  --gray-300: #cbd5e1;
  --gray-400: #94a3b8;
  --gray-500: #64748b;
  --gray-600: #475569;
  --gray-700: #334155;
  --gray-800: #1e293b;
  --gray-900: #0f172a;
  --white: #ffffff;
  --font-main: 'Poppins', sans-serif;
  --font-alt: 'Nunito', sans-serif;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 12px rgba(79, 70, 229, 0.12), 0 2px 6px rgba(0,0,0,0.08);
  --shadow-lg: 0 10px 30px rgba(79, 70, 229, 0.15), 0 4px 12px rgba(0,0,0,0.1);
  --shadow-xl: 0 20px 50px rgba(79, 70, 229, 0.2);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font-main);
  background: var(--gray-50);
  color: var(--gray-800);
  line-height: 1.6;
  overflow-x: hidden;
}
a { text-decoration: none; color: inherit; transition: var(--transition); }
ul { list-style: none; }
img { max-width: 100%; height: auto; }
button { cursor: pointer; font-family: var(--font-main); }
input, select, textarea { font-family: var(--font-main); }

/* =============================================
   NAVBAR
   ============================================= */
.navbar {
  background: var(--white);
  box-shadow: 0 2px 20px rgba(79, 70, 229, 0.1);
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 3px solid transparent;
  border-image: linear-gradient(90deg, var(--primary), var(--secondary), var(--accent)) 1;
}
.nav-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
  gap: 16px;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: -0.5px;
  flex-shrink: 0;
}
.nav-logo .logo-icon {
  width: 40px; height: 40px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  color: white; font-size: 1.1rem; font-weight: 800;
}
.nav-logo span.beat { color: var(--primary); }
.nav-logo span.exam { color: var(--secondary); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
  justify-content: center;
}
.nav-links > li { position: relative; }
.nav-links > li > a {
  display: flex; align-items: center; gap: 5px;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--gray-700);
  transition: var(--transition);
}
.nav-links > li > a:hover,
.nav-links > li > a.active {
  color: var(--primary);
  background: rgba(79, 70, 229, 0.08);
}
.nav-links > li > a i { font-size: 0.7rem; }

/* Dropdown */
.dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  background: var(--white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  min-width: 220px;
  padding: 8px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: var(--transition);
  border: 1px solid var(--gray-100);
  z-index: 100;
}
.dropdown:hover .dropdown-menu,
.dropdown:focus-within .dropdown-menu {
  opacity: 1; visibility: visible; transform: translateY(0);
}
.dropdown-menu li a {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--gray-700);
  transition: var(--transition);
}
.dropdown-menu li a:hover {
  background: linear-gradient(135deg, rgba(79,70,229,0.08), rgba(124,58,237,0.08));
  color: var(--primary);
  padding-left: 18px;
}
.dropdown-menu li a .dm-icon {
  width: 28px; height: 28px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  color: white; font-size: 0.7rem; font-weight: 700;
  flex-shrink: 0;
}

/* Nav Auth Buttons */
.nav-auth { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.btn-nav-login {
  padding: 8px 18px;
  border: 2px solid var(--primary);
  border-radius: var(--radius-sm);
  font-size: 0.85rem; font-weight: 600;
  color: var(--primary);
  background: transparent;
  transition: var(--transition);
}
.btn-nav-login:hover { background: var(--primary); color: white; }
.btn-nav-signup {
  padding: 8px 18px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border: none; border-radius: var(--radius-sm);
  font-size: 0.85rem; font-weight: 600;
  color: white; transition: var(--transition);
  box-shadow: 0 4px 12px rgba(79,70,229,0.3);
}
.btn-nav-signup:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(79,70,229,0.4); }

/* Profile Dropdown */
.profile-nav { position: relative; }
.profile-trigger {
  display: flex; align-items: center; gap: 10px;
  padding: 6px 14px 6px 6px;
  border-radius: 50px;
  background: var(--gray-100);
  cursor: pointer;
  transition: var(--transition);
  border: 2px solid transparent;
}
.profile-trigger:hover { border-color: var(--primary); background: rgba(79,70,229,0.05); }
.profile-avatar {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: white; font-weight: 700; font-size: 0.9rem;
}
.profile-name { font-size: 0.85rem; font-weight: 600; color: var(--gray-700); max-width: 100px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile-menu {
  position: absolute; top: calc(100% + 8px); right: 0;
  background: var(--white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  min-width: 220px; padding: 8px;
  opacity: 0; visibility: hidden; transform: translateY(-10px);
  transition: var(--transition);
  border: 1px solid var(--gray-100);
}
.profile-nav.open .profile-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.profile-menu .pm-header {
  padding: 12px 14px; border-bottom: 1px solid var(--gray-100); margin-bottom: 8px;
}
.pm-header .pm-name { font-weight: 700; color: var(--gray-800); font-size: 0.95rem; }
.pm-header .pm-email { font-size: 0.78rem; color: var(--gray-500); }
.profile-menu a {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; border-radius: var(--radius-sm);
  font-size: 0.85rem; font-weight: 500; color: var(--gray-700);
  transition: var(--transition);
}
.profile-menu a:hover { background: var(--gray-100); color: var(--primary); }
.profile-menu .logout-btn {
  color: var(--danger) !important; width: 100%; background: none; border: none; text-align: left;
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; border-radius: var(--radius-sm);
  font-size: 0.85rem; font-weight: 500;
  transition: var(--transition); cursor: pointer;
  border-top: 1px solid var(--gray-100); margin-top: 4px;
}
.profile-menu .logout-btn:hover { background: rgba(239,68,68,0.08); }

/* Hamburger */
.nav-hamburger {
  display: none; flex-direction: column; gap: 5px; cursor: pointer;
  padding: 8px; border-radius: var(--radius-sm); transition: var(--transition);
}
.nav-hamburger span {
  display: block; width: 24px; height: 2px;
  background: var(--gray-700); border-radius: 2px; transition: var(--transition);
}
.nav-hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.nav-hamburger.active span:nth-child(2) { opacity: 0; }
.nav-hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* =============================================
   HERO SECTION
   ============================================= */
.hero {
  background: linear-gradient(135deg, #1e1b4b 0%, #312e81 40%, #4c1d95 70%, #1e1b4b 100%);
  padding: 80px 20px 100px;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Ccircle cx='30' cy='30' r='10'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.hero-container { max-width: 1280px; margin: 0 auto; position: relative; text-align: center; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.2);
  border-radius: 50px; padding: 8px 20px; font-size: 0.82rem; font-weight: 600;
  color: rgba(255,255,255,0.9); margin-bottom: 24px;
  backdrop-filter: blur(10px);
}
.hero-badge .dot { width: 8px; height: 8px; background: #10b981; border-radius: 50%; animation: pulse 2s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }
.hero h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800; color: white;
  line-height: 1.15; margin-bottom: 20px;
  letter-spacing: -1px;
}
.hero h1 .highlight {
  background: linear-gradient(135deg, #818cf8, #06b6d4);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero p {
  font-size: 1.1rem; color: rgba(255,255,255,0.75);
  max-width: 600px; margin: 0 auto 40px; line-height: 1.7;
}
.hero-stats {
  display: flex; align-items: center; justify-content: center;
  gap: 40px; margin-bottom: 50px; flex-wrap: wrap;
}
.hero-stat { text-align: center; }
.hero-stat .num { font-size: 2rem; font-weight: 800; color: white; line-height: 1; }
.hero-stat .lbl { font-size: 0.78rem; color: rgba(255,255,255,0.6); font-weight: 500; margin-top: 4px; text-transform: uppercase; letter-spacing: 0.5px; }
.hero-buttons { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.btn-hero-primary {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 16px 36px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white; border-radius: var(--radius-md); font-weight: 700;
  font-size: 1rem; border: none;
  box-shadow: 0 8px 30px rgba(79,70,229,0.4);
  transition: var(--transition);
}
.btn-hero-primary:hover { transform: translateY(-3px); box-shadow: 0 12px 40px rgba(79,70,229,0.5); color: white; }
.btn-hero-secondary {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 16px 36px;
  background: rgba(255,255,255,0.1); color: white;
  border-radius: var(--radius-md); font-weight: 700;
  font-size: 1rem; border: 2px solid rgba(255,255,255,0.3);
  backdrop-filter: blur(10px); transition: var(--transition);
}
.btn-hero-secondary:hover { background: rgba(255,255,255,0.2); transform: translateY(-3px); }

/* =============================================
   FINDER TOOL
   ============================================= */
.finder-section {
  padding: 0 20px;
  margin-top: -50px;
  position: relative; z-index: 10;
}
.finder-card {
  max-width: 900px;
  margin: 0 auto;
  background: var(--white);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  padding: 36px 40px;
  border: 1px solid var(--gray-200);
}
.finder-title {
  text-align: center; margin-bottom: 28px;
}
.finder-title h2 {
  font-size: 1.4rem; font-weight: 800; color: var(--dark);
  margin-bottom: 6px;
}
.finder-title h2 span { color: var(--primary); }
.finder-title p { font-size: 0.875rem; color: var(--gray-500); }
.finder-grid {
  display: grid; grid-template-columns: 1fr 1fr 1fr auto;
  gap: 16px; align-items: end;
}
.finder-group { display: flex; flex-direction: column; gap: 6px; }
.finder-group label {
  font-size: 0.78rem; font-weight: 700; color: var(--gray-600);
  text-transform: uppercase; letter-spacing: 0.5px;
}
.finder-group select {
  padding: 12px 16px;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-sm);
  font-size: 0.9rem; font-weight: 500;
  color: var(--gray-700);
  background: var(--gray-50);
  cursor: pointer; transition: var(--transition);
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%234f46e5' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 40px;
}
.finder-group select:focus {
  outline: none; border-color: var(--primary);
  background-color: var(--white);
  box-shadow: 0 0 0 3px rgba(79,70,229,0.1);
}
.btn-find-test {
  padding: 12px 28px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white; border: none; border-radius: var(--radius-sm);
  font-size: 0.95rem; font-weight: 700;
  display: flex; align-items: center; gap: 8px;
  white-space: nowrap; transition: var(--transition);
  box-shadow: 0 4px 15px rgba(79,70,229,0.35);
}
.btn-find-test:hover { transform: translateY(-2px); box-shadow: 0 8px 25px rgba(79,70,229,0.45); }

/* =============================================
   SECTION STYLES
   ============================================= */
.section { padding: 70px 20px; }
.section-header { text-align: center; margin-bottom: 48px; }
.section-tag {
  display: inline-block;
  background: linear-gradient(135deg, rgba(79,70,229,0.1), rgba(124,58,237,0.1));
  color: var(--primary); border-radius: 50px;
  padding: 6px 18px; font-size: 0.78rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 1px; margin-bottom: 12px;
}
.section-header h2 {
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  font-weight: 800; color: var(--dark);
  margin-bottom: 12px; letter-spacing: -0.5px;
}
.section-header h2 span { color: var(--primary); }
.section-header p {
  font-size: 1rem; color: var(--gray-500);
  max-width: 550px; margin: 0 auto;
}

.container { max-width: 1280px; margin: 0 auto; }

/* =============================================
   TEST CARD (NO IMAGE - TEXT ONLY)
   ============================================= */
.tests-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}
.test-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 24px;
  border: 1px solid var(--gray-200);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}
.test-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
}
.test-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(79,70,229,0.2);
}
.test-card-header {
  display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 16px;
}
.test-class-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: linear-gradient(135deg, rgba(79,70,229,0.1), rgba(124,58,237,0.1));
  color: var(--primary); border-radius: 50px;
  padding: 5px 12px; font-size: 0.75rem; font-weight: 700;
}
.test-subject-badge {
  background: rgba(6,182,212,0.1); color: var(--accent);
  border-radius: 50px; padding: 5px 12px;
  font-size: 0.75rem; font-weight: 700;
}
.test-card h3 {
  font-size: 1.05rem; font-weight: 700; color: var(--dark);
  margin-bottom: 16px; line-height: 1.4;
}
.test-meta {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 10px; margin-bottom: 18px;
}
.meta-item {
  display: flex; flex-direction: column; gap: 2px;
  background: var(--gray-50); border-radius: var(--radius-sm); padding: 10px 12px;
}
.meta-item .meta-label {
  font-size: 0.68rem; color: var(--gray-400);
  text-transform: uppercase; letter-spacing: 0.5px; font-weight: 600;
}
.meta-item .meta-val {
  font-size: 0.95rem; font-weight: 700; color: var(--gray-800);
}
.meta-item .meta-val i { color: var(--primary); margin-right: 4px; font-size: 0.8rem; }
.test-attempts {
  display: flex; align-items: center; gap: 8px;
  font-size: 0.8rem; color: var(--gray-500);
  margin-bottom: 18px;
  padding: 8px 12px;
  background: var(--gray-50); border-radius: var(--radius-sm);
}
.test-attempts i { color: var(--success); }
.btn-start-test {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; padding: 12px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white; border: none; border-radius: var(--radius-sm);
  font-size: 0.9rem; font-weight: 700; transition: var(--transition);
  box-shadow: 0 4px 12px rgba(79,70,229,0.25);
}
.btn-start-test:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(79,70,229,0.4); }

/* =============================================
   CLASSES GRID
   ============================================= */
.classes-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 16px;
}
.class-card {
  background: var(--white); border-radius: var(--radius-lg);
  border: 2px solid var(--gray-200); padding: 24px 16px;
  text-align: center; transition: var(--transition); cursor: pointer;
}
.class-card:hover { border-color: var(--primary); box-shadow: var(--shadow-md); transform: translateY(-4px); }
.class-card .class-num {
  width: 56px; height: 56px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-radius: var(--radius-md); margin: 0 auto 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem; font-weight: 800; color: white;
}
.class-card .class-label { font-size: 0.9rem; font-weight: 700; color: var(--gray-700); }
.class-card .class-tests { font-size: 0.75rem; color: var(--gray-400); margin-top: 4px; }

/* Subject Category Grid */
.subjects-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 16px; }
.subject-card {
  background: var(--white); border-radius: var(--radius-lg); border: 2px solid var(--gray-200);
  padding: 20px; text-align: center; transition: var(--transition); cursor: pointer; overflow: hidden; position: relative;
}
.subject-card::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(79,70,229,0.05), rgba(124,58,237,0.05));
  opacity: 0; transition: var(--transition);
}
.subject-card:hover::before { opacity: 1; }
.subject-card:hover { border-color: var(--primary); transform: translateY(-4px); box-shadow: var(--shadow-md); }
.subject-icon {
  width: 50px; height: 50px;
  border-radius: var(--radius-sm); margin: 0 auto 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem; font-weight: 800; color: white;
}
.subject-card h4 { font-size: 0.9rem; font-weight: 700; color: var(--gray-700); }
.subject-card p { font-size: 0.75rem; color: var(--gray-400); margin-top: 4px; }

/* Subject icon colors */
.s-math { background: linear-gradient(135deg, #4f46e5, #7c3aed); }
.s-science { background: linear-gradient(135deg, #059669, #10b981); }
.s-social { background: linear-gradient(135deg, #d97706, #f59e0b); }
.s-english { background: linear-gradient(135deg, #dc2626, #ef4444); }
.s-hindi { background: linear-gradient(135deg, #db2777, #ec4899); }
.s-physics { background: linear-gradient(135deg, #2563eb, #3b82f6); }
.s-chemistry { background: linear-gradient(135deg, #7c3aed, #8b5cf6); }
.s-biology { background: linear-gradient(135deg, #16a34a, #22c55e); }
.s-geo { background: linear-gradient(135deg, #0891b2, #06b6d4); }
.s-history { background: linear-gradient(135deg, #c2410c, #ea580c); }
.s-civics { background: linear-gradient(135deg, #4338ca, #6366f1); }
.s-eco { background: linear-gradient(135deg, #a16207, #ca8a04); }
.s-accounts { background: linear-gradient(135deg, #0f766e, #14b8a6); }
.s-bst { background: linear-gradient(135deg, #1d4ed8, #3b82f6); }

/* =============================================
   CLASS PAGE LAYOUT
   ============================================= */
.class-page-hero {
  background: linear-gradient(135deg, var(--dark) 0%, var(--dark2) 100%);
  padding: 50px 20px 60px;
  text-align: center; position: relative; overflow: hidden;
}
.class-page-hero h1 { font-size: 2.2rem; font-weight: 800; color: white; margin-bottom: 8px; }
.class-page-hero p { color: rgba(255,255,255,0.7); font-size: 1rem; }
.class-page-hero .breadcrumb {
  display: flex; align-items: center; gap: 8px; justify-content: center;
  margin-bottom: 20px; font-size: 0.82rem; color: rgba(255,255,255,0.5);
}
.class-page-hero .breadcrumb a { color: rgba(255,255,255,0.7); }
.class-page-hero .breadcrumb a:hover { color: white; }

/* Tabs */
.class-tabs {
  display: flex; gap: 4px;
  background: var(--gray-100); border-radius: var(--radius-md); padding: 4px;
  margin-bottom: 32px; flex-wrap: wrap;
}
.tab-btn {
  flex: 1; min-width: 120px; padding: 10px 16px;
  border: none; border-radius: var(--radius-sm);
  font-size: 0.85rem; font-weight: 600; color: var(--gray-600);
  background: transparent; cursor: pointer; transition: var(--transition);
  white-space: nowrap;
}
.tab-btn.active { background: white; color: var(--primary); box-shadow: var(--shadow-sm); }
.tab-btn:hover:not(.active) { color: var(--primary); background: rgba(79,70,229,0.05); }

.subject-section { display: none; }
.subject-section.active { display: block; }

.subject-header {
  display: flex; align-items: center; gap: 14px; margin-bottom: 24px; padding-bottom: 16px; border-bottom: 2px solid var(--gray-200);
}
.subject-header .subj-icon {
  width: 48px; height: 48px; border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem; font-weight: 800; color: white;
}
.subject-header h2 { font-size: 1.3rem; font-weight: 800; color: var(--dark); }
.subject-header p { font-size: 0.82rem; color: var(--gray-500); }

/* =============================================
   FILTERS
   ============================================= */
.filters-bar {
  display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 28px; align-items: center;
}
.filter-label { font-size: 0.82rem; font-weight: 700; color: var(--gray-600); }
.filter-btn {
  padding: 8px 18px; border: 2px solid var(--gray-200);
  border-radius: 50px; font-size: 0.82rem; font-weight: 600;
  color: var(--gray-600); background: var(--white); cursor: pointer; transition: var(--transition);
}
.filter-btn:hover, .filter-btn.active {
  border-color: var(--primary); color: var(--primary);
  background: rgba(79,70,229,0.08);
}
.filter-select {
  padding: 8px 16px; border: 2px solid var(--gray-200);
  border-radius: var(--radius-sm); font-size: 0.85rem; font-weight: 500;
  color: var(--gray-700); background: var(--white); cursor: pointer;
}
.filter-select:focus { outline: none; border-color: var(--primary); }

/* =============================================
   QUIZ PAGE
   ============================================= */
.quiz-container {
  max-width: 900px; margin: 0 auto; padding: 30px 20px 60px;
}
.quiz-header {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-radius: var(--radius-lg); padding: 28px 32px;
  color: white; margin-bottom: 28px;
  display: flex; justify-content: space-between; align-items: center; flex-wrap: gap;
}
.quiz-info h2 { font-size: 1.3rem; font-weight: 800; }
.quiz-info p { opacity: 0.8; font-size: 0.85rem; margin-top: 4px; }
.quiz-timer {
  display: flex; align-items: center; gap: 10px;
  background: rgba(255,255,255,0.15); border-radius: var(--radius-md);
  padding: 12px 20px; font-size: 1.6rem; font-weight: 800;
  min-width: 110px; justify-content: center;
  backdrop-filter: blur(10px);
}
.quiz-timer.warning { background: rgba(239,68,68,0.3); animation: timerPulse 1s infinite; }
@keyframes timerPulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.03); } }

.quiz-progress-bar {
  background: var(--gray-200); border-radius: 50px; height: 8px; margin-bottom: 28px; overflow: hidden;
}
.quiz-progress-fill {
  height: 100%; background: linear-gradient(90deg, var(--primary), var(--accent));
  border-radius: 50px; transition: width 0.4s ease;
}

.quiz-body { background: var(--white); border-radius: var(--radius-lg); box-shadow: var(--shadow-md); overflow: hidden; }
.quiz-question-area { padding: 32px; }
.question-count { font-size: 0.8rem; font-weight: 700; color: var(--gray-400); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 12px; }
.question-text { font-size: 1.15rem; font-weight: 600; color: var(--dark); margin-bottom: 28px; line-height: 1.6; }

.options-list { display: flex; flex-direction: column; gap: 12px; }
.option-label {
  display: flex; align-items: center; gap: 14px;
  padding: 16px 20px; border: 2px solid var(--gray-200);
  border-radius: var(--radius-md); cursor: pointer; transition: var(--transition);
  font-size: 0.95rem; font-weight: 500; color: var(--gray-700);
}
.option-label:hover { border-color: var(--primary); background: rgba(79,70,229,0.04); }
.option-label input[type="radio"] { display: none; }
.option-label.selected { border-color: var(--primary); background: rgba(79,70,229,0.08); color: var(--primary); }
.option-label.correct { border-color: var(--success); background: rgba(16,185,129,0.08); color: var(--success); }
.option-label.wrong { border-color: var(--danger); background: rgba(239,68,68,0.08); color: var(--danger); }
.option-key {
  width: 32px; height: 32px; flex-shrink: 0;
  border-radius: 50%; border: 2px solid var(--gray-300);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.82rem; transition: var(--transition);
}
.option-label.selected .option-key { background: var(--primary); border-color: var(--primary); color: white; }
.option-label.correct .option-key { background: var(--success); border-color: var(--success); color: white; }
.option-label.wrong .option-key { background: var(--danger); border-color: var(--danger); color: white; }

.quiz-footer {
  padding: 20px 32px; background: var(--gray-50); border-top: 1px solid var(--gray-200);
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px;
}
.quiz-nav-btns { display: flex; gap: 10px; }
.btn-quiz-nav {
  padding: 10px 20px; border-radius: var(--radius-sm);
  font-size: 0.88rem; font-weight: 600; cursor: pointer; transition: var(--transition);
  display: flex; align-items: center; gap: 8px;
}
.btn-prev { background: var(--gray-100); border: 2px solid var(--gray-200); color: var(--gray-600); }
.btn-prev:hover { background: var(--gray-200); }
.btn-next { background: var(--primary); border: none; color: white; box-shadow: 0 4px 12px rgba(79,70,229,0.3); }
.btn-next:hover { background: var(--primary-dark); transform: translateY(-2px); }
.btn-submit {
  padding: 10px 24px; background: linear-gradient(135deg, var(--success), #059669);
  border: none; border-radius: var(--radius-sm); color: white;
  font-size: 0.88rem; font-weight: 700; cursor: pointer; transition: var(--transition);
  box-shadow: 0 4px 12px rgba(16,185,129,0.3);
}
.btn-submit:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(16,185,129,0.4); }

/* Question Navigator */
.question-nav {
  background: var(--white); border-radius: var(--radius-lg); padding: 20px;
  box-shadow: var(--shadow-sm); margin-top: 20px; border: 1px solid var(--gray-200);
}
.question-nav h4 { font-size: 0.82rem; font-weight: 700; color: var(--gray-500); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 14px; }
.q-nav-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.q-nav-btn {
  width: 38px; height: 38px; border-radius: 8px;
  border: 2px solid var(--gray-200); background: var(--gray-50);
  font-size: 0.82rem; font-weight: 700; color: var(--gray-600);
  cursor: pointer; transition: var(--transition);
}
.q-nav-btn:hover { border-color: var(--primary); color: var(--primary); }
.q-nav-btn.current { border-color: var(--primary); background: var(--primary); color: white; }
.q-nav-btn.answered { border-color: var(--success); background: rgba(16,185,129,0.1); color: var(--success); }
.q-nav-legend { display: flex; gap: 16px; margin-top: 14px; flex-wrap: wrap; }
.legend-item { display: flex; align-items: center; gap: 6px; font-size: 0.75rem; color: var(--gray-500); }
.legend-dot { width: 12px; height: 12px; border-radius: 3px; border: 2px solid; }

/* =============================================
   RESULT PAGE
   ============================================= */
.result-container { max-width: 750px; margin: 0 auto; padding: 40px 20px 60px; }
.result-card {
  background: var(--white); border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl); overflow: hidden;
}
.result-hero {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  padding: 40px; text-align: center; color: white;
}
.result-score-circle {
  width: 120px; height: 120px;
  background: rgba(255,255,255,0.15); border-radius: 50%;
  margin: 0 auto 20px; display: flex; flex-direction: column;
  align-items: center; justify-content: center; border: 4px solid rgba(255,255,255,0.3);
  backdrop-filter: blur(10px);
}
.result-score-circle .score-num { font-size: 2.2rem; font-weight: 800; line-height: 1; }
.result-score-circle .score-pct { font-size: 0.75rem; opacity: 0.8; }
.result-hero h2 { font-size: 1.5rem; font-weight: 800; margin-bottom: 8px; }
.result-hero p { opacity: 0.8; font-size: 0.9rem; }
.result-grade {
  display: inline-block; padding: 6px 20px;
  background: rgba(255,255,255,0.2); border-radius: 50px;
  font-weight: 700; font-size: 0.9rem; margin-top: 12px;
}

.result-details { padding: 32px; }
.result-stats {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 28px;
}
.result-stat {
  text-align: center; padding: 16px; border-radius: var(--radius-md);
  border: 2px solid var(--gray-200);
}
.result-stat .rs-val { font-size: 1.8rem; font-weight: 800; line-height: 1; }
.result-stat .rs-lbl { font-size: 0.75rem; color: var(--gray-500); font-weight: 600; margin-top: 4px; text-transform: uppercase; letter-spacing: 0.5px; }
.rs-correct { border-color: rgba(16,185,129,0.3); }
.rs-correct .rs-val { color: var(--success); }
.rs-wrong { border-color: rgba(239,68,68,0.3); }
.rs-wrong .rs-val { color: var(--danger); }
.rs-skip { border-color: rgba(245,158,11,0.3); }
.rs-skip .rs-val { color: var(--warning); }

.result-info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 28px; }
.ri-item { display: flex; flex-direction: column; gap: 4px; padding: 14px; background: var(--gray-50); border-radius: var(--radius-sm); }
.ri-label { font-size: 0.72rem; color: var(--gray-400); text-transform: uppercase; letter-spacing: 0.5px; font-weight: 600; }
.ri-val { font-size: 0.95rem; font-weight: 700; color: var(--dark); }

.result-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.btn-result-primary {
  flex: 1; padding: 14px; background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white; border: none; border-radius: var(--radius-sm);
  font-size: 0.9rem; font-weight: 700; cursor: pointer; transition: var(--transition);
  box-shadow: 0 4px 15px rgba(79,70,229,0.3); display: flex; align-items: center; justify-content: center; gap: 8px;
}
.btn-result-primary:hover { transform: translateY(-2px); }
.btn-result-secondary {
  flex: 1; padding: 14px; background: var(--gray-100);
  color: var(--gray-700); border: 2px solid var(--gray-200); border-radius: var(--radius-sm);
  font-size: 0.9rem; font-weight: 700; cursor: pointer; transition: var(--transition);
  display: flex; align-items: center; justify-content: center; gap: 8px;
}
.btn-result-secondary:hover { background: var(--gray-200); }

/* =============================================
   LEADERBOARD
   ============================================= */
.leaderboard-table { width: 100%; border-collapse: collapse; }
.leaderboard-table th {
  padding: 12px 16px; text-align: left;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white; font-size: 0.8rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px;
}
.leaderboard-table th:first-child { border-radius: var(--radius-sm) 0 0 0; }
.leaderboard-table th:last-child { border-radius: 0 var(--radius-sm) 0 0; }
.leaderboard-table td { padding: 14px 16px; border-bottom: 1px solid var(--gray-100); font-size: 0.88rem; }
.leaderboard-table tr:hover td { background: rgba(79,70,229,0.03); }
.rank-badge {
  width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 0.85rem;
}
.rank-1 { background: linear-gradient(135deg, #fbbf24, #f59e0b); color: white; }
.rank-2 { background: linear-gradient(135deg, #94a3b8, #64748b); color: white; }
.rank-3 { background: linear-gradient(135deg, #cd7f32, #b45309); color: white; }
.rank-other { background: var(--gray-100); color: var(--gray-600); }

/* =============================================
   DASHBOARD
   ============================================= */
.dashboard-layout { display: grid; grid-template-columns: 280px 1fr; gap: 24px; max-width: 1280px; margin: 0 auto; padding: 30px 20px; }
.sidebar {
  background: var(--white); border-radius: var(--radius-lg); padding: 24px;
  box-shadow: var(--shadow-sm); border: 1px solid var(--gray-200); height: fit-content; position: sticky; top: 80px;
}
.sidebar-profile { text-align: center; margin-bottom: 24px; padding-bottom: 24px; border-bottom: 1px solid var(--gray-100); }
.sidebar-avatar {
  width: 72px; height: 72px; background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-radius: 50%; margin: 0 auto 12px; display: flex; align-items: center; justify-content: center;
  font-size: 1.8rem; font-weight: 800; color: white;
}
.sidebar-name { font-size: 1.05rem; font-weight: 700; color: var(--dark); }
.sidebar-email { font-size: 0.78rem; color: var(--gray-400); margin-top: 4px; }
.sidebar-class { font-size: 0.78rem; font-weight: 600; color: var(--primary); background: rgba(79,70,229,0.08); border-radius: 50px; padding: 4px 12px; display: inline-block; margin-top: 8px; }
.sidebar-nav { display: flex; flex-direction: column; gap: 4px; }
.sidebar-nav a {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; border-radius: var(--radius-sm);
  font-size: 0.875rem; font-weight: 600; color: var(--gray-600); transition: var(--transition);
}
.sidebar-nav a:hover, .sidebar-nav a.active { background: rgba(79,70,229,0.08); color: var(--primary); }
.sidebar-nav a i { width: 20px; text-align: center; }

.dashboard-main {}
.dash-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; margin-bottom: 28px; }
.dash-card {
  background: var(--white); border-radius: var(--radius-md); padding: 20px;
  box-shadow: var(--shadow-sm); border: 1px solid var(--gray-200);
}
.dash-card .dc-icon {
  width: 44px; height: 44px; border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem; color: white; margin-bottom: 12px;
}
.dc-1 .dc-icon { background: linear-gradient(135deg, var(--primary), var(--secondary)); }
.dc-2 .dc-icon { background: linear-gradient(135deg, var(--success), #059669); }
.dc-3 .dc-icon { background: linear-gradient(135deg, var(--warning), #d97706); }
.dc-4 .dc-icon { background: linear-gradient(135deg, var(--accent), #0891b2); }
.dash-card .dc-val { font-size: 1.8rem; font-weight: 800; color: var(--dark); line-height: 1; }
.dash-card .dc-lbl { font-size: 0.78rem; color: var(--gray-500); font-weight: 500; margin-top: 4px; }

/* =============================================
   AUTH PAGES (Login / Signup)
   ============================================= */
.auth-page {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #1e1b4b 0%, #312e81 50%, #4c1d95 100%);
  padding: 20px;
}
.auth-card {
  background: var(--white); border-radius: var(--radius-xl);
  padding: 40px; width: 100%; max-width: 460px;
  box-shadow: var(--shadow-xl);
}
.auth-logo { text-align: center; margin-bottom: 32px; }
.auth-logo a { font-size: 1.8rem; font-weight: 800; color: var(--primary); }
.auth-logo span.exam { color: var(--secondary); }
.auth-logo p { font-size: 0.85rem; color: var(--gray-500); margin-top: 6px; }
.auth-title { font-size: 1.5rem; font-weight: 800; color: var(--dark); margin-bottom: 6px; }
.auth-subtitle { font-size: 0.875rem; color: var(--gray-500); margin-bottom: 28px; }

.form-group { margin-bottom: 18px; }
.form-group label {
  display: block; font-size: 0.82rem; font-weight: 700; color: var(--gray-700);
  margin-bottom: 6px; text-transform: uppercase; letter-spacing: 0.3px;
}
.form-group input,
.form-group select {
  width: 100%; padding: 12px 16px;
  border: 2px solid var(--gray-200); border-radius: var(--radius-sm);
  font-size: 0.9rem; color: var(--gray-800); transition: var(--transition);
}
.form-group input:focus,
.form-group select:focus {
  outline: none; border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(79,70,229,0.1);
}
.form-group .input-wrapper { position: relative; }
.form-group .input-wrapper input { padding-left: 44px; }
.form-group .input-icon {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  color: var(--gray-400); font-size: 0.9rem;
}
.btn-auth {
  width: 100%; padding: 14px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white; border: none; border-radius: var(--radius-sm);
  font-size: 1rem; font-weight: 700; cursor: pointer; transition: var(--transition);
  box-shadow: 0 4px 15px rgba(79,70,229,0.3); margin-top: 8px;
}
.btn-auth:hover { transform: translateY(-2px); box-shadow: 0 8px 25px rgba(79,70,229,0.4); }
.auth-divider { text-align: center; margin: 20px 0; position: relative; }
.auth-divider::before {
  content: ''; position: absolute; top: 50%; left: 0; right: 0; height: 1px; background: var(--gray-200);
}
.auth-divider span { background: white; padding: 0 14px; font-size: 0.8rem; color: var(--gray-400); position: relative; }
.auth-footer { text-align: center; margin-top: 24px; font-size: 0.875rem; color: var(--gray-500); }
.auth-footer a { color: var(--primary); font-weight: 700; }

/* =============================================
   FOOTER
   ============================================= */
.footer { background: var(--dark); color: rgba(255,255,255,0.8); padding: 60px 20px 0; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; max-width: 1280px; margin: 0 auto; padding-bottom: 48px; }
.footer-brand {}
.footer-logo { font-size: 1.5rem; font-weight: 800; margin-bottom: 12px; }
.footer-logo span.beat { color: var(--primary-light); }
.footer-logo span.exam { color: var(--accent); }
.footer-desc { font-size: 0.85rem; line-height: 1.7; opacity: 0.7; max-width: 280px; margin-bottom: 20px; }
.footer-social { display: flex; gap: 10px; }
.social-btn {
  width: 38px; height: 38px; border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.1); display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,0.7); transition: var(--transition);
}
.social-btn:hover { background: var(--primary); color: white; transform: translateY(-3px); }
.footer-col h4 { font-size: 0.9rem; font-weight: 700; color: white; margin-bottom: 16px; padding-bottom: 8px; border-bottom: 2px solid rgba(79,70,229,0.4); }
.footer-col ul { display: flex; flex-direction: column; gap: 10px; }
.footer-col ul li a { font-size: 0.83rem; opacity: 0.7; transition: var(--transition); }
.footer-col ul li a:hover { opacity: 1; color: var(--primary-light); padding-left: 4px; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding: 20px; text-align: center;
  font-size: 0.8rem; opacity: 0.5; max-width: 1280px; margin: 0 auto;
}

/* =============================================
   LEGAL PAGES
   ============================================= */
.legal-page-hero { background: linear-gradient(135deg, var(--dark), var(--dark2)); padding: 60px 20px; text-align: center; }
.legal-page-hero h1 { font-size: 2rem; font-weight: 800; color: white; margin-bottom: 8px; }
.legal-page-hero p { color: rgba(255,255,255,0.7); }
.legal-container { max-width: 860px; margin: 0 auto; padding: 50px 20px 70px; }
.legal-card { background: white; border-radius: var(--radius-lg); padding: 40px; box-shadow: var(--shadow-md); border: 1px solid var(--gray-200); }
.legal-card h2 { font-size: 1.2rem; font-weight: 800; color: var(--dark); margin: 28px 0 12px; padding-bottom: 8px; border-bottom: 2px solid var(--gray-200); }
.legal-card h2:first-child { margin-top: 0; }
.legal-card p { font-size: 0.9rem; line-height: 1.8; color: var(--gray-600); margin-bottom: 12px; }
.legal-card ul { padding-left: 20px; margin-bottom: 12px; }
.legal-card ul li { font-size: 0.9rem; line-height: 1.8; color: var(--gray-600); margin-bottom: 6px; }
.legal-updated { font-size: 0.8rem; color: var(--gray-400); margin-bottom: 24px; }

/* =============================================
   CONTACT PAGE
   ============================================= */
.contact-grid { display: grid; grid-template-columns: 1fr 1.4fr; gap: 32px; }
.contact-info { display: flex; flex-direction: column; gap: 16px; }
.contact-item {
  display: flex; gap: 16px; align-items: flex-start;
  background: white; padding: 20px; border-radius: var(--radius-md);
  border: 1px solid var(--gray-200); box-shadow: var(--shadow-sm);
}
.contact-item .ci-icon {
  width: 44px; height: 44px; flex-shrink: 0;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center;
  color: white; font-size: 1rem;
}
.contact-item h4 { font-size: 0.9rem; font-weight: 700; color: var(--dark); margin-bottom: 4px; }
.contact-item p { font-size: 0.83rem; color: var(--gray-500); }
.contact-form { background: white; border-radius: var(--radius-lg); padding: 32px; box-shadow: var(--shadow-md); border: 1px solid var(--gray-200); }
.contact-form h3 { font-size: 1.2rem; font-weight: 800; color: var(--dark); margin-bottom: 24px; }
.contact-form textarea {
  width: 100%; padding: 12px 16px; border: 2px solid var(--gray-200);
  border-radius: var(--radius-sm); font-size: 0.9rem; color: var(--gray-800);
  transition: var(--transition); resize: vertical; min-height: 120px; font-family: var(--font-main);
}
.contact-form textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(79,70,229,0.1); }
.btn-contact {
  padding: 14px 32px; background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white; border: none; border-radius: var(--radius-sm);
  font-size: 0.95rem; font-weight: 700; cursor: pointer; transition: var(--transition);
  box-shadow: 0 4px 15px rgba(79,70,229,0.3);
}
.btn-contact:hover { transform: translateY(-2px); box-shadow: 0 8px 25px rgba(79,70,229,0.4); }

/* =============================================
   ABOUT PAGE
   ============================================= */
.about-mission { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; margin-bottom: 60px; }
.about-text h2 { font-size: 1.8rem; font-weight: 800; color: var(--dark); margin-bottom: 16px; }
.about-text h2 span { color: var(--primary); }
.about-text p { font-size: 0.95rem; line-height: 1.8; color: var(--gray-600); margin-bottom: 12px; }
.about-visual {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-radius: var(--radius-xl); padding: 40px; color: white; text-align: center;
}
.about-visual .av-num { font-size: 3rem; font-weight: 800; line-height: 1; }
.about-visual .av-lbl { font-size: 0.9rem; opacity: 0.8; margin-top: 6px; }
.about-stats-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.about-stat-box { background: rgba(255,255,255,0.15); border-radius: var(--radius-md); padding: 20px; backdrop-filter: blur(10px); }

.team-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 20px; }
.team-card { background: white; border-radius: var(--radius-lg); padding: 28px 20px; text-align: center; border: 1px solid var(--gray-200); box-shadow: var(--shadow-sm); transition: var(--transition); }
.team-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.team-avatar { width: 64px; height: 64px; border-radius: 50%; background: linear-gradient(135deg, var(--primary), var(--secondary)); margin: 0 auto 14px; display: flex; align-items: center; justify-content: center; font-size: 1.6rem; font-weight: 800; color: white; }
.team-name { font-size: 1rem; font-weight: 700; color: var(--dark); }
.team-role { font-size: 0.8rem; color: var(--primary); font-weight: 600; margin-top: 4px; }

/* =============================================
   UTILITY CLASSES
   ============================================= */
.text-primary { color: var(--primary); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-warning { color: var(--warning); }
.text-center { text-align: center; }
.text-muted { color: var(--gray-500); }
.fw-700 { font-weight: 700; }
.fw-800 { font-weight: 800; }
.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.mb-32 { margin-bottom: 32px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.hidden { display: none !important; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }

/* Alert / Toast */
.alert { padding: 12px 18px; border-radius: var(--radius-sm); font-size: 0.875rem; font-weight: 600; margin-bottom: 16px; display: flex; align-items: center; gap: 10px; }
.alert-success { background: rgba(16,185,129,0.1); color: var(--success); border: 1px solid rgba(16,185,129,0.3); }
.alert-error { background: rgba(239,68,68,0.1); color: var(--danger); border: 1px solid rgba(239,68,68,0.3); }
.alert-info { background: rgba(79,70,229,0.1); color: var(--primary); border: 1px solid rgba(79,70,229,0.2); }

.toast {
  position: fixed; bottom: 24px; right: 24px; z-index: 9999;
  background: var(--dark); color: white; padding: 14px 22px;
  border-radius: var(--radius-md); box-shadow: var(--shadow-xl);
  font-size: 0.9rem; font-weight: 600;
  transform: translateY(100px); opacity: 0; transition: var(--transition);
  display: flex; align-items: center; gap: 10px;
  max-width: 360px;
}
.toast.show { transform: translateY(0); opacity: 1; }
.toast-success { border-left: 4px solid var(--success); }
.toast-error { border-left: 4px solid var(--danger); }

/* Loading */
.loading { display: flex; align-items: center; justify-content: center; padding: 60px 20px; flex-direction: column; gap: 16px; }
.spinner { width: 40px; height: 40px; border: 4px solid var(--gray-200); border-top-color: var(--primary); border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Breadcrumb */
.breadcrumb { display: flex; align-items: center; gap: 8px; font-size: 0.82rem; color: var(--gray-400); margin-bottom: 20px; flex-wrap: wrap; }
.breadcrumb a { color: var(--primary); font-weight: 600; }
.breadcrumb span { color: var(--gray-400); }

/* Empty State */
.empty-state { text-align: center; padding: 60px 20px; }
.empty-state i { font-size: 3rem; color: var(--gray-300); margin-bottom: 16px; }
.empty-state h3 { font-size: 1.1rem; font-weight: 700; color: var(--gray-600); margin-bottom: 8px; }
.empty-state p { font-size: 0.875rem; color: var(--gray-400); }

/* =============================================
   RESPONSIVE - MOBILE FIRST
   ============================================= */
@media (max-width: 1024px) {
  .finder-grid { grid-template-columns: 1fr 1fr; }
  .btn-find-test { grid-column: span 2; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .dashboard-layout { grid-template-columns: 1fr; }
  .sidebar { position: static; }
}

@media (max-width: 768px) {
  .nav-links, .nav-auth { display: none; }
  .nav-hamburger { display: flex; }
  .nav-links.mobile-open {
    display: flex; flex-direction: column; align-items: flex-start;
    position: absolute; top: 68px; left: 0; right: 0;
    background: white; padding: 16px; box-shadow: var(--shadow-lg);
    z-index: 999; gap: 4px;
  }
  .nav-links.mobile-open .nav-auth { display: flex; flex-direction: column; width: 100%; padding-top: 12px; border-top: 1px solid var(--gray-100); }
  .nav-links.mobile-open > li { width: 100%; }
  .nav-links.mobile-open > li > a { width: 100%; }
  .dropdown-menu { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: none; background: var(--gray-50); margin-top: 4px; padding-left: 16px; }
  
  .hero { padding: 60px 20px 80px; }
  .hero-stats { gap: 24px; }
  .finder-card { padding: 24px 20px; }
  .finder-grid { grid-template-columns: 1fr; }
  .btn-find-test { grid-column: auto; }
  .classes-grid { grid-template-columns: repeat(3, 1fr); }
  .subjects-grid { grid-template-columns: repeat(2, 1fr); }
  .tests-grid { grid-template-columns: 1fr; }
  .about-mission { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .result-stats { grid-template-columns: 1fr 1fr 1fr; }
  .result-info-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .quiz-header { flex-direction: column; gap: 16px; }
  .quiz-footer { flex-direction: column; }
  .quiz-nav-btns { width: 100%; justify-content: space-between; }
}

@media (max-width: 480px) {
  .classes-grid { grid-template-columns: repeat(2, 1fr); }
  .hero h1 { font-size: 1.75rem; }
  .result-stats { grid-template-columns: 1fr; }
  .auth-card { padding: 28px 20px; }
  .legal-card { padding: 24px 16px; }
}

/* =============================================
   ANIMATIONS
   ============================================= */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
.animate-in { animation: fadeInUp 0.5s ease forwards; }
.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
