/* ==========================================================================
   A1M - Modern Test Series Portal CSS
   Design: Clean Crisp White Background with Original Vibrant Blue/Purple Accents
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Outfit:wght@400;500;600;700;800&display=swap');

:root {
  --font-primary: 'Inter', system-ui, -apple-system, sans-serif;
  --font-display: 'Outfit', sans-serif;

  /* Color Palette - Clean White Base with Original Vibrant Blue & Purple Accents */
  --bg-dark: #ffffff;
  --bg-card: #ffffff;
  --bg-card-hover: #f8fafc;
  --border-color: #e2e8f0;
  --border-glow: rgba(59, 130, 246, 0.4);

  --text-primary: #0f172a;   /* Rich Slate 900 */
  --text-secondary: #475569; /* Slate 600 */
  --text-muted: #64748b;     /* Slate 500 */

  --accent-primary: #3b82f6;   /* Royal Blue */
  --accent-secondary: #8b5cf6; /* Electric Purple */
  --accent-cyan: #06b6d4;      /* Vibrant Cyan */
  --accent-emerald: #10b981;   /* Emerald Green */
  --accent-amber: #f59e0b;     /* Star Gold */
  --accent-rose: #f43f5e;      /* Rose Red */

  --gradient-brand: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 50%, #ec4899 100%);
  --gradient-card: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  --gradient-glow: radial-gradient(circle at 50% 0%, rgba(59, 130, 246, 0.1), transparent 70%);

  --shadow-sm: 0 4px 12px rgba(15, 23, 42, 0.05);
  --shadow-lg: 0 20px 30px -10px rgba(15, 23, 42, 0.08), 0 8px 10px -6px rgba(15, 23, 42, 0.04);
  --shadow-glow: 0 8px 30px rgba(59, 130, 246, 0.25);

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;

  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Optional Dark Theme Toggle */
[data-theme="dark"] {
  --bg-dark: #0b0f19;
  --bg-card: rgba(18, 24, 38, 0.85);
  --bg-card-hover: rgba(27, 36, 56, 0.95);
  --border-color: rgba(255, 255, 255, 0.08);
  --border-glow: rgba(59, 130, 246, 0.4);

  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #64748b;

  --gradient-card: linear-gradient(180deg, rgba(30, 41, 59, 0.5) 0%, rgba(15, 23, 42, 0.7) 100%);
  --gradient-glow: radial-gradient(circle at 50% 0%, rgba(59, 130, 246, 0.15), transparent 70%);
}

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

body {
  font-family: var(--font-primary);
  background-color: var(--bg-dark);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
  transition: background-color var(--transition-fast), color var(--transition-fast);
}

/* Typography Utility */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.25;
}

.gradient-text {
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Glassmorphism Container */
.glass-panel {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-smooth);
}

.glass-panel:hover {
  border-color: rgba(59, 130, 246, 0.35);
  box-shadow: var(--shadow-lg);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
  background: rgba(59, 130, 246, 0.4);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(59, 130, 246, 0.7);
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-color);
  padding: 1rem 2rem;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.03);
}

[data-theme="dark"] .navbar {
  background: rgba(11, 15, 25, 0.85);
}

.nav-container {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.5rem;
  font-family: var(--font-display);
  font-weight: 800;
  text-decoration: none;
  color: var(--text-primary);
}

.brand-logo i {
  font-size: 1.75rem;
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

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

.nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  transition: color var(--transition-fast);
}

.nav-link:hover, .nav-link.active {
  color: var(--accent-primary);
}

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

.btn-icon {
  background: #f1f5f9;
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  width: 42px;
  height: 42px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}

[data-theme="dark"] .btn-icon {
  background: rgba(255, 255, 255, 0.05);
}

.btn-icon:hover {
  background: #e2e8f0;
  color: var(--accent-primary);
  transform: scale(1.05);
}

.btn-primary {
  background: var(--gradient-brand);
  color: #fff;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(59, 130, 246, 0.35);
  transition: all var(--transition-fast);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
}

.btn-primary:hover {
  box-shadow: 0 6px 22px rgba(59, 130, 246, 0.55);
  transform: translateY(-2px);
}

