/* ==========================================================================
   JEE Main & Advanced Practice Portal - Core Design System & Tokens
   ========================================================================== */

:root {
  /* Color Palette - Dark Mode (Default) */
  --bg-base: #0a0e17;
  --bg-surface: #111827;
  --bg-surface-elevated: #1a2234;
  --bg-surface-translucent: rgba(17, 24, 39, 0.85);
  --bg-overlay: rgba(5, 8, 15, 0.75);

  --border-subtle: #1f293d;
  --border-medium: #2e3a52;
  --border-bright: #3d4d6e;

  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  --accent-cyan: #06b6d4;
  --accent-cyan-subtle: rgba(6, 182, 212, 0.12);
  --accent-blue: #3b82f6;
  --accent-indigo: #6366f1;
  --accent-purple: #8b5cf6;
  --accent-emerald: #10b981;
  --accent-emerald-subtle: rgba(16, 185, 129, 0.12);
  --accent-amber: #f59e0b;
  --accent-rose: #f43f5e;
  --accent-rose-subtle: rgba(244, 63, 94, 0.12);

  /* NTA CBT Standard Exam Status Colors */
  --nta-answered: #10b981;          /* Green */
  --nta-not-answered: #ef4444;      /* Red/Coral */
  --nta-not-visited: #64748b;       /* Slate Grey */
  --nta-marked: #8b5cf6;           /* Purple */
  --nta-ans-marked: #a855f7;       /* Violet with badge */

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.25);
  --shadow-md: 0 6px 20px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 12px 36px rgba(0, 0, 0, 0.45);
  --shadow-glow-cyan: 0 0 24px rgba(6, 182, 212, 0.25);
  --shadow-glow-purple: 0 0 24px rgba(139, 92, 246, 0.25);

  /* Typography */
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --font-display: 'Outfit', var(--font-sans);
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;

  /* Layout Dimensions */
  --header-height: 64px;
  --max-content-width: 1360px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;
  --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Light Theme Overrides */
[data-theme="light"] {
  --bg-base: #f8fafc;
  --bg-surface: #ffffff;
  --bg-surface-elevated: #f1f5f9;
  --bg-surface-translucent: rgba(255, 255, 255, 0.88);
  --bg-overlay: rgba(15, 23, 42, 0.45);

  --border-subtle: #e2e8f0;
  --border-medium: #cbd5e1;
  --border-bright: #94a3b8;

  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;

  --accent-cyan: #0284c7;
  --accent-cyan-subtle: rgba(2, 132, 199, 0.08);
  --accent-blue: #2563eb;
  --accent-emerald-subtle: rgba(16, 185, 129, 0.08);
  --accent-rose-subtle: rgba(244, 63, 94, 0.08);

  --shadow-sm: 0 2px 6px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 6px 16px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 12px 32px rgba(15, 23, 42, 0.12);
  --shadow-glow-cyan: 0 0 20px rgba(2, 132, 199, 0.15);
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-base);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.5;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  transition: background-color var(--transition-smooth), color var(--transition-smooth);
}

/* Links & Buttons Reset */
a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

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

/* Site Global Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-height);
  background-color: var(--bg-surface-translucent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
}

.brand-container {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.brand-logo-icon {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  background: linear-gradient(135deg, #06b6d4, #6366f1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  box-shadow: 0 2px 10px rgba(6, 182, 212, 0.35);
}

.brand-text-box h1 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.brand-tagline {
  font-size: 0.75rem;
  color: var(--accent-cyan);
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 0.85rem;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}

.nav-link:hover, .nav-link.active {
  color: var(--text-primary);
  background-color: var(--bg-surface-elevated);
}

.nav-link.active {
  color: var(--accent-cyan);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.btn-theme-toggle {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  background-color: var(--bg-surface-elevated);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}

.btn-theme-toggle:hover {
  color: var(--text-primary);
  border-color: var(--border-medium);
}

[data-theme="dark"] .icon-sun { display: block; }
[data-theme="dark"] .icon-moon { display: none; }
[data-theme="light"] .icon-sun { display: none; }
[data-theme="light"] .icon-moon { display: block; }

/* In-Progress Test Resume Banner */
.in-progress-banner {
  background: linear-gradient(90deg, rgba(6, 182, 212, 0.15), rgba(99, 102, 241, 0.15));
  border-bottom: 1px solid var(--accent-cyan);
  padding: 0.65rem 1.5rem;
  position: relative;
  z-index: 90;
}

.resume-banner-content {
  max-width: var(--max-content-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.9rem;
}

.resume-actions {
  display: flex;
  gap: 0.5rem;
}

.btn-resume-now {
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-sm);
  background-color: var(--accent-cyan);
  color: #000;
  font-weight: 600;
  font-size: 0.82rem;
}

.btn-dismiss-resume {
  padding: 0.35rem 0.65rem;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 0.82rem;
}

/* Typography & General Utilities */
.gradient-text {
  background: linear-gradient(135deg, #06b6d4, #818cf8, #c084fc);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.pulse-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--accent-emerald);
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* KaTeX Formula Handling & Mobile Overflow */
.katex-display {
  overflow-x: auto;
  overflow-y: hidden;
  padding: 0.5rem 0;
  margin: 0.75rem 0 !important;
  scrollbar-width: thin;
}

.katex {
  font-size: 1.05em;
}

@media (max-width: 640px) {
  .site-header {
    padding: 0 1rem;
  }
  .brand-tagline {
    display: none;
  }
  .nav-link span {
    display: none;
  }
  .nav-daily-test span {
    display: inline !important;
    font-size: 0.75rem;
  }
}

/* Nav Daily Test Highlight Badge */
.nav-daily-test {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.15), rgba(239, 68, 68, 0.1));
  border: 1px solid rgba(245, 158, 11, 0.35) !important;
  color: var(--accent-amber) !important;
  font-weight: 700 !important;
}

.nav-daily-test:hover, .nav-daily-test.active {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.25), rgba(239, 68, 68, 0.18)) !important;
  color: #fbbf24 !important;
}

/* ==========================================================================
   SMAPhysics Global Footer Styling
   ========================================================================== */
.site-footer {
  margin-top: auto;
  background-color: var(--bg-surface);
  border-top: 1px solid var(--border-subtle);
  padding: 3.5rem 1.5rem 2rem;
  color: var(--text-secondary);
}

.footer-inner {
  max-width: var(--max-content-width);
  margin: 0 auto;
}

.footer-top-grid {
  display: grid;
  grid-template-columns: 1.8fr 1fr 1fr 1fr;
  gap: 2.5rem;
  margin-bottom: 3rem;
}

.footer-brand-col {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.footer-brand-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.footer-brand-header h3 {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.2;
}

.footer-brand-desc {
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--text-secondary);
  max-width: 380px;
}

.footer-domain-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent-cyan);
  background-color: var(--accent-cyan-subtle);
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-full);
  width: fit-content;
}

.footer-col h4 {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1.2rem;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.footer-links a {
  font-size: 0.88rem;
  color: var(--text-secondary);
  transition: color var(--transition-fast);
}

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

.footer-bottom-bar {
  border-top: 1px solid var(--border-subtle);
  padding-top: 1.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.footer-github-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.95rem;
  background-color: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-weight: 600;
  transition: all var(--transition-fast);
}

.footer-github-link:hover {
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
  transform: translateY(-1px);
}

@media (max-width: 900px) {
  .footer-top-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }
}

@media (max-width: 600px) {
  .footer-top-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .footer-bottom-bar {
    flex-direction: column;
    align-items: flex-start;
  }
}

