/* ==========================================================
   Exam Mock Test Portal - Modern Responsive CBT Stylesheet
   Pure CSS3 with Mobile-First Responsive Design
   ========================================================== */

:root {
  --bg-primary: #f8fafc;
  --bg-surface: #ffffff;
  --bg-surface-secondary: #f1f5f9;
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --border-color: #cbd5e1;
  --border-focus: #3b82f6;

  --neo-shadow-light: rgba(255, 255, 255, 0.8);
  --neo-shadow-dark: rgba(0, 0, 0, 0.08);
  --neo-border: rgba(255, 255, 255, 0.5);

  
  --primary: #3b82f6;
  --primary-hover: #60a5fa;
  --primary-dark: #2563eb;
  --primary-light: #eff6ff;
  
  --success: #22c55e;
  --success-dark: #16a34a;
  --danger: #ef4444;
  --danger-dark: #dc2626;
  --warning: #eab308;
  
  --palette-answered: #22c55e;
  --palette-not-answered: #ef4444;
  --palette-marked: #a855f7;
  --palette-answered-marked: #a855f7;
  --palette-not-visited: #94a3b8;
  
  --shadow-sm: 2px 2px 0 rgba(15, 23, 42, 0.15);
  --shadow-md: 4px 4px 0 rgba(15, 23, 42, 0.15);
  --shadow-lg: 6px 6px 0 rgba(15, 23, 42, 0.15);
  --shadow-focus: 0 0 0 4px rgba(59, 130, 246, 0.3);
  
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-full: 9999px;
  
  --font-base: 'Plus Jakarta Sans', 'Noto Sans Devanagari', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-size-multiplier: 1;
}

[data-theme="dark"] {
  --bg-primary: #0f172a;
  --bg-surface: #1e293b;
  --bg-surface-secondary: #334155;
  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #64748b;
  --border-color: #475569;
  --border-focus: #60a5fa;

  --neo-shadow-light: rgba(255, 255, 255, 0.03);
  --neo-shadow-dark: rgba(0, 0, 0, 0.4);
  --neo-border: rgba(255, 255, 255, 0.05);

  
  --primary: #3b82f6;
  --primary-hover: #60a5fa;
  --primary-dark: #2563eb;
  --primary-light: rgba(59, 130, 246, 0.15);

  --shadow-sm: 2px 2px 0 rgba(0, 0, 0, 0.6);
  --shadow-md: 4px 4px 0 rgba(0, 0, 0, 0.6);
  --shadow-lg: 6px 6px 0 rgba(0, 0, 0, 0.6);
  --shadow-focus: 0 0 0 4px rgba(59, 130, 246, 0.3);
}

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

/* Candidate Profile Badge in Header */
.candidate-badge-btn {
  white-space: nowrap;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.5rem;
  background: var(--bg-surface);
  border: 2px solid var(--border-color);
  border-bottom: 4px solid var(--border-color);
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-primary);
  transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
}

.candidate-badge-btn:hover {
  background: var(--bg-surface);
  border-color: var(--border-color);
  border-bottom: 4px solid var(--border-color);
  transform: translateY(-2px);
}

.candidate-badge-btn:active {
  transform: translateY(2px);
  border-bottom-width: 2px;
  box-shadow: none;
}

.candidate-avatar {
  width: 24px;
  height: 24px;
  border-radius: var(--radius-md);
  background: var(--bg-surface-secondary);
  color: var(--text-primary);
  display: grid;
  place-items: center;
  font-size: 0.75rem;
  font-weight: 700;
  border: 1px solid var(--border-color);
}

/* Quick Start / Sign In Modal Tabs & Layout */
.auth-tab-nav {
  display: flex;
  border-bottom: 2px solid var(--border-color);
  margin-bottom: 1.25rem;
  gap: 0.5rem;
}

.auth-tab-btn {
  flex: 1;
  padding: 0.75rem 0.5rem;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-muted);
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  transition: all 0.2s ease;
  text-align: center;
}

.auth-tab-btn.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  background: var(--primary-light);
  border-top-left-radius: var(--radius-md);
  border-top-right-radius: var(--radius-md);
}

.guest-focus-banner {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.08) 0%, rgba(59, 130, 246, 0.15) 100%);
  border: 1px solid rgba(37, 99, 235, 0.25);
  border-radius: var(--radius-md);
  padding: 0.9rem 1rem;
  margin-bottom: 1.25rem;
}

.guest-focus-banner strong {
  color: var(--primary);
  display: block;
  font-size: 0.95rem;
  margin-bottom: 0.2rem;
}

.guest-focus-banner p {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.btn-hero-primary {
  background: #ffffff;
  color: #1e3a8a;
  border: 2px solid #ffffff;
  font-weight: 800;
  padding: 0.75rem 1.6rem;
  border-radius: var(--radius-md);
  font-size: 1.05rem;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-hero-primary:hover {
  transform: translateY(-2px);
  background: #f8fafc;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

body {
  font-family: var(--font-base);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-size: calc(15px * var(--font-size-multiplier));
}

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

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

/* Navigation Header */
.app-header {
  background: transparent;
  border-bottom: 1px solid transparent;
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 40;
  box-shadow: none;
  transition: background-color 0.3s ease, backdrop-filter 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.app-header.scrolled {
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
}

[data-theme="dark"] .app-header.scrolled {
  background: rgba(15, 23, 42, 0.75);
}

.brand-container {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--text-primary);
  cursor: pointer;
}

.brand-icon {
  background: var(--primary);
  color: #ffffff;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-md);
  font-size: 1.1rem;
}

.header-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  display: grid;
  place-items: center;
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
  background: var(--bg-surface-secondary);
  transition: all 0.15s ease;
  font-size: 1rem;
}

.btn-icon:hover {
  background: var(--border-color);
  color: var(--text-primary);
}

/* Containers */
.main-container {
  flex: 1;
  max-width: 1280px;
  width: 100%;
  margin: 0 auto;
  padding: 1.25rem 1rem;
}

/* Dashboard / Home View */
.hero-banner {
  background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 60%, #3b82f6 100%);
  color: #ffffff;
  border-radius: var(--radius-lg);
  padding: 2.25rem 1.5rem;
  margin-bottom: 1.75rem;
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.75rem;
}

.hero-title {
  font-size: 1.85rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.25;
  text-align: center;
}

.hero-subtitle {
  color: #e0e7ff;
  font-size: 0.95rem;
  max-width: 680px;
  margin: 0 auto;
  text-align: center;
  line-height: 1.5;
}

.hero-stats-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 0.5rem;
}

.hero-stat-chip {
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(8px);
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

/* Category Filter Tabs & Browse Toggle */
.browse-toggle-container {
  display: flex;
  position: relative;
  z-index: 10;
  flex-direction: column;
  gap: 1.25rem;
  margin-bottom: 1.75rem;
}

.browse-toggle-bar {
  display: inline-flex;
  background: var(--bg-surface-secondary);
  padding: 0.35rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-color);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  width: fit-content;
  max-width: 100%;
  gap: 0.35rem;
}

.browse-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 1.35rem;
  border-radius: var(--radius-full);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-secondary);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
  border: 1px solid transparent;
  background: transparent;
  cursor: pointer;
}

.browse-toggle-btn:hover {
  color: var(--text-primary);
  background: rgba(0, 0, 0, 0.03);
}

.browse-toggle-btn.active {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.28);
}

/* Small Tiles Grid & Common Square Card Design */
.small-tiles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(145px, 1fr));
  gap: 0.85rem;
}

.small-tile-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 0.85rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  aspect-ratio: 1 / 1;
  width: 100%;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  text-align: left;
  user-select: none;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.small-tile-card:hover {
  border-color: rgba(59, 130, 246, 0.4);
  transform: translateY(-2px);
  box-shadow: 0 8px 16px -4px rgba(0, 0, 0, 0.06), 0 2px 6px -1px rgba(0, 0, 0, 0.03);
}

.small-tile-card:active {
  transform: translateY(0) scale(0.98);
  transition-duration: 0.08s;
}

.small-tile-card.active {
  background: var(--bg-surface);
  border-color: var(--primary);
  box-shadow: 0 0 0 1.5px var(--primary), 0 4px 12px rgba(37, 99, 235, 0.12);
}

.small-tile-card.active::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary) 0%, #60a5fa 100%);
}

.small-tile-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.small-tile-icon-box {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  background: var(--bg-surface-secondary);
  border: 1px solid var(--border-color);
  transition: all 0.2s ease;
}

.small-tile-card:hover .small-tile-icon-box {
  transform: scale(1.06);
  background: rgba(59, 130, 246, 0.08);
  border-color: rgba(59, 130, 246, 0.25);
}

.small-tile-card.active .small-tile-icon-box {
  background: rgba(59, 130, 246, 0.12);
  border-color: rgba(59, 130, 246, 0.35);
}

.small-tile-badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--text-secondary);
  background: var(--bg-surface-secondary);
  padding: 0.15rem 0.45rem;
  border-radius: 6px;
  border: 1px solid var(--border-color);
  transition: all 0.2s ease;
  white-space: nowrap;
}

.small-tile-card:hover .small-tile-badge {
  border-color: rgba(59, 130, 246, 0.3);
}

.small-tile-card.active .small-tile-badge {
  background: rgba(59, 130, 246, 0.1);
  color: var(--primary);
  border-color: rgba(59, 130, 246, 0.3);
}

