/* ==========================================================================
   TOPPER BITIYA V/S TOPPER BHAIYA - OFFICIAL MASTER STYLESHEET
   National Scholarship & Talent Search Examination 2026 (www.topperbitiya.com)
   ========================================================================== */

:root {
  /* Brand Primary Colors */
  --primary-navy: #0a192f;
  --primary-navy-light: #112240;
  --primary-navy-dark: #020c1b;
  --primary-blue: #1e3a8a;
  
  /* Indian National Accent Colors */
  --saffron: #f97316;
  --saffron-hover: #ea580c;
  --saffron-dark: #c2410c;
  --saffron-light: #fff7ed;
  --saffron-border: #fed7aa;
  
  --emerald: #10b981;
  --emerald-hover: #059669;
  --emerald-dark: #047857;
  --emerald-light: #ecfdf5;
  --emerald-border: #a7f3d0;
  
  --gold: #f59e0b;
  --gold-dark: #b45309;
  --gold-light: #fef3c7;
  --gold-gradient: linear-gradient(135deg, #f59e0b 0%, #d97706 50%, #b45309 100%);
  
  /* Dual Fighter Colors */
  --bitiya-pink: #ec4899;
  --bitiya-pink-dark: #be185d;
  --bitiya-pink-light: #fdf2f8;
  --bhaiya-blue: #06b6d4;
  --bhaiya-blue-dark: #0e7490;
  --bhaiya-blue-light: #ecfeff;
  
  --crimson: #e11d48;
  --crimson-light: #ffe4e6;

  /* Theme Surfaces (Light Mode Default) */
  --bg-page: #f8fafc;
  --bg-surface: #ffffff;
  --bg-subtle: #f1f5f9;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --border-color: #e2e8f0;
  
  /* Typography */
  --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-serif: 'Cinzel', Georgia, serif;

  /* Elevation Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  --shadow-glow-saffron: 0 0 25px rgba(249, 115, 22, 0.35);

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;
  --transition: 200ms cubic-bezier(0.16, 1, 0.3, 1);
}

[data-theme="dark"] {
  --bg-page: #060c18;
  --bg-surface: #0b1526;
  --bg-subtle: #112240;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --border-color: #1e293b;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.6);
  --saffron-light: rgba(249, 115, 22, 0.12);
  --saffron-border: rgba(249, 115, 22, 0.3);
  --emerald-light: rgba(16, 185, 129, 0.12);
  --emerald-border: rgba(16, 185, 129, 0.3);
  --bitiya-pink-light: rgba(236, 72, 153, 0.12);
  --bhaiya-blue-light: rgba(6, 182, 212, 0.12);
  --gold-light: rgba(245, 158, 11, 0.15);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-page);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
  transition: background-color var(--transition), color var(--transition);
}

a {
  color: inherit;
  text-decoration: none;
}

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
}

button {
  cursor: pointer;
  border: none;
  outline: none;
}

.container {
  max-width: 1240px;
  margin-inline: auto;
  padding-inline: 1.25rem;
}

/* ================= 1. NOTICE & TICKER BAR ================= */
.top-notice-bar {
  background: linear-gradient(90deg, #b45309 0%, #ea580c 50%, #047857 100%);
  color: #ffffff;
  padding: 0.45rem 0;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.helpline-links {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.helpline-item {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.news-ticker-bar {
  background-color: var(--primary-navy);
  color: #f1f5f9;
  padding: 0.45rem 1rem;
  display: flex;
  align-items: center;
  font-size: 0.8125rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  overflow: hidden;
}

.ticker-label {
  background: var(--saffron);
  color: #ffffff;
  padding: 0.15rem 0.6rem;
  border-radius: var(--radius-sm);
  font-weight: 800;
  font-size: 0.6875rem;
  letter-spacing: 0.05em;
  margin-right: 0.75rem;
  white-space: nowrap;
  flex-shrink: 0;
}

.ticker-marquee {
  white-space: nowrap;
  animation: marquee 30s linear infinite;
  font-weight: 500;
}

@keyframes marquee {
  0% { transform: translateX(100%); }
  100% { transform: translateX(-100%); }
}

/* ================= 2. SITE HEADER ================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: var(--bg-surface);
  border-bottom: 1.5px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 0.75rem;
  gap: 1rem;
}

.brand-wrapper {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}

.brand-emblem {
  width: 46px;
  height: 46px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, #ea580c 0%, #ec4899 50%, #06b6d4 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  box-shadow: 0 4px 12px rgba(234, 88, 12, 0.3);
}

.brand-text-block {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--text-main);
}

.brand-title .bitiya-text { color: var(--bitiya-pink); }
.brand-title .vs-tag {
  font-size: 0.875rem;
  color: var(--gold-dark);
  margin-inline: 0.25rem;
  font-style: italic;
}
.brand-title .bhaiya-text { color: var(--bhaiya-blue); }

.brand-subtitle {
  font-size: 0.6875rem;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  list-style: none;
}

.nav-link-btn {
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-muted);
  transition: all var(--transition);
}

.nav-link-btn:hover, .nav-link-btn.active {
  color: var(--saffron-dark);
  background-color: var(--saffron-light);
}

.header-action-group {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

/* ================= 3. BUTTONS ================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1.25rem;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 0.9375rem;
  transition: all var(--transition);
  text-decoration: none;
  white-space: nowrap;
}

.btn-sm {
  padding: 0.45rem 0.85rem;
  font-size: 0.8125rem;
  border-radius: var(--radius-sm);
}

.btn-lg {
  padding: 0.85rem 1.85rem;
  font-size: 1.05rem;
  border-radius: var(--radius-lg);
}

.btn-saffron {
  background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(234, 88, 12, 0.35);
}

.btn-saffron:hover {
  background: linear-gradient(135deg, #ea580c 0%, #c2410c 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(234, 88, 12, 0.45);
}

.btn-emerald {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35);
}

.btn-emerald:hover {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  transform: translateY(-2px);
}

.btn-bitiya {
  background: linear-gradient(135deg, #ec4899 0%, #db2777 100%);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(236, 72, 153, 0.35);
}

.btn-bhaiya {
  background: linear-gradient(135deg, #06b6d4 0%, #0284c7 100%);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(6, 182, 212, 0.35);
}

.btn-outline {
  background-color: transparent;
  border: 1.5px solid var(--border-color);
  color: var(--text-main);
}

.btn-outline:hover {
  background-color: var(--bg-subtle);
  border-color: var(--text-muted);
}

.btn-navy {
  background: var(--primary-navy);
  color: #ffffff;
}

/* ================= 4. HERO SECTION (BATTLE ARENA) ================= */
.vs-battle-hero {
  position: relative;
  background: linear-gradient(180deg, rgba(6, 12, 24, 0.88) 0%, rgba(10, 25, 47, 0.92) 100%), url('../hero-battle-3d.jpg') center top / cover no-repeat;
  color: #ffffff;
  padding-block: 3.5rem 4rem;
  overflow: hidden;
  border-bottom: 2px solid rgba(245, 158, 11, 0.3);
}

.battle-banner-container {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 1.5rem;
  align-items: stretch;
  margin-top: 2rem;
}

.battle-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1.5px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-xl);
  padding: 2.25rem 1.75rem;
  backdrop-filter: blur(12px);
  position: relative;
  overflow: hidden;
  transition: transform var(--transition), border-color var(--transition);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.battle-card:hover {
  transform: translateY(-6px);
}

.battle-card.bitiya-side {
  border-color: rgba(236, 72, 153, 0.4);
  box-shadow: inset 0 0 40px rgba(236, 72, 153, 0.1);
}

.battle-card.bhaiya-side {
  border-color: rgba(6, 182, 212, 0.4);
  box-shadow: inset 0 0 40px rgba(6, 182, 212, 0.1);
}

.battle-avatar-badge {
  font-size: 3.5rem;
  margin-bottom: 0.5rem;
  display: inline-block;
}

.battle-stat-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
  margin-bottom: 0.75rem;
  background: rgba(255, 255, 255, 0.1);
}

.battle-title {
  font-family: var(--font-heading);
  font-size: 1.75rem;
  font-weight: 900;
  margin-bottom: 0.5rem;
  line-height: 1.2;
}

.battle-desc {
  font-size: 0.9375rem;
  color: #cbd5e1;
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

/* VS Center Node */
.vs-center-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  padding-inline: 1rem;
}

.vs-fire-circle {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: var(--gold-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-size: 1.75rem;
  font-weight: 900;
  color: #ffffff;
  box-shadow: 0 0 35px rgba(245, 158, 11, 0.8), inset 0 0 15px rgba(255, 255, 255, 0.4);
  animation: pulseClash 2s infinite ease-in-out;
}

@keyframes pulseClash {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); box-shadow: 0 0 45px rgba(245, 158, 11, 1); }
}

.vs-clash-text {
  font-size: 0.8125rem;
  font-weight: 800;
  letter-spacing: 0.15em;
  color: #fbbf24;
  margin-top: 0.75rem;
  text-transform: uppercase;
}

/* Live Countdown Box */
.countdown-box {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  background: rgba(0, 0, 0, 0.45);
  border: 1.5px solid rgba(245, 158, 11, 0.5);
  border-radius: var(--radius-lg);
  padding: 0.65rem 1.25rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.countdown-unit {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.countdown-number {
  font-family: var(--font-heading);
  font-size: 1.65rem;
  font-weight: 900;
  color: #fbbf24;
  line-height: 1;
}

.countdown-label {
  font-size: 0.625rem;
  font-weight: 700;
  color: #cbd5e1;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.countdown-colon {
  font-size: 1.5rem;
  font-weight: 900;
  color: #f59e0b;
}

/* ================= 5. METRICS STRIP ================= */
.metrics-strip {
  background: var(--bg-surface);
  border-bottom: 1.5px solid var(--border-color);
  padding-block: 1.75rem;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  text-align: center;
}

.metric-item {
  border-right: 1px solid var(--border-color);
  padding-inline: 1rem;
}

.metric-item:last-child {
  border-right: none;
}

.metric-value {
  font-family: var(--font-heading);
  font-size: 1.85rem;
  font-weight: 900;
  color: var(--primary-navy);
  line-height: 1.1;
}

[data-theme="dark"] .metric-value {
  color: #38bdf8;
}

.metric-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-top: 0.35rem;
}

/* ================= 6. SECTION COMMON ================= */
.slabs-section {
  padding-block: 4rem;
}

.section-header-center {
  text-align: center;
  max-width: 780px;
  margin-inline: auto;
  margin-bottom: 2.75rem;
}

.section-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
  background: var(--saffron-light);
  color: var(--saffron-dark);
  border: 1px solid var(--saffron-border);
  margin-bottom: 0.5rem;
}

.section-title {
  font-family: var(--font-heading);
  font-size: 2.15rem;
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: 0.75rem;
}

/* ================= 7. HOW EXAM WORKS / PROCESS STEPS (Item: Exam Kaise Hoga) ================= */
.process-steps-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

.process-step-card {
  background: var(--bg-surface);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.75rem 1.25rem;
  position: relative;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
}

.process-step-card:hover {
  transform: translateY(-4px);
  border-color: var(--saffron);
  box-shadow: var(--shadow-md);
}

.process-step-num {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--saffron);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-weight: 900;
  font-size: 1.2rem;
  margin-bottom: 1rem;
}

/* ================= 8. TESTIMONIALS (Item: Student Testimonials) ================= */
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.testimonial-card {
  background: var(--bg-surface);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all var(--transition);
}

.testimonial-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: #38bdf8;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1.25rem;
  border-top: 1px solid var(--border-color);
  padding-top: 0.75rem;
}

/* ================= 9. SPONSORS / PARTNERS (Item: Sponsors/Partners) ================= */
.sponsors-strip {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.sponsor-badge {
  background: var(--bg-surface);
  border: 1.5px solid var(--border-color);
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-weight: 800;
  font-size: 0.9375rem;
  box-shadow: var(--shadow-sm);
  color: var(--text-main);
}

/* Slabs Grid */
.slabs-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.slab-card {
  background: var(--bg-surface);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all var(--transition);
  position: relative;
}

.slab-card:hover {
  transform: translateY(-4px);
  border-color: var(--saffron);
  box-shadow: var(--shadow-lg);
}

.slab-card.champion-slab {
  grid-column: span 3;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.1) 0%, rgba(234, 88, 12, 0.15) 100%);
  border: 2px solid var(--gold);
}

