:root {
  --bg: #0b1221;
  --bg-soft: #111a2e;
  --surface: #151f36;
  --card: #1b2642;
  --text: #f2f4ff;
  --muted: #a2acc4;
  --brand: #4de0c4;
  --brand-dark: #1da688;
  --accent: #ffb86c;
  --accent-2: #8aa8ff;
  --danger: #ff6b6b;
  --border: rgba(255, 255, 255, 0.08);
  --shadow: 0 25px 60px rgba(6, 11, 25, 0.35);
  --radius-lg: 24px;
  --radius-md: 16px;
  --hero-grad-1: #1b2f4b;
  --hero-grad-2: #0a0f1f;
  --brand-text: #041219;
  --pill-text: #2b1a05;
  --outline-light: rgba(255, 255, 255, 0.25);
  --progress-track: rgba(255, 255, 255, 0.08);
  --tag-bg: #10102f;
  --accent-soft: rgba(255, 184, 108, 0.18);
  --brand-soft: rgba(77, 224, 196, 0.12);
  --brand-glow-bg: rgba(77, 224, 196, 0.2);
  --brand-glow-border: rgba(77, 224, 196, 0.3);
  --glass-bg: rgba(20, 30, 55, 0.92);
  --nav-glass-bg: rgba(15, 24, 45, 0.78);
}

* {
  box-sizing: border-box;
}

body {
  font-family: "Space Grotesk", "Outfit", sans-serif;
  background: radial-gradient(circle at top left, var(--hero-grad-1) 0%, var(--bg) 45%, var(--hero-grad-2) 100%);
  color: var(--text);
  min-height: 100vh;
}

.text-muted {
  color: var(--muted) !important;
}

.bg-glass {
  background: var(--nav-glass-bg);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.hero-section {
  padding: 0px 0 0px;
  overflow: hidden;
}

.hero-card {
  background: linear-gradient(135deg, rgba(77, 224, 196, 0.15), rgba(138, 168, 255, 0.12));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow);
}

.hero-stats {
  display: flex;
  gap: 24px;
}

.hero-stats .stat h4 {
  margin-bottom: 4px;
}

.section-padding {
  padding: 80px 0;
}

.hero-section
{
  margin-top: 40px;
}

.section-title {
  font-weight: 700;
}

.card {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--card);
  color: var(--text);
  box-shadow: var(--shadow);
}

.series-card .tag {
  background: var(--tag-bg);
  color: var(--text);
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  position: absolute;
  top: 7px;
  left: 5px;
}

.series-card-wrapper a
{
  text-decoration: none;
  
}

.series-meta li {
  margin-bottom: 6px;
  color: var(--muted);
}

.price {
  color: var(--brand);
  font-weight: 700;
  font-size: 20px;
}

.btn-brand {
  background: var(--brand);
  color: var(--brand-text);
  border: none;
}

.btn-brand:hover {
  background: var(--brand-dark);
  color: var(--text);
}

.btn-outline-light {
  border-color: var(--outline-light);
  color: var(--text);
}

.btn-filter {
  border: 1px solid var(--border);
  color: var(--muted);
  background: transparent;
}

.btn-filter.active,
.btn-filter:hover {
  background: var(--surface);
  color: var(--text);
}

.bg-surface {
  background: var(--bg-soft);
}

.test-card .test-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.pill {
  background: var(--accent);
  color: var(--pill-text);
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
}

.pill-soft {
  background: var(--accent-soft);
  color: var(--accent);
}

.badge-glow {
  background: var(--brand-glow-bg);
  color: var(--brand);
  border: 1px solid var(--brand-glow-border);
  padding: 6px 12px;
  border-radius: 999px;
}

.feature-card {
  background: var(--surface);
  padding: 5px 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}

.insight-card .pulse-item {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.footer {
  padding: 40px 0 60px;
  border-top: 1px solid var(--border);
}

.glass {
  background: var(--glass-bg);
  border: 1px solid var(--border);
  color: var(--text);
}

/* Image viewer */
.img-viewer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1100;
  touch-action: none;
}
.img-viewer-backdrop.active {
  display: flex;
}
.img-viewer-canvas {
  position: relative;
  max-width: 95vw;
  max-height: 90vh;
  overflow: hidden;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #000;
}
.img-viewer-canvas img {
  user-select: none;
  -webkit-user-drag: none;
  display: block;
  max-width: 100%;
  max-height: 100%;
  transform-origin: center center;
  transition: transform 0.08s ease-out;
}
.img-viewer-close {
  position: fixed;
  top: 16px;
  right: 16px;
  background: rgba(0,0,0,0.65);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 999px;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  cursor: pointer;
  z-index: 1110;
}
.img-viewer-caption {
  position: fixed;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  color: #e5e7ef;
  background: rgba(0,0,0,0.55);
  padding: 8px 14px;
  border-radius: 12px;
  max-width: 80vw;
  text-align: center;
  font-size: 14px;
}