.small-tile-body {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  width: 100%;
}

.small-tile-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.25;
  letter-spacing: -0.01em;
  transition: color 0.15s ease;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.small-tile-card:hover .small-tile-title,
.small-tile-card.active .small-tile-title {
  color: var(--primary);
}

.small-tile-meta {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-weight: 500;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.small-tile-card.active .small-tile-meta {
  color: var(--text-secondary);
}

@media (max-width: 640px) {
  .small-tiles-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.65rem;
  }
  .small-tile-card {
    padding: 0.7rem !important;
    border-radius: 12px !important;
  }
  .small-tile-icon-box {
    width: 32px !important;
    height: 32px !important;
    font-size: 1.05rem !important;
    border-radius: 8px !important;
  }
  .small-tile-badge {
    font-size: 0.62rem !important;
    padding: 0.1rem 0.35rem !important;
  }
  .small-tile-title {
    font-size: 0.82rem !important;
  }
  .small-tile-meta {
    font-size: 0.68rem !important;
  }
}

/* Category View All / Show Less Toggle Button */
.btn-toggle-categories {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 1.25rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary);
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
}

.btn-toggle-categories:hover {
  background: rgba(59, 130, 246, 0.06);
  border-color: rgba(59, 130, 246, 0.4);
  transform: translateY(-1px);
  box-shadow: 0 4px 10px -2px rgba(59, 130, 246, 0.12);
}

.btn-toggle-categories:active {
  transform: translateY(0) scale(0.97);
}

.btn-toggle-categories .toggle-icon {
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.btn-toggle-categories .toggle-icon.expanded {
  transform: rotate(180deg);
}

.active-filter-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-surface-secondary);
  border: 1px solid var(--border-color);
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  margin-top: 1rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  gap: 0.6rem;
}

/* Test Length & Sectional Filter Bar */
.test-filters-wrapper {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 1.1rem;
  margin-bottom: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.03);
  transition: border-color 0.2s ease;
}

.test-filters-wrapper:hover {
  border-color: rgba(59, 130, 246, 0.25);
}

.test-type-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.test-type-pills {
  display: flex;
  gap: 0.45rem;
  background: var(--bg-surface-secondary);
  padding: 0.35rem;
  border-radius: 10px;
  border: 1px solid var(--border-color);
  flex-wrap: wrap;
  width: fit-content;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02) inset;
}

.test-type-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.5rem 1rem;
  border-radius: 7px;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--text-secondary);
  border: 1px solid transparent;
  background: transparent;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
}

.test-type-pill:hover {
  color: var(--text-primary);
  background: rgba(0, 0, 0, 0.03);
}

.test-type-pill:active {
  transform: scale(0.98);
}

.test-type-pill.active {
  background: var(--bg-surface);
  color: var(--primary);
  border-color: var(--border-color);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

.test-type-pill .pill-count-badge,
.test-type-pill .pill-counter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.15rem 0.45rem;
  font-size: 0.72rem;
  font-weight: 700;
  border-radius: 5px;
  background: var(--bg-surface-secondary);
  color: var(--text-secondary);
  min-width: 20px;
  transition: all 0.2s ease;
}

.test-type-pill.active .pill-count-badge,
.test-type-pill.active .pill-counter {
  background: rgba(59, 130, 246, 0.12);
  color: var(--primary);
}

/* Section Selection Bar (when in sectional or full) */
.section-choice-box {
  background: var(--bg-surface-secondary);
  border-radius: 12px;
  padding: 0.9rem;
  border: 1px solid var(--border-color);
}

.section-choice-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.65rem;
}

.section-choice-title {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.section-chips-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.section-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.85rem;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
}

.section-chip:hover {
  border-color: rgba(59, 130, 246, 0.4);
  color: var(--primary);
  transform: translateY(-1px);
  box-shadow: 0 3px 6px -1px rgba(0, 0, 0, 0.05);
}

.section-chip:active {
  transform: translateY(0) scale(0.98);
}

.section-chip.active {
  background: var(--bg-surface);
  border-color: var(--primary);
  color: var(--primary);
  font-weight: 700;
  box-shadow: 0 0 0 1px var(--primary), 0 2px 6px rgba(59, 130, 246, 0.15);
}

.section-chip .section-chip-count,
.section-chip .chip-count {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.1rem 0.4rem;
  border-radius: 5px;
  background: var(--bg-surface-secondary);
  color: var(--text-muted);
  transition: all 0.2s ease;
}

.section-chip:hover .section-chip-count,
.section-chip:hover .chip-count {
  background: rgba(59, 130, 246, 0.1);
  color: var(--primary);
}

.section-chip.active .section-chip-count,
.section-chip.active .chip-count {
  background: rgba(59, 130, 246, 0.12);
  color: var(--primary);
}

/* Card Badges for Full-Length & Sectional */
.badge-type-full {
  background: #dbeafe;
  color: #1d4ed8;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.badge-type-sectional {
  background: #fef3c7;
  color: #b45309;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.card-sections-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin: 0.5rem 0 0.85rem 0;
}

.card-section-tag {
  font-size: 0.72rem;
  background: var(--bg-surface-secondary);
  color: var(--text-secondary);
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  font-weight: 500;
}

.category-tabs {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
  margin-bottom: 1.5rem;
  scrollbar-width: none;
}

.category-tabs::-webkit-scrollbar {
  display: none;
}

.tab-btn {
  padding: 0.55rem 1.1rem;
  border-radius: var(--radius-full);
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  white-space: nowrap;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.tab-btn.active {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
  box-shadow: 0 2px 4px rgba(37, 99, 235, 0.25);
}

/* Test Grid Cards */
.tests-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 1.25rem;
}

.test-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.test-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.75rem;
}

.test-badge {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
  background: var(--primary-light);
  color: var(--primary);
}

.test-card-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.test-card-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.4;
  margin-bottom: 1rem;
}

.test-meta-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-color);
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.btn-primary {
  background: var(--primary);
  color: #ffffff;
  padding: 0.65rem 1.25rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.95rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all 0.15s ease;
  width: 100%;
}

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

.btn-secondary {
  background: var(--bg-surface-secondary);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  padding: 0.65rem 1.25rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.95rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all 0.15s ease;
}

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

/* Test Instructions Screen */
.instructions-container {
  max-width: 800px;
  margin: 0 auto;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-md);
}

.instructions-header {
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 1rem;
  margin-bottom: 1.25rem;
}

.instructions-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin: 1.25rem 0;
  font-size: 0.95rem;
  color: var(--text-secondary);
}

.palette-legend-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.75rem;
  margin: 1.25rem 0;
  padding: 1rem;
  background: var(--bg-surface-secondary);
  border-radius: var(--radius-md);
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.palette-badge {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  display: grid;
  place-items: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: #ffffff;
  flex-shrink: 0;
  position: relative;
}

.palette-badge.answered { background: var(--palette-answered); }
.palette-badge.not-answered { background: var(--palette-not-answered); }
.palette-badge.marked { background: var(--palette-marked); }
.palette-badge.answered-marked { background: var(--palette-marked); }
.palette-badge.answered-marked::after {
  content: "";
  position: absolute;
  bottom: 2px;
  right: 2px;
  width: 6px;
  height: 6px;
  background: #22c55e;
  border-radius: 50%;
}
.palette-badge.not-visited {
  background: var(--palette-not-visited);
  color: #ffffff;
}

.declaration-box {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin: 1.5rem 0;
  padding: 1rem;
  background: var(--primary-light);
  border-radius: var(--radius-md);
  border: 1px solid rgba(37, 99, 235, 0.2);
}

.declaration-box input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--primary);
}

/* CBT Exam Active Layout */
.cbt-wrapper {
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 65px);
  background: var(--bg-primary);
}

.cbt-top-bar {
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-color);
  padding: 0.5rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  position: sticky;
  top: 57px;
  z-index: 30;
}

.timer-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--danger-light);
  color: var(--danger);
  border: 1px solid var(--danger);
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: 1rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.05em;
}

.timer-badge.normal {
  background: var(--primary-light);
  color: var(--primary);
  border-color: var(--primary);
}

.sections-bar {
  display: flex;
  gap: 0.35rem;
  overflow-x: auto;
  padding: 0.4rem 1rem;
  background: var(--bg-surface-secondary);
  border-bottom: 1px solid var(--border-color);
}

.section-btn {
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  white-space: nowrap;
  transition: all 0.15s ease;
}

.section-btn.active {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
}

/* CBT Main Workspace Split */
.cbt-workspace {
  display: grid;
  grid-template-columns: 1fr 340px;
  flex: 1;
  min-height: 0;
}

@media (max-width: 900px) {
  .cbt-workspace {
    grid-template-columns: 1fr;
  }
}

/* Question Area */
.question-panel {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  background: var(--bg-surface);
  border-right: 1px solid var(--border-color);
  overflow-y: auto;
}

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

.question-num-tag {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
}

.question-marks {
  font-size: 0.8rem;
  font-weight: 600;
  display: flex;
  gap: 0.5rem;
}

.mark-pos {
  color: var(--success);
  background: var(--success-light);
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-sm);
}

.mark-neg {
  color: var(--danger);
  background: var(--danger-light);
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-sm);
}

.question-body {
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--text-primary);
  line-height: 1.6;
  white-space: pre-line;
  margin-bottom: 1.5rem;
  user-select: text;
}

