/* ==========================================================================
   MCQWaale - Light Blue & Bright Blue Theme Design System
   Colors Requested: Light blue (#E9F1FA), Bright blue (#00ABE4), White (#FFFFFF)
   Fonts: Inter & Mukta Devanagari
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Mukta:wght@400;500;600;700;800&display=swap');

:root {
  --bg-slate: #E9F1FA;            /* Primary Light Blue Background */
  --bg-surface: #FFFFFF;          /* Pure White Cards & Surfaces */
  --bg-muted: #D9E8F5;            /* Soft Blue Muted */
  --brand-navy: #0F2C59;          /* Deep Navy Text & Contrast Headers */
  --brand-navy-light: #1E3A8A;
  --brand-blue: #00ABE4;          /* Requested Bright Blue Accent */
  --brand-blue-dark: #008BBF;     /* Hover Darker Blue */
  --brand-blue-light: #D4EBF8;    /* Soft Bright Blue Tint */
  --brand-green: #059669;
  --brand-green-light: #E0F2FE;
  --brand-rose: #E11D48;
  --brand-rose-light: #FFE4E6;
  --text-primary: #0F2C59;
  --text-secondary: #334155;
  --text-muted: #64748B;
  --border-light: #CBD5E1;
  --border-subtle: #D4E2F0;
  --shadow-sm: 0 2px 4px 0 rgba(0, 171, 228, 0.06);
  --shadow-md: 0 4px 10px -1px rgba(0, 171, 228, 0.12);
  --shadow-card: 0 10px 25px -5px rgba(15, 44, 89, 0.08), 0 4px 6px -2px rgba(0, 171, 228, 0.04);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-full: 9999px;
  --transition-fast: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  --font-base: 'Inter', 'Mukta', system-ui, -apple-system, sans-serif;
  --font-hindi: 'Mukta', 'Inter', system-ui, sans-serif;
}

html {
  overflow-y: scroll;
  scrollbar-gutter: stable;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-base);
  background-color: var(--bg-slate);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: var(--brand-blue);
  text-decoration: none;
  transition: var(--transition-fast);
}

a:hover {
  color: var(--brand-blue-dark);
}

/* ==========================================================================
   Header & Navbar Layout
   ========================================================================== */

.app-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background-color: #FFFFFF !important;
  border-bottom: 2px solid var(--brand-blue-light);
  box-shadow: 0 2px 10px rgba(15, 44, 89, 0.08);
}

.header-container {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 20px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  flex-shrink: 0;
}

.logo-icon-box {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, var(--brand-blue), var(--brand-navy));
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFFFFF;
  box-shadow: 0 4px 10px rgba(0, 171, 228, 0.3);
}

.logo-text-box {
  display: flex;
  flex-direction: column;
}

.logo-title {
  font-size: 22px;
  font-weight: 800;
  color: var(--brand-navy);
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.logo-title span {
  color: var(--brand-blue);
}

.logo-subtitle {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* Search Bar in Header */
.header-search {
  flex: 1;
  max-width: 420px;
  position: relative;
}

.header-search input {
  width: 100%;
  padding: 10px 16px 10px 42px;
  background-color: var(--bg-slate);
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-full);
  font-size: 14px;
  color: var(--text-primary);
  outline: none;
  transition: var(--transition-fast);
}

.header-search input:focus {
  background-color: #FFFFFF;
  border-color: var(--brand-blue);
  box-shadow: 0 0 0 3px rgba(0, 171, 228, 0.2);
}

.header-search .search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--brand-blue);
  pointer-events: none;
}

.header-search .search-clear-btn {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  padding: 4px;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  border-radius: 50%;
  transition: color 0.15s ease;
}

.header-search .search-clear-btn:hover {
  color: #ef4444;
}

/* Global Search Live Results Dropdown */
.search-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  width: 100%;
  min-width: 320px;
  max-width: 520px;
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 14px;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.16);
  max-height: 440px;
  overflow-y: auto;
  z-index: 9999;
  display: none;
}

.search-dropdown-menu.is-active {
  display: block;
}

.search-dropdown-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 14px;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  font-size: 11px;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.search-dropdown-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  text-decoration: none;
  color: inherit;
  border-bottom: 1px solid #f1f5f9;
  transition: background 0.15s ease, border-left 0.15s ease;
  border-left: 3px solid transparent;
}

.search-dropdown-item:hover,
.search-dropdown-item.is-selected {
  background: #eff6ff;
  border-left-color: var(--brand-blue);
}

.search-dropdown-item .item-icon-box {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: #eff6ff;
  color: var(--brand-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13.5px;
  flex-shrink: 0;
  margin-right: 12px;
}

.search-dropdown-item.type-subject .item-icon-box {
  background: #ecfdf5;
  color: #059669;
}

.search-dropdown-item.type-note .item-icon-box {
  background: #fff7ed;
  color: #c2410c;
}

.search-dropdown-item .item-main {
  flex: 1;
  min-width: 0;
}

.search-dropdown-item .item-title {
  font-size: 13px;
  font-weight: 700;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}

.search-dropdown-item .item-meta {
  font-size: 11px;
  color: #64748b;
  margin-top: 2px;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-dropdown-item .item-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  background: #f1f5f9;
  color: #475569;
  white-space: nowrap;
  flex-shrink: 0;
  margin-left: 10px;
}

.search-dropdown-empty {
  padding: 24px 16px;
  text-align: center;
  color: #64748b;
  font-size: 13px;
}

.search-dropdown-loading {
  padding: 18px 16px;
  text-align: center;
  color: #64748b;
  font-size: 13px;
}

/* Controls & Language Switcher */
.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.lang-toggle-bar {
  background-color: var(--bg-slate);
  padding: 3px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  border: 1px solid var(--border-subtle);
}

.lang-btn {
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 700;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition-fast);
}

.lang-btn.active {
  background-color: var(--brand-blue);
  color: #FFFFFF;
  box-shadow: var(--shadow-sm);
}

.nav-link-btn {
  padding: 8px 12px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 600;
  color: var(--brand-navy);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  transition: var(--transition-fast);
}

.nav-link-btn:hover {
  background-color: var(--brand-blue-light);
  color: var(--brand-blue-dark);
}

.nav-link-btn.btn-primary {
  background-color: var(--brand-blue);
  color: #FFFFFF;
  flex-shrink: 0;
  white-space: nowrap;
  font-weight: 700;
  padding: 8px 16px;
}

.nav-link-btn.btn-primary:hover {
  background-color: var(--brand-blue-dark);
}

/* ==========================================================================
   Navigation Dropdown Menu (Academy -> About & Contact)
   ========================================================================== */
.nav-dropdown {
  position: relative;
  display: inline-flex;
}

.nav-dropdown-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  font-family: inherit;
}

.dropdown-caret {
  font-size: 11px;
  margin-left: 4px;
  transition: transform 0.25s ease;
}

.nav-dropdown:hover .dropdown-caret,
.nav-dropdown.open .dropdown-caret {
  transform: rotate(180deg);
}

@media (min-width: 1081px) {
  .nav-dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: #ffffff;
    border: 1.5px solid #e2e8f0;
    border-radius: 14px;
    box-shadow: 0 14px 35px rgba(15, 23, 42, 0.12);
    min-width: 270px;
    padding: 8px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1), transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.2s;
    z-index: 1050;
  }

  .nav-dropdown-menu::before {
    content: '';
    position: absolute;
    top: -12px;
    left: 0;
    right: 0;
    height: 12px;
  }

  .nav-dropdown:hover .nav-dropdown-menu,
  .nav-dropdown.open .nav-dropdown-menu {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
  }

  .nav-dropdown.dropdown-align-right .nav-dropdown-menu {
    left: auto;
    right: 0;
    transform: translateY(10px);
  }

  .nav-dropdown.dropdown-align-right:hover .nav-dropdown-menu,
  .nav-dropdown.dropdown-align-right.open .nav-dropdown-menu {
    transform: translateY(0);
  }
}

.nav-dropdown-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  text-decoration: none;
  transition: background-color 0.15s ease, transform 0.15s ease;
}

.nav-dropdown-item:hover {
  background-color: #f8fafc;
  transform: translateX(2px);
}

.nav-dropdown-item.active {
  background-color: #eff6ff;
}

.dropdown-icon-box {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.dropdown-text-box {
  display: flex;
  flex-direction: column;
}

.dropdown-item-title {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--brand-navy);
  line-height: 1.3;
}