.modal-content {
  border-radius: var(--radius-md);
}

.question-card {
  background: var(--surface);
  padding: 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}

.options {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.btn-option {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  text-align: left;
  display: flex;
  align-items: center;
  gap: 0;
  padding: 0;
  overflow: hidden;
}

.btn-option .option-key {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  height: 100%;
  padding: 10px 0;
  font-weight: 700;
  font-size: 15px;
  background: rgba(255,255,255,0.06);
  border-right: 1px solid var(--border);
  color: var(--brand);
  flex-shrink: 0;
}

.btn-option .option-text {
  padding: 10px 14px;
  flex: 1;
}

.btn-option.active,
.btn-option:hover {
  border-color: var(--brand);
  background: var(--brand-soft);
}

.btn-option.active .option-key {
  background: var(--brand);
  color: var(--brand-text, #fff);
  border-color: var(--brand);
}

.hero-cta {
  display: flex;
  gap: 12px;
}

.filter-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.progress {
  background: var(--progress-track);
  height: 10px;
}

.progress-bar {
  background: linear-gradient(90deg, var(--brand), var(--accent-2));
}

.test-action-buttons
{
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

@media (max-width: 991px) {
  .hero-stats {
    flex-direction: column;
  }

  .section-padding {
  padding: 30px 0;
  }

  .question-card 
    {
      padding: 0px;
    }
  .test-action-buttons
  {
    display: inline-block;
    width: 100%;
  }

  .test-action-buttons .btn-mark-review
  {
    width: 100%;
    margin-bottom: 15px;
  }

  .test-action-buttons .btn-pagination
  {
    justify-content: space-between;
  }

  .test-action-buttons .btn-pagination .btn
  {
    width: 40%;
  }

  #toggleQuestions
  {
    width: 100%;
  }

  .pulse-items
  {
    display: flex;
    justify-content: space-between;
    margin-top: 5px;
    margin-bottom: 5px;
  }
}


/* Series cards */
.series-thumb {
  max-height: 220px;
  object-fit: cover;
}

.content-body img {
  max-width: 100%;
  height: auto;
}

.checkout-summary {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}
.otp-inputs input {
  max-width: 52px;
  height: 52px;
  font-size: 20px;
  font-weight: 600;
}

.timer-pill {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 14px;
  font-weight: 600;
}

.question-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}

.btn-question {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
}

.btn-question.active {
  background: var(--brand);
  color: var(--brand-text);
  border-color: var(--brand);
}

.btn-question.answered {
  background: #28a745;
  color: #fff;
  border-color: #28a745;
}

.btn-question.marked {
  background: transparent;
  color: #ffb86c;
  border: 2px solid #ffb86c;
}

.btn-question.answered.marked {
  background: #28a745;
  color: #fff;
  border: 2px solid #ffb86c;
  box-shadow: 0 0 0 2px rgba(255, 184, 108, 0.4);
}

#markForReview.mark-active {
  background: rgba(255, 184, 108, 0.15);
  color: #ffb86c;
  border-color: #ffb86c;
}

.grid-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 10px;
  margin-bottom: 6px;
}

.grid-legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-muted, #999);
}

.grid-legend-swatch {
  width: 16px;
  height: 16px;
  border-radius: 4px;
  display: inline-block;
}

.grid-legend-swatch.swatch-default {
  background: transparent;
  border: 1px solid var(--border);
}

.grid-legend-swatch.swatch-current {
  background: var(--brand);
  border: 1px solid var(--brand);
}

.grid-legend-swatch.swatch-answered {
  background: #28a745;
  border: 1px solid #28a745;
}

.grid-legend-swatch.swatch-marked {
  background: transparent;
  border: 2px solid #ffb86c;
}

.grid-legend-swatch.swatch-both {
  background: #28a745;
  border: 2px solid #ffb86c;
}

.timer-row {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: flex-start;
  flex-shrink: 0;
}

@media (max-width: 576px) {
  .timer-row {
    gap: 8px;
  }
}

.attempt-summary {
  position: sticky;
  top: 90px;
}

.formula-box {
  background: var(--surface);
  border: 1px solid var(--brand-glow-border);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  font-size: 14px;
  color: var(--brand);
}

.formula-box code {
  background: var(--bg);
  padding: 4px 8px;
  border-radius: 6px;
  font-family: "Courier New", monospace;
  color: var(--accent-2);
  display: inline-block;
  margin-left: 8px;
}

.diagram-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 150px;
}

.diagram-box img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
}

.diagram-box svg {
  max-width: 100%;
  height: auto;
}

.test-result-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.3s ease;
  margin-bottom: 16px;
}

.test-result-card:hover {
  border-color: var(--brand);
  box-shadow: 0 8px 24px rgba(77, 224, 196, 0.15);
  transform: translateY(-2px);
}

.result-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 16px;
  margin: 16px 0;
}