/* Options List */
.options-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 2rem;
}

.option-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.option-item:hover {
  border-color: var(--primary);
  background: var(--primary-light);
}

.option-item.selected {
  border-color: var(--primary);
  background: var(--primary-light);
  font-weight: 600;
}

.option-key {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1.5px solid var(--border-color);
  display: grid;
  place-items: center;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-secondary);
  background: var(--bg-surface-secondary);
  flex-shrink: 0;
}

.option-item.selected .option-key {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
}

.option-text {
  flex: 1;
  font-size: 0.95rem;
  color: var(--text-primary);
}

/* Question Palette Panel (Desktop / Tablet) */
.palette-panel {
  background: var(--bg-surface-secondary);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  overflow-y: auto;
}

.palette-status-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;
  background: var(--bg-surface);
  padding: 0.75rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

.palette-status-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.palette-status-count {
  font-weight: 700;
  font-size: 0.85rem;
}

.palette-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.5rem;
  max-height: 380px;
  overflow-y: auto;
  padding: 0.25rem;
}

.palette-btn {
  aspect-ratio: 1;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.85rem;
  display: grid;
  place-items: center;
  transition: transform 0.1s ease;
  position: relative;
}

.palette-btn:hover {
  transform: scale(1.08);
}

.palette-btn.current {
  outline: 2.5px solid var(--primary);
  outline-offset: 2px;
}

/* Bottom Action Bar (CBT) */
.cbt-action-bar {
  background: var(--bg-surface);
  border-top: 1px solid var(--border-color);
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  position: sticky;
  bottom: 0;
  z-index: 30;
  box-shadow: 0 -2px 10px rgba(0,0,0,0.05);
}

.action-group-left, .action-group-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

/* Mobile Question Palette Floating / Drawer Button */
.mobile-palette-toggle {
  display: none;
}

@media (max-width: 900px) {
  .palette-panel {
    display: flex;
    position: fixed;
    top: 0;
    right: -320px;
    bottom: 0;
    width: 300px;
    z-index: 60;
    box-shadow: -5px 0 25px rgba(0,0,0,0.25);
    transition: right 0.3s ease;
  }

  .palette-panel.open {
    right: 0;
  }

  .mobile-palette-toggle {
    display: inline-flex;
  }
}

/* Result & Scorecard View */
.result-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-md);
  margin-bottom: 1.5rem;
}

.score-hero-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
  margin: 1.25rem 0;
}

.score-metric-box {
  background: var(--bg-surface-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1rem;
  text-align: center;
}

.metric-value {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 0.2rem;
}

.metric-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Review / Solutions Section */
.review-filter-tabs {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
}

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

.review-card.correct {
  border-left: 5px solid var(--success);
}

.review-card.incorrect {
  border-left: 5px solid var(--danger);
}

.review-card.unattempted {
  border-left: 5px solid var(--text-muted);
}

.explanation-box {
  margin-top: 1rem;
  padding: 1rem;
  background: var(--primary-light);
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  color: var(--text-primary);
  border: 1px solid rgba(37, 99, 235, 0.15);
}

/* Modals & Dialogs */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  display: grid;
  place-items: center;
  z-index: 70;
  padding: 1rem;
}

.modal-content {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 1.5rem;
  box-shadow: var(--shadow-lg);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-color);
}

.modal-title {
  font-size: 1.25rem;
  font-weight: 700;
}

/* Practice Mode & Custom Creator Form */
.form-group {
  margin-bottom: 1rem;
}

.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 0.4rem;
}

.form-input, .form-select {
  width: 100%;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  color: var(--text-primary);
  outline: none;
}

.form-input:focus, .form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

/* Responsive Utilities */
@media (max-width: 640px) {
  .hero-title {
    font-size: 1.4rem;
  }
  .tests-grid {
    grid-template-columns: 1fr;
  }
  .cbt-action-bar {
    padding: 0.5rem;
  }
  .cbt-action-bar button {
    font-size: 0.85rem;
    padding: 0.5rem 0.75rem;
  }
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  max-width: 380px;
}

.app-toast {
  background: var(--bg-surface);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  border-left: 5px solid var(--primary);
  padding: 0.85rem 1.15rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  font-size: 0.88rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  animation: slide-in-toast 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.app-toast.success {
  border-left-color: var(--success);
}

.app-toast.info {
  border-left-color: var(--primary);
}

.app-toast.warning {
  border-left-color: var(--warning);
}

@keyframes slide-in-toast {
  from {
    transform: translateY(20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* ==========================================================
   STUDENT AUTH & DEDICATED DASHBOARD STYLES
   ========================================================== */

.btn-student-logout {
  white-space: nowrap;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.38rem 1.25rem;
  font-size: 0.85rem;
  font-weight: 700;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 60%, #3b82f6 100%);
  border: 1px solid transparent;
  color: #ffffff;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-student-logout:hover {
  background: linear-gradient(135deg, #1e3a8a 0%, #1d4ed8 60%, #2563eb 100%);
  color: #ffffff;
  border-color: transparent;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2), 0 4px 15px rgba(37, 99, 235, 0.4);
  transform: translateY(-2px) scale(0.98);
}

.btn-student-dashboard {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.6rem;
  font-size: 0.85rem;
  font-weight: 700;
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  border: 2px solid var(--border-color);
  border-bottom: 4px solid var(--border-color);
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}
.btn-student-dashboard:hover {
  background: var(--bg-surface);
  color: var(--primary);
  border-color: var(--border-color);
  border-bottom: 4px solid var(--border-color);
  transform: translateY(-2px);
}
.btn-student-dashboard:active {
  transform: translateY(2px);
  border-bottom-width: 2px;
  box-shadow: none;
}

.student-dashboard-hero {
  background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 50%, #3b82f6 100%);
  color: #ffffff;
  border-radius: var(--radius-lg);
  padding: 1.75rem 2rem;
  margin-bottom: 2rem;
  box-shadow: 0 10px 25px -5px rgba(30, 58, 138, 0.3);
}

.student-dashboard-hero h2 {
  font-size: 1.8rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.student-stat-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.student-stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.student-stat-val {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 0.25rem;
  letter-spacing: -0.02em;
}

.student-stat-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.attempt-history-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1rem;
}

.attempt-history-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
}

.badge-accuracy-high {
  background: var(--success-light);
  color: var(--success);
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
}

.badge-accuracy-mid {
  background: var(--warning-light);
  color: var(--warning);
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
}

.badge-accuracy-low {
  background: var(--danger-light);
  color: var(--danger);
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
}

.dashboard-tab-pill {
  padding: 0.45rem 1rem;
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-color);
  background: var(--bg-surface);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
}

.dashboard-tab-pill:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.dashboard-tab-pill.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
}

.auth-alert-box {
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.auth-alert-box.error {
  background: var(--danger-light);
  color: var(--danger);
  border: 1px solid rgba(220, 38, 38, 0.3);
}

.auth-alert-box.success {
  background: var(--success-light);
  color: var(--success);
  border: 1px solid rgba(22, 163, 74, 0.3);
}

.local-storage-tools-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  background: var(--bg-surface-secondary);
  border: 1px solid var(--border-color);
  padding: 0.85rem 1.25rem;
  border-radius: var(--radius-lg);
  margin-bottom: 1.5rem;
}

.local-storage-indicator {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--primary);
}

.local-badge {
  background: rgba(34, 197, 94, 0.15);
  color: #15803d;
  border: 1px solid rgba(34, 197, 94, 0.3);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.btn-tool-outline {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.85rem;
  font-size: 0.82rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-tool-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-light);
}

.btn-danger-outline {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.85rem;
  font-size: 0.82rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  background: var(--bg-surface);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: var(--danger);
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-danger-outline:hover {
  background: var(--danger-light);
  border-color: var(--danger);
}

/* Mock Test Library Search Bar */
.test-search-wrapper {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  transition: all 0.2s ease;
}

.test-search-wrapper:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}

.test-search-input-box {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.test-search-icon {
  position: absolute;
  left: 1rem;
  font-size: 1.15rem;
  color: var(--text-muted);
  pointer-events: none;
  display: flex;
  align-items: center;
}

.test-search-input {
  width: 100%;
  padding: 0.75rem 5.5rem 0.75rem 2.85rem;
  font-size: 0.95rem;
  font-family: inherit;
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--bg-surface-secondary);
  color: var(--text-primary);
  outline: none;
  transition: all 0.2s ease;
}

.test-search-input:focus {
  background: var(--bg-surface);
  border-color: var(--primary);
}

.test-search-clear-btn {
  position: absolute;
  right: 0.75rem;
  background: var(--border-color);
  border: none;
  border-radius: var(--radius-full);
  color: var(--text-secondary);
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.75rem;
  font-weight: bold;
  transition: all 0.15s ease;
}

.test-search-clear-btn:hover {
  background: var(--danger);
  color: #ffffff;
}

.test-search-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.test-search-tags {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.test-search-tag-chip {
  background: var(--bg-surface-secondary);
  border: 1px solid var(--border-color);
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s ease;
}

.test-search-tag-chip:hover {
  background: var(--primary-light);
  color: var(--primary);
  border-color: var(--primary);
}

/* Candidate Profile Badge in Header */
.candidate-badge-btn {
  white-space: nowrap;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.5rem;
  background: var(--bg-surface);
  border: 2px solid var(--border-color);
  border-bottom: 4px solid var(--border-color);
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-primary);
  transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
}