.slab-rank-badge {
  display: inline-block;
  font-size: 0.8125rem;
  font-weight: 800;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
}

.schedule-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
}

.schedule-card {
  background: var(--bg-surface);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all var(--transition);
}

.schedule-card:hover {
  transform: translateY(-4px);
  border-color: var(--saffron);
  box-shadow: var(--shadow-lg);
}

/* Filter Tabs & Dropdowns (Phase 4) */
.filter-tabs-row {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2rem;
}

.filter-tab-btn {
  background: var(--bg-surface);
  border: 1.5px solid var(--border-color);
  color: var(--text-muted);
  font-weight: 700;
  font-size: 0.875rem;
  padding: 0.45rem 1rem;
  border-radius: var(--radius-full);
  transition: all var(--transition);
}

.filter-tab-btn:hover, .filter-tab-btn.active {
  background-color: var(--saffron);
  border-color: var(--saffron);
  color: white;
}

.leaderboard-filters-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  background: var(--bg-surface);
  border: 1.5px solid var(--border-color);
  padding: 1rem 1.25rem;
  border-radius: var(--radius-lg);
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.toppers-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
}

.topper-badge-card {
  background: var(--bg-surface);
  border: 2px solid #f59e0b;
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  text-align: center;
  box-shadow: var(--shadow-md);
  transition: all var(--transition);
}

