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

:root {
  font-family: "Vazirmatn", Tahoma, sans-serif;
  color: #19243a;
  background: #f5f7fb;
  font-synthesis: none;
  --blue: #3979e8;
  --blue-dark: #245ec4;
  --ink: #19243a;
  --muted: #7b879b;
  --line: #e8edf5;
  --green: #159b70;
  --red: #d95362;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: radial-gradient(circle at 84% 8%, #e9f1ff 0, transparent 26%), #f5f7fb; }
button { font: inherit; }
.page-shell { width: min(1120px, calc(100% - 40px)); margin: 0 auto; }
.topbar { height: 88px; display: flex; align-items: center; justify-content: space-between; }
.brand { display: flex; align-items: center; gap: 11px; text-decoration: none; color: var(--ink); }
.brand-icon { width: 43px; height: 43px; border-radius: 14px; display: grid; place-items: center; background: #e8f0ff; color: var(--blue); font-size: 27px; font-weight: 800; }
.brand strong, .brand small { display: block; }
.brand strong { font-size: 15px; }
.brand small { font-size: 11px; color: var(--muted); margin-top: 2px; }
.topbar-note { color: #65738b; font-size: 12px; display: flex; align-items: center; gap: 8px; }
.live-dot { width: 8px; height: 8px; background: #20b783; border-radius: 50%; box-shadow: 0 0 0 4px #dff7ee; }
.hero { min-height: 270px; border-radius: 25px; padding: 35px 43px; background: linear-gradient(115deg, #142c51, #1e467b 65%, #2860a0); color: white; display: flex; align-items: center; justify-content: space-between; overflow: hidden; position: relative; box-shadow: 0 18px 45px #1e467b1c; }
.hero-copy { max-width: 610px; position: relative; z-index: 2; }
.eyebrow { font-size: 10px; letter-spacing: 1.5px; color: #8fb8fa; font-weight: 700; }
.hero h1 { font-size: clamp(26px, 4vw, 38px); line-height: 1.5; margin: 9px 0 7px; font-weight: 800; }
.hero h1 span { color: #82b1ff; }
.hero p { color: #d2def0; font-size: 13px; line-height: 2; max-width: 520px; margin: 0; }
.hero-points { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 19px; color: #dce8f8; font-size: 11px; }
.hero-art { width: 235px; height: 205px; position: relative; flex: 0 0 235px; margin-left: 22px; }
.orbit { position: absolute; border: 1px solid #ffffff28; border-radius: 50%; transform: rotate(-25deg); }
.orbit-one { width: 220px; height: 125px; top: 34px; left: 0; }
.orbit-two { width: 185px; height: 170px; top: 10px; left: 20px; transform: rotate(55deg); }
.floating-symbol { position: absolute; color: #b9d3ff; font-weight: 800; text-shadow: 0 5px 20px #0003; }
.symbol-sigma { font-size: 49px; top: 14px; right: 30px; }
.symbol-pi { font-size: 39px; bottom: 21px; left: 19px; }
.symbol-root { font-size: 42px; top: 83px; left: 83px; color: #80afff; }
.art-card { position: absolute; left: 55px; top: 68px; width: 112px; padding: 12px 8px; border: 1px solid #ffffff40; background: #ffffff20; backdrop-filter: blur(10px); border-radius: 16px; text-align: center; box-shadow: 0 12px 25px #061c3c35; }
.art-card span { display: block; font-size: 32px; line-height: 1.2; font-weight: 800; }
.art-card small { color: #e0eaff; font-size: 10px; }
.quiz-layout { display: grid; grid-template-columns: 275px minmax(0, 1fr); gap: 20px; margin-top: 22px; align-items: stretch; }
.side-panel, .question-panel { background: #fff; border: 1px solid #edf0f6; border-radius: 21px; box-shadow: 0 8px 30px #203b6410; }
.side-panel { padding: 23px 21px; }
.panel-heading { display: flex; align-items: center; justify-content: space-between; }
.panel-heading h2 { margin: 4px 0 0; font-size: 16px; }
.panel-heading .eyebrow { color: #8a98ad; letter-spacing: 0; }
.mini-icon { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 11px; background: #f0f5ff; color: var(--blue); }
.progress-number { display: flex; justify-content: space-between; align-items: baseline; margin-top: 25px; }
.progress-number strong { color: var(--blue); font-size: 24px; }
.progress-number span { color: var(--muted); font-size: 11px; }
.progress-track { height: 7px; border-radius: 20px; background: #edf1f7; margin-top: 8px; overflow: hidden; }
.progress-fill { height: 100%; width: 10%; background: linear-gradient(90deg, #5b95f3, #2868d4); border-radius: inherit; transition: width .3s ease; }
.stats-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 23px; }
.stat-card { border-radius: 14px; padding: 12px; display: grid; grid-template-columns: 25px 1fr; align-items: center; column-gap: 7px; }
.stat-card strong { font-size: 18px; line-height: 1.2; }
.stat-card small { grid-column: 1 / -1; margin-top: 7px; font-size: 10px; }
.stat-icon { width: 23px; height: 23px; border-radius: 8px; display: grid; place-items: center; font-weight: 800; }
.correct-stat { background: #edfaf5; color: #16845f; }
.correct-stat .stat-icon { background: #d8f4e8; }
.wrong-stat { background: #fff2f3; color: #c74d5a; }
.wrong-stat .stat-icon { background: #ffe1e4; }
.tip-box { display: flex; gap: 10px; padding: 13px; border-radius: 14px; background: #f7f9fd; margin-top: 23px; }
.tip-icon { font-size: 18px; }
.tip-box strong { font-size: 11px; }
.tip-box p { margin: 4px 0 0; color: var(--muted); font-size: 10px; line-height: 1.9; }
.question-panel { padding: 27px 30px 23px; min-height: 365px; display: flex; flex-direction: column; }
.question-topline { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.question-tag { color: #3473da; background: #edf4ff; padding: 6px 11px; border-radius: 8px; font-size: 10px; font-weight: 700; }
.question-index { color: #a2adbd; font: 700 9px Arial, sans-serif; letter-spacing: 1px; direction: ltr; }
.question-panel h2 { font-size: 19px; line-height: 2; margin: 22px 0 17px; }
.options-list { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; }
.option { display: flex; align-items: center; gap: 11px; min-height: 52px; padding: 10px 13px; border: 1px solid #e8edf5; border-radius: 12px; background: #fff; color: #344159; text-align: right; cursor: pointer; transition: .18s ease; }
.option:hover:not(:disabled) { border-color: #9bbcf4; background: #f8faff; transform: translateY(-1px); }
.option:focus-visible, button:focus-visible { outline: 3px solid #9dbdf5; outline-offset: 2px; }
.option-letter { width: 27px; height: 27px; border-radius: 8px; display: grid; place-items: center; background: #f1f4f9; color: #77859b; font-size: 11px; font-weight: 700; flex: 0 0 27px; }
.option-text { font-size: 13px; font-weight: 600; }
.option.selected { border-color: #4b87e9; background: #f2f7ff; color: #245fc3; box-shadow: 0 0 0 2px #4b87e91a; }
.option.selected .option-letter { color: white; background: var(--blue); }
.option:disabled { cursor: default; opacity: .8; }
.question-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: auto; padding-top: 23px; }
.select-hint { font-size: 10px; color: #98a3b4; }
.primary-button { border: 0; border-radius: 11px; background: var(--blue); color: white; padding: 12px 19px; font-size: 12px; font-weight: 700; cursor: pointer; transition: .18s ease; box-shadow: 0 7px 16px #3979e82b; }
.primary-button:hover:not(:disabled) { background: var(--blue-dark); transform: translateY(-1px); }
.primary-button:disabled { background: #cbd5e5; color: #f8faff; box-shadow: none; cursor: not-allowed; }
.primary-button span { margin-right: 12px; font-size: 16px; vertical-align: -1px; }
footer { display: flex; justify-content: space-between; padding: 22px 3px 28px; color: #9aa5b5; font-size: 10px; }
footer span:first-child { font-weight: 700; color: #65738b; }
.modal-backdrop { position: fixed; inset: 0; z-index: 10; background: #101c31a6; backdrop-filter: blur(5px); display: grid; place-items: center; padding: 20px; }
.modal-backdrop[hidden] { display: none; }
.modal-card { position: relative; width: min(450px, 100%); background: white; border-radius: 23px; padding: 31px; text-align: center; box-shadow: 0 25px 80px #07152c45; animation: pop .22s ease-out; }
@keyframes pop { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: translateY(0) scale(1); } }
.modal-close { position: absolute; top: 14px; left: 15px; width: 31px; height: 31px; border: 0; border-radius: 9px; background: #f2f4f8; color: #68758a; font-size: 21px; cursor: pointer; }
.modal-symbol { width: 57px; height: 57px; margin: 0 auto 14px; border-radius: 18px; display: grid; place-items: center; font-size: 27px; font-weight: 800; background: #e5f8f0; color: var(--green); }
.modal-card.is-wrong .modal-symbol { background: #fff0f1; color: var(--red); }
.modal-kicker { color: var(--green); font-size: 11px; font-weight: 800; }
.modal-card.is-wrong .modal-kicker { color: var(--red); }
.modal-card h2 { margin: 5px 0 9px; font-size: 22px; }
.modal-message { margin: 0 auto 16px; color: #6f7c90; font-size: 12px; line-height: 2; }
.explanation-box { padding: 14px 16px; border-radius: 13px; background: #f5f8fd; color: #4e5c72; text-align: right; font-size: 12px; line-height: 2.1; }
.explanation-box strong { color: #253752; }
.modal-next { width: 100%; margin-top: 19px; }
.result-medal { font-size: 42px; margin-bottom: 8px; }
.result-card .modal-kicker { color: var(--blue); }
.final-score { display: flex; justify-content: center; align-items: baseline; gap: 7px; margin: 12px 0; color: #8a96a9; }
.final-score strong { font-size: 48px; color: var(--blue); line-height: 1.2; }
.result-breakdown { display: flex; justify-content: center; gap: 12px; margin: 18px 0 5px; }
.result-breakdown div { min-width: 105px; border-radius: 12px; background: #f4f7fb; padding: 11px; }
.result-breakdown strong, .result-breakdown span { display: block; }
.result-breakdown strong { font-size: 18px; }
.result-breakdown span { color: var(--muted); font-size: 10px; margin-top: 3px; }
@media (max-width: 760px) {
  .page-shell { width: min(100% - 26px, 560px); }
  .topbar { height: 72px; }
  .hero { padding: 27px 24px; min-height: 240px; }
  .hero-art { width: 145px; flex-basis: 145px; transform: scale(.75); transform-origin: center left; margin-left: -30px; }
  .hero-points { gap: 9px 13px; font-size: 10px; }
  .quiz-layout { grid-template-columns: 1fr; gap: 13px; }
  .side-panel { padding: 17px; }
  .progress-number { margin-top: 13px; }
  .stats-grid { margin-top: 14px; }
  .tip-box { display: none; }
  .question-panel { padding: 22px 19px; min-height: 390px; }
}
@media (max-width: 450px) {
  .hero-art { display: none; }
  .hero { min-height: 220px; }
  .hero h1 { font-size: 27px; }
  .options-list { grid-template-columns: 1fr; gap: 8px; }
  .option { min-height: 48px; }
  .question-panel h2 { font-size: 17px; }
  .question-actions { align-items: stretch; flex-direction: column; }
  .select-hint { text-align: center; }
  .question-actions .primary-button { width: 100%; }
  footer { font-size: 9px; }
}