.candidate-badge-btn:hover {
  background: var(--bg-surface);
  border-color: var(--border-color);
  border-bottom: 4px solid var(--border-color);
  transform: translateY(-2px);
}

.candidate-badge-btn:active {
  transform: translateY(2px);
  border-bottom-width: 2px;
  box-shadow: none;
}

.candidate-avatar {
  width: 24px;
  height: 24px;
  border-radius: var(--radius-md);
  background: var(--bg-surface-secondary);
  color: var(--text-primary);
  display: grid;
  place-items: center;
  font-size: 0.75rem;
  font-weight: 700;
  border: 1px solid var(--border-color);
}

/* Auth Modal Tabs */
.auth-tab-nav {
  display: flex;
  background: var(--bg-surface-secondary);
  padding: 0.3rem;
  border-radius: var(--radius-md);
  margin-bottom: 1.25rem;
  gap: 0.25rem;
  border: 1px solid var(--border-color);
}

.auth-tab-btn {
  flex: 1;
  padding: 0.5rem 0.75rem;
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: none;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: center;
}

.auth-tab-btn.active {
  background: var(--bg-surface);
  color: var(--primary);
  font-weight: 700;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.auth-tab-btn:hover:not(.active) {
  color: var(--text-primary);
}

/* Top Nav Search Bar */
.nav-search-container {
  display: flex;
  align-items: center;
  position: relative;
  max-width: 320px;
  width: 100%;
  margin: 0 0.5rem;
}

.nav-search-box {
  display: flex;
  align-items: center;
  width: 100%;
  position: relative;
}

.nav-search-icon {
  position: absolute;
  left: 0.7rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  pointer-events: none;
  display: flex;
  align-items: center;
}

.nav-search-input {
  width: 100%;
  padding: 0.4rem 2rem 0.4rem 2.1rem;
  font-size: 0.82rem;
  font-family: inherit;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  background: var(--bg-surface-secondary);
  color: var(--text-primary);
  outline: none;
  transition: all 0.2s ease;
}

.nav-search-input:focus {
  background: var(--bg-surface);
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.nav-search-clear {
  position: absolute;
  right: 0.6rem;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.2rem;
}

.nav-search-clear:hover {
  color: var(--danger);
}

@media (max-width: 860px) {

  /* Fix drawer layout */
  .header-controls {
    border-right: none;
    box-shadow: 5px 0 25px rgba(0,0,0,0.15);
  }

  .header-controls .btn-student-logout {
    margin-top: auto !important;
    order: 99 !important;
    border: 1px solid transparent !important;
    background: var(--danger-light) !important;
    color: var(--danger-dark) !important;
    box-shadow: 4px 4px 10px var(--neo-shadow-dark), -4px -4px 10px var(--neo-shadow-light) !important;
  }
  
  .header-controls .btn-student-logout:hover {
    background: var(--danger) !important;
    color: #ffffff !important;
    box-shadow: inset 3px 3px 6px rgba(0,0,0,0.2), inset -3px -3px 6px rgba(255,255,255,0.1) !important;
    border-color: transparent !important;
  }
  
  .mobile-menu-header {
    display: flex !important;
    margin-bottom: 0.5rem;
  }
  
  /* Turn icon buttons into pill buttons in mobile drawer */
  .header-controls #btn-toggle-lang,
  .header-controls #btn-toggle-theme {
    width: 100% !important;
    border-radius: 50px !important;
    justify-content: flex-start !important;
    align-items: center !important;
    padding: 0.75rem 1rem !important;
    height: auto !important;
    display: flex !important;
  }
  
  /* Make all generic buttons pill-shaped in mobile drawer */
  .header-controls button:not(.btn-icon), 
  .header-controls .candidate-badge-btn {
    border-radius: 50px !important;
    padding: 0.75rem 1rem !important;
    width: 100% !important;
    justify-content: flex-start !important;
  }
  
  /* Ensure the close button remains a circle */
  .header-controls #btn-close-hamburger-menu {
    width: 36px !important;
    height: 36px !important;
    border-radius: 50% !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }


  
}

/* Performance Analytics Chart Component */
.chart-card-container {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-sm);
}

.chart-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.chart-metric-switcher {
  display: inline-flex;
  background: var(--bg-surface-secondary);
  padding: 0.25rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  gap: 0.25rem;
}

.chart-metric-btn {
  padding: 0.35rem 0.75rem;
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: none;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s ease;
}

.chart-metric-btn.active {
  background: var(--bg-surface);
  color: var(--primary);
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  font-weight: 700;
}

.chart-canvas-wrapper {
  position: relative;
  width: 100%;
  height: 280px;
  max-height: 320px;
}

@media (max-width: 640px) {
  .chart-canvas-wrapper {
    height: 220px;
  }
}

@media print {
  body {
    background: #ffffff !important;
    color: #000000 !important;
  }
  #app-header, .header-controls, .btn-student-dashboard, .btn-student-logout,
  .local-storage-tools-bar, #btn-dash-new-test, #btn-dash-refresh-supabase,
  #btn-dash-logout, #btn-dash-login, .btn-reattempt-past-test, .btn-delete-past-attempt {
    display: none !important;
  }
  .student-dashboard-hero {
    background: #1e3a8a !important;
    color: #ffffff !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  .card, .student-stat-card, .attempt-history-card {
    border: 1px solid #cccccc !important;
    box-shadow: none !important;
    break-inside: avoid;
  }
}



.btn-edit-profile-highlight {
  background: #ffffff !important;
  color: var(--primary) !important;
  border: none !important;
  font-size: 0.8rem !important;
  font-weight: 800 !important;
  padding: 0.35rem 0.85rem !important;
  border-radius: var(--radius-full) !important;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.btn-edit-profile-highlight:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
  background: #f8fafc !important;
}

.btn-dash-logout-highlight:hover {
  background: #dc2626 !important;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(239, 68, 68, 0.5) !important;
}


/* ========================================================== */
/* FOOTER STYLES */
/* ========================================================== */
.app-footer {
  background-color: #0f172a;
  color: #e2e8f0;
  font-family: var(--font-base);
  padding: 4.5rem 2rem 2rem 2rem;
  margin-top: auto;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 3.5rem;
  margin-bottom: 4rem;
}

.footer-col h3 {
  font-size: 0.95rem;
  font-weight: 800;
  margin-bottom: 1.5rem;
  color: #ffffff;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-col ul li {
  margin-bottom: 0.85rem;
}

.footer-col ul li a {
  color: #94a3b8;
  text-decoration: none;
  font-size: 0.95rem;
  transition: all 0.25s ease;
  display: inline-block;
  font-weight: 500;
}

.footer-col ul li a:hover {
  color: #38bdf8;
  transform: translateX(4px);
}

.footer-desc {
  font-size: 0.9rem;
  line-height: 1.6;
  color: #94a3b8;
  margin-bottom: 1.5rem;
}

.social-icons {
  display: flex;
  gap: 0.85rem;
  flex-wrap: wrap;
}

.social-icons a {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 42px;
  height: 42px;
  background-color: rgba(255, 255, 255, 0.04);
  color: #cbd5e1;
  border-radius: var(--radius-md);
  text-decoration: none;
  transition: all 0.25s ease;
  border: 1px solid rgba(255,255,255, 0.08);
}

.social-icons a:hover {
  background-color: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
  transform: translateY(-3px);
  box-shadow: 0 6px 12px rgba(37, 99, 235, 0.25);
}

.footer-bottom {
  max-width: 1200px;
  margin: 0 auto;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  font-size: 0.9rem;
  color: #64748b;
  font-weight: 500;
}

.footer-bottom-links {
  display: flex;
  gap: 1.75rem;
  flex-wrap: wrap;
}