.topper-badge-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

/* FAQs */
.faq-accordion-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.faq-accordion-item {
  background: var(--bg-surface);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.faq-question-head {
  padding: 1.15rem 1.5rem;
  font-weight: 700;
  font-size: 1.05rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  user-select: none;
}

.faq-answer-body {
  padding: 0 1.5rem 1.25rem;
  color: var(--text-muted);
  font-size: 0.9375rem;
  line-height: 1.7;
}

/* Modals */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background-color: rgba(2, 12, 27, 0.75);
  backdrop-filter: blur(8px);
  z-index: 150;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
}

.modal-backdrop.active {
  display: flex !important;
}

.modal-box {
  background-color: var(--bg-surface);
  color: var(--text-main);
  border-radius: var(--radius-xl);
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-xl);
  border: 1.5px solid var(--border-color);
  animation: modalScale 200ms ease-out;
}

@keyframes modalScale {
  from { transform: scale(0.95); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.75rem;
  border-bottom: 1.5px solid var(--border-color);
}

.modal-close-icon {
  background-color: var(--bg-subtle);
  color: var(--text-main);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  transition: all var(--transition);
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
}

.form-input {
  width: 100%;
  padding: 0.65rem 0.85rem;
  border: 1.5px solid var(--border-color);
  background-color: var(--bg-page);
  color: var(--text-main);
  border-radius: var(--radius-md);
  font-size: 0.9375rem;
  outline: none;
  transition: border-color var(--transition);
}

.form-input:focus {
  border-color: var(--saffron);
}

/* OTP Digits */
.otp-input-row {
  display: flex;
  gap: 0.65rem;
  justify-content: center;
  margin-block: 1.25rem;
}

.otp-digit {
  width: 48px;
  height: 54px;
  text-align: center;
  font-size: 1.5rem;
  font-weight: 900;
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  color: var(--text-main);
}

.otp-digit:focus {
  border-color: var(--saffron);
  outline: none;
  box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.2);
}