.stat-item {
  text-align: center;
  padding: 12px;
  background: var(--surface);
  border-radius: 8px;
  border: 1px solid var(--border);
}

.stat-item .label {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 8px;
  text-transform: uppercase;
}

.stat-item .score-value,
.stat-item .rank-value,
.stat-item .correct-value,
.stat-item .time-value {
  display: block;
  font-size: 20px;
  color: var(--brand);
  font-weight: 600;
}

/* Mobile Bottom Navigation */
.mobile-navbar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--nav-glass-bg);
  backdrop-filter: blur(14px);
  border-top: 1px solid var(--border);
  z-index: 1000;
  padding: 8px 0;
}

@media (max-width: 768px) {
  .mobile-navbar {
    display: flex;
    justify-content: space-around;
    align-items: center;
  }
  
  body {
    padding-bottom: 70px;
  }
}

.mobile-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 8px 16px;
  text-decoration: none;
  color: var(--muted);
  font-size: 12px;
  transition: all 0.3s ease;
  cursor: pointer;
  flex: 1;
  text-align: center;
}

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

.mobile-nav-item svg {
  width: 24px;
  height: 24px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}

.mobile-nav-item.active svg {
  fill: var(--brand);
  stroke: var(--brand);
}

/* Feature boxes */
.feature-box {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: all 0.3s ease;
}

.feature-box:hover {
  border-color: var(--brand);
  box-shadow: 0 8px 24px rgba(77, 224, 196, 0.15);
  transform: translateY(-4px);
}

.stat-box {
  background: var(--surface);
  padding: 16px;
  border-radius: 8px;
  border: 1px solid var(--border);
}

/* Contact form styling */
.form-control,
.form-select {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
}

.form-control:focus,
.form-select:focus {
  background: var(--surface);
  border-color: var(--brand);
  color: var(--text);
  box-shadow: 0 0 0 0.25rem rgba(77, 224, 196, 0.25);
}

.form-control::placeholder {
  color: var(--muted);
}

.form-label {
  color: var(--text);
  font-weight: 500;
  margin-bottom: 8px;
}

/* Accordion styling */
.accordion-item {
  background: var(--card);
  border: 1px solid var(--border);
}

.accordion-button {
  background: var(--card);
  color: var(--text);
  font-weight: 500;
}

.accordion-button:not(.collapsed) {
  background: var(--surface);
  color: var(--brand);
}

.accordion-button:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 0.25rem rgba(77, 224, 196, 0.25);
}

.accordion-body {
  background: var(--card);
  color: var(--text);
}

/* Instructions Modal */
.instruction-box {
  background: var(--surface);
  padding: 12px;
  border-radius: 8px;
  border-left: 3px solid var(--brand);
}

.instruction-list {
  list-style: none;
  padding-left: 0;
}

.instruction-list li {
  padding-left: 24px;
  position: relative;
  color: var(--text);
}

.instruction-list li:before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--brand);
  font-weight: bold;
}

.instructions-section {
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.instructions-section:last-child {
  border-bottom: none;
}

.form-check-input {
  background: var(--surface);
  border: 1px solid var(--border);
  width: 20px;
  height: 20px;
}

.form-check-input:checked {
  background: var(--brand);
  border-color: var(--brand);
}

.form-check-input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 0.25rem rgba(77, 224, 196, 0.25);
}

/* Progress Section */
.progress-section {
  background: var(--surface);
  padding: 12px 16px;
  border-radius: 8px;
  border: 1px solid var(--border);
}

.progress {
  background: var(--bg);
  border-radius: 4px;
  overflow: hidden;
}

#progressText {
  color: var(--brand);
  font-weight: 600;
}

/* Inline Progress Bar */
.progress-inline {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: 0;
  margin-right: auto;
  order: 2;
}

.progress-bar-small {
  width: 60px;
  height: 2px;
  background: var(--border);
  border-radius: 1px;
  overflow: hidden;
  flex-shrink: 0;
}

.progress-fill {
  height: 100%;
  background: var(--brand);
  transition: width 0.3s ease;
  border-radius: 1px;
}

#progressPercent {
  color: var(--brand);
  font-weight: 600;
  font-size: 11px;
  min-width: 24px;
  text-align: right;
  flex-shrink: 0;
}

#toggleQuestions {
  flex-shrink: 0;
  white-space: nowrap;
  margin-left: auto;
}

/* Mobile responsive */
@media (max-width: 576px) {
  .timer-row {
    order: 1;
    flex: 0 1 auto;
  }
  
  .progress-inline {
    order: 2;
    gap: 3px;
    margin-left: 0;
    margin-right: auto;
    min-width: fit-content;
  }
  
  .progress-bar-small {
    width: 50px;
    height: 2px;
  }
  
  #progressPercent {
    font-size: 10px;
    min-width: 22px;
  }
  
  #toggleQuestions {
    order: 3;
    flex-shrink: 0;
    white-space: nowrap;
    margin-left: auto;
  }
}
}