.footer-bottom-links a {
  color: #64748b;
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-bottom-links a:hover {
  color: #e2e8f0;
}

@media (max-width: 768px) {
  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }
}
/* ========================================================== */
/* CHATBOT WIDGET STYLES */
/* ========================================================== */
.chatbot-widget {
  position: fixed;
  pointer-events: none;

  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.chatbot-fab {
  pointer-events: auto;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background-color: var(--primary);
  color: #ffffff;
  font-size: 1.8rem;
  border: none;
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.chatbot-fab:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

.chatbot-window {
  pointer-events: auto;
  width: 350px;
  height: 500px;
  max-height: calc(100vh - 100px);
  background-color: var(--bg-surface);
  border-radius: var(--radius-lg);
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
  margin-bottom: 1rem;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--border-color);
  transition: opacity 0.3s ease, transform 0.3s ease;
  transform-origin: bottom right;
}

.chatbot-window.hidden {
  opacity: 0;
  transform: scale(0.5);
  pointer-events: none;
}

.chatbot-header {
  background-color: var(--primary);
  color: #ffffff;
  padding: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.chatbot-close-btn {
  background: transparent;
  border: none;
  color: #ffffff;
  cursor: pointer;
  opacity: 0.85;
  padding: 4px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.chatbot-close-btn:hover {
  opacity: 1;
  background: rgba(255, 255, 255, 0.15);
}

.chatbot-clear-btn {
  background: transparent;
  border: none;
  color: #ffffff;
  cursor: pointer;
  opacity: 0.85;
  padding: 4px 6px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.chatbot-clear-btn:hover {
  opacity: 1;
  background: rgba(255, 255, 255, 0.15);
}

.chatbot-fab-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.chatbot-header-avatar {
  transition: transform 0.3s ease;
}

.chatbot-header-avatar:hover {
  transform: scale(1.1) rotate(5deg);
}

/* ================= ROBOT SVG STYLING & ANIMATIONS ================= */
.bot-robot-svg {
  display: block;
  overflow: visible;
  transform-origin: center center;
  animation: bot-gentle-float 3.5s ease-in-out infinite;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Default / Initial Clean Normal State */
.bot-robot-svg .bot-antenna {
  stroke: currentColor;
  stroke-width: 2px;
  stroke-linecap: round;
}

.bot-robot-svg .bot-antenna-dot {
  transform-origin: 12px 3px;
  animation: bot-dot-pulse 2.8s ease-in-out infinite;
  transition: all 0.3s ease;
}

.bot-robot-svg .bot-head {
  stroke: currentColor;
  stroke-width: 2px;
  transition: all 0.3s ease;
}

.bot-robot-svg .bot-ear-l {
  stroke: currentColor;
  stroke-width: 2px;
  stroke-linecap: round;
  transform-origin: 4px 14px;
  animation: bot-ear-left-idle 4s ease-in-out infinite;
  transition: transform 0.3s ease;
}

.bot-robot-svg .bot-ear-r {
  stroke: currentColor;
  stroke-width: 2px;
  stroke-linecap: round;
  transform-origin: 20px 14px;
  animation: bot-ear-right-idle 4s ease-in-out infinite;
  transition: transform 0.3s ease;
}

.bot-robot-svg .bot-eye {
  transform-origin: center;
  animation: bot-eye-idle-blink 4s ease-in-out infinite;
  transition: transform 0.25s ease;
}

.bot-robot-svg .bot-eye-left {
  transform-origin: 9px 13px;
}

.bot-robot-svg .bot-eye-right {
  transform-origin: 15px 13px;
}

.bot-robot-svg .bot-smile {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8px;
  stroke-linecap: round;
  transform-origin: 12px 16px;
  animation: bot-smile-gentle-pulse 3s ease-in-out infinite;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), stroke-width 0.25s ease;
}

/* ================= HOVER & CLICK / ACTIVE ANIMATIONS ================= */
.chatbot-fab:hover {
  transform: scale(1.08) translateY(-2px);
  box-shadow: 0 8px 25px rgba(59, 130, 246, 0.45);
}

.chatbot-fab:active {
  transform: scale(0.95);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.35);
}

/* Hover or Active on FAB / Avatar: Triggers enhanced joyful animation */
.chatbot-fab:hover .bot-robot-svg,
.chatbot-header-avatar:hover .bot-robot-svg {
  animation: bot-pop-happy 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) infinite alternate;
}

.chatbot-fab:hover .bot-smile,
.chatbot-header-avatar:hover .bot-smile {
  stroke-width: 2.2px;
  transform: scale(1.25, 1.5) translateY(0.3px);
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.3));
}

.chatbot-fab:hover .bot-antenna-dot,
.chatbot-header-avatar:hover .bot-antenna-dot {
  fill: #93c5fd;
  transform: scale(1.45);
  filter: drop-shadow(0 0 4px #93c5fd);
}

.chatbot-fab:hover .bot-eye,
.chatbot-header-avatar:hover .bot-eye {
  animation: bot-eye-happy-blink 1.5s ease-in-out infinite;
}

.chatbot-fab:hover .bot-ear-l,
.chatbot-header-avatar:hover .bot-ear-l {
  animation: bot-ear-left-wiggle 0.8s ease-in-out infinite alternate;
}

.chatbot-fab:hover .bot-ear-r,
.chatbot-header-avatar:hover .bot-ear-r {
  animation: bot-ear-right-wiggle 0.8s ease-in-out infinite alternate;
}

/* Keyframes for Idle / Initial State */
@keyframes bot-gentle-float {
  0%, 100% {
    transform: translateY(0) rotate(0deg);
  }
  50% {
    transform: translateY(-2px) rotate(1deg);
  }
}

@keyframes bot-smile-gentle-pulse {
  0%, 100% {
    transform: scale(1) translateY(0);
  }
  50% {
    transform: scale(1.15, 1.25) translateY(0.25px);
  }
}

@keyframes bot-dot-pulse {
  0%, 100% {
    opacity: 0.9;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.2);
  }
}

@keyframes bot-eye-idle-blink {
  0%, 90%, 96%, 100% {
    transform: scaleY(1);
  }
  93% {
    transform: scaleY(0.15);
  }
}

@keyframes bot-ear-left-idle {
  0%, 100% {
    transform: rotate(0deg);
  }
  50% {
    transform: rotate(-4deg);
  }
}

@keyframes bot-ear-right-idle {
  0%, 100% {
    transform: rotate(0deg);
  }
  50% {
    transform: rotate(4deg);
  }
}

/* Keyframes for Interactive Hover */
@keyframes bot-pop-happy {
  0% {
    transform: translateY(0) rotate(-3.5deg) scale(1.06);
  }
  100% {
    transform: translateY(-3px) rotate(3.5deg) scale(1.14);
  }
}

@keyframes bot-eye-happy-blink {
  0%, 75%, 100% {
    transform: scaleY(1);
  }
  85% {
    transform: scaleY(0.15) scaleX(1.1);
  }
}

@keyframes bot-ear-left-wiggle {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(-14deg);
  }
}

@keyframes bot-ear-right-wiggle {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(14deg);
  }
}

.chat-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: var(--primary);
  color: #ffffff !important;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.45rem 0.85rem;
  border-radius: 0.5rem;
  border: none;
  cursor: pointer;
  margin-top: 0.5rem;
  margin-right: 0.4rem;
  transition: all 0.2s ease;
  box-shadow: 0 2px 6px rgba(59, 130, 246, 0.25);
  text-decoration: none;
  line-height: 1.2;
}

.chat-action-btn:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(59, 130, 246, 0.35);
}

.chat-action-secondary {
  background: var(--bg-surface-secondary);
  color: var(--text-primary) !important;
  border: 1px solid var(--border-color);
  box-shadow: none;
}

.chat-action-secondary:hover {
  border-color: var(--primary);
  color: var(--primary) !important;
  background: var(--bg-surface);
}

.chatbot-body {
  flex: 1;
  padding: 1rem;
  overflow-y: auto;
  background-color: var(--bg-surface-secondary);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.chat-message {
  max-width: 88%;
  padding: 0.75rem 1rem;
  border-radius: 1.1rem;
  font-size: 0.88rem;
  line-height: 1.5;
  word-break: break-word;
}

.chat-message a {
  color: var(--primary);
  text-decoration: underline;
}

.chat-message.bot strong {
  color: var(--text-primary);
}

.chat-message.bot em {
  color: var(--text-secondary);
}

.chat-message.bot {
  background-color: var(--bg-surface);
  color: var(--text-primary);
  align-self: flex-start;
  border-bottom-left-radius: 0.2rem;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

/* ================= CHAT SUGGESTED TOPICS ================= */
.chat-suggested-topics {
  margin-top: 0.85rem;
  padding-top: 0.75rem;
  border-top: 1px dashed var(--border-color);
}

.chat-suggest-title {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.4rem;
}

.chat-suggest-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.chat-suggest-chip {
  background: var(--bg-surface-secondary);
  color: var(--primary) !important;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  font-size: 0.76rem;
  font-weight: 600;
  padding: 0.3rem 0.65rem;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  line-height: 1.2;
}

.chat-suggest-chip:hover {
  background: var(--primary);
  color: #ffffff !important;
  border-color: var(--primary);
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(59, 130, 246, 0.25);
}

/* ================= CHATBOT INBUILT TOOLS ================= */
.chatbot-tool-card {
  margin-top: 0.65rem;
  background: var(--bg-surface-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.75rem;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.06);
  animation: toolFadeIn 0.25s ease-out forwards;
}

@keyframes toolFadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.chat-tool-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.6rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--border-color);
}

.chat-tool-title {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-primary);
}

.chat-tool-close-btn {
  background: transparent;
  border: none;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  transition: all 0.15s ease;
  line-height: 1;
}

.chat-tool-close-btn:hover {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
}

/* --- Calculator Styles --- */
.chat-calc-widget {
  max-width: 290px;
  width: 100%;
}

.calc-screen {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.65rem;
  text-align: right;
  margin-bottom: 0.6rem;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.06);
}

.calc-expr {
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  min-height: 1.1rem;
  word-break: break-all;
  overflow-x: auto;
}

.calc-res {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  margin-top: 0.2rem;
  min-height: 1.5rem;
}

.calc-keypad {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.35rem;
}

.calc-btn {
  background: var(--bg-surface);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.45rem 0.2rem;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
}