.dropdown-item-desc {
  font-size: 11.5px;
  color: #64748b;
  margin-top: 2px;
}

/* ==========================================================================
   Hero Banner Section
   ========================================================================== */

.hero-banner {
  background: linear-gradient(180deg, #FFFFFF 0%, var(--bg-slate) 100%);
  border-bottom: 2px solid var(--border-subtle);
  padding: 28px 20px 24px 20px;
  text-align: center;
}

.hero-content {
  max-width: 800px;
  margin: 0 auto;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background-color: var(--brand-blue-light);
  color: var(--brand-blue-dark);
  font-size: 13px;
  font-weight: 700;
  padding: 6px 16px;
  border-radius: var(--radius-full);
  margin-bottom: 16px;
  border: 1px solid rgba(0, 171, 228, 0.3);
}

.hero-title {
  font-size: 28px;
  font-weight: 800;
  color: var(--brand-navy);
  line-height: 1.25;
  margin-bottom: 10px;
  letter-spacing: -0.02em;
}

.hero-subtitle {
  font-size: 15px;
  color: var(--text-secondary);
  max-width: 680px;
  margin: 0 auto 18px auto;
}

/* Quick Category Badges */
.category-pills {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.pill-item {
  padding: 8px 18px;
  background-color: #FFFFFF;
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-full);
  font-size: 14px;
  font-weight: 600;
  color: var(--brand-navy);
  box-shadow: var(--shadow-sm);
  transition: var(--transition-fast);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.pill-item:hover, .pill-item.active {
  border-color: var(--brand-blue);
  background-color: var(--brand-blue);
  color: #FFFFFF;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 171, 228, 0.3);
}

/* ==========================================================================
   Main Grid Layout & Cards
   ========================================================================== */

.main-container {
  max-width: 1200px;
  margin: 20px auto;
  padding: 0 20px;
  flex: 1;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.section-title {
  font-size: 22px;
  font-weight: 800;
  color: var(--brand-navy);
  display: flex;
  align-items: center;
  gap: 10px;
  border-left: 5px solid var(--brand-blue);
  padding-left: 12px;
}

.view-all-link {
  font-size: 14px;
  font-weight: 700;
  color: var(--brand-blue);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.view-all-link:hover {
  text-decoration: underline;
  color: var(--brand-blue-dark);
}

/* Directory Cards Grid */
.directory-card {
  background-color: #FFFFFF;
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 28px;
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
}

.directory-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--brand-navy), var(--brand-blue));
}

.card-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 16px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--bg-slate);
}

.card-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--brand-navy);
  display: flex;
  align-items: center;
  gap: 10px;
}

.tag-badge {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background-color: var(--brand-blue);
  color: #FFFFFF;
  padding: 4px 12px;
  border-radius: var(--radius-full);
}

/* Links Grid inside Directory Cards */
.links-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}

.directory-link-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  background-color: var(--bg-slate);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  text-decoration: none;
  transition: var(--transition-fast);
}

.directory-link-item:hover {
  border-color: var(--brand-blue);
  background-color: var(--brand-blue-light);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.link-title-box {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  color: var(--brand-navy);
  font-size: 15px;
}

.link-num-box {
  width: 32px;
  height: 32px;
  background-color: var(--brand-blue);
  color: #FFFFFF;
  border-radius: 50%;
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.link-arrow {
  color: var(--brand-blue);
  transition: var(--transition-fast);
}

.directory-link-item:hover .link-arrow {
  transform: translateX(4px);
}

/* ==========================================================================
   Interactive Quiz Page Components
   ========================================================================== */

.quiz-wrapper {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 24px;
  align-items: start;
  width: 100%;
  box-sizing: border-box;
}

@media (max-width: 900px) {
  .quiz-wrapper {
    grid-template-columns: 1fr;
  }
}

/* Question Main Card */
.quiz-main-card {
  background-color: #FFFFFF;
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
  width: 100%;
  min-width: 0; /* Prevents grid column blowout when explanation card appears */
  box-sizing: border-box;
  word-break: break-word;
  overflow-wrap: break-word;
}

.quiz-main-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background-color: var(--brand-blue);
}

.quiz-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--bg-slate);
}

.quiz-ch-badge {
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--brand-blue-dark);
  background-color: var(--brand-blue-light);
  padding: 4px 12px;
  border-radius: var(--radius-md);
}

.quiz-q-counter {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-secondary);
}

/* In-Card Language Bar */
.quiz-card-lang-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: var(--bg-slate);
  padding: 8px 14px;
  border-radius: var(--radius-md);
  margin-bottom: 16px;
  border: 1px solid var(--border-subtle);
  flex-wrap: wrap;
  gap: 8px;
}

.quiz-lang-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--brand-navy);
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Progress Dots Bar */
.dots-navigator {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-bottom: 14px;
}

.dot-step {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background-color: var(--bg-slate);
  border: 1px solid var(--border-light);
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-fast);
}

.dot-step.active {
  background-color: var(--brand-navy);
  color: #FFFFFF;
  border-color: var(--brand-navy);
  transform: scale(1.12);
}

.dot-step.correct {
  background-color: var(--brand-blue);
  color: #FFFFFF;
  border-color: var(--brand-blue);
}

.dot-step.wrong {
  background-color: var(--brand-rose);
  color: #FFFFFF;
  border-color: var(--brand-rose);
}

/* Question Text Box */
.question-text-box {
  margin-bottom: 18px;
  word-break: break-word;
  overflow-wrap: break-word;
}

.question-text {
  font-size: 17px;
  font-weight: 700;
  color: var(--brand-navy);
  line-height: 1.45;
  margin-bottom: 4px;
}

.question-text-sub {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.35;
}

/* Options Container */
.options-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
  width: 100%;
}

.option-btn {
  width: 100%;
  padding: 11px 15px;
  background-color: var(--bg-slate);
  border: 2px solid var(--border-subtle);
  border-radius: var(--radius-md);
  text-align: left;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
  transition: var(--transition-fast);
  box-sizing: border-box;
}

.option-btn:hover:not(:disabled) {
  border-color: var(--brand-blue);
  background-color: var(--brand-blue-light);
}

.option-key-badge {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background-color: #FFFFFF;
  border: 1px solid var(--border-light);
  font-size: 14px;
  font-weight: 800;
  color: var(--brand-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.option-content {
  flex: 1;
  min-width: 0;
  word-break: break-word;
  overflow-wrap: break-word;
}

.option-label-primary {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.4;
}

.option-label-secondary {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 2px;
}

/* Correct / Wrong Option States */
.option-btn.correct {
  background-color: var(--brand-blue-light) !important;
  border-color: var(--brand-blue) !important;
}

.option-btn.correct .option-key-badge {
  background-color: var(--brand-blue) !important;
  color: #FFFFFF !important;
  border-color: var(--brand-blue) !important;
}

.option-btn.wrong {
  background-color: var(--brand-rose-light) !important;
  border-color: var(--brand-rose) !important;
}

.option-btn.wrong .option-key-badge {
  background-color: var(--brand-rose) !important;
  color: #FFFFFF !important;
  border-color: var(--brand-rose) !important;
}

/* Explanation Box */
.explanation-card {
  display: none;
  padding: 16px 20px;
  background-color: var(--bg-slate);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  margin-bottom: 24px;
  animation: fadeIn 0.3s ease;
  width: 100%;
  box-sizing: border-box;
  word-break: break-word;
  overflow-wrap: break-word;
}

.explanation-card.show {
  display: block;
}

.exp-title {
  font-size: 14px;
  font-weight: 800;
  color: var(--brand-navy);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.exp-body {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Quiz Controls Bar */
.quiz-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 16px;
  border-top: 1px solid var(--bg-slate);
}

.btn-action {
  padding: 10px 20px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition-fast);
}

.btn-secondary {
  background-color: var(--bg-slate);
  color: var(--brand-navy);
  border: 1px solid var(--border-light);
}

.btn-secondary:hover {
  background-color: var(--border-light);
  color: var(--brand-navy);
}

.btn-primary-action {
  background-color: var(--brand-blue);
  color: #FFFFFF;
}

.btn-primary-action:hover {
  background-color: var(--brand-blue-dark);
}

/* Sidebar Score Card */
.sidebar-card {
  background-color: #FFFFFF;
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-card);
  margin-bottom: 20px;
}

.sidebar-title {
  font-size: 15px;
  font-weight: 800;
  color: var(--brand-navy);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.score-display {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 12px;
}

.score-big {
  font-size: 42px;
  font-weight: 800;
  color: var(--brand-navy);
  line-height: 1;
}

.score-denom {
  font-size: 16px;
  color: var(--text-muted);
}

.score-progress-bar {
  height: 8px;
  background-color: var(--bg-slate);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-bottom: 16px;
}

.score-progress-fill {
  height: 100%;
  background-color: var(--brand-blue);
  border-radius: var(--radius-full);
  width: 0%;
  transition: width 0.5s ease;
}

/* ==========================================================================
   PDF Notes & Downloads Page
   ========================================================================== */

.notes-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

@media (max-width: 768px) {
  .notes-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }
}

.note-card {
  background-color: #FFFFFF;
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: var(--transition-fast);
}

.note-card:hover {
  transform: translateY(-4px);
  border-color: var(--brand-blue);
}

.note-badge {
  font-size: 11px;
  font-weight: 800;
  color: var(--brand-blue-dark);
  background-color: var(--brand-blue-light);
  padding: 4px 12px;
  border-radius: var(--radius-md);
  align-self: flex-start;
  margin-bottom: 12px;
}

.note-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--brand-navy);
  line-height: 1.4;
  margin-bottom: 16px;
}

