:root {

  --primary: #4f46e5;
  --primary-dark: #3730a3;
  --primary-light: #eef2ff;

  --secondary: #7c3aed;

  --success: #16a34a;
  --success-bg: #dcfce7;
  --success-border: #22c55e;

  --danger: #dc2626;
  --danger-bg: #fee2e2;
  --danger-border: #ef4444;

  --text: #111827;
  --text-light: #64748b;

  --background: #f8fafc;
  --card: #ffffff;
  --border: #e2e8f0;

  --radius: 16px;

  --shadow:
    0 8px 25px rgba(15, 23, 42, 0.06);
}


/* ============================================================
GLOBAL
============================================================ */

* {
  box-sizing: border-box;
}

body {

  background:
    radial-gradient(
      circle at 10% 5%,
      rgba(99, 102, 241, 0.04),
      transparent 25%
    ),
    var(--background);

  color: var(--text);

  font-family:
    "Noto Sans Kannada",
    "Nirmala UI",
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}


/* ============================================================
MAIN LAYOUT
============================================================ */

main {
  min-height: calc(100vh - 140px);
}

.row {

  width: min(1180px, calc(100% - 30px));

  margin: 0 auto;

  display: flex;

  gap: 24px;

  padding: 20px 0 45px;
}

.col-9 {
  width: calc(75% - 12px);
}

.col-3 {
  width: calc(25% - 12px);
}


/* ============================================================
BREADCRUMB
============================================================ */

.breadcrumb {

  display: flex;

  flex-wrap: wrap;

  align-items: center;

  gap: 7px;

  margin: 0 0 12px;

  color: #64748b;

  font-size: 13px;

  line-height: 1.6;
}

.breadcrumb a {

  color: var(--primary);

  text-decoration: none;

  font-weight: 600;
}

.breadcrumb a:hover {
  text-decoration: underline;
}


/* ============================================================
HERO
============================================================ */

.hero {

  position: relative;

  overflow: hidden;

  margin-bottom: 15px;

  padding: 22px 24px;

  background:
    radial-gradient(
      circle at 100% 0%,
      rgba(124, 58, 237, 0.14),
      transparent 35%
    ),
    linear-gradient(
      135deg,
      #eef2ff,
      #faf5ff
    );

  border: 1px solid #ddd6fe;

  border-radius: 18px;

  box-shadow:
    0 8px 25px rgba(79, 70, 229, 0.06);
}

.hero::after {

  content: "";

  position: absolute;

  width: 150px;
  height: 150px;

  right: -75px;
  bottom: -85px;

  background:
    rgba(99, 102, 241, 0.07);

  border-radius: 50%;

  pointer-events: none;
}

.hero-label {

  position: relative;

  z-index: 1;

  margin: 0 0 4px;

  color: var(--primary);

  font-size: 12px;

  font-weight: 800;

  text-transform: uppercase;

  letter-spacing: .3px;
}

.hero h1 {

  position: relative;

  z-index: 1;

  margin: 0 0 7px;

  color: #1e1b4b;

  font-size: 23px !important;

  line-height: 1.45;

  font-weight: 800;
}

.hero p:not(.hero-label) {

  position: relative;

  z-index: 1;

  margin: 0;

  color: #64748b;

  font-size: 14px;

  line-height: 1.65;
}


/* ============================================================
SEO CONTENT
============================================================ */

.seo-content {

  margin-bottom: 15px;

  padding: 18px 20px;

  background: #ffffff;

  border: 1px solid var(--border);

  border-radius: 16px;

  box-shadow:
    0 4px 15px rgba(15, 23, 42, 0.035);
}

.seo-content h2 {

  margin: 0 0 8px;

  color: #172033;

  font-size: 18px;

  line-height: 1.5;

  font-weight: 800;
}

.seo-content h2:not(:first-child) {

  margin-top: 18px;
}

.seo-content p {

  margin: 0 0 9px;

  color: #64748b;

  font-size: 14px;

  line-height: 1.75;
}

.seo-content p:last-child {
  margin-bottom: 0;
}

.seo-content strong {
  color: var(--primary);
}


/* ============================================================
QUIZ SECTION
============================================================ */

.quiz-section {

  margin-bottom: 15px;

  padding: 18px 20px;

  background: #ffffff;

  border: 1px solid var(--border);

  border-radius: 18px;

  box-shadow: var(--shadow);
}