.calc-btn:hover {
  background: var(--bg-surface-hover, #e2e8f0);
  border-color: var(--border-hover, #cbd5e1);
  transform: translateY(-1px);
}

.calc-btn:active {
  transform: translateY(1px);
}

.calc-btn.calc-op {
  background: var(--bg-surface-secondary);
  color: var(--primary);
  font-weight: 700;
}

.calc-btn.calc-op:hover {
  background: rgba(59, 130, 246, 0.15);
}

.calc-btn.calc-equals {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
  font-weight: 700;
}

.calc-btn.calc-equals:hover {
  background: var(--primary-hover, #2563eb);
  box-shadow: 0 2px 6px rgba(59, 130, 246, 0.35);
}

.calc-quick-footer {
  display: flex;
  gap: 0.3rem;
  margin-top: 0.4rem;
}

.calc-quick-fn {
  flex: 1;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.3rem 0;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s ease;
}

.calc-quick-fn:hover {
  background: rgba(59, 130, 246, 0.1);
  color: var(--primary);
  border-color: var(--primary);
}

/* --- Multiplication Table Generator Styles --- */
.chat-table-widget {
  max-width: 320px;
  width: 100%;
}

.table-tool-controls {
  margin-bottom: 0.6rem;
}

.table-input-group label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 0.25rem;
}

.table-input-row {
  display: flex;
  gap: 0.35rem;
}

.table-num-input {
  flex: 1;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.35rem 0.55rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
}

.table-num-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

.table-gen-btn {
  background: var(--primary);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 0.35rem 0.75rem;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.table-gen-btn:hover {
  background: var(--primary-hover, #2563eb);
}

.table-presets {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem;
  margin-top: 0.4rem;
}

.table-presets-label {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
}

.table-preset-chip {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  padding: 0.15rem 0.45rem;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.15s ease;
}

.table-preset-chip:hover {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
}

.table-range-toggle {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.45rem;
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.table-range-btn {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  padding: 0.2rem 0.5rem;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s ease;
}

.table-range-btn.active {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
}

.table-output-container {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.5rem;
  margin-top: 0.5rem;
}

.table-output-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 0.35rem;
  margin-bottom: 0.4rem;
  border-bottom: 1px dashed var(--border-color);
}

.table-output-title {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-primary);
}

.table-copy-btn {
  background: var(--bg-surface-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.2rem 0.45rem;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s ease;
}

.table-copy-btn:hover {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
}

.table-output-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.25rem 0.5rem;
  max-height: 200px;
  overflow-y: auto;
  padding-right: 0.2rem;
}

.table-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.76rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  padding: 0.15rem 0.35rem;
  background: var(--bg-surface-secondary);
  border-radius: 4px;
}

.table-mul {
  font-weight: 500;
  color: var(--text-secondary);
}

.table-eq {
  color: var(--text-secondary);
  opacity: 0.6;
  margin: 0 0.15rem;
}

.table-val {
  font-weight: 700;
  color: var(--primary);
}

.chat-action-tool {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.12), rgba(37, 99, 235, 0.18)) !important;
  border-color: var(--primary) !important;
  color: var(--primary) !important;
  font-weight: 700 !important;
}

.chat-action-tool:hover {
  background: var(--primary) !important;
  color: #ffffff !important;
}

.chat-message.user {
  background-color: var(--primary);
  color: #ffffff;
  align-self: flex-end;
  border-bottom-right-radius: 0.2rem;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.chatbot-footer {
  padding: 0.75rem;
  background-color: var(--bg-surface);
  border-top: 1px solid var(--border-color);
  display: flex;
  gap: 0.5rem;
}

.chatbot-footer input {
  flex: 1;
  padding: 0.6rem 1rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  font-family: inherit;
  font-size: 0.9rem;
  background-color: var(--bg-surface-secondary);
  color: var(--text-primary);
  outline: none;
}

.chatbot-footer input:focus {
  border-color: var(--primary);
}

.chatbot-footer button {
  background-color: var(--primary);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-full);
  padding: 0 1.25rem;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.chatbot-footer button:hover {
  background-color: var(--primary-hover);
}

@media (max-width: 768px) {
  .chatbot-widget {
    bottom: 20px;
    right: 20px;
    left: 20px;
    align-items: flex-end;
  }
  .chatbot-window {
    width: 100%;
    height: 70vh;
    max-height: 500px;
    margin-bottom: 20px;
    border-radius: var(--radius-lg);
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
  }
}

.static-page-wrapper {
  max-width: 1000px;
  margin: 3rem auto;
  padding: 2rem;
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  box-shadow: 0 4px 6px rgba(0,0,0,0.05);
  border: 1px solid var(--border-color);
}
.static-page-wrapper h1 {
  font-size: 2.2rem;
  margin-bottom: 1.5rem;
  color: var(--text-primary);
  border-bottom: 2px solid var(--primary-light);
  padding-bottom: 0.5rem;
}
.static-page-wrapper h2 {
  font-size: 1.5rem;
  margin-top: 2rem;
  margin-bottom: 1rem;
  color: var(--text-primary);
}
.static-page-wrapper p {
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--text-secondary);
  margin-bottom: 1rem;
}
.static-page-wrapper ul {
  margin-left: 1.5rem;
  margin-bottom: 1.5rem;
  color: var(--text-secondary);
  line-height: 1.6;
}
.static-page-wrapper li {
  margin-bottom: 0.5rem;
}
.contact-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.contact-list li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  color: #a3a3a3;
  font-size: 0.9rem;
}
.contact-list li svg {
  flex-shrink: 0;
  color: #ffffff;
}

/* ========================================================== */
/* FAQ ACCORDION STYLES */
/* ========================================================== */
/* Hamburger Menu Styles */
.mobile-hamburger {
  display: none !important;
}

.desktop-hidden {
  display: none;
}

.mobile-menu-header {
  display: none;
}

@media (max-width: 860px) {

  /* Fix drawer layout */
  .header-controls {
    border-right: none;
    box-shadow: 5px 0 25px rgba(0,0,0,0.15);
  }

  .header-controls .btn-student-logout {
    margin-top: auto !important;
    order: 99 !important;
    border: 1px solid transparent !important;
    background: var(--danger-light) !important;
    color: var(--danger-dark) !important;
    box-shadow: 4px 4px 10px var(--neo-shadow-dark), -4px -4px 10px var(--neo-shadow-light) !important;
  }
  
  .header-controls .btn-student-logout:hover {
    background: var(--danger) !important;
    color: #ffffff !important;
    box-shadow: inset 3px 3px 6px rgba(0,0,0,0.2), inset -3px -3px 6px rgba(255,255,255,0.1) !important;
    border-color: transparent !important;
  }
  
  .mobile-menu-header {
    display: flex !important;
    margin-bottom: 0.5rem;
  }
  
  /* Turn icon buttons into pill buttons in mobile drawer */
  .header-controls #btn-toggle-lang,
  .header-controls #btn-toggle-theme {
    width: 100% !important;
    border-radius: 50px !important;
    justify-content: flex-start !important;
    align-items: center !important;
    padding: 0.75rem 1rem !important;
    height: auto !important;
    display: flex !important;
  }
  
  /* Make all generic buttons pill-shaped in mobile drawer */
  .header-controls button:not(.btn-icon), 
  .header-controls .candidate-badge-btn {
    border-radius: 50px !important;
    padding: 0.75rem 1rem !important;
    width: 100% !important;
    justify-content: flex-start !important;
  }
  
  /* Ensure the close button remains a circle */
  .header-controls #btn-close-hamburger-menu {
    width: 36px !important;
    height: 36px !important;
    border-radius: 50% !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }


  .desktop-hidden {
    display: inline-block;
  }
  
  .mobile-hamburger {
    display: grid !important;
  }
  
  .header-controls {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 300px;
    background: var(--bg-surface);
    border-right: 1px solid var(--border-color);
    border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
    padding: 1.5rem;
    box-shadow: 5px 0 25px rgba(0,0,0,0.25);
    z-index: 100;
    transform: translateX(-110%);
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    align-items: stretch;
    gap: 1rem;
  }
  
  .header-controls.mobile-open {
    transform: translateX(0);
  }
  
  .mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1rem;
    margin-bottom: 0.5rem;
  }

  .header-controls .btn-student-dashboard,
  .header-controls .candidate-badge-btn,
  .header-controls .btn-student-logout,
  .header-controls .btn-secondary,
  .header-controls .btn-icon {
    width: 100%;
    justify-content: flex-start;
    padding: 0.75rem 1rem;
    height: auto;
    font-size: 1rem;
  }

  .header-controls .btn-icon {
    display: flex;
    align-items: center;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
  }
  
  .header-controls .candidate-badge-btn {
    border: 1px solid var(--border-color);
    background: var(--bg-surface-secondary);
  }
}