.note-title a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition-fast);
}

.note-title a:hover {
  color: var(--brand-blue);
  text-decoration: underline;
}

.note-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.btn-download {
  width: 100%;
  padding: 10px;
  background-color: var(--brand-blue);
  color: #FFFFFF;
  border: none;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  transition: var(--transition-fast);
}

.btn-download:hover {
  background-color: var(--brand-blue-dark);
  color: #FFFFFF;
}

/* ==========================================================================
   Footer
   ========================================================================== */

.app-footer {
  background-color: var(--brand-navy);
  color: #FFFFFF;
  padding: 40px 20px 20px 20px;
  margin-top: 60px;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 32px;
  padding-bottom: 32px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-title {
  font-size: 16px;
  font-weight: 800;
  margin-bottom: 16px;
  color: var(--brand-blue);
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-links a {
  color: #CBD5E1;
  font-size: 14px;
}

.footer-links a:hover {
  color: #FFFFFF;
}

.footer-copyright {
  text-align: center;
  padding-top: 20px;
  font-size: 13px;
  color: #94A3B8;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   Comprehensive Mobile & Tablet Responsive Design System
   ========================================================================== */

@media (max-width: 900px) {
  .quiz-wrapper {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

@media (max-width: 768px) {
  /* Mobile Header */
  .header-container {
    height: 60px !important;
    min-height: 60px !important;
    max-height: 60px !important;
    padding: 0 16px !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 10px;
  }

  .brand-logo {
    gap: 8px;
  }

  .logo-icon-box {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    font-size: 14px;
  }

  .logo-title {
    font-size: 18px;
  }

  .logo-subtitle {
    display: none;
  }

  .lang-toggle-bar {
    width: 100%;
    padding: 2px;
    display: flex;
    justify-content: space-between;
  }

  .lang-btn {
    padding: 6px 8px;
    font-size: 12px;
    flex: 1;
    text-align: center;
  }

  .nav-link-btn {
    padding: 8px 12px;
    font-size: 13px;
    justify-content: center;
  }

  /* Mobile Hero Banner & Touch Category Pills */
  .hero-banner {
    padding: 24px 14px 20px 14px;
  }

  .hero-title {
    font-size: 20px;
    line-height: 1.3;
    margin-bottom: 8px;
  }

  .hero-subtitle {
    font-size: 13px;
    margin-bottom: 16px;
  }

  .category-pills {
    display: flex;
    overflow-x: auto;
    white-space: nowrap;
    justify-content: flex-start;
    padding-bottom: 8px;
    -webkit-overflow-scrolling: touch;
    gap: 8px;
  }

  .pill-item {
    flex-shrink: 0;
    padding: 6px 14px;
    font-size: 12px;
  }

  /* Mobile Main Layout & Quiz Card */
  .main-container {
    margin: 16px auto;
    padding: 0 12px;
  }

  .directory-card {
    padding: 16px 14px;
    margin-bottom: 20px;
  }

  .card-title {
    font-size: 16px;
  }

  .links-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .directory-link-item {
    padding: 12px 14px;
  }

  /* Mobile Quiz Engine */
  .quiz-main-card {
    padding: 16px 14px;
    border-radius: var(--radius-md);
  }

  .quiz-topbar {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 14px;
  }

  .quiz-ch-badge {
    font-size: 11px;
    padding: 3px 8px;
  }

  .quiz-q-counter {
    font-size: 12px;
  }

  .dots-navigator {
    gap: 6px;
    margin-bottom: 16px;
  }

  .dot-step {
    width: 34px;
    height: 34px;
    font-size: 12px;
  }

  .question-text-box {
    margin-bottom: 18px;
  }

  .question-text {
    font-size: 16px;
    line-height: 1.45;
  }

  .question-text-sub {
    font-size: 14px;
  }

  .options-list {
    gap: 10px;
    margin-bottom: 18px;
  }

  .option-btn {
    padding: 12px 14px;
    gap: 10px;
    border-radius: var(--radius-md);
  }

  .option-key-badge {
    width: 28px;
    height: 28px;
    font-size: 13px;
    border-radius: 6px;
  }

  .option-label-primary {
    font-size: 14px;
    line-height: 1.35;
  }

  .option-label-secondary {
    font-size: 12px;
  }

  .explanation-card {
    padding: 12px 14px;
    margin-bottom: 18px;
  }

  .exp-title {
    font-size: 13px;
  }

  .exp-body {
    font-size: 13px;
  }

  .quiz-controls {
    display: flex;
    gap: 10px;
    padding-top: 14px;
  }

  .btn-action {
    flex: 1;
    justify-content: center;
    padding: 10px 12px;
    font-size: 13px;
  }

  /* Mobile Sidebar Score Card */
  .sidebar-card {
    padding: 16px 14px;
  }

  .score-big {
    font-size: 32px;
  }

  /* Mobile Notes Grid */
  .notes-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .note-card {
    padding: 16px 14px;
  }

  .note-title {
    font-size: 15px;
  }
}

/* ==========================================================================
   Quiz Completion Modal (Stunning Sharable Modal)
   ========================================================================== */

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(15, 44, 89, 0.65);
  backdrop-filter: blur(8px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.modal-overlay.show {
  opacity: 1;
  visibility: visible;
}

.modal-card {
  background: #FFFFFF;
  border-radius: var(--radius-lg);
  max-width: 440px;
  width: 100%;
  max-height: 92vh;
  overflow-y: auto;
  padding: 22px 20px 20px 20px;
  position: relative;
  box-shadow: 0 20px 40px rgba(0, 171, 228, 0.25);
  border: 2px solid var(--brand-blue-light);
  transform: scale(0.85);
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  text-align: center;
  box-sizing: border-box;
}

.modal-overlay.show .modal-card {
  transform: scale(1);
}

.modal-close-btn {
  position: absolute;
  top: 10px;
  right: 12px;
  background: var(--bg-slate);
  border: none;
  font-size: 18px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  color: var(--brand-navy);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-fast);
}

.modal-close-btn:hover {
  background: var(--brand-rose-light);
  color: var(--brand-rose);
}

.modal-header-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 10px auto;
  background: linear-gradient(135deg, #F59E0B, #D97706);
  color: #FFFFFF;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  box-shadow: 0 8px 20px rgba(217, 119, 6, 0.3);
  animation: bounceTrophy 1s ease infinite alternate;
}

@keyframes bounceTrophy {
  from { transform: translateY(0); }
  to { transform: translateY(-6px); }
}

.modal-title {
  font-size: 19px;
  font-weight: 800;
  color: var(--brand-navy);
  margin-bottom: 2px;
}

.modal-subtitle {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 12px;
  font-weight: 600;
}

.modal-score-box {
  background-color: var(--bg-slate);
  border-radius: var(--radius-md);
  padding: 12px 10px;
  margin-bottom: 12px;
  border: 1px solid var(--border-subtle);
}

.circle-score-meter {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
}

.score-num {
  font-size: 34px;
  font-weight: 800;
  color: var(--brand-blue-dark);
  line-height: 1;
}

.score-pct-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--brand-navy);
  background-color: var(--brand-blue-light);
  padding: 2px 10px;
  border-radius: var(--radius-full);
  margin-top: 4px;
}

.score-stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 6px;
}

.stat-item {
  background: #FFFFFF;
  padding: 8px 4px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  gap: 5px;
  border: 1px solid var(--border-subtle);
  justify-content: center;
}

.stat-correct i { color: var(--brand-green); font-size: 14px; }
.stat-wrong i { color: var(--brand-rose); font-size: 14px; }
.stat-total i { color: var(--brand-blue); font-size: 14px; }

.stat-value {
  font-size: 14px;
  font-weight: 800;
  color: var(--brand-navy);
  line-height: 1;
}

.stat-label {
  font-size: 10px;
  color: var(--text-muted);
  font-weight: 600;
}

/* Share Box */
.share-box {
  background-color: var(--brand-blue-light);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  margin-bottom: 12px;
  border: 1px dashed var(--brand-blue);
}

.share-title {
  font-size: 12px;
  font-weight: 800;
  color: var(--brand-navy);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.share-buttons-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 6px;
}

.share-btn {
  padding: 7px 8px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 700;
  border: none;
  color: #FFFFFF;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  transition: var(--transition-fast);
}

.btn-whatsapp {
  background-color: #25D366;
}
.btn-whatsapp:hover { background-color: #1DA851; }

.btn-telegram {
  background-color: #0088CC;
}
.btn-telegram:hover { background-color: #006699; }

.btn-copy {
  background-color: var(--brand-navy);
}
.btn-copy:hover { background-color: var(--brand-navy-light); }

.modal-actions {
  display: flex;
  gap: 8px;
}

.modal-actions .btn-action {
  flex: 1;
  justify-content: center;
  padding: 10px 14px;
  font-size: 13.5px;
}

/* ==========================================================================
   Blog Article & Readable Chapter Notes Layout
   ========================================================================== */

.blog-note-post {
  background: #ffffff;
  border-radius: 16px;
  border: 1px solid var(--border-light);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  margin-bottom: 36px;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.blog-note-post:hover {
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
}

.blog-post-header {
  background: linear-gradient(135deg, #f8fafc 0%, #edf2f7 100%);
  padding: 24px 28px;
  border-bottom: 1px solid var(--border-light);
}

.blog-meta-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-top: 12px;
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 600;
}

.blog-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.blog-download-bar-top {
  background: #f1f5f9;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  border-bottom: 1px solid var(--border-light);
}

.blog-post-body {
  padding: 28px;
  font-size: 16px;
  line-height: 1.8;
  color: #1e293b;
  font-family: var(--font-base);
}

.blog-post-body h1, .blog-post-body h2, .blog-post-body h3, .blog-post-body h4 {
  color: var(--brand-navy);
  font-weight: 800;
  margin-top: 24px;
  margin-bottom: 12px;
  line-height: 1.35;
}

.blog-post-body p {
  margin-bottom: 16px;
}

.blog-post-body ul, .blog-post-body ol {
  margin-bottom: 16px;
  padding-left: 24px;
}

.blog-post-body img {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  margin: 16px 0;
  box-shadow: var(--shadow-sm);
}

.blog-post-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
}

.blog-post-body table th, .blog-post-body table td {
  padding: 10px 14px;
  border: 1px solid var(--border-subtle);
}

.blog-post-body table th {
  background-color: #f1f5f9;
  font-weight: 700;
}

.mid-article-pdf-box {
  background: linear-gradient(135deg, #00abe4 0%, #0f2c59 100%);
  color: #ffffff;
  padding: 20px 24px;
  border-radius: 12px;
  margin: 28px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  box-shadow: 0 8px 24px rgba(0, 171, 228, 0.25);
}

.blog-post-footer {
  background: #f8fafc;
  padding: 20px 28px;
  border-top: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

/* ==========================================================================
   Mobile Responsive Navigation Bar & Hamburger Drawer
   ========================================================================== */

.mobile-menu-btn {
  display: none;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  background-color: var(--bg-slate);
  color: var(--brand-navy);
  align-items: center;
  justify-content: center;
  font-size: 18px;
  cursor: pointer;
  transition: var(--transition-fast);
  flex-shrink: 0;
}

.mobile-menu-btn:hover, .mobile-menu-btn:focus {
  background-color: var(--brand-blue-light);
  color: var(--brand-blue);
  border-color: var(--brand-blue);
}
/* Medium Desktop / Laptop Screens (1081px - 1240px) */
@media (min-width: 1081px) and (max-width: 1240px) {
  .header-container {
    padding: 0 12px;
    gap: 8px;
  }
  .brand-logo .logo-subtitle {
    display: none;
  }
  .header-search {
    max-width: 220px;
  }
  .header-actions {
    gap: 4px;
  }
  .nav-link-btn {
    padding: 6px 8px !important;
    font-size: 13px !important;
    gap: 4px !important;
  }
}

@media (max-width: 1080px) {
  .app-header {
    background-color: #FFFFFF !important;
    box-shadow: 0 2px 8px rgba(15, 44, 89, 0.08);
  }

  .header-container {
    height: 60px !important;
    min-height: 60px !important;
    max-height: 60px !important;
    padding: 0 16px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    flex-wrap: nowrap !important;
    gap: 12px !important;
    background-color: #FFFFFF !important;
    position: relative !important;
  }

  .brand-logo {
    gap: 10px;
    min-width: 0;
    flex-shrink: 1;
  }

  .logo-icon-box {
    width: 38px !important;
    height: 38px !important;
    border-radius: 10px !important;
    font-size: 16px !important;
  }

  .logo-title {
    font-size: 20px !important;
  }

  .logo-subtitle {
    display: none !important;
  }

  .mobile-menu-btn {
    display: flex !important;
  }

  .header-search {
    display: none;
    position: absolute !important;
    top: 60px !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    background: #FFFFFF !important;
    padding: 12px 16px !important;
    border-bottom: 2px solid var(--border-subtle) !important;
    box-shadow: 0 12px 28px rgba(15, 44, 89, 0.14) !important;
    z-index: 1005 !important;
    box-sizing: border-box !important;
    margin: 0 !important;
  }

  .header-search.is-mobile-search-open {
    display: block !important;
  }

  .header-actions {
    display: none;
    position: fixed !important;
    top: 60px !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    height: calc(100dvh - 60px) !important;
    max-height: calc(100dvh - 60px) !important;
    background: #FFFFFF !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    padding: 16px 16px 60px 16px !important;
    margin: 0 !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: 0 20px 40px rgba(15, 44, 89, 0.2) !important;
    z-index: 99998 !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 8px !important;
    box-sizing: border-box !important;
  }

  .header-actions.show-mobile {
    display: flex !important;
  }

  .lang-toggle-bar {
    width: 100%;
    justify-content: space-between;
    background-color: var(--bg-slate);
    border: 1px solid var(--border-subtle);
    padding: 3px;
    border-radius: 10px;
  }

  .lang-btn {
    flex: 1;
    text-align: center;
  }

  .nav-link-btn {
    width: 100%;
    justify-content: flex-start;
    padding: 12px 14px;
    font-size: 14px;
    font-weight: 700;
    background-color: #F8FAFC;
    border: 1.5px solid #E2E8F0;
    border-radius: 12px;
    color: var(--brand-navy);
    min-height: 48px;
    box-sizing: border-box;
  }

  .nav-link-btn:hover {
    background-color: var(--brand-blue-light);
    color: var(--brand-blue-dark);
  }

  .nav-link-btn.btn-primary {
    background: linear-gradient(135deg, var(--brand-blue), var(--brand-navy)) !important;
    color: #FFFFFF !important;
    border: none !important;
    justify-content: center;
  }

  /* Mobile Dropdown Menu */
  .nav-dropdown {
    width: 100%;
    display: flex;
    flex-direction: column;
  }
  .nav-dropdown-btn {
    width: 100%;
    justify-content: space-between;
    background-color: #F8FAFC;
    border: 1.5px solid #E2E8F0;
    padding: 12px 14px;
    border-radius: 12px;
    min-height: 48px;
    font-weight: 700;
    color: var(--brand-navy);
    box-sizing: border-box;
  }
  .nav-dropdown-menu {
    position: static !important;
    transform: none !important;
    box-shadow: none !important;
    border: 1.5px solid #E2E8F0 !important;
    border-radius: 12px !important;
    margin-top: 6px !important;
    width: 100% !important;
    box-sizing: border-box !important;
    display: none !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    background: #F8FAFC !important;
    padding: 6px !important;
  }
  .nav-dropdown.open .nav-dropdown-menu {
    display: flex !important;
    flex-direction: column !important;
    gap: 4px !important;
    transform: none !important;
  }
}

@media (max-width: 576px) {
  .header-container {
    padding: 10px 12px;
  }

  .logo-title {
    font-size: 18px;
  }

  .logo-icon-box {
    width: 36px;
    height: 36px;
    font-size: 16px;
  }

  .logo-subtitle {
    font-size: 8px;
  }

  .header-search input {
    padding: 8px 14px 8px 36px;
    font-size: 13px;
  }

  .header-search .search-icon {
    left: 12px;
    font-size: 13px;
  }
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ==========================================================================
   Class -> Subject -> Chapter Interactive Accordion System
   ========================================================================== */

/* 2-Column Responsive Grid Layout for Desktop/Tablet (1-Column on Mobile) */
.subjects-grid,
.books-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-top: 14px;
}

.subject-wrapper {
  margin-bottom: 0;
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  overflow: hidden;
  transition: var(--transition-fast);
}

@media (max-width: 768px) {
  .subjects-grid,
  .books-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}

.subject-wrapper:hover {
  border-color: var(--brand-blue);
  box-shadow: var(--shadow-sm);
}

.subject-card-header {
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  background-color: #FAFCFF;
  user-select: none;
  transition: var(--transition-fast);
}

.subject-card-header:hover {
  background-color: var(--brand-blue-light);
}

.subject-card-header.active {
  background-color: var(--brand-blue-light);
  border-bottom: 1.5px solid var(--border-subtle);
}

.subject-card-info {
  display: flex;
  align-items: center;
  gap: 14px;
}

.subject-icon-box {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background-color: var(--brand-blue-light);
  color: var(--brand-blue-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.subject-title {
  font-size: 16px;
  font-weight: 800;
  color: var(--brand-navy);
  margin-bottom: 2px;
}

.subject-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 600;
}

.btn-toggle-chapters {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: var(--radius-full);
  background-color: var(--bg-surface);
  border: 1px solid var(--border-light);
  color: var(--brand-navy);
  font-size: 13px;
  font-weight: 700;
  transition: var(--transition-fast);
}

.subject-card-header:hover .btn-toggle-chapters {
  background-color: var(--brand-blue);
  color: #FFFFFF;
  border-color: var(--brand-blue);
}

.toggle-icon {
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.subject-card-header.active .toggle-icon {
  transform: rotate(180deg);
}

.subject-chapters-container {
  padding: 16px 20px;
  background-color: #FFFFFF;
  border-top: 1px dashed var(--border-light);
  animation: fadeInDown 0.25s ease-out;
}

.chapters-header-note {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  font-size: 13px;
  font-weight: 700;
  color: var(--brand-navy);
}

.direct-subject-link {
  font-size: 12px;
  color: var(--brand-blue);
  font-weight: 700;
}
.direct-subject-link:hover {
  text-decoration: underline;
}

@media (max-width: 640px) {
  .subject-card-header {
    padding: 12px 14px;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .subject-card-action {
    width: 100%;
  }
  .btn-toggle-chapters {
    width: 100%;
    justify-content: center;
  }
  .subject-chapters-container {
    padding: 12px 14px;
  }
}

.subject-wrapper {
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  overflow: hidden;
  transition: var(--transition-fast);
}

@media (max-width: 768px) {
  .subjects-grid,
  .books-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}

.subject-wrapper:hover {
  border-color: var(--brand-blue);
  box-shadow: var(--shadow-sm);
}

.subject-card-header {
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  background-color: #FAFCFF;
  user-select: none;
  transition: var(--transition-fast);
}

.subject-card-header:hover {
  background-color: var(--brand-blue-light);
}

.subject-card-header.active {
  background-color: var(--brand-blue-light);
  border-bottom: 1.5px solid var(--border-subtle);
}

.subject-card-info {
  display: flex;
  align-items: center;
  gap: 14px;
}

.subject-icon-box {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background-color: var(--brand-blue-light);
  color: var(--brand-blue-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.subject-title {
  font-size: 16px;
  font-weight: 800;
  color: var(--brand-navy);
  margin-bottom: 2px;
}

.subject-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 600;
}

.btn-toggle-chapters {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: var(--radius-full);
  background-color: var(--bg-surface);
  border: 1px solid var(--border-light);
  color: var(--brand-navy);
  font-size: 13px;
  font-weight: 700;
  transition: var(--transition-fast);
}

.subject-card-header:hover .btn-toggle-chapters {
  background-color: var(--brand-blue);
  color: #FFFFFF;
  border-color: var(--brand-blue);
}

.toggle-icon {
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.subject-card-header.active .toggle-icon {
  transform: rotate(180deg);
}

.subject-chapters-container {
  padding: 16px 20px;
  background-color: #FFFFFF;
  border-top: 1px dashed var(--border-light);
  animation: fadeInDown 0.25s ease-out;
}

.chapters-header-note {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  font-size: 13px;
  font-weight: 700;
  color: var(--brand-navy);
}

.direct-subject-link {
  font-size: 12px;
  color: var(--brand-blue);
  font-weight: 700;
}
.direct-subject-link:hover {
  text-decoration: underline;
}

@media (max-width: 640px) {
  .subject-card-header {
    padding: 12px 14px;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .subject-card-action {
    width: 100%;
  }
  .btn-toggle-chapters {
    width: 100%;
    justify-content: center;
  }
  .subject-chapters-container {
    padding: 12px 14px;
  }
}

/* ==========================================================================
   Compact Viewport Optimization (13.5" Laptops & Height-Constrained Screens)
   ========================================================================== */
@media screen and (min-width: 993px) and (max-height: 800px) {
  .header-container {
    height: 56px;
  }
  .main-container {
    margin: 14px auto;
  }
  .quiz-main-card {
    padding: 16px;
  }
  .quiz-topbar {
    margin-bottom: 10px;
    padding-bottom: 8px;
  }
  .dots-navigator {
    margin-bottom: 10px;
    gap: 4px;
  }
  .dot-step {
    width: 25px;
    height: 25px;
    font-size: 10px;
  }
  .question-text-box {
    margin-bottom: 12px;
  }
  .question-text {
    font-size: 16px;
  }
  .options-list {
    gap: 8px;
    margin-bottom: 14px;
  }
  .option-btn {
    padding: 9px 13px;
  }
  .modal-card {
    padding: 16px 14px 14px 14px;
    max-width: 420px;
  }
  .modal-header-icon {
    width: 48px;
    height: 48px;
    font-size: 22px;
    margin-bottom: 6px;
  }
  .modal-title {
    font-size: 17px;
  }
  .modal-score-box {
    padding: 10px 8px;
  }
}

@media (max-width: 768px) {
  .subjects-grid,
  .books-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}

.subject-wrapper:hover {
  border-color: var(--brand-blue);
  box-shadow: var(--shadow-sm);
}

.subject-card-header {
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  background-color: #FAFCFF;
  user-select: none;
  transition: var(--transition-fast);
}

.subject-card-header:hover {
  background-color: var(--brand-blue-light);
}

.subject-card-header.active {
  background-color: var(--brand-blue-light);
  border-bottom: 1.5px solid var(--border-subtle);
}

.subject-card-info {
  display: flex;
  align-items: center;
  gap: 14px;
}

.subject-icon-box {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background-color: var(--brand-blue-light);
  color: var(--brand-blue-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.subject-title {
  font-size: 16px;
  font-weight: 800;
  color: var(--brand-navy);
  margin-bottom: 2px;
}

.subject-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 600;
}

.btn-toggle-chapters {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: var(--radius-full);
  background-color: var(--bg-surface);
  border: 1px solid var(--border-light);
  color: var(--brand-navy);
  font-size: 13px;
  font-weight: 700;
  transition: var(--transition-fast);
}

.subject-card-header:hover .btn-toggle-chapters {
  background-color: var(--brand-blue);
  color: #FFFFFF;
  border-color: var(--brand-blue);
}

.toggle-icon {
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.subject-card-header.active .toggle-icon {
  transform: rotate(180deg);
}

.subject-chapters-container {
  padding: 16px 20px;
  background-color: #FFFFFF;
  border-top: 1px dashed var(--border-light);
  animation: fadeInDown 0.25s ease-out;
}

.chapters-header-note {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  font-size: 13px;
  font-weight: 700;
  color: var(--brand-navy);
}

.direct-subject-link {
  font-size: 12px;
  color: var(--brand-blue);
  font-weight: 700;
}
.direct-subject-link:hover {
  text-decoration: underline;
}

@media (max-width: 640px) {
  .subject-card-header {
    padding: 12px 14px;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .subject-card-action {
    width: 100%;
  }
  .btn-toggle-chapters {
    width: 100%;
    justify-content: center;
  }
  .subject-chapters-container {
    padding: 12px 14px;
  }
}

/* ==========================================================================
   Compact Viewport Optimization (13.5" Laptops & Height-Constrained Screens)
   ========================================================================== */
@media screen and (min-width: 993px) and (max-height: 800px) {
  .header-container {
    height: 56px;
  }
  .main-container {
    margin: 14px auto;
  }
  .quiz-main-card {
    padding: 16px;
  }
  .quiz-topbar {
    margin-bottom: 10px;
    padding-bottom: 8px;
  }
  .dots-navigator {
    margin-bottom: 10px;
    gap: 4px;
  }
  .dot-step {
    width: 25px;
    height: 25px;
    font-size: 10px;
  }
  .question-text-box {
    margin-bottom: 12px;
  }
  .question-text {
    font-size: 16px;
  }
  .options-list {
    gap: 8px;
    margin-bottom: 14px;
  }
  .option-btn {
    padding: 9px 13px;
  }
  .modal-card {
    padding: 16px 14px 14px 14px;
    max-width: 420px;
  }
  .modal-header-icon {
    width: 48px;
    height: 48px;
    font-size: 22px;
    margin-bottom: 6px;
  }
  .modal-title {
    font-size: 17px;
  }
  .modal-score-box {
    padding: 10px 8px;
    margin-bottom: 10px;
  }
  .score-num {
    font-size: 30px;
  }
  .share-box {
    padding: 8px 10px;
    margin-bottom: 10px;
  }
}

/* ==========================================================================
   New vs Old Edition Tabs & Badges (CBSE / NCERT 2024-25 NCF)
   ========================================================================== */
.edition-filter-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  background: var(--bg-slate);
  padding: 6px 10px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  flex-wrap: wrap;
}

.edition-filter-title {
  font-size: 12px;
  font-weight: 800;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-right: 4px;
}

.edition-tab-btn {
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 700;
  border: 1.5px solid transparent;
  background: #FFFFFF;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition-fast);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: var(--shadow-sm);
}

.edition-tab-btn:hover {
  color: var(--brand-navy);
  border-color: var(--border-light);
  transform: translateY(-1px);
}

.edition-tab-btn.active {
  background: var(--brand-blue);
  color: #FFFFFF;
  border-color: var(--brand-blue);
  box-shadow: 0 2px 8px rgba(0, 171, 228, 0.35);
}

.edition-tab-btn.active-new {
  background: linear-gradient(135deg, #059669 0%, #10b981 100%);
  color: #FFFFFF;
  border-color: #059669;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.35);
}

.edition-tab-btn.active-old {
  background: #475569;
  color: #FFFFFF;
  border-color: #334155;
  box-shadow: 0 2px 8px rgba(71, 85, 105, 0.35);
}

.badge-edition {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 800;
  padding: 2px 9px;
  border-radius: var(--radius-full);
  letter-spacing: 0.2px;
  margin-bottom: 4px;
}

.badge-edition-new {
  background-color: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
}

.badge-edition-old {
  background-color: #f1f5f9;
  color: #475569;
  border: 1px solid #cbd5e1;
}

.score-progress-fill {
  height: 100%;
  background-color: var(--brand-blue);
  border-radius: var(--radius-full);
  width: 0%;
  transition: width 0.5s ease;
}

/* ==========================================================================
   Home Page Class Selection Cards Grid & Section Separators
   ========================================================================== */
.classes-section-box {
  margin-bottom: 28px;
  background: #FFFFFF;
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px 20px;
  box-shadow: var(--shadow-sm);
}

.classes-section-header {
  text-align: center;
  margin-bottom: 20px;
}

.classes-section-title {
  font-size: 22px;
  font-weight: 800;
  color: var(--brand-navy);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.classes-section-subtitle {
  font-size: 14px;
  color: var(--text-secondary);
  max-width: 620px;
  margin: 0 auto;
}

.classes-selector-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 14px;
}

.class-select-card {
  border: 2px solid var(--border-subtle);
  border-radius: var(--radius-md);
  background-color: #FAFCFF;
  padding: 16px 14px;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
  text-decoration: none;
}

.class-select-card:hover {
  border-color: var(--brand-blue);
  background-color: #FFFFFF;
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 171, 228, 0.15);
}

.class-select-card.active {
  border-color: var(--brand-blue);
  background: linear-gradient(180deg, #FFFFFF 0%, #f0f9ff 100%);
  box-shadow: 0 6px 18px rgba(0, 171, 228, 0.25);
}

.class-select-card.active::after {
  content: "✓ Active";
  position: absolute;
  top: 8px;
  right: 8px;
  font-size: 10px;
  font-weight: 800;
  color: #0284c7;
  background: #e0f2fe;
  padding: 2px 8px;
  border-radius: 10px;
}

.class-card-top {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.class-card-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background-color: var(--brand-blue-light);
  color: var(--brand-blue-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
  transition: var(--transition-fast);
}

.class-select-card:hover .class-card-icon,
.class-select-card.active .class-card-icon {
  background-color: var(--brand-blue);
  color: #FFFFFF;
}

.class-card-name {
  font-size: 16px;
  font-weight: 800;
  color: var(--brand-navy);
  line-height: 1.25;
}

.class-card-subname {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 600;
}

.class-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-secondary);
  padding-top: 10px;
  border-top: 1px dashed var(--border-light);
  margin-top: 8px;
}

.class-card-badge {
  font-size: 10px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 6px;
  background: #f1f5f9;
  color: #475569;
}

.class-card-badge.badge-ncf {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
}

/* ==========================================================================
   Edition Section Headers & Visual Separator Dividers (New NCF vs Old Classic)
   ========================================================================== */
.edition-section-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  border-radius: var(--radius-md);
  margin-bottom: 18px;
  position: relative;
}

.edition-section-header.new-edition {
  background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
  border: 2px solid #86efac;
  box-shadow: 0 4px 12px rgba(22, 163, 74, 0.08);
}

.edition-section-header.old-edition {
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border: 2px solid #cbd5e1;
  box-shadow: 0 4px 12px rgba(100, 116, 139, 0.08);
}

.edition-heading-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
  box-shadow: var(--shadow-sm);
}

.edition-heading-icon.new-icon {
  background: linear-gradient(135deg, #15803d 0%, #16a34a 100%);
  color: #FFFFFF;
}

.edition-heading-icon.old-icon {
  background: linear-gradient(135deg, #475569 0%, #64748b 100%);
  color: #FFFFFF;
}

.edition-heading-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 6px;
  background-color: #bbf7d0;
  color: #166534;
  margin-bottom: 4px;
  letter-spacing: 0.3px;
}

.edition-heading-badge.old-badge {
  background-color: #e2e8f0;
  color: #334155;
}

.edition-heading-title {
  font-size: 17px;
  font-weight: 800;
  margin: 0;
  line-height: 1.3;
}

.new-edition .edition-heading-title {
  color: #14532d;
}

.old-edition .edition-heading-title {
  color: #0f172a;
}

.edition-heading-desc {
  font-size: 13px;
  margin: 3px 0 0 0;
  font-weight: 600;
}

.new-edition .edition-heading-desc {
  color: #15803d;
}

.old-edition .edition-heading-desc {
  color: #475569;
}

/* Prominent Separator Divider */
.edition-divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 36px 0 24px 0;
  position: relative;
}

.edition-divider::before,
.edition-divider::after {
  content: '';
  flex: 1;
  border-bottom: 2.5px dashed #94a3b8;
}

.edition-divider span {
  padding: 8px 22px;
  background-color: #f1f5f9;
  color: #1e293b;
  font-size: 14px;
  font-weight: 800;
  border-radius: var(--radius-full);
  border: 2px solid #cbd5e1;
  margin: 0 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.edition-notice-box {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background-color: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-left: 4px solid #64748b;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  margin-bottom: 20px;
  font-size: 13px;
  color: #334155;
  line-height: 1.5;
}

.edition-notice-box i {
  color: #64748b;
  font-size: 16px;
  margin-top: 2px;
  flex-shrink: 0;
}

/* No Class Selected Prompt Banner on Homepage */
.no-class-prompt-card {
  text-align: center;
  padding: 40px 24px;
  background: linear-gradient(180deg, #FFFFFF 0%, #f8fafc 100%);
  border: 2px dashed #cbd5e1;
  border-radius: var(--radius-lg);
  margin-bottom: 30px;
}

.no-class-prompt-icon {
  width: 60px;
  height: 60px;
  margin: 0 auto 16px auto;
  border-radius: 50%;
  background-color: var(--brand-blue-light);
  color: var(--brand-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  animation: bounceSlow 2s infinite;
}

@keyframes bounceSlow {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.no-class-prompt-title {
  font-size: 20px;
  font-weight: 800;
  color: var(--brand-navy);
  margin-bottom: 8px;
}

.no-class-prompt-desc {
  font-size: 14px;
  color: var(--text-secondary);
  max-width: 580px;
  margin: 0 auto 20px auto;
  line-height: 1.5;
}

.no-class-quick-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.no-class-pill-btn {
  padding: 8px 16px;
  border-radius: var(--radius-full);
  background: #FFFFFF;
  border: 1.5px solid #cbd5e1;
  color: var(--brand-navy);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition-fast);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.no-class-pill-btn:hover {
  border-color: var(--brand-blue);
  background-color: var(--brand-blue);
  color: #FFFFFF;
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0, 171, 228, 0.25);
}

/* ==========================================================================
   Subject Drawer Quick Action Small Cards
   ========================================================================== */
.sub-quick-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

@media (max-width: 640px) {
  .sub-quick-cards-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }
}

.quick-action-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 15px;
  border-radius: 12px;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  position: relative;
}

.quick-action-card:hover {
  transform: translateY(-2px);
}

/* Mega Quiz Card */
.quick-action-card.card-mega {
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
  border: 1.5px solid #fde047;
  box-shadow: 0 2px 8px rgba(234, 179, 8, 0.12);
}

.quick-action-card.card-mega:hover {
  border-color: #eab308;
  box-shadow: 0 4px 14px rgba(234, 179, 8, 0.22);
}

.quick-card-icon.icon-mega {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: #fef08a;
  border: 1px solid #facc15;
  color: #854d0e;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.quick-card-pill.pill-mega {
  font-size: 10px;
  font-weight: 800;
  background: #f59e0b;
  color: #ffffff;
  padding: 2px 7px;
  border-radius: 10px;
}

.quick-action-card.card-mega .quick-card-title {
  color: #854d0e;
}

.quick-action-card.card-mega .quick-card-desc {
  color: #a16207;
}

.quick-action-card.card-mega .quick-card-arrow {
  color: #b45309;
}

/* Subject Overview Card */
.quick-action-card.card-overview {
  background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
  border: 1.5px solid #bae6fd;
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.08);
}

.quick-action-card.card-overview:hover {
  border-color: #0284c7;
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.18);
}

.quick-card-icon.icon-overview {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: #e0f2fe;
  border: 1px solid #7dd3fc;
  color: #0284c7;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.quick-card-pill.pill-overview {
  font-size: 10px;
  font-weight: 800;
  background: #0284c7;
  color: #ffffff;
  padding: 2px 7px;
  border-radius: 10px;
}

.quick-action-card.card-overview .quick-card-title {
  color: #0369a1;
}

.quick-action-card.card-overview .quick-card-desc {
  color: #075985;
}

.quick-action-card.card-overview .quick-card-arrow {
  color: #0284c7;
}

/* Chapter PDF Notes Quick Card */
.quick-action-card.card-notes {
  background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
  border: 1.5px solid #86efac;
  box-shadow: 0 2px 8px rgba(22, 163, 74, 0.08);
}

.quick-action-card.card-notes:hover {
  border-color: #16a34a;
  box-shadow: 0 4px 14px rgba(22, 163, 74, 0.18);
}

.quick-card-icon.icon-notes {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: #bbf7d0;
  border: 1px solid #86efac;
  color: #15803d;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.quick-card-pill.pill-notes {
  font-size: 10px;
  font-weight: 800;
  background: #16a34a;
  color: #ffffff;
  padding: 2px 7px;
  border-radius: 10px;
}

.quick-action-card.card-notes .quick-card-title {
  color: #166534;
}

.quick-action-card.card-notes .quick-card-desc {
  color: #15803d;
}

.quick-action-card.card-notes .quick-card-arrow {
  color: #15803d;
}

/* Shared Card Details */
.quick-card-info {
  flex-grow: 1;
  min-width: 0;
}

.quick-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.quick-card-title {
  font-size: 13.5px;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.quick-card-desc {
  font-size: 11.5px;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.quick-card-arrow {
  font-size: 13px;
  flex-shrink: 0;
  opacity: 0.75;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.quick-action-card:hover .quick-card-arrow {
  opacity: 1;
  transform: translateX(3px);
}

/* ==========================================================================
   HIGH-IMPACT ATTENTION-GRABBING PROMOTIONAL ADVERTISING DESIGN SYSTEM
   ========================================================================== */

@keyframes adGlowPulse {
  0% { box-shadow: 0 0 0 0 rgba(0, 171, 228, 0.45); }
  70% { box-shadow: 0 0 0 10px rgba(0, 171, 228, 0); }
  100% { box-shadow: 0 0 0 0 rgba(0, 171, 228, 0); }
}

@keyframes adLiveDotPulse {
  0%, 100% {
    transform: scale(0.85);
    opacity: 0.85;
  }
  50% {
    transform: scale(1.3);
    opacity: 1;
    box-shadow: 0 0 8px #ef4444;
  }
}

@keyframes adButtonShimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

@keyframes adGradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Master Ad Card Container */
.mcqwale-ad-card {
  position: relative;
  background: #ffffff;
  border-radius: 18px;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 10px 30px -5px rgba(15, 44, 89, 0.09), 0 0 0 1px rgba(0, 171, 228, 0.2);
  margin: 22px 0;
  z-index: 1;
}

/* Multi-color Radiant Top Accent Bar */
.mcqwale-ad-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4.5px;
  background: linear-gradient(90deg, #00ABE4, #2563eb, #8b5cf6, #f59e0b, #00ABE4);
  background-size: 300% 100%;
  animation: adGradientShift 6s ease infinite;
  z-index: 3;
}

.mcqwale-ad-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 42px -10px rgba(0, 171, 228, 0.28), 0 0 0 1.5px #00ABE4;
}

/* Horizontal Banner Interactive Link */
.mcqwale-ad-horizontal-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 16px 22px;
  text-decoration: none;
  color: inherit;
  flex-wrap: wrap;
  background: linear-gradient(135deg, #ffffff 0%, #f0f9ff 55%, #f8fafc 100%);
  position: relative;
}

/* Live Sponsored Badge with Radar Dot */
.ad-badge-live {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #fee2e2;
  color: #b91c1c;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 3px 9px;
  border-radius: 20px;
  border: 1px solid #fecaca;
  box-shadow: 0 2px 6px rgba(239, 68, 68, 0.12);
}

.ad-radar-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #ef4444;
  display: inline-block;
  animation: adLiveDotPulse 1.4s infinite;
}

.ad-badge-partner {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #e0f2fe;
  color: #0369a1;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  padding: 3px 9px;
  border-radius: 20px;
  border: 1px solid #bae6fd;
}

/* Thumbnail Visual Box */
.ad-thumb-box {
  width: 84px;
  height: 84px;
  border-radius: 14px;
  overflow: hidden;
  flex-shrink: 0;
  background: linear-gradient(135deg, #e0f2fe, #bae6fd);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(0, 171, 228, 0.2);
  border: 1.5px solid rgba(255, 255, 255, 0.9);
  position: relative;
}

.ad-thumb-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.mcqwale-ad-card:hover .ad-thumb-box img {
  transform: scale(1.08);
}

.ad-thumb-icon {
  font-size: 36px;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #00ABE4, #0284c7);
}

/* Ad Text Content */
.ad-content-box {
  flex: 1;
  min-width: 260px;
}

.ad-title-text {
  font-size: 17px;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.3;
  margin: 4px 0;
  letter-spacing: -0.2px;
}

.ad-tagline-text {
  font-size: 13.5px;
  color: #475569;
  line-height: 1.45;
  margin: 0;
}

/* Shimmer Magnetic CTA Button */
.ad-cta-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 24px;
  border-radius: 12px;
  font-size: 14.5px;
  font-weight: 800;
  color: #ffffff;
  background: linear-gradient(135deg, #00ABE4 0%, #0284c7 50%, #2563eb 100%);
  background-size: 200% auto;
  box-shadow: 0 6px 18px rgba(0, 171, 228, 0.35);
  transition: all 0.25s ease;
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}

.ad-cta-button::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    60deg,
    rgba(255, 255, 255, 0) 20%,
    rgba(255, 255, 255, 0.35) 50%,
    rgba(255, 255, 255, 0) 80%
  );
  transform: rotate(30deg);
  animation: adButtonShimmer 3.5s infinite;
}

.ad-cta-button .cta-arrow {
  transition: transform 0.2s ease;
  font-size: 13px;
}

.mcqwale-ad-card:hover .ad-cta-button {
  background-position: right center;
  box-shadow: 0 8px 25px rgba(0, 171, 228, 0.5);
  transform: translateY(-1px);
}

.mcqwale-ad-card:hover .ad-cta-button .cta-arrow {
  transform: translateX(4px);
}

/* Vertical Sidebar Card */
.mcqwale-ad-vertical {
  background: linear-gradient(180deg, #ffffff 0%, #f0f9ff 100%);
}

.mcqwale-ad-vertical .ad-vert-header {
  position: relative;
  width: 100%;
  height: 180px;
  overflow: hidden;
  background: linear-gradient(135deg, #00ABE4, #0284c7);
}

.mcqwale-ad-vertical .ad-vert-header img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.mcqwale-ad-vertical:hover .ad-vert-header img {
  transform: scale(1.06);
}

.mcqwale-ad-vertical .ad-vert-body {
  padding: 18px 20px;
}

.mcqwale-ad-vertical .ad-cta-button {
  width: 100%;
  margin-top: 14px;
}

/* Micro Disclaimer Badge */
.ad-micro-disclaimer {
  position: absolute;
  bottom: 6px;
  right: 12px;
  font-size: 9.5px;
  color: #94a3b8;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  pointer-events: none;
  opacity: 0.75;
}

@media (max-width: 768px) {
  .mcqwale-ad-horizontal-link {
    padding: 14px 16px;
    gap: 14px;
  }
  .ad-thumb-box {
    width: 68px;
    height: 68px;
  }
  .ad-title-text {
    font-size: 15px;
  }
  .ad-tagline-text {
    font-size: 12.5px;
  }
  .ad-cta-button {
    width: 100%;
    padding: 10px 18px;
    font-size: 13.5px;
  }
}

/* ==========================================================================
   Quiz Countdown Timer (Monthly Tests & Competitions)
   ========================================================================== */
.quiz-timer-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: #f0fdf4;
  border: 1.5px solid #86efac;
  color: #15803d;
  padding: 5px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(22, 163, 74, 0.15);
}

.quiz-timer-badge .timer-tag {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  opacity: 0.85;
}

.quiz-timer-badge .timer-countdown {
  font-family: 'Outfit', monospace;
  font-size: 14.5px;
  font-weight: 900;
  letter-spacing: 0.5px;
}

/* Timer Warning State (< 5 minutes) */
.quiz-timer-badge.timer-warning,
.timer-sidebar-card.timer-warning .timer-big-clock {
  background: #fffbeb;
  border-color: #fde68a;
  color: #b45309;
}

/* Timer Urgent State (< 2 minutes) */
.quiz-timer-badge.timer-urgent,
.timer-sidebar-card.timer-urgent .timer-big-clock {
  background: #fef2f2;
  border-color: #fca5a5;
  color: #b91c1c;
  animation: timerPulse 1.2s infinite;
}

@keyframes timerPulse {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.4);
  }
  50% {
    transform: scale(1.03);
    box-shadow: 0 0 14px rgba(220, 38, 38, 0.35);
  }
}

/* Sidebar Timer Card */
.timer-sidebar-card {
  background: #ffffff;
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-card);
  margin-bottom: 20px;
  border-top: 4px solid #00ABE4;
}

.timer-status-pill {
  font-size: 11px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 12px;
  background: #dcfce7;
  color: #15803d;
  border: 1px solid #86efac;
}

.timer-display-box {
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border: 1.5px solid #e2e8f0;
  border-radius: 14px;
  padding: 16px;
  text-align: center;
  margin: 12px 0 10px;
}

.timer-big-clock {
  font-family: 'Outfit', monospace;
  font-size: 36px;
  font-weight: 900;
  color: #0f172a;
  letter-spacing: 1px;
  line-height: 1.1;
  transition: color 0.3s ease;
}

.timer-sub-text {
  font-size: 12px;
  color: #64748b;
  font-weight: 700;
  margin-top: 4px;
}

.timer-progress-track {
  height: 8px;
  background-color: #e2e8f0;
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 10px;
}

.timer-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #10b981, #059669);
  border-radius: 999px;
  width: 100%;
  transition: width 1s linear, background 0.5s ease;
}

.timer-progress-bar.bar-warning {
  background: linear-gradient(90deg, #f59e0b, #d97706);
}

.timer-progress-bar.bar-urgent {
  background: linear-gradient(90deg, #ef4444, #dc2626);
}

.timer-hints {
  font-size: 11.5px;
  color: #64748b;
  line-height: 1.4;
  margin-top: 8px;
}




/* ==========================================================================
   GLOBAL SEARCH DROPDOWN - ENHANCED MULTI-CATEGORY STYLES
   ========================================================================== */
.search-dropdown-item.type-chapter .item-icon-box { background: #eff6ff; color: #0284c7; }
.search-dropdown-item.type-subject .item-icon-box { background: #ecfdf5; color: #059669; }
.search-dropdown-item.type-puzzle .item-icon-box { background: #fef3c7; color: #d97706; }
.search-dropdown-item.type-worksheet .item-icon-box { background: #e0f2fe; color: #0284c7; }
.search-dropdown-item.type-competition .item-icon-box { background: #ffedd5; color: #ea580c; }
.search-dropdown-item.type-ebook .item-icon-box { background: #ede9fe; color: #7c3aed; }
.search-dropdown-item.type-note .item-icon-box { background: #ffe4e6; color: #e11d48; }
.search-dropdown-item.type-question .item-icon-box { background: #e0e7ff; color: #4f46e5; }
.search-dropdown-item.type-tool .item-icon-box { background: #ccfbf1; color: #0d9488; }
.search-dropdown-item.type-category .item-icon-box { background: #f3e8ff; color: #9333ea; }

.search-dropdown-item.type-chapter:hover { border-left-color: #0284c7; }
.search-dropdown-item.type-subject:hover { border-left-color: #059669; }
.search-dropdown-item.type-puzzle:hover { border-left-color: #d97706; }
.search-dropdown-item.type-worksheet:hover { border-left-color: #0284c7; }
.search-dropdown-item.type-competition:hover { border-left-color: #ea580c; }
.search-dropdown-item.type-ebook:hover { border-left-color: #7c3aed; }
.search-dropdown-item.type-note:hover { border-left-color: #e11d48; }
.search-dropdown-item.type-question:hover { border-left-color: #4f46e5; }
.search-dropdown-item.type-tool:hover { border-left-color: #0d9488; }
.search-dropdown-item.type-category:hover { border-left-color: #9333ea; }

.search-dropdown-item.type-puzzle .item-badge { background: #fef3c7; color: #92400e; }
.search-dropdown-item.type-worksheet .item-badge { background: #e0f2fe; color: #0369a1; }
.search-dropdown-item.type-competition .item-badge { background: #ffedd5; color: #c2410c; }
.search-dropdown-item.type-ebook .item-badge { background: #ede9fe; color: #6d28d9; }
.search-dropdown-item.type-question .item-badge { background: #e0e7ff; color: #3730a3; }
.search-dropdown-item.type-tool .item-badge { background: #ccfbf1; color: #0f766e; }
.search-dropdown-item.type-category .item-badge { background: #f3e8ff; color: #7e22ce; }

.search-dropdown-item .item-type-tag {
  font-weight: 800;
  font-size: 10.5px;
  color: #3b82f6;
  text-transform: uppercase;
}
.search-dropdown-item.type-puzzle .item-type-tag { color: #d97706; }
.search-dropdown-item.type-worksheet .item-type-tag { color: #0284c7; }
.search-dropdown-item.type-competition .item-type-tag { color: #ea580c; }
.search-dropdown-item.type-ebook .item-type-tag { color: #7c3aed; }
.search-dropdown-item.type-tool .item-type-tag { color: #0d9488; }
.search-dropdown-item.type-category .item-type-tag { color: #9333ea; }
.search-dropdown-item.type-subject .item-type-tag { color: #059669; }