.quiz-section-header {

  display: flex;

  align-items: center;

  justify-content: space-between;

  gap: 15px;

  margin-bottom: 11px;
}

.quiz-section-header h2 {

  margin: 0 0 2px;

  color: #172033;

  font-size: 18px;

  line-height: 1.4;

  font-weight: 800;
}

.quiz-section-header p {

  margin: 0;

  color: var(--text-light);

  font-size: 13px;

  line-height: 1.5;
}

.quiz-progress-text {

  flex-shrink: 0;

  padding: 6px 10px;

  color: var(--primary);

  background: var(--primary-light);

  border-radius: 50px;

  font-size: 12px;

  font-weight: 800;
}


/* ============================================================
PROGRESS
============================================================ */

.quiz-progress-container {

  width: 100%;

  height: 6px;

  margin-bottom: 14px;

  overflow: hidden;

  background: #e2e8f0;

  border-radius: 50px;
}

.quiz-progress-bar {

  height: 100%;

  background:
    linear-gradient(
      90deg,
      var(--primary),
      var(--secondary)
    );

  border-radius: inherit;

  transition:
    width .3s ease;
}


/* ============================================================
QUIZ CONTAINER
============================================================ */

.quiz-container {

  width: 100%;

  padding: 16px 17px;

  background: #ffffff;

  border: 1px solid #e2e8f0;

  border-radius: 15px;
}


/* ============================================================
ONE QUESTION
============================================================ */

.quiz-container .question {

  margin: 0;

  padding: 0;
}

.quiz-container .question h3 {

  margin: 0 0 13px;

  padding: 0;

  color: var(--text);

  font-size: 18px;

  line-height: 1.48;

  font-weight: 750;
}


/* ============================================================
OPTIONS
============================================================ */

.quiz-container .options {

  display: grid;

  gap: 7px;

  width: 100%;
}

.quiz-container .option {

  width: 100%;

  min-height: 43px;

  display: flex;

  align-items: center;

  padding: 8px 12px;

  text-align: left;

  color: var(--text);

  background: #ffffff;

  border: 1.5px solid var(--border);

  border-radius: 10px;

  font-family: inherit;

  font-size: 14.5px;

  line-height: 1.4;

  cursor: pointer;

  transition:
    border-color .18s ease,
    background .18s ease,
    transform .12s ease,
    box-shadow .18s ease;
}

.quiz-container .option:hover {

  border-color: #a5b4fc;

  background: #f8f7ff;

  transform: translateY(-1px);

  box-shadow:
    0 4px 12px rgba(79, 70, 229, .07);
}

.quiz-container .option:focus-visible {

  outline: 3px solid rgba(79, 70, 229, .2);

  outline-offset: 2px;
}


/* ============================================================
OPTION NUMBER
============================================================ */

.quiz-container .option-number {

  width: 28px;

  height: 28px;

  display: grid;

  place-items: center;

  flex-shrink: 0;

  margin-right: 9px;

  color: #475569;

  background: #f1f5f9;

  border-radius: 8px;

  font-size: 12px;

  font-weight: 800;
}


/* ============================================================
CORRECT
============================================================ */

.quiz-container .option.correct {

  color: #166534;

  background: var(--success-bg);

  border-color: var(--success-border);

  box-shadow:
    0 4px 12px rgba(22, 163, 74, .08);
}

.quiz-container .option.correct .option-number {

  color: #ffffff;

  background: var(--success);
}


/* ============================================================
WRONG
============================================================ */

.quiz-container .option.wrong {

  color: #991b1b;

  background: var(--danger-bg);

  border-color: var(--danger-border);

  box-shadow:
    0 4px 12px rgba(220, 38, 38, .07);
}

.quiz-container .option.wrong .option-number {

  color: #ffffff;

  background: var(--danger);
}


/* ============================================================
DISABLED
============================================================ */

.quiz-container .option:disabled {

  cursor: default;

  transform: none;

  opacity: 1;
}


/* ============================================================
FEEDBACK
============================================================ */

.quiz-container .feedback {

  margin-top: 11px;

  padding: 9px 12px;

  border-radius: 10px;

  font-size: 13px;

  line-height: 1.55;
}

.quiz-container .feedback.correct {

  color: #166534;

  background: var(--success-bg);

  border: 1px solid #86efac;
}