/* Neumorphism Styles */
.header-controls button:not(.btn-icon),
.header-controls .candidate-badge-btn {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  box-shadow: 4px 4px 10px var(--neo-shadow-dark), -4px -4px 10px var(--neo-shadow-light);
  border-radius: 50px;
  padding: 0.5rem 1rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
  color: var(--text-primary);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.header-controls button:not(.btn-icon):hover,
.header-controls .candidate-badge-btn:hover {
  box-shadow: inset 3px 3px 6px var(--neo-shadow-dark), inset -3px -3px 6px var(--neo-shadow-light);
  color: var(--primary);
  border-color: transparent;
  transform: scale(0.98);
}

/* Icon Buttons (Hamburger, Theme Toggle, Close) */
#btn-hamburger,
.header-controls .btn-icon {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  box-shadow: 3px 3px 8px var(--neo-shadow-dark), -3px -3px 8px var(--neo-shadow-light);
  border-radius: 50%;
  width: 42px;
  height: 42px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  color: var(--text-secondary);
}

#btn-hamburger:hover,
.header-controls .btn-icon:hover {
  box-shadow: inset 2px 2px 5px var(--neo-shadow-dark), inset -2px -2px 5px var(--neo-shadow-light);
  color: var(--primary);
  border-color: transparent;
  transform: scale(0.95);
}

/* Ensure mobile header controls stretch correctly with neumorphism */
@media (max-width: 860px) {

  /* Fix drawer layout */
  .header-controls {
    border-right: none;
    box-shadow: 5px 0 25px rgba(0,0,0,0.15);
  }

  .header-controls .btn-student-logout {
    margin-top: auto !important;
    order: 99 !important;
    border: 1px solid transparent !important;
    background: var(--danger-light) !important;
    color: var(--danger-dark) !important;
    box-shadow: 4px 4px 10px var(--neo-shadow-dark), -4px -4px 10px var(--neo-shadow-light) !important;
  }
  
  .header-controls .btn-student-logout:hover {
    background: var(--danger) !important;
    color: #ffffff !important;
    box-shadow: inset 3px 3px 6px rgba(0,0,0,0.2), inset -3px -3px 6px rgba(255,255,255,0.1) !important;
    border-color: transparent !important;
  }
  
  .mobile-menu-header {
    display: flex !important;
    margin-bottom: 0.5rem;
  }
  
  /* Turn icon buttons into pill buttons in mobile drawer */
  .header-controls #btn-toggle-lang,
  .header-controls #btn-toggle-theme {
    width: 100% !important;
    border-radius: 50px !important;
    justify-content: flex-start !important;
    align-items: center !important;
    padding: 0.75rem 1rem !important;
    height: auto !important;
    display: flex !important;
  }
  
  /* Make all generic buttons pill-shaped in mobile drawer */
  .header-controls button:not(.btn-icon), 
  .header-controls .candidate-badge-btn {
    border-radius: 50px !important;
    padding: 0.75rem 1rem !important;
    width: 100% !important;
    justify-content: flex-start !important;
  }
  
  /* Ensure the close button remains a circle */
  .header-controls #btn-close-hamburger-menu {
    width: 36px !important;
    height: 36px !important;
    border-radius: 50% !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }



}

/* -------- SUPER FIX FOR MOBILE DRAWER -------- */
@media (max-width: 860px) {
  .header-controls {
    border-right: none !important;
    box-shadow: 5px 0 25px rgba(0,0,0,0.2) !important;
    padding: 1.5rem 1.2rem !important;
  }

  /* Force all buttons in drawer to be identical pills with neumorphism */
  .header-controls > button,
  .header-controls > .candidate-badge-btn {
    width: 100% !important;
    height: 54px !important;
    border-radius: 50px !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: flex-start !important;
    padding: 0 1.5rem !important;
    margin: 0 !important;
    background: var(--bg-surface-secondary) !important;
    border: 1px solid var(--border-color) !important;
    box-shadow: none !important;
    color: var(--text-primary) !important;
    font-weight: 600 !important;
    font-size: 1rem !important;
    gap: 0.75rem !important;
    transition: all 0.2s ease !important;
    white-space: nowrap !important;
  }

  .header-controls > button:hover,
  .header-controls > .candidate-badge-btn:hover {
    box-shadow: none !important;
    background: var(--bg-surface) !important;
    color: var(--primary) !important;
    border-color: var(--primary) !important;
    transform: scale(0.98) !important;
  }

  /* Specific fix for Close Menu Button */
  .header-controls .mobile-menu-header button#btn-close-hamburger-menu {
    width: 40px !important;
    height: 40px !important;
    padding: 0 !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: transparent !important;
    border: 1px solid var(--border-color) !important;
    box-shadow: none !important;
  }

  /* Specific fix for Logout Button to make it pop */
  .header-controls > #btn-nav-logout {
    margin-top: auto !important;
    order: 99 !important;
    background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 60%, #3b82f6 100%) !important;
    color: #ffffff !important;
    border: 1px solid transparent !important;
    justify-content: center !important;
    text-align: center !important;
    font-weight: 700 !important;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
  }
  
  .header-controls > #btn-nav-logout:hover {
    background: linear-gradient(135deg, #1e3a8a 0%, #1d4ed8 60%, #2563eb 100%) !important;
    color: #ffffff !important;
    border-color: transparent !important;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.2), 0 6px 16px rgba(37, 99, 235, 0.4) !important;
    transform: scale(0.97) !important;
  }

  /* Fix spans inside theme and lang toggles */
  .header-controls > button > span.desktop-hidden {
    display: inline-block !important;
    margin-left: 0 !important;
  }
}

/* Top Nav Actions Styling */
.top-nav-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.top-nav-actions #btn-toggle-theme {
  width: 40px !important;
  height: 40px !important;
  border-radius: 50% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: var(--bg-surface) !important;
  border: 1px solid var(--border-color) !important;
  color: var(--text-secondary) !important;
  box-shadow: 3px 3px 8px var(--neo-shadow-dark), -3px -3px 8px var(--neo-shadow-light) !important;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.top-nav-actions #btn-toggle-theme:hover {
  box-shadow: inset 2px 2px 5px var(--neo-shadow-dark), inset -2px -2px 5px var(--neo-shadow-light) !important;
  color: var(--primary) !important;
  border-color: transparent !important;
  transform: scale(0.95) !important;
}

/* Ensure mobile header search isn't overlapping if it exists */
@media (max-width: 860px) {
  .top-nav-actions #btn-toggle-theme {
    /* Slightly smaller on mobile if needed, but 40px is good for touch targets */
    width: 38px !important;
    height: 38px !important;
  }
}

/* Responsive Search Nav Fix */
.app-header {
  flex-wrap: wrap;
  gap: 1rem;
}
.nav-search-container {
  flex: 1;
  max-width: 500px;
  margin: 0 auto;
}

@media (max-width: 860px) {
  .app-header {
    padding: 0.75rem 1rem !important;
  }
  .nav-search-container {
    display: flex !important;
    order: 3;
    width: 100% !important;
    max-width: 100% !important;
    margin-top: 0.25rem !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }
  .top-nav-actions {
    margin-left: auto;
  }
}

/* Desktop / Mobile Search Logic */
.mobile-search-btn {
  display: none !important;
}
.desktop-search-only {
  display: flex !important;
}
.mobile-search-overlay {
  display: none;
}

@media (max-width: 860px) {
  .app-header {
    flex-wrap: nowrap !important;
  }
  .desktop-search-only {
    display: none !important;
  }
  .mobile-search-btn {
    display: flex !important;
  }
  
  /* Mobile Search Overlay styling */
  .mobile-search-overlay {
    display: flex;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    background: var(--bg-surface);
    padding: 0.75rem 1rem;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    z-index: 50;
    opacity: 0;
    transform: scale(0.95);
    transform-origin: top right;
    pointer-events: none;
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1), transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-bottom: 1px solid var(--border-color);
  }
  
  .mobile-search-overlay.active {
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
  }

  .mobile-search-header {
    display: flex;
    align-items: center;
    width: 100%;
    gap: 0.5rem;
  }
}

/* Static Page Modern Redesign Styles */
.static-hero {
  background: rgba(241, 245, 249, 0.7);
  color: var(--text-primary);
  padding: 5rem 2rem 4rem;
  text-align: center;
  border-bottom: 1px solid rgba(203, 213, 225, 0.5);
}

.static-hero h1 {
  font-size: 3rem;
  font-weight: 800;
  margin-bottom: 1rem;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.static-hero p {
  font-size: 1.25rem;
  color: var(--text-secondary);
  max-width: 650px;
  margin: 0 auto;
  line-height: 1.6;
}

.static-content-section {
  max-width: 800px;
  margin: 3rem auto;
  padding: 0 2rem 4rem;
  line-height: 1.8;
  color: var(--text-secondary);
  font-size: 1.1rem;
}

.static-content-section h2 {
  color: var(--text-primary);
  margin-top: 2.5rem;
  font-size: 1.5rem;
  font-weight: 700;
}

.static-content-section h3 {
  color: var(--text-primary);
  font-size: 1.25rem;
  margin-top: 1.5rem;
}

.static-content-section p {
  margin-bottom: 1rem;
}

.static-content-section ul {
  padding-left: 1.5rem;
  margin-bottom: 1.5rem;
}

.static-content-section li {
  margin-bottom: 0.5rem;
}

.contact-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.contact-card {
  background: #ffffff;
  padding: 1.75rem;
  border-radius: 0.75rem;
  border: 1px solid #e2e8f0;
  text-align: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.contact-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 20px -5px rgba(0, 0, 0, 0.08);
}
.contact-card .icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}
.contact-card h3 {
  margin: 0 0 0.5rem 0;
  color: var(--text-primary);
}
.contact-card p {
  margin: 0;
  color: var(--text-muted);
}




/* Minimal Text-Focused Native Accordion FAQ */
.faq-container {
  margin-top: 4rem;
  background: rgba(255, 255, 255, 0.8);
  padding: 3rem;
  border-radius: 1.5rem;
  border: 1px solid rgba(226, 232, 240, 0.8);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.02);
}

.faq-container h2 {
  margin-top: 0;
  margin-bottom: 2.5rem;
  font-size: 2rem;
  font-weight: 800;
  color: var(--text-primary);
  text-align: center;
  letter-spacing: -0.02em;
}

details.faq-item {
  border-bottom: 1px solid rgba(226, 232, 240, 0.8);
  padding: 1.5rem 0;
}

