/* ==========================================================================
   ExamResultsBD - Complete Modern Design System
   Color Palette: Deep Emerald, Royal Slate, Frosted Glass & Vibrant Accents
   Light / Dark Mode, Micro-interactions, Responsive & Accessible
   ========================================================================== */

:root {
  /* Core Color Palette (Light Theme) */
  --bg-main: #F8FAFC;
  --bg-card: #FFFFFF;
  --bg-card-alt: #F1F5F9;
  --bg-glass: rgba(255, 255, 255, 0.85);
  --border-color: #E2E8F0;
  --border-focus: #059669;
  
  --text-primary: #0F172A;
  --text-secondary: #334155;
  --text-muted: #475569;
  
  --primary: #0B4D3B;
  --primary-hover: #083A2C;
  --primary-light: #E6F4EA;
  --primary-glow: rgba(11, 77, 59, 0.2);
  
  --accent-emerald: #047857;
  --accent-indigo: #4338CA;
  --accent-amber: #B45309;
  --accent-rose: #BE123C;
  --accent-cyan: #0E7490;
  --accent-purple: #6D28D9;
  
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.03);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
  --shadow-glow: 0 0 20px rgba(16, 185, 129, 0.25);
  
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;
  
  --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] {
  /* Dark Theme Overrides */
  --bg-main: #0B1120;
  --bg-card: #131E32;
  --bg-card-alt: #1A263E;
  --bg-glass: rgba(19, 30, 50, 0.85);
  --border-color: #243450;
  --border-focus: #10B981;
  
  --text-primary: #F8FAFC;
  --text-secondary: #CBD5E1;
  --text-muted: #94A3B8;
  
  --primary: #10B981;
  --primary-hover: #34D399;
  --primary-light: rgba(16, 185, 129, 0.15);
  --primary-glow: rgba(16, 185, 129, 0.35);
  
  --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);
}

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

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

body {
  font-family: 'Hind Siliguri', 'Noto Sans Bengali', 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  background-color: var(--bg-main);
  color: var(--text-primary);
  line-height: 1.6;
  transition: background-color 0.3s ease, color 0.3s ease;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

.mono {
  font-family: 'JetBrains Mono', monospace;
}

.serif {
  font-family: 'Fraunces', 'Noto Serif Bengali', serif;
}

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

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

/* ==========================================================================
   Header & Navigation
   ========================================================================== */
.memo-strip {
  background: #06241B;
  color: #A7F3D0;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  padding: 6px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.memo-strip .status-indicator {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.memo-strip .pulse-dot {
  width: 8px;
  height: 8px;
  background: #10B981;
  border-radius: 50%;
  box-shadow: 0 0 8px #10B981;
  will-change: transform, opacity;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.95); opacity: 0.75; }
  50% { transform: scale(1.25); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.75; }
}

header.site {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  padding: 12px 24px;
  transition: var(--transition);
}

.site-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.seal {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, #0B4D3B, #059669);
  color: #FFFFFF;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Fraunces', serif;
  font-size: 22px;
  font-weight: 700;
  box-shadow: 0 4px 10px rgba(11, 77, 59, 0.3);
  flex-shrink: 0;
}

.brand-text .bn {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  display: block;
  line-height: 1.2;
}

.brand-text small {
  font-size: 11.5px;
  color: var(--text-muted);
  display: block;
}

nav.main {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

nav.main a {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

nav.main a:hover {
  color: var(--primary);
  background: var(--primary-light);
}

/* Theme Switcher Button */
.theme-btn {
  background: var(--bg-card-alt);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 17px;
  transition: var(--transition);
  flex-shrink: 0;
}

.theme-btn:hover {
  border-color: var(--border-focus);
  transform: rotate(15deg) scale(1.05);
}

/* ==========================================================================
   Hero & Search Section
   ========================================================================== */
.hero {
  max-width: 1200px;
  margin: 32px auto 0;
  padding: 0 24px;
}

.hero-card {
  background: linear-gradient(135deg, var(--bg-card), var(--bg-card-alt));
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 40px;
  box-shadow: var(--shadow-xl);
  position: relative;
  overflow: hidden;
}

.hero-card::before {
  content: '';
  position: absolute;
  top: -50px;
  right: -50px;
  width: 250px;
  height: 250px;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.15), transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--primary-light);
  color: var(--primary);
  font-size: 13px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  margin-bottom: 16px;
}