.quiz-container .feedback.wrong {

  color: #991b1b;

  background: var(--danger-bg);

  border: 1px solid #fca5a5;
}


/* ============================================================
NEXT BUTTON
============================================================ */

.quiz-container .next-btn,
.quiz-container #nextBtn {

  width: 100%;

  display: block;

  margin-top: 11px;

  min-height: 42px;

  padding: 9px 14px;

  border: 0;

  border-radius: 10px;

  color: #ffffff;

  background:
    linear-gradient(
      135deg,
      var(--primary),
      var(--secondary)
    );

  font-family: inherit;

  font-size: 14px;

  font-weight: 800;

  cursor: pointer;

  box-shadow:
    0 7px 15px rgba(79, 70, 229, .16);

  transition:
    transform .18s ease,
    box-shadow .18s ease;
}

.quiz-container .next-btn:hover,
.quiz-container #nextBtn:hover {

  transform: translateY(-1px);

  box-shadow:
    0 10px 20px rgba(79, 70, 229, .21);
}

.quiz-container .next-btn:focus-visible,
.quiz-container #nextBtn:focus-visible {

  outline: 3px solid rgba(79, 70, 229, .2);

  outline-offset: 2px;
}


/* ============================================================
RESULT MODAL
============================================================ */

.modal {

  position: fixed;

  inset: 0;

  z-index: 9999;

  display: none;

  align-items: center;

  justify-content: center;

  padding: 18px;

  background:
    rgba(15, 23, 42, .62);

  backdrop-filter: blur(7px);
}

.modal.show,
.modal.active {

  display: flex;
}

.modal-content {

  width: min(430px, 100%);

  padding: 28px 22px;

  text-align: center;

  background: #ffffff;

  border-radius: 20px;

  box-shadow:
    0 25px 70px rgba(15, 23, 42, .25);

  animation:
    modalIn .25s ease;
}

.modal-content h2 {

  margin: 0 0 10px;

  color: #172033;

  font-size: 25px;

  line-height: 1.4;
}

#resultText {

  margin: 0 0 18px;

  color: var(--text-light);

  font-size: 15px;

  line-height: 1.7;
}

#restartBtn {

  width: 100%;

  min-height: 43px;

  padding: 10px 15px;

  border: 0;

  border-radius: 10px;

  color: #ffffff;

  background: var(--primary);

  font-family: inherit;

  font-size: 14px;

  font-weight: 800;

  cursor: pointer;
}

#restartBtn:hover {

  background: var(--primary-dark);

  transform: translateY(-1px);
}


/* ============================================================
SCORE
============================================================ */

.score-circle {

  width: 100px;

  height: 100px;

  display: grid;

  place-items: center;

  margin: 0 auto 15px;

  border-radius: 50%;

  color: var(--primary);

  background:
    linear-gradient(
      135deg,
      #eef2ff,
      #ede9fe
    );

  border: 7px solid #ddd6fe;

  font-size: 24px;

  font-weight: 900;
}