/* Dashboard Container */
.dashboard-container {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: 520px;
}

.dashboard-sidebar {
  background: var(--bg-subtle);
  border-right: 1.5px solid var(--border-color);
  padding: 1.25rem 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.dashboard-tab-btn {
  text-align: left;
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.875rem;
  color: var(--text-muted);
  background: transparent;
  transition: all var(--transition);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.dashboard-tab-btn:hover, .dashboard-tab-btn.active {
  background: var(--bg-surface);
  color: var(--saffron-dark);
  box-shadow: var(--shadow-sm);
}

.dashboard-main-content {
  padding: 1.75rem;
  overflow-y: auto;
}

/* 3D Battle Card */
.candidate-battle-card {
  width: 320px;
  margin: 0 auto;
  border-radius: var(--radius-xl);
  padding: 1.75rem;
  color: white;
  position: relative;
  overflow: hidden;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
  transform-style: preserve-3d;
  transition: transform 300ms ease;
}

.candidate-battle-card.bitiya {
  background: linear-gradient(135deg, #ec4899 0%, #be185d 100%);
  border: 2px solid #f472b6;
}

.candidate-battle-card.bhaiya {
  background: linear-gradient(135deg, #06b6d4 0%, #0369a1 100%);
  border: 2px solid #38bdf8;
}

/* Admit Card */
.admit-card-frame {
  border: 2px solid #0f172a;
  background: #ffffff;
  color: #0f172a;
  padding: 2rem;
  border-radius: var(--radius-md);
}

.admit-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 2px solid #0f172a;
  padding-bottom: 1rem;
  margin-bottom: 1.5rem;
}

.admit-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 1.5rem;
  align-items: center;
}

.admit-photo-box {
  width: 130px;
  height: 150px;
  border: 2px dashed #64748b;
  margin-left: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #f8fafc;
}

/* Certificate */
.certificate-frame {
  border: 12px double #b45309;
  background: #fffbeb;
  color: #0f172a;
  padding: 2.5rem 2rem;
  border-radius: var(--radius-lg);
  text-align: center;
  box-shadow: var(--shadow-lg);
}

.certificate-title {
  font-family: var(--font-serif);
  font-size: 1.85rem;
  font-weight: 900;
  color: #b45309;
  letter-spacing: 0.05em;
  margin-block: 0.5rem;
}

/* CBT Exam Arena Fullscreen */
.exam-arena-wrapper {
  background: #020c1b;
  color: #ffffff;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.exam-arena-header {
  background: #0a192f;
  border-bottom: 1.5px solid rgba(255, 255, 255, 0.1);
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.exam-timer-box {
  background: rgba(0, 0, 0, 0.4);
  border: 1.5px solid #10b981;
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-md);
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 900;
  color: #34d399;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.exam-timer-box.warning-yellow { border-color: #f59e0b; color: #fbbf24; }
.exam-timer-box.warning-red { border-color: #e11d48; color: #f87171; animation: flashRed 1s infinite; }

@keyframes flashRed {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.exam-main-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  flex: 1;
  overflow: hidden;
}

.exam-question-area {
  padding: 2rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.question-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 0.75rem;
}

.question-text {
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.exam-options-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.exam-option-label {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1.5px solid rgba(255, 255, 255, 0.15);
  padding: 1rem 1.25rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition);
}

.exam-option-label:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.3);
}

.exam-section-tabs {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
  background: rgba(255, 255, 255, 0.04);
  padding: 0.35rem;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.1);
  overflow-x: auto;
}

.exam-section-tab-btn {
  background: transparent;
  color: #94a3b8;
  padding: 0.45rem 0.85rem;
  border-radius: var(--radius-sm);
  font-size: 0.8125rem;
  font-weight: 700;
  white-space: nowrap;
  transition: all var(--transition);
}

.exam-section-tab-btn:hover, .exam-section-tab-btn.active {
  background: var(--saffron);
  color: white;
}

.notification-bell-btn {
  position: relative;
  background: var(--bg-surface);
  border: 1.5px solid var(--border-color);
  padding: 0.45rem 0.65rem;
  border-radius: var(--radius-md);
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
}

.notification-bell-btn:hover {
  background-color: var(--bg-subtle);
  border-color: var(--saffron);
}

.notification-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: var(--crimson);
  color: white;
  font-size: 0.625rem;
  font-weight: 900;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.palette-legend-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.65rem;
  font-size: 0.8125rem;
  margin-top: 1rem;
  background: rgba(255, 255, 255, 0.04);
  padding: 0.75rem;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.legend-dot {
  width: 16px;
  height: 16px;
  border-radius: 4px;
}

.exam-action-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 1.25rem;
  margin-top: 2rem;
}