.hero-card h1 {
  font-size: clamp(26px, 4vw, 36px);
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.3;
  margin-bottom: 12px;
}

.hero-card h1 span.highlight {
  background: linear-gradient(120deg, #059669, #10B981, #0891B2);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-card p.lead {
  font-size: 16px;
  color: var(--text-secondary);
  max-width: 760px;
  margin-bottom: 28px;
}

/* Instant Search Container */
.hero-search-hub {
  background: var(--bg-card);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  box-shadow: var(--shadow-md);
  transition: var(--transition);
}

.hero-search-hub:focus-within {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 4px var(--primary-glow);
}

.search-bar-wrap {
  display: flex;
  align-items: center;
  position: relative;
}

.search-icon {
  font-size: 20px;
  color: var(--text-muted);
  margin-right: 12px;
  flex-shrink: 0;
}

#global-exam-search {
  width: 100%;
  border: none;
  background: transparent;
  font-size: 17px;
  color: var(--text-primary);
  outline: none;
}

#global-exam-search::placeholder {
  color: var(--text-muted);
  font-size: 15.5px;
}

.clear-btn {
  background: none;
  border: none;
  font-size: 22px;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0 6px;
  display: none;
  transition: color 0.15s;
}

.clear-btn:hover {
  color: var(--accent-rose);
}

/* Category Filter Pills */
.filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--border-color);
}

.pill {
  background: var(--bg-card-alt);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.pill:hover {
  border-color: var(--border-focus);
  color: var(--text-primary);
  background: var(--primary-light);
}

.pill.active {
  background: var(--primary);
  color: #FFFFFF;
  border-color: var(--primary);
  box-shadow: 0 2px 8px var(--primary-glow);
}

.search-info-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 10px;
  font-size: 12.5px;
  color: var(--text-muted);
  flex-wrap: wrap;
  gap: 6px;
}

/* Quick Action Jump Grid */
.quick-jump-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
  margin-top: 24px;
}