@keyframes modalIn {

  from {
    opacity: 0;
    transform: translateY(15px) scale(.98);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}


/* ============================================================
SIDEBAR
============================================================ */

.quiz-sidebar {

  min-height: 100px;
}

.sidebar-card {

  padding: 17px;

  background: #ffffff;

  border: 1px solid var(--border);

  border-radius: 16px;

  box-shadow: var(--shadow);
}

.sidebar-card h2 {

  margin: 0 0 9px;

  color: #172033;

  font-size: 17px;
}

.sidebar-card a {

  display: block;

  padding: 8px 0;

  color: var(--primary);

  border-bottom: 1px solid #f1f5f9;

  font-size: 13px;

  line-height: 1.5;

  text-decoration: none;
}

.sidebar-card a:last-child {
  border-bottom: 0;
}

.sidebar-card a:hover {
  text-decoration: underline;
}


/* ============================================================
RELATED LINKS
============================================================ */

.related-links {

  display: flex;

  flex-wrap: wrap;

  gap: 9px;

  margin-top: 15px;
}

.related-links a {

  display: inline-flex;

  align-items: center;

  padding: 8px 11px;

  color: var(--primary);

  background: var(--primary-light);

  border-radius: 9px;

  font-size: 13px;

  font-weight: 700;

  text-decoration: none;
}

.related-links a:hover {
  background: #e0e7ff;
}


/* ============================================================
FOOTER
============================================================ */

footer {

  margin-top: 10px;

  padding: 25px 0;

  color: #64748b;

  background: #ffffff;

  border-top: 1px solid var(--border);

  text-align: center;

  font-size: 13px;
}

footer p {
  margin: 3px 0;
}

footer a {

  color: var(--primary);

  text-decoration: none;

  font-weight: 600;
}


/* ============================================================
TABLET
============================================================ */

@media (max-width: 950px) {

  .row {
    display: block;
  }

  .col-9,
  .col-3 {
    width: 100%;
  }

  .quiz-sidebar {
    display: none;
  }
}


/* ============================================================
MOBILE
============================================================ */

@media (max-width: 700px) {

  .row {

    width: calc(100% - 20px);

    padding: 12px 0 35px;
  }

  .breadcrumb {

    margin-bottom: 9px;

    font-size: 12px;

    gap: 5px;
  }

  .hero {

    margin-bottom: 11px;

    padding: 18px 16px;

    border-radius: 16px;
  }

  .hero-label {
    font-size: 11px;
  }

  .hero h1 {

    font-size: 20px !important;

    line-height: 1.5;
  }

  .hero p:not(.hero-label) {

    font-size: 13px;

    line-height: 1.65;
  }

  .seo-content {

    padding: 15px 15px;

    margin-bottom: 11px;

    border-radius: 14px;
  }

  .seo-content h2 {

    font-size: 17px;

    line-height: 1.5;
  }

  .seo-content p {

    font-size: 13.5px;

    line-height: 1.75;
  }

  .quiz-section {

    padding: 14px 12px;

    border-radius: 15px;
  }

  .quiz-section-header {

    align-items: flex-start;

    flex-direction: column;

    gap: 7px;

    margin-bottom: 9px;
  }

  .quiz-section-header h2 {
    font-size: 17px;
  }

  .quiz-section-header p {
    font-size: 12.5px;
  }

  .quiz-progress-text {

    padding: 5px 9px;

    font-size: 11.5px;
  }

  .quiz-progress-container {

    height: 5px;

    margin-bottom: 11px;
  }

  .quiz-container {

    padding: 13px 11px;

    border-radius: 13px;
  }

  .quiz-container .question h3 {

    margin-bottom: 11px;

    font-size: 16px;

    line-height: 1.55;
  }

  .quiz-container .options {

    gap: 6px;
  }

  .quiz-container .option {

    min-height: 44px;

    padding: 8px 9px;

    font-size: 13.5px;

    line-height: 1.45;

    border-radius: 9px;
  }

  .quiz-container .option-number {

    width: 27px;

    height: 27px;

    margin-right: 8px;

    border-radius: 7px;

    font-size: 11.5px;
  }

  .quiz-container .feedback {

    margin-top: 9px;

    padding: 8px 10px;

    font-size: 12.5px;

    line-height: 1.55;
  }

  .quiz-container .next-btn,
  .quiz-container #nextBtn {

    min-height: 42px;

    margin-top: 9px;

    padding: 9px 12px;

    font-size: 13.5px;
  }

  .related-links {

    flex-direction: column;
  }

  .related-links a {

    width: 100%;

    justify-content: center;

    text-align: center;
  }
}


/* ============================================================
SMALL MOBILE
============================================================ */

@media (max-width: 380px) {

  .row {
    width: calc(100% - 16px);
  }

  .hero {
    padding: 16px 14px;
  }

  .hero h1 {
    font-size: 18px !important;
  }

  .hero p:not(.hero-label) {
    font-size: 12.5px;
  }

  .seo-content {
    padding: 13px;
  }

  .seo-content h2 {
    font-size: 16px;
  }

  .seo-content p {
    font-size: 13px;
  }

  .quiz-section {
    padding: 12px 10px;
  }

  .quiz-container {
    padding: 11px 9px;
  }

  .quiz-container .question h3 {
    font-size: 15px;
  }

  .quiz-container .option {
    min-height: 42px;

    padding: 7px 8px;

    font-size: 13px;
  }

  .quiz-container .option-number {
    width: 25px;
    height: 25px;

    margin-right: 7px;
  }
}


/* ============================================================
REDUCED MOTION
============================================================ */

@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {

    scroll-behavior: auto !important;

    animation-duration: .01ms !important;

    animation-iteration-count: 1 !important;

    transition-duration: .01ms !important;
  }
}