.exam-proctor-sidebar {
  background: #090e17;
  border-left: 1.5px solid rgba(255, 255, 255, 0.1);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  overflow-y: auto;
}

.proctor-camera-hud {
  width: 100%;
  height: 150px;
  background: #000000;
  border-radius: var(--radius-md);
  border: 1.5px solid #10b981;
  position: relative;
  overflow: hidden;
}

.camera-video-feed {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ai-face-mesh-overlay {
  position: absolute;
  inset: 0;
  border: 1px dashed rgba(16, 185, 129, 0.6);
  pointer-events: none;
}

.proctor-status-tag {
  position: absolute;
  bottom: 6px;
  left: 6px;
  background: rgba(0, 0, 0, 0.7);
  color: #34d399;
  font-size: 0.6875rem;
  font-weight: 800;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
}

.proctor-metrics-list {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  padding: 0.75rem;
  font-size: 0.8125rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.proctor-device-hud {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: var(--radius-md);
  padding: 0.75rem;
  font-size: 0.75rem;
  color: #94a3b8;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.proctor-activity-log-box {
  background: #040914;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  padding: 0.65rem;
  max-height: 110px;
  overflow-y: auto;
  font-family: monospace;
  font-size: 0.6875rem;
  color: #a7f3d0;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.log-entry {
  line-height: 1.3;
}

.log-entry.warn {
  color: #fca5a5;
}

.exam-watermark {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-25deg);
  font-size: 3rem;
  font-weight: 900;
  color: rgba(255, 255, 255, 0.02);
  pointer-events: none;
  user-select: none;
  z-index: 1;
  white-space: nowrap;
}

.palette-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.5rem;
}