.jump-tile {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 600;
  font-size: 14px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.jump-tile:hover {
  transform: translateY(-2px);
  border-color: var(--border-focus);
  background: var(--primary-light);
  color: var(--primary);
  box-shadow: var(--shadow-md);
}

.jump-tile .tile-icon {
  font-size: 22px;
  flex-shrink: 0;
}

.jump-tile .tile-text small {
  display: block;
  font-size: 11px;
  font-weight: 400;
  color: var(--text-muted);
  margin-top: 1px;
}

/* Pillar Container & Headers */
.pillar-section {
  max-width: 1200px;
  margin: 56px auto 0;
  padding: 0 24px;
}

.pillar-banner {
  background: linear-gradient(135deg, var(--bg-card), var(--bg-card-alt));
  border: 1px solid var(--border-color);
  border-left: 4px solid var(--primary);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  margin-bottom: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.pillar-banner-text h2 {
  font-size: 22px;
  font-weight: 800;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 10px;
}

.pillar-banner-text p {
  font-size: 13.5px;
  color: var(--text-muted);
  margin-top: 3px;
}

.pillar-badge {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11.5px;
  font-weight: 700;
  background: var(--primary-light);
  color: var(--primary);
  padding: 4px 10px;
  border-radius: var(--radius-full);
}


/* ==========================================================================
   Section Headers & Grids
   ========================================================================== */
section {
  max-width: 1200px;
  margin: 48px auto 0;
  padding: 0 24px;
}

.section-title-wrap {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
}

.section-icon-badge {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  background: var(--primary-light);
  color: var(--primary);
  flex-shrink: 0;
}

.section-title-wrap h2 {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}

.section-title-wrap p {
  font-size: 14px;
  color: var(--text-muted);
  margin-top: 2px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

/* Modern Card Design */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--border-color);
  transition: var(--transition);
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: var(--border-focus);
}

.card:hover::before {
  background: var(--primary);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 10px;
}

.card-header h3 {
  font-size: 17.5px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.35;
}

/* Badges */
.badge {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
  flex-shrink: 0;
}

.badge.gov { background: #FEF3C7; color: #B45309; }
.badge.board { background: #E0E7FF; color: #4338CA; }
.badge.uni { background: #E0F2FE; color: #0369A1; }
.badge.med { background: #DCFCE7; color: #15803D; }
.badge.nu { background: #F3E8FF; color: #7E22CE; }
.badge.job { background: #FFEDD5; color: #C2410C; }

[data-theme="dark"] .badge.gov { background: rgba(245, 158, 11, 0.2); color: #FCD34D; }
[data-theme="dark"] .badge.board { background: rgba(99, 102, 241, 0.2); color: #A5B4FC; }
[data-theme="dark"] .badge.uni { background: rgba(14, 165, 233, 0.2); color: #7DD3FC; }
[data-theme="dark"] .badge.med { background: rgba(16, 185, 129, 0.2); color: #6EE7B7; }
[data-theme="dark"] .badge.nu { background: rgba(168, 85, 247, 0.2); color: #D8B4FE; }
[data-theme="dark"] .badge.job { background: rgba(249, 115, 22, 0.2); color: #FDBA74; }

.card-desc {
  font-size: 13.5px;
  color: var(--text-secondary);
  margin-bottom: 16px;
  flex-grow: 1;
}

.card-domain {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.card-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 9px 14px;
  font-size: 13.5px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  background: var(--primary);
  color: #FFFFFF;
  border: 1px solid var(--primary);
  transition: var(--transition);
  cursor: pointer;
}

.card-action-btn:hover {
  background: var(--primary-hover);
  box-shadow: 0 2px 8px var(--primary-glow);
}

/* ==========================================================================
   Live Lookup Widget Box
   ========================================================================== */
.widget-box {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow-md);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}

.form-group input,
.form-group select {
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background: var(--bg-card-alt);
  color: var(--text-primary);
  font-size: 14px;
  outline: none;
  transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

.btn-submit {
  grid-column: 1 / -1;
  padding: 12px 20px;
  background: var(--primary);
  color: #FFFFFF;
  font-size: 15px;
  font-weight: 600;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-submit:hover {
  background: var(--primary-hover);
  box-shadow: 0 4px 12px var(--primary-glow);
}

/* API Result Displays */
.api-result-display {
  margin-top: 20px;
  border-radius: var(--radius-md);
  overflow: hidden;
  display: none;
}

.api-result-display.loading {
  display: block;
  padding: 24px;
  text-align: center;
  background: var(--bg-card-alt);
  color: var(--text-muted);
  font-weight: 500;
}

.api-result-display.error {
  display: block;
  padding: 16px 20px;
  background: rgba(225, 29, 72, 0.1);
  border: 1px solid var(--accent-rose);
  color: var(--accent-rose);
  font-weight: 600;
}

.api-result-display.success {
  display: block;
}

.marksheet {
  background: var(--bg-card);
  border: 2px solid var(--primary);
  border-radius: var(--radius-md);
  padding: 24px;
}

.marksheet-header {
  text-align: center;
  border-bottom: 2px dashed var(--border-color);
  padding-bottom: 16px;
  margin-bottom: 20px;
}

.marksheet-header h2 {
  font-size: 22px;
  color: var(--primary);
  font-weight: 800;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 10px;
  font-size: 14px;
  margin-bottom: 20px;
}

.grades-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 20px;
  font-size: 13.5px;
}

.grades-table th, .grades-table td {
  border: 1px solid var(--border-color);
  padding: 8px 12px;
  text-align: left;
}

.grades-table th {
  background: var(--bg-card-alt);
  font-weight: 600;
}

.marksheet-summary {
  display: flex;
  justify-content: flex-end;
  gap: 20px;
  font-size: 16px;
  font-weight: 700;
  border-top: 1px solid var(--border-color);
  padding-top: 14px;
}

/* ==========================================================================
   Interactive SMS Generator Tool
   ========================================================================== */
.sms-generator-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow-md);
  margin-top: 20px;
}

.sms-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

@media (max-width: 768px) {
  .sms-grid { grid-template-columns: 1fr; }
}

.sms-output-box {
  background: var(--bg-card-alt);
  border: 1px dashed var(--border-color);
  border-radius: var(--radius-sm);
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.sms-code-preview {
  font-family: 'JetBrains Mono', monospace;
  font-size: 18px;
  font-weight: 700;
  color: var(--primary);
  background: var(--bg-card);
  padding: 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  text-align: center;
  margin: 12px 0;
  word-break: break-all;
}

.sms-btn-group {
  display: flex;
  gap: 10px;
  margin-top: 12px;
}

.btn-copy-sms, .btn-send-sms {
  flex: 1;
  padding: 10px 14px;
  font-size: 13.5px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: var(--transition);
}

.btn-copy-sms {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
}

.btn-copy-sms:hover {
  background: var(--primary-light);
  border-color: var(--border-focus);
}

.btn-send-sms {
  background: var(--accent-emerald);
  color: #FFFFFF;
  border: 1px solid var(--accent-emerald);
}

.btn-send-sms:hover {
  background: #065F46;
  border-color: #065F46;
}

/* ==========================================================================
   Table & Board Directory
   ========================================================================== */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--bg-card);
  color: var(--text-primary);
}

.board-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  color: var(--text-primary);
}

.board-table th, .board-table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-primary);
}

.board-table th {
  background: var(--bg-card-alt);
  font-weight: 700;
  color: var(--text-primary);
}

.board-table tr:last-child td {
  border-bottom: none;
}

.board-table tr:hover td {
  background: var(--bg-card-alt);
}

.board-link {
  color: var(--primary);
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  font-weight: 500;
}

.board-link:hover {
  text-decoration: underline;
}

/* ==========================================================================
   FAQ Accordion
   ========================================================================== */
.faq-list {
  display: grid;
  gap: 12px;
}

.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  overflow: hidden;
  transition: var(--transition);
}

.faq-item:hover {
  border-color: var(--border-focus);
}

.faq-question {
  padding: 16px 20px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text-primary);
  font-size: 15px;
}

.faq-question::-webkit-details-marker {
  display: none;
}

.faq-question::after {
  content: "+";
  font-size: 20px;
  font-weight: 700;
  color: var(--text-muted);
  transition: transform 0.2s ease;
}

.faq-item[open] .faq-question::after {
  content: "−";
  color: var(--primary);
}

.faq-answer {
  padding: 0 20px 18px;
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.6;
  border-top: 1px solid var(--border-color);
}

.faq-answer a {
  color: var(--primary);
  text-decoration: underline;
}

/* ==========================================================================
   Toast Notification
   ========================================================================== */
#toast {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background: var(--text-primary);
  color: var(--bg-main);
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  box-shadow: var(--shadow-xl);
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 8px;
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
}

#toast.show {
  transform: translateY(0);
  opacity: 1;
}

/* ==========================================================================
   Footer
   ========================================================================== */
footer {
  margin-top: 60px;
  background: var(--bg-card);
  border-top: 1px solid var(--border-color);
  padding: 40px 24px 80px;
  font-size: 13.5px;
  color: var(--text-muted);
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.footer-disclaimer {
  background: var(--bg-card-alt);
  border-left: 3px solid var(--accent-amber);
  padding: 12px 16px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin-bottom: 24px;
  font-size: 13px;
  color: var(--text-secondary);
}

.footer-links-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  margin-bottom: 24px;
}

.footer-links-grid a {
  color: var(--text-secondary);
  transition: color 0.15s;
}

.footer-links-grid a:hover {
  color: var(--primary);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--border-color);
  padding-top: 20px;
  flex-wrap: wrap;
  gap: 12px;
}

/* ==========================================================================
   Mobile Bottom Bar
   ========================================================================== */
.mobile-bottom-bar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--border-color);
  padding: 8px 16px;
  z-index: 99;
  justify-content: space-around;
  align-items: center;
}