.btn-outline {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: var(--text-primary);
  padding: 0.65rem 1.25rem;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all var(--transition-fast);
}

[data-theme="dark"] .btn-outline {
  background: transparent;
}

.btn-outline:hover {
  border-color: var(--accent-primary);
  background: rgba(59, 130, 246, 0.08);
  color: var(--accent-primary);
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero-section {
  position: relative;
  padding: 5rem 1.5rem 4rem;
  background: var(--gradient-glow);
  text-align: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1.25rem;
  background: rgba(59, 130, 246, 0.08);
  border: 1px solid rgba(59, 130, 246, 0.25);
  border-radius: var(--radius-full);
  color: var(--accent-primary);
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
}

.hero-title {
  font-size: 3.25rem;
  max-width: 900px;
  margin: 0 auto 1.25rem;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.hero-subtitle {
  font-size: 1.2rem;
  color: var(--text-secondary);
  max-width: 680px;
  margin: 0 auto 2.5rem;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  max-width: 900px;
  margin: 0 auto 3rem;
}

.stat-card {
  padding: 1.25rem;
  text-align: center;
  background: #ffffff;
  border: 1px solid var(--border-color);
}

[data-theme="dark"] .stat-card {
  background: var(--bg-card);
}

.stat-number {
  font-size: 2rem;
  font-weight: 800;
  font-family: var(--font-display);
  color: var(--accent-primary);
}

.stat-label {
  font-size: 0.875rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* ==========================================================================
   Search & Filter Bar Section
   ========================================================================== */
.filter-section {
  max-width: 1280px;
  margin: 0 auto 3rem;
  padding: 0 1.5rem;
}

.search-box-wrapper {
  position: relative;
  max-width: 650px;
  margin: 0 auto 2rem;
}

.search-input {
  width: 100%;
  padding: 1.1rem 1.5rem 1.1rem 3.25rem;
  font-size: 1rem;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: var(--radius-full);
  color: var(--text-primary);
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.06);
  outline: none;
  transition: all var(--transition-fast);
}

[data-theme="dark"] .search-input {
  background: var(--bg-card);
}

.search-input:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 20px rgba(59, 130, 246, 0.2);
}

.search-icon {
  position: absolute;
  left: 1.25rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--accent-primary);
  font-size: 1.1rem;
}

.category-tabs {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.tab-btn {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: var(--text-secondary);
  padding: 0.65rem 1.25rem;
  border-radius: var(--radius-full);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.03);
  transition: all var(--transition-fast);
}

[data-theme="dark"] .tab-btn {
  background: rgba(255, 255, 255, 0.04);
}

.tab-btn:hover {
  background: #f0f7ff;
  color: var(--accent-primary);
  border-color: var(--accent-primary);
}

.tab-btn.active {
  background: var(--gradient-brand);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 14px rgba(59, 130, 246, 0.35);
}

/* ==========================================================================
   Exam Cards Grid
   ========================================================================== */
.exams-section {
  max-width: 1280px;
  margin: 0 auto 5rem;
  padding: 0 1.5rem;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2rem;
}

.section-title {
  font-size: 1.75rem;
  color: var(--text-primary);
}

.results-count {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.exams-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 2rem;
}

.exam-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  position: relative;
  overflow: hidden;
  background: #ffffff;
}

[data-theme="dark"] .exam-card {
  background: var(--bg-card);
}