.palette-btn {
  aspect-ratio: 1;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.08);
  color: white;
  font-size: 0.875rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.palette-btn.current { border: 2px solid #f59e0b; }
.palette-btn.answered { background-color: var(--emerald-dark); }
.palette-btn.review { background-color: #8b5cf6; }

/* Admin UI Components (Phase 5) */
.admin-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.admin-kpi-card {
  background: var(--bg-surface);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.admin-table th {
  background: var(--bg-subtle);
  color: var(--text-muted);
  font-weight: 700;
  text-align: left;
  padding: 0.75rem 1rem;
  border-bottom: 1.5px solid var(--border-color);
}

.admin-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border-color);
}

.difficulty-badge {
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-size: 0.6875rem;
  font-weight: 800;
  text-transform: uppercase;
}

.difficulty-badge.easy { background: #dcfce7; color: #166534; }
.difficulty-badge.medium { background: #fef3c7; color: #92400e; }
.difficulty-badge.hard { background: #fee2e2; color: #991b1b; }

.pyq-tag {
  background: #f3e8ff;
  color: #6b21a8;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-size: 0.6875rem;
  font-weight: 800;
}

.solution-card {
  background: var(--bg-surface);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  margin-bottom: 1rem;
}

.solution-explanation-box {
  background: #f8fafc;
  border-left: 4px solid var(--emerald);
  padding: 0.85rem 1rem;
  border-radius: 4px;
  margin-top: 0.75rem;
  font-size: 0.875rem;
  color: #334155;
}

[data-theme="dark"] .solution-explanation-box {
  background: #0f172a;
  color: #cbd5e1;
}

/* Toast */
.toast-shelf {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 250;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.toast-msg {
  background-color: var(--primary-navy);
  color: white;
  padding: 0.85rem 1.25rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  font-size: 0.9375rem;
  font-weight: 600;
  border-left: 4px solid var(--saffron);
  animation: toastIn 200ms ease-out;
}

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

.toast-msg.success { border-left-color: var(--emerald); }
.toast-msg.violation { border-left-color: var(--crimson); background-color: #7f1d1d; }

/* Responsive Rules */
html, body {
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden !important;
}

.container, section, .page-section, .vs-battle-hero, .site-header, .top-notice-bar {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

/* ================= UNIVERSAL CROSS-DEVICE RESPONSIVE SYSTEM ================= */
/* 1. Ultra-Wide PC & Desktop Monitors (>= 1200px) */
@media (min-width: 1200px) {
  .container { max-width: 1240px; margin: 0 auto; }
}

/* 2. Laptops & Standard Desktops (993px to 1199px) */
@media (min-width: 993px) and (max-width: 1199px) {
  .container { max-width: 960px; }
  .nav-links { gap: 0.65rem; font-size: 0.8125rem; }
  .btn-sm { font-size: 0.8125rem; padding: 0.35rem 0.65rem; }
}

/* 3. Tablets & iPads (iPad Air, iPad Pro, iPad Mini, Android Tablets: 769px to 1024px) */
@media (max-width: 1024px) {
  .nav-links { display: none !important; }
}

@media (min-width: 769px) and (max-width: 992px) {
  .battle-banner-container { grid-template-columns: 1fr 1fr; gap: 1.25rem; }
  .vs-center-node { grid-column: span 2; margin-block: 0.5rem; }
  .schedule-grid { grid-template-columns: repeat(2, 1fr); }
  .slabs-grid { grid-template-columns: repeat(2, 1fr); }
  .slab-card.champion-slab { grid-column: span 2; }
  .exam-main-layout { grid-template-columns: 1fr; }
  .payment-wrapper { grid-template-columns: 1fr; }
  .dashboard-container { grid-template-columns: 1fr; }
  .metrics-grid { grid-template-columns: repeat(2, 1fr); }
  .admin-kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .toppers-grid { grid-template-columns: repeat(2, 1fr); }
  .process-steps-grid { grid-template-columns: repeat(2, 1fr); }
  .testimonials-grid { grid-template-columns: repeat(2, 1fr); }
  .modal-box { max-width: 90vw !important; }
}

/* 4. Android Mobiles & Apple iPhones (<= 768px) */
@media (max-width: 768px) {
  .hide-on-mobile { display: none !important; }
  .header-inner { flex-wrap: wrap; gap: 0.5rem; }
  .brand-title { font-size: 1.05rem; }
  .brand-subtitle { display: none; }
  .brand-emblem { width: 36px; height: 36px; font-size: 1.15rem; }
  .header-action-group { gap: 0.35rem; }
  .btn-sm { padding: 0.35rem 0.65rem; font-size: 0.75rem; }
  .battle-banner-container { grid-template-columns: 1fr !important; gap: 1.5rem; }
  .schedule-grid { grid-template-columns: 1fr !important; }
  .slabs-grid { grid-template-columns: 1fr !important; }
  .slab-card.champion-slab { grid-column: span 1 !important; }
  .vs-center-node { order: -1; margin-block: 1rem; }
  .exam-main-layout { grid-template-columns: 1fr !important; }
  .payment-wrapper { grid-template-columns: 1fr !important; }
  .dashboard-container { grid-template-columns: 1fr !important; }
  .metrics-grid { grid-template-columns: 1fr !important; }
  .admin-kpi-grid { grid-template-columns: 1fr !important; }
  .toppers-grid { grid-template-columns: 1fr !important; }
  .process-steps-grid { grid-template-columns: 1fr !important; }
  .testimonials-grid { grid-template-columns: 1fr !important; }
  .modal-backdrop { padding: 0.5rem; }
  .modal-box { width: 100% !important; max-width: 100% !important; margin: auto; border-radius: 14px; }
  
  /* Collapse inline CSS multi-column grids */
  [style*="grid-template-columns: repeat(4"],
  [style*="grid-template-columns: repeat(3"],
  [style*="grid-template-columns: 1.2fr 1fr"],
  [style*="grid-template-columns: 1fr 1fr 1fr 1fr"],
  [style*="grid-template-columns: 2fr 1fr 1fr 1.2fr"] {
    grid-template-columns: 1fr !important;
  }
}

/* 5. Compact Smartphones & iPhone SE (<= 390px) */
@media (max-width: 390px) {
  .brand-title { font-size: 0.95rem !important; }
  .btn { font-size: 0.8125rem !important; padding: 0.4rem 0.75rem !important; }
  .battle-avatar-badge { width: 60px !important; height: 60px !important; }
  .metric-value { font-size: 1.25rem !important; }
  .modal-head h3 { font-size: 1.05rem !important; }
}

/* ================= 22. MOBILE-FIRST & LOW-DATA STYLES ================= */

/* Low Data Mode (कम डेटा मोड - Save 80% Data) */
body.low-data-mode {
  background-image: none !important;
  transition: none !important;
}

body.low-data-mode * {
  animation: none !important;
  transition: none !important;
  box-shadow: none !important;
  text-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

body.low-data-mode .hero-banner,
body.low-data-mode .badge-glow,
body.low-data-mode .gradient-border {
  background: var(--bg-surface) !important;
  border: 1px solid var(--border-color) !important;
}

/* Large Ergonomic Touch Buttons for Mobile */
.mobile-touch-btn,
.btn-large-touch {
  min-height: 52px !important;
  font-size: 1.05rem !important;
  font-weight: 800 !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border-radius: var(--radius-md);
  padding: 0.85rem 1.5rem !important;
  touch-action: manipulation;
}

/* Mobile Bottom Navigation Bar (Android & iOS) */
.mobile-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 64px;
  background: var(--bg-surface);
  border-top: 1.5px solid var(--border-color);
  z-index: 1000;
  box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.08);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

@media (max-width: 768px) {
  .mobile-bottom-nav {
    display: flex;
    align-items: center;
    justify-content: space-around;
  }
  body {
    padding-bottom: 70px;
  }
}

.mobile-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  height: 100%;
  background: transparent;
  border: none;
  color: var(--text-muted);
  text-decoration: none;
  font-family: inherit;
  cursor: pointer;
  padding: 0.25rem;
  transition: color 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}

.mobile-nav-item:active,
.mobile-nav-item.active {
  color: var(--saffron);
}

.mobile-nav-icon {
  font-size: 1.35rem;
  line-height: 1;
  margin-bottom: 2px;
}

.mobile-nav-label {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: -0.2px;
}

/* Distraction-Free CBT Mode */
.distraction-free-cbt {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  z-index: 9999 !important;
  background: var(--bg-surface) !important;
  overflow-y: auto !important;
  padding: 1rem !important;
  padding-top: max(1rem, env(safe-area-inset-top)) !important;
  padding-bottom: max(1rem, env(safe-area-inset-bottom)) !important;
}

/* ================= APPLE iOS / SAFARI / WEBKIT DEDICATED OPTIMIZATIONS ================= */
@supports (-webkit-touch-callout: none) {
  /* iOS Safari specific rules */
  body {
    -webkit-font-smoothing: antialiased;
    -webkit-tap-highlight-color: transparent;
  }

  .site-header {
    padding-top: max(0.5rem, env(safe-area-inset-top));
  }

  .mobile-bottom-nav {
    padding-bottom: max(0.5rem, env(safe-area-inset-bottom));
    height: calc(60px + env(safe-area-inset-bottom, 0px));
  }

  /* Prevent auto-zoom on iOS input focus when tapping forms */
  @media screen and (max-width: 768px) {
    input, select, textarea, .form-input {
      font-size: 16px !important;
    }
  }

  /* Momentum smooth scrolling for iOS WebKit */
  .modal-box,
  .dashboard-container,
  .leaderboard-table-container,
  .toast-shelf {
    -webkit-overflow-scrolling: touch;
  }
}