.mobile-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  text-decoration: none;
}

.mobile-nav-item span.icon {
  font-size: 18px;
}

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

@media (max-width: 768px) {
  .mobile-bottom-bar { display: flex; }
  nav.main { display: none; }
  .hero-card { padding: 24px; }
  section { padding: 0 16px; margin-top: 36px; }
  #toast { bottom: 70px; right: 16px; left: 16px; text-align: center; justify-content: center; }
}



/* ==========================================================================
   Cookie Consent Banner (Privacy & GDPR Compliant)
   ========================================================================== */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--bg-card);
  border-top: 2px solid var(--accent-emerald);
  box-shadow: var(--shadow-xl);
  padding: 16px 24px;
  z-index: 1000;
  display: none; /* Controlled by script.js */
  animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
  from { transform: translateY(100%); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.cookie-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.cookie-text {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 280px;
}

.cookie-text span {
  font-size: 26px;
  flex-shrink: 0;
}

.cookie-text p {
  font-size: 13.5px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin: 0;
}

.cookie-text a {
  color: var(--primary);
  font-weight: 600;
  text-decoration: underline;
}

.cookie-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.cookie-btn {
  padding: 8px 18px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
}

.cookie-btn.accept {
  background: var(--primary);
  color: #FFFFFF;
  border: none;
}

.cookie-btn.accept:hover {
  background: var(--primary-hover);
  box-shadow: var(--shadow-glow);
}

.cookie-btn.learn {
  background: var(--bg-card-alt);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.cookie-btn.learn:hover {
  background: var(--border-color);
}

@media (max-width: 768px) {
  .cookie-banner {
    bottom: 56px; /* Above mobile bottom bar */
    padding: 12px 16px;
  }
  .cookie-content {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .cookie-actions {
    width: 100%;
    justify-content: flex-end;
  }
}

/* ==========================================================================
   Comprehensive SEO Result Guidelines & Marksheet Instructions
   ========================================================================== */
.guide-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 20px;
  margin-top: 18px;
}

.guide-box {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.guide-box:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-focus);
}

.guide-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-color);
}