details.faq-item:last-child {
  border-bottom: none;
}

summary.faq-question {
  font-weight: 600;
  font-size: 1.2rem;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text-primary);
  transition: color 0.2s ease;
}

summary.faq-question:hover {
  color: var(--primary);
}

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

summary.faq-question::after {
  content: "+";
  font-size: 1.75rem;
  color: var(--text-muted);
  font-weight: 300;
  transition: transform 0.3s ease, color 0.3s ease;
}

details[open] summary.faq-question::after {
  content: "−";
  transform: rotate(180deg);
  color: var(--primary);
}

.faq-answer {
  margin-top: 1.25rem;
  color: var(--text-secondary);
  line-height: 1.8;
  font-size: 1.05rem;
  padding-right: 2rem;
  animation: faqFadeIn 0.3s ease-out forwards;
  max-height: none; /* Override any old max-height */
  overflow: visible;
  background: transparent;
}

@keyframes faqFadeIn {
  from { opacity: 0; transform: translateY(-5px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Generic Grid and Card styles for content-rich pages */
.content-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
  margin-bottom: 2rem;
}

.content-card {
  background: rgba(255, 255, 255, 0.8);
  padding: 2rem;
  border-radius: 1rem;
  border: 1px solid rgba(226, 232, 240, 0.8);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.content-card h3 {
  margin-top: 0;
  color: var(--text-primary);
  font-size: 1.25rem;
  margin-bottom: 1rem;
}

.content-card p {
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 0;
}

/* Dark Mode Overrides for Static Pages (translucent glassmorphism) */
[data-theme="dark"] .static-hero {
  background: rgba(15, 23, 42, 0.7); /* translucent bg-primary */
  border-bottom: 1px solid rgba(71, 85, 105, 0.5); /* translucent border-color */
}

[data-theme="dark"] .faq-container {
  background: rgba(30, 41, 59, 0.8); /* translucent bg-surface */
  border: 1px solid rgba(71, 85, 105, 0.8);
}

[data-theme="dark"] details.faq-item {
  border-bottom: 1px solid rgba(71, 85, 105, 0.5);
}

[data-theme="dark"] .content-card {
  background: rgba(30, 41, 59, 0.8);
  border: 1px solid rgba(71, 85, 105, 0.8);
}


/* Advanced Chatbot CSS */
.chatbot-quick-replies {
  display: flex;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  overflow-x: auto;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-color);
  scrollbar-width: none;
}
.chatbot-quick-replies::-webkit-scrollbar {
  display: none;
}
.chat-qr {
  background: var(--bg-surface-secondary);
  border: 1px solid var(--primary-light);
  color: var(--primary);
  border-radius: 20px;
  padding: 0.35rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.2s ease;
}
.chat-qr:hover {
  background: var(--primary);
  color: #fff;
}
.chat-message.typing {
  background: var(--bg-surface-secondary);
  color: var(--text-secondary);
  font-style: italic;
  display: flex;
  align-items: center;
  gap: 4px;
  width: fit-content;
}
.typing-dot {
  width: 6px;
  height: 6px;
  background: var(--text-secondary);
  border-radius: 50%;
  animation: typingBounce 1.4s infinite ease-in-out both;
}
.typing-dot:nth-child(1) { animation-delay: -0.32s; }
.typing-dot:nth-child(2) { animation-delay: -0.16s; }
@keyframes typingBounce {
  0%, 80%, 100% { transform: scale(0); }
  40% { transform: scale(1); }
}

/* Exam Guide Detailed Page Styles */
.page-breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}

.page-breadcrumb a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
}

.page-breadcrumb a:hover {
  text-decoration: underline;
}

.exam-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(59, 130, 246, 0.1);
  color: var(--primary);
  padding: 0.35rem 0.85rem;
  border-radius: 9999px;
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 1rem;
  border: 1px solid rgba(59, 130, 246, 0.2);
}

.exam-highlights-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin: 2rem 0;
}

.exam-highlight-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1.25rem 1rem;
  text-align: center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.exam-highlight-box .hl-icon {
  font-size: 1.6rem;
  margin-bottom: 0.35rem;
}

.exam-highlight-box .hl-title {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.exam-highlight-box .hl-value {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-top: 0.25rem;
}

.exam-type-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
  margin: 1.75rem 0;
}

.exam-type-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1.35rem;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.exam-type-card:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 8px 18px -4px rgba(0, 0, 0, 0.06);
}

.exam-type-card h4 {
  margin: 0 0 0.4rem 0;
  font-size: 1.08rem;
  color: var(--text-primary);
  font-weight: 700;
}

.exam-type-card p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 0.75rem;
}

.exam-type-card .card-meta-list {
  font-size: 0.82rem;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  border-top: 1px solid var(--border-color);
  padding-top: 0.75rem;
}

.exam-info-table-wrapper {
  overflow-x: auto;
  margin: 1.5rem 0 2rem;
  border-radius: 10px;
  border: 1px solid var(--border-color);
  background: var(--bg-surface);
}

.exam-info-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.92rem;
}

.exam-info-table th {
  background: var(--bg-surface-secondary);
  color: var(--text-primary);
  font-weight: 700;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border-color);
  white-space: nowrap;
}

.exam-info-table td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-secondary);
  vertical-align: middle;
}

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

.exam-info-table tr:hover td {
  background: rgba(59, 130, 246, 0.02);
}

.exam-cta-banner {
  background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 100%);
  color: #ffffff;
  padding: 2.25rem 2rem;
  border-radius: 16px;
  text-align: center;
  margin: 3rem 0 2rem;
  box-shadow: 0 10px 25px -5px rgba(37, 99, 235, 0.3);
}

.exam-cta-banner h3 {
  font-size: 1.6rem;
  font-weight: 800;
  margin: 0 0 0.6rem 0;
  color: #ffffff;
}

.exam-cta-banner p {
  font-size: 1rem;
  color: #dbeafe;
  max-width: 600px;
  margin: 0 auto 1.5rem auto;
  line-height: 1.6;
}

.exam-cta-banner .btn-cta-white {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: #ffffff;
  color: #1e3a8a;
  font-weight: 700;
  padding: 0.75rem 1.6rem;
  border-radius: 8px;
  text-decoration: none;
  font-size: 0.98rem;
  transition: all 0.2s ease;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.exam-cta-banner .btn-cta-white:hover {
  background: #f8fafc;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

.syllabus-tag-container {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.syllabus-tag {
  background: var(--bg-surface-secondary);
  border: 1px solid var(--border-color);
  padding: 0.3rem 0.65rem;
  border-radius: 6px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
}

[data-theme="dark"] .exam-highlight-box,
[data-theme="dark"] .exam-type-card,
[data-theme="dark"] .exam-info-table-wrapper {
  background: #1e293b;
  border-color: #334155;
}

[data-theme="dark"] .exam-info-table th {
  background: #0f172a;
  border-color: #334155;
}

[data-theme="dark"] .exam-info-table td {
  border-color: #334155;
}

[data-theme="dark"] .syllabus-tag {
  background: #0f172a;
  border-color: #334155;
}

/* Interactive Mock Test CTA Section (Below FAQ) */
.homepage-interactive-cta {
  max-width: 860px;
  margin: 3rem auto 4rem auto;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 1.25rem;
  padding: 2rem 2.25rem;
  color: var(--text-primary);
  box-shadow: 0 4px 20px -4px rgba(0, 0, 0, 0.05);
  position: relative;
  overflow: hidden;
  transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

.cta-header-wrapper {
  text-align: center;
  margin-bottom: 1.5rem;
}

.cta-catchphrase {
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1.3;
  color: var(--text-primary);
  margin-bottom: 0.4rem;
  letter-spacing: -0.01em;
}

.cta-subtitle {
  font-size: 0.95rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.5;
}

.cta-pills-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  justify-content: center;
  margin-bottom: 1.25rem;
}

.cta-exam-pill {
  background: var(--bg-surface-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 0.4rem 0.85rem;
  border-radius: 9999px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
  user-select: none;
}

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

.cta-exam-pill.active {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
  box-shadow: 0 2px 6px rgba(59, 130, 246, 0.25);
}

.cta-single-action-box {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 1.5rem;
}

.btn-cta-single-start {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: var(--primary);
  color: #ffffff;
  font-size: 1.05rem;
  font-weight: 700;
  padding: 0.85rem 2.2rem;
  border-radius: 0.65rem;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  box-shadow: 0 4px 14px rgba(59, 130, 246, 0.35);
}

.btn-cta-single-start:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.45);
}

/* Dark theme overrides for interactive CTA */
[data-theme="dark"] .homepage-interactive-cta {
  background: rgba(30, 41, 59, 0.6);
  border-color: rgba(71, 85, 105, 0.6);
}

[data-theme="dark"] .cta-exam-pill {
  background: rgba(30, 41, 59, 0.8);
  border-color: #475569;
  color: #cbd5e1;
}

[data-theme="dark"] .cta-exam-pill:hover {
  background: #334155;
  color: #ffffff;
  border-color: #64748b;
}

@media (max-width: 640px) {
  .homepage-interactive-cta {
    padding: 1.5rem 1rem;
    margin: 2rem 0.75rem;
  }
  .cta-catchphrase {
    font-size: 1.2rem;
  }
  .btn-cta-single-start {
    width: 100%;
  }
}