.exam-card-header {
  padding: 1.5rem 1.5rem 1rem;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.exam-icon-box {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: #fff;
  flex-shrink: 0;
  box-shadow: var(--shadow-sm);
}

.exam-badge {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: rgba(59, 130, 246, 0.1);
  color: var(--accent-primary);
  border: 1px solid rgba(59, 130, 246, 0.25);
}

.exam-card-body {
  padding: 0 1.5rem 1.25rem;
  flex-grow: 1;
}

.exam-category-name {
  font-size: 0.8rem;
  color: var(--accent-primary);
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 0.25rem;
}

.exam-card-title {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
  color: var(--text-primary);
}

.exam-meta-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.25rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.rating-tag {
  color: var(--accent-amber);
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.breakdown-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.tag-pill {
  background: #f1f5f9;
  border: 1px solid var(--border-color);
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-sm);
  font-size: 0.775rem;
  color: var(--text-secondary);
}

[data-theme="dark"] .tag-pill {
  background: rgba(255, 255, 255, 0.05);
}

.highlights-list {
  list-style: none;
  margin-bottom: 1.25rem;
}

.highlights-list li {
  font-size: 0.85rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}

.highlights-list li i {
  color: var(--accent-emerald);
  font-size: 0.75rem;
}

.exam-card-footer {
  padding: 1.25rem 1.5rem;
  border-top: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  background: #f8fafc;
}

[data-theme="dark"] .exam-card-footer {
  background: rgba(0, 0, 0, 0.15);
}

.btn-card-action {
  flex: 1;
  text-align: center;
  padding: 0.65rem;
  font-size: 0.875rem;
}

/* ==========================================================================
   Full Screen CBT Test Simulator Modal (Light & Clean Workspace)
   ========================================================================== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity var(--transition-smooth);
}

.modal-overlay.active {
  display: flex !important;
  opacity: 1 !important;
  z-index: 200000 !important;
}

.cbt-modal-container {
  width: 100vw;
  height: 100vh;
  background: #f8fafc;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  color: #0f172a;
}

[data-theme="dark"] .cbt-modal-container {
  background: #0f172a;
  color: #f8fafc;
}

/* CBT Top Bar */
.cbt-header {
  background: #ffffff;
  border-bottom: 1px solid #e2e8f0;
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

[data-theme="dark"] .cbt-header {
  background: #1e293b;
  border-bottom-color: rgba(255, 255, 255, 0.1);
}

.cbt-exam-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
}

.cbt-timer-box {
  background: #eff6ff;
  border: 1px solid #93c5fd;
  color: #2563eb;
  padding: 0.4rem 1rem;
  border-radius: var(--radius-sm);
  font-family: monospace;
  font-size: 1.1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.cbt-user-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.cbt-user-avatar {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  background: var(--gradient-brand);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
}

/* CBT Main Workspace */
.cbt-workspace {
  flex-grow: 1;
  display: grid;
  grid-template-columns: 1fr 340px;
  height: calc(100vh - 65px - 60px);
  overflow: hidden;
}

.cbt-left-pane {
  display: flex;
  flex-direction: column;
  border-right: 1px solid #e2e8f0;
  background: #f8fafc;
}

[data-theme="dark"] .cbt-left-pane {
  border-right-color: rgba(255, 255, 255, 0.1);
  background: #0b0f19;
}

/* Subject Tabs */
.cbt-sections-bar {
  background: #ffffff;
  padding: 0.5rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border-bottom: 1px solid #e2e8f0;
}

[data-theme="dark"] .cbt-sections-bar {
  background: #182234;
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

.cbt-sec-tab {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  padding: 0.5rem 1rem;
  font-weight: 600;
  font-size: 0.875rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.cbt-sec-tab.active {
  background: var(--accent-primary);
  color: #fff;
}

/* Question Area */
.cbt-question-header {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #ffffff;
}

[data-theme="dark"] .cbt-question-header {
  border-bottom-color: rgba(255, 255, 255, 0.06);
  background: rgba(30, 41, 59, 0.3);
}

.q-number {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
}

.q-marks-tag {
  font-size: 0.8rem;
  color: #059669;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-sm);
}

.cbt-question-body {
  flex-grow: 1;
  padding: 2rem 1.5rem;
  overflow-y: auto;
}

.q-text {
  font-size: 1.1rem;
  color: var(--text-primary);
  margin-bottom: 2rem;
  line-height: 1.7;
  white-space: pre-line;
}

.options-group {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 750px;
}

.option-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-md);
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.02);
  transition: all var(--transition-fast);
}

[data-theme="dark"] .option-item {
  background: rgba(30, 41, 59, 0.5);
  border-color: rgba(255, 255, 255, 0.1);
}

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

.option-item.selected {
  border-color: var(--accent-primary);
  background: #eff6ff;
  box-shadow: 0 0 12px rgba(59, 130, 246, 0.2);
}

.option-radio {
  width: 20px;
  height: 20px;
  accent-color: var(--accent-primary);
}

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

/* CBT Right Palette Pane */
.cbt-right-pane {
  background: #ffffff;
  display: flex;
  flex-direction: column;
  padding: 1.25rem;
  overflow-y: auto;
  border-left: 1px solid #e2e8f0;
}

[data-theme="dark"] .cbt-right-pane {
  background: #0f172a;
  border-left-color: rgba(255, 255, 255, 0.1);
}

.palette-status-legend {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #e2e8f0;
}

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

.legend-badge {
  width: 22px;
  height: 22px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: #fff;
}

.bg-answered { background: var(--accent-emerald); }
.bg-marked { background: var(--accent-secondary); }
.bg-not-answered { background: var(--accent-rose); }
.bg-not-visited { background: #cbd5e1; color: #334155 !important; }

[data-theme="dark"] .bg-not-visited { background: #334155; color: #fff !important; }

.palette-grid-container {
  flex-grow: 1;
}

.palette-section-title {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
  text-transform: uppercase;
}

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

.q-palette-btn {
  height: 42px;
  border-radius: var(--radius-sm);
  border: none;
  font-weight: 700;
  font-size: 0.9rem;
  color: #fff;
  cursor: pointer;
  transition: transform var(--transition-fast);
}

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

.q-palette-btn.current {
  outline: 2px solid var(--accent-cyan);
  outline-offset: 2px;
}

/* CBT Bottom Action Footer */
.cbt-footer {
  height: 60px;
  background: #ffffff;
  border-top: 1px solid #e2e8f0;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

[data-theme="dark"] .cbt-footer {
  background: #1e293b;
  border-top-color: rgba(255, 255, 255, 0.1);
}

.cbt-action-btns {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* ==========================================================================
   Scorecard / Analytics Modal
   ========================================================================== */
.score-modal-content {
  width: 90%;
  max-width: 900px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 2.5rem;
  background: #ffffff;
  border: 1px solid var(--border-color);
  box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.15);
  color: var(--text-primary);
}

[data-theme="dark"] .score-modal-content {
  background: #0f172a;
}

.score-header {
  text-align: center;
  margin-bottom: 2rem;
}

.score-header h2 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.score-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

.score-stat-box {
  padding: 1.25rem;
  text-align: center;
  background: #f8fafc;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

[data-theme="dark"] .score-stat-box {
  background: rgba(30, 41, 59, 0.6);
}

.score-val {
  font-size: 2.25rem;
  font-weight: 800;
  font-family: var(--font-display);
}

.val-green { color: var(--accent-emerald); }
.val-blue { color: var(--accent-primary); }
.val-purple { color: var(--accent-secondary); }
.val-amber { color: var(--accent-amber); }

.solutions-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.solution-card {
  padding: 1.5rem;
  background: #f8fafc;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
}

[data-theme="dark"] .solution-card {
  background: rgba(30, 41, 59, 0.4);
}

.solution-q-title {
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.solution-status-tag {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.sol-correct { background: #d1fae5; color: #059669; }
.sol-incorrect { background: #fee2e2; color: #dc2626; }
.sol-unattempted { background: #e2e8f0; color: #64748b; }

.solution-box {
  margin-top: 0.75rem;
  padding: 1rem;
  background: #ffffff;
  border-left: 4px solid var(--accent-cyan);
  border-radius: 4px;
  font-size: 0.9rem;
  color: var(--text-secondary);
  border: 1px solid #e2e8f0;
}

[data-theme="dark"] .solution-box {
  background: rgba(15, 23, 42, 0.6);
  border-color: transparent;
}

/* ==========================================================================
   Pricing Section
   ========================================================================== */
.pricing-section {
  max-width: 1280px;
  margin: 0 auto 5rem;
  padding: 0 1.5rem;
  text-align: center;
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.pricing-card {
  padding: 2.5rem 2rem;
  display: flex;
  flex-direction: column;
  position: relative;
  background: #ffffff;
}

[data-theme="dark"] .pricing-card {
  background: var(--bg-card);
}

.pricing-card.popular {
  border-color: var(--accent-primary);
  box-shadow: 0 15px 35px rgba(59, 130, 246, 0.15);
  transform: scale(1.03);
}

.pricing-card.popular::before {
  content: 'MOST POPULAR';
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--gradient-brand);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 800;
  padding: 0.25rem 1rem;
  border-radius: var(--radius-full);
}

.price-title {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.price-amount {
  font-size: 3rem;
  font-weight: 800;
  font-family: var(--font-display);
  color: var(--text-primary);
  margin-bottom: 1.5rem;
}

.price-period {
  font-size: 1rem;
  color: var(--text-muted);
  font-weight: 400;
}

.pricing-features {
  list-style: none;
  text-align: left;
  margin-bottom: 2rem;
  flex-grow: 1;
}

.pricing-features li {
  font-size: 0.9rem;
  color: var(--text-secondary);
  padding: 0.6rem 0;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border-bottom: 1px solid var(--border-color);
}

.pricing-features li i {
  color: var(--accent-emerald);
}

/* ==========================================================================
   Footer & Testimonials
   ========================================================================== */
.testimonials-section {
  max-width: 1280px;
  margin: 0 auto 5rem;
  padding: 0 1.5rem;
}

.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
  margin-top: 2.5rem;
}

.testimonial-card {
  padding: 2rem;
  background: #ffffff;
}

[data-theme="dark"] .testimonial-card {
  background: var(--bg-card);
}

.topper-info {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.topper-photo {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-full);
  object-fit: cover;
}

.topper-name {
  font-weight: 700;
  font-size: 1rem;
  color: var(--text-primary);
}

.topper-exam {
  font-size: 0.8rem;
  color: var(--accent-primary);
  font-weight: 600;
}

.footer {
  background: #f1f5f9;
  border-top: 1px solid var(--border-color);
  padding: 4rem 1.5rem 2rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}

[data-theme="dark"] .footer {
  background: #070a12;
}

.footer-container {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-bottom {
  max-width: 1280px;
  margin: 0 auto;
  padding-top: 2rem;
  border-top: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

@media (max-width: 600px) {
  .hero-title { font-size: 2rem; }
  .nav-menu { display: none; }
  .exams-grid { grid-template-columns: 1fr; }
  .footer-container { grid-template-columns: 1fr; }
}

/* ==========================================================================
   DRM Security Suite, Dynamic Moving Watermark & Canvas Reader Styles
   ========================================================================== */

/* Anti-copy & selection protection on core elements */
.protected-content,
.notes-viewport,
.cbt-modal-container,
.exam-card-title,
.q-text,
.options-group {
  -webkit-user-select: none !important;
  -moz-user-select: none !important;
  -ms-user-select: none !important;
  user-select: none !important;
}

/* 1. Dynamic Moving Watermark Overlay (Enterprise Ultra-Subtle Style) */
.watermark-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none !important;
  z-index: 99999;
  overflow: hidden;
}

/* Subtle Floating Watermark Pill */
.moving-watermark-box {
  position: absolute;
  top: 15%;
  left: 10%;
  transform: rotate(-12deg);
  background: rgba(15, 23, 42, 0.12);
  border: 1px solid rgba(234, 88, 12, 0.18);
  color: var(--text-primary);
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
  backdrop-filter: blur(2px);
  transition: all 1.2s cubic-bezier(0.25, 1, 0.5, 1);
  opacity: 0.18;
  font-family: 'Inter', monospace, sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  pointer-events: none;
  user-select: none;
}

[data-theme="dark"] .moving-watermark-box {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.12);
  color: #e2e8f0;
  opacity: 0.14;
}

/* Subdued Background Grid */
.watermark-grid {
  position: absolute;
  inset: -20%;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6rem;
  transform: rotate(-25deg);
  pointer-events: none;
  opacity: 0.06;
}

.wm-grid-item {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  letter-spacing: 0.06em;
  user-select: none;
  font-family: monospace;
}

/* 2. Privacy Screen Blackout Overlay */
.screen-privacy-overlay {
  position: fixed;
  inset: 0;
  background: rgba(11, 17, 32, 0.96);
  backdrop-filter: blur(20px);
  z-index: 100000;
  display: none;
  align-items: center;
  justify-content: center;
}

.screen-privacy-overlay.active {
  display: flex;
}

.privacy-box {
  max-width: 440px;
  width: 90%;
  padding: 2.5rem;
  text-align: center;
  background: var(--bg-card);
  border: 1px solid var(--border-glow);
  box-shadow: var(--shadow-xl);
}

.privacy-icon {
  font-size: 3.5rem;
  color: var(--accent-rose);
  margin-bottom: 1rem;
}

.privacy-badge {
  display: inline-block;
  background: rgba(244, 63, 94, 0.15);
  color: var(--accent-rose);
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
  margin-top: 1rem;
}

/* 3. Security Toasts */
.security-toast-container {
  position: fixed;
  top: 1.25rem;
  right: 1.25rem;
  z-index: 100001;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
}

.security-toast {
  background: #0f172a;
  color: #ffffff;
  border-left: 4px solid var(--accent-rose);
  padding: 0.75rem 1.15rem;
  border-radius: var(--radius-sm);
  font-size: 0.825rem;
  font-weight: 500;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  gap: 0.65rem;
  animation: toastSlideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: auto;
}

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

/* 4. DRM Suite Button & Pulse */
.drm-suite-badge-btn {
  border-color: var(--accent-emerald) !important;
  color: var(--text-primary) !important;
  position: relative;
  overflow: hidden;
}

.text-emerald { color: var(--accent-emerald) !important; }
.text-amber { color: var(--accent-amber) !important; }

.shield-pulse {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 7px;
  height: 7px;
  background: var(--accent-emerald);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--accent-emerald);
  animation: pulseGlow 1.8s infinite;
}

@keyframes pulseGlow {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.5); opacity: 0.4; }
}

/* 5. Secure HTML5 Canvas Notes Reader Section */
.notes-reader-section {
  padding: 4rem 1.5rem;
  max-width: 1280px;
  margin: 0 auto;
}

.canvas-reader-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.canvas-toolbar {
  padding: 1rem 1.5rem;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.canvas-title-box {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-grow: 1;
}

.notes-select-dropdown {
  max-width: 500px;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 600;
}

.canvas-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.zoom-controls, .canvas-page-nav {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-dark);
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
}

.zoom-text, .page-text {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  padding: 0 0.25rem;
}

.btn-sm {
  padding: 0.35rem 0.75rem !important;
  font-size: 0.8rem !important;
}

.security-status-tag {
  background: rgba(16, 185, 129, 0.15);
  color: var(--accent-emerald);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.canvas-viewport {
  width: 100%;
  min-height: 540px;
  max-height: 720px;
  overflow: auto;
  background: #0f172a;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 1.5rem;
  position: relative;
}

.notes-canvas {
  background: #ffffff;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  border-radius: 4px;
  cursor: default;
}

.canvas-footer {
  padding: 0.85rem 1.5rem;
  background: var(--bg-card);
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.825rem;
  color: var(--text-muted);
}

.canvas-footer-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* 6. Security Control Center Modal */
.security-modal-container {
  width: 92%;
  max-width: 1100px;
  background: var(--bg-card);
  padding: 0;
  border: 1px solid var(--border-glow);
  overflow: hidden;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
}

.security-modal-header {
  padding: 1.25rem 1.75rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-dark);
}

.security-shield-icon {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(234, 88, 12, 0.15);
  color: var(--accent-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
}

.security-modal-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  flex-grow: 1;
  overflow: hidden;
}

.sec-left-panel {
  padding: 1.5rem;
  border-right: 1px solid var(--border-color);
  overflow-y: auto;

  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.sec-right-panel {
  padding: 1.5rem;
  background: var(--bg-dark);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.user-cred-card {
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.25);
  padding: 1rem;
  border-radius: var(--radius-md);
}

.cred-header {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent-emerald);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.65rem;
}

.cred-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.cred-lbl {
  color: var(--text-muted);
}

.badge-active-session {
  background: rgba(16, 185, 129, 0.2);
  color: var(--accent-emerald);
  font-weight: 700;
  padding: 0.1rem 0.5rem;
  border-radius: 4px;
  font-size: 0.725rem;
}

.sec-box {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 1rem;
  border-radius: var(--radius-md);
}

.sec-box h4 {
  font-size: 0.9rem;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.sec-control-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
  font-size: 0.85rem;
}

.sec-select {
  padding: 0.4rem 0.75rem;
  font-size: 0.8rem;
}

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

.chip {
  font-size: 0.725rem;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-sm);
  background: var(--bg-dark);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
}

.chip.active {
  background: rgba(234, 88, 12, 0.15);
  color: var(--accent-primary);
  border-color: rgba(234, 88, 12, 0.3);
  font-weight: 600;
}

.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.45rem 0;
  font-size: 0.825rem;
  border-bottom: 1px dashed var(--border-color);
  cursor: pointer;
}

.toggle-row:last-child {
  border-bottom: none;
}

.toggle-row input[type="checkbox"] {
  accent-color: var(--accent-primary);
  width: 16px;
  height: 16px;
}

.audit-log-stream {
  flex-grow: 1;
  overflow-y: auto;
  font-family: monospace;
  font-size: 0.78rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding-right: 0.35rem;
}

.log-entry {
  background: var(--bg-card);
  padding: 0.5rem 0.75rem;
  border-radius: 4px;
  border-left: 3px solid var(--accent-primary);
  line-height: 1.4;
  color: var(--text-secondary);
}

.log-entry.warn {
  border-left-color: var(--accent-rose);
  background: rgba(244, 63, 94, 0.06);
}

.log-entry.info {
  border-left-color: var(--accent-cyan);
}

.log-time {
  color: var(--text-muted);
  font-size: 0.7rem;
  margin-right: 0.35rem;
}

/* 7. Proctor Warning Modal */
.proctor-warning-card {
  width: 90%;
  max-width: 440px;
  padding: 2.25rem;
  text-align: center;
  background: var(--bg-card);
  border: 1px solid rgba(244, 63, 94, 0.4);
}

.warning-icon-badge {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: rgba(244, 63, 94, 0.15);
  color: var(--accent-rose);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  margin: 0 auto 1rem;
}

.violation-count-badge {
  display: inline-block;
  background: var(--accent-rose);
  color: #ffffff;
  font-size: 0.85rem;
  font-weight: 700;
  padding: 0.35rem 1rem;
  border-radius: var(--radius-full);
}

.violation-alert-box {
  background: rgba(244, 63, 94, 0.08);
  border: 1px solid rgba(244, 63, 94, 0.25);
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  font-size: 0.8rem;
  color: var(--accent-rose);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-align: left;
}

@media (max-width: 768px) {
  .security-modal-grid { grid-template-columns: 1fr; }
  .sec-left-panel { border-right: none; border-bottom: 1px solid var(--border-color); }
}

/* ==========================================================================
   MOBILE-FIRST APP DESIGN & TOUCH UX SYSTEM
   ========================================================================== */

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

/* Mobile Off-Canvas Drawer */
.mobile-nav-drawer {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: var(--bg-card);
  z-index: 150000;
  border-bottom: 1px solid var(--border-color);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
  transform: translateY(-100%);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
}

.mobile-nav-drawer.active {
  transform: translateY(0);
}

.mobile-drawer-header {
  padding: 1rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-dark);
}

.mobile-drawer-menu {
  list-style: none;
  padding: 0.75rem 0;
}

.mobile-drawer-link {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.95rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  text-decoration: none;
  border-bottom: 1px solid var(--border-color);
  transition: background 0.2s;
}

.mobile-drawer-link:active {
  background: rgba(234, 88, 12, 0.1);
  color: var(--accent-primary);
}

.mobile-drawer-link i {
  color: var(--accent-primary);
  width: 20px;
}

/* Explicitly hide mobile elements on Laptops & Desktops (> 768px) */
@media (min-width: 769px) {
  .mobile-nav-drawer,
  .mobile-menu-btn {
    display: none !important;
  }
}

/* Mobile Touch & Layout Media Queries (<= 768px Smartphones) */
@media (max-width: 768px) {

  .nav-menu {
    display: none !important;
  }

  .desktop-only-btn {
    display: none !important;
  }

  .mobile-menu-btn {
    display: flex !important;
  }

  .mobile-bottom-bar {
    display: grid !important;
  }

  .hero-section {
    padding: 2.25rem 1rem 1.5rem !important;
    text-align: center;
  }

  .hero-title {
    font-size: 1.85rem !important;
    line-height: 1.3 !important;
  }

  .hero-subtitle {
    font-size: 0.95rem !important;
  }

  /* 2x2 Grid for Stats on Smartphones */
  .stats-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.75rem !important;
  }

  .stat-card {
    padding: 1rem 0.75rem !important;
  }

  .stat-number {
    font-size: 1.5rem !important;
  }

  .stat-label {
    font-size: 0.75rem !important;
  }

  /* Single Column Stack for Exams Grid */
  .exams-grid {
    grid-template-columns: 1fr !important;
    gap: 1.25rem !important;
  }

  /* Secure Notes Canvas Responsive */
  .notes-reader-section {
    padding: 2rem 0.85rem !important;
  }

  .canvas-toolbar {
    flex-direction: column !important;
    align-items: stretch !important;
    padding: 0.85rem !important;
  }

  .notes-select-dropdown {
    max-width: 100% !important;
    font-size: 0.825rem !important;
  }

  .canvas-actions {
    justify-content: space-between !important;
    width: 100% !important;
  }

  .canvas-viewport {
    padding: 0.5rem !important;
    min-height: 380px !important;
    max-height: 500px !important;
  }

  /* Mobile Responsive Modals */
  .glass-panel {
    border-radius: var(--radius-md) !important;
  }

  .modal-overlay {
    padding: 0 !important;
  }

  .modal-overlay > .glass-panel {
    width: 100% !important;
    max-width: 100% !important;
    height: 100% !important;
    max-height: 100% !important;
    border-radius: 0 !important;
  }

  /* Touch-Optimized Form Input Heights & Spacious Mobile Layout */
  #studentAuthModal .glass-panel {
    width: 100% !important;
    max-width: 100% !important;
    height: 100vh !important;
    max-height: 100vh !important;
    border-radius: 0 !important;
  }

  #studentAuthModal form div[style*="grid-template-columns"],
  form div[style*="grid-template-columns"] {
    grid-template-columns: 1fr !important;
    gap: 1.25rem !important;
    margin-bottom: 1.5rem !important;
  }

  input[type="text"],
  input[type="email"],
  input[type="tel"],
  input[type="password"],
  input[type="date"],
  select,
  textarea {
    font-size: 16px !important; /* Prevents mobile browser auto-zoom on focus */
    min-height: 48px !important;
    padding: 0.85rem 1.1rem !important;
    border-radius: var(--radius-md) !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  #studentAuthModal label {
    font-size: 0.875rem !important;
    font-weight: 600 !important;
    margin-bottom: 0.45rem !important;
    display: block !important;
    color: var(--text-primary) !important;
  }

  #studentAuthModal .tab-btn {
    padding: 0.85rem 1rem !important;
    font-size: 0.9rem !important;
    flex: 1 !important;
    justify-content: center !important;
  }

  #studentAuthModal button[type="submit"] {
    min-height: 52px !important;
    font-size: 1rem !important;
    font-weight: 700 !important;
    margin-top: 1.5rem !important;
  }

  /* CBT Simulator Mobile Workspace */
  .cbt-workspace {
    grid-template-columns: 1fr !important;
  }

  .cbt-header {
    padding: 0.5rem 0.85rem !important;
    font-size: 0.85rem !important;
  }

  .cbt-left-pane {
    padding: 1rem 0.85rem !important;
  }

  .cbt-footer {
    padding: 0.75rem 0.85rem !important;
    flex-direction: column !important;
    gap: 0.5rem !important;
  }

  .cbt-action-btns {
    width: 100% !important;
    justify-content: space-between !important;
  }

  .moving-watermark-box {
    font-size: 0.7rem !important;
    padding: 0.25rem 0.65rem !important;
  }
}