.guide-icon-badge {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 700;
  flex-shrink: 0;
}

.guide-header h3 {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.guide-header p {
  font-size: 13px;
  color: var(--text-muted);
  margin: 0;
}

.steps-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.steps-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.step-num {
  background: var(--primary-light);
  color: var(--primary);
  font-weight: 700;
  font-size: 12px;
  min-width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 2px;
  flex-shrink: 0;
}

.guide-tip-box {
  margin-top: 16px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  background: var(--bg-card-alt);
  border-left: 4px solid var(--accent-emerald);
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.guide-tip-box strong {
  color: var(--text-primary);
}

.code-pill {
  font-family: 'JetBrains Mono', monospace;
  background: rgba(16, 185, 129, 0.1);
  color: var(--primary);
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 600;
  font-size: 12.5px;
}

/* ==========================================================================
   Comprehensive Educational Knowledge Hub & In-Depth Editorial Articles
   (Full AdSense High-Value Content Design System)
   ========================================================================== */
.knowledge-section {
  margin-top: 48px;
}

.article-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 24px;
  margin-top: 24px;
}

.article-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.article-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary);
}

.article-header {
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-color);
}

.article-badge-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.article-category {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 700;
  background: var(--primary-light);
  color: var(--primary);
}

.article-read-time {
  font-size: 12px;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.article-header h3 {
  font-size: 18.5px;
  color: var(--text-primary);
  line-height: 1.45;
  font-weight: 700;
  margin-bottom: 0;
}

.article-body {
  font-size: 14.5px;
  line-height: 1.75;
  color: var(--text-secondary);
  flex-grow: 1;
}

.article-body p {
  margin-bottom: 14px;
}

.article-body h4 {
  font-size: 15.5px;
  color: var(--text-primary);
  margin-top: 18px;
  margin-bottom: 8px;
  font-weight: 700;
}

.article-body ul, .article-body ol {
  padding-left: 20px;
  margin-bottom: 14px;
}

.article-body li {
  margin-bottom: 8px;
}

.article-body strong {
  color: var(--text-primary);
}

.highlight-callout {
  background: var(--bg-card-alt);
  border-left: 4px solid var(--accent-emerald);
  padding: 14px 16px;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  margin: 16px 0;
  font-size: 13.5px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.highlight-callout.warning {
  border-left-color: var(--accent-amber);
  background: rgba(217, 119, 6, 0.08);
}

.highlight-callout.info {
  border-left-color: var(--accent-indigo);
  background: rgba(79, 70, 229, 0.08);
}

.formula-box {
  background: var(--bg-card-alt);
  border: 1px dashed var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  margin: 14px 0;
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  color: var(--primary);
  font-weight: 600;
}

.mini-table {
  width: 100%;
  border-collapse: collapse;
  margin: 14px 0;
  font-size: 13.5px;
}

.mini-table th, .mini-table td {
  padding: 8px 12px;
  border: 1px solid var(--border-color);
  text-align: left;
}

.mini-table th {
  background: var(--bg-card-alt);
  color: var(--text-primary);
  font-weight: 600;
}

.article-footer {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  color: var(--text-muted);
}