:root {
  --navy: #082e52;
  --navy-deep: #041d35;
  --teal: #35aaa6;
  --teal-light: #65cac5;
  --sky: #eaf7f7;
  --ink: #13233a;
  --muted: #66758a;
  --line: #dce6ed;
  --paper: #ffffff;
  --success: #138a60;
  --danger: #c74949;
  --warning: #b87914;
  --shadow: 0 24px 70px rgba(7, 38, 68, .14);
  --radius-xl: 32px;
  --radius-lg: 24px;
  --radius-md: 16px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: Tahoma, Arial, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 8% 5%, rgba(53,170,166,.12), transparent 28%),
    radial-gradient(circle at 94% 22%, rgba(8,46,82,.08), transparent 25%),
    linear-gradient(180deg, #fafdff 0%, #f5fbfc 48%, #f8fbfd 100%);
  overflow-x: hidden;
}
button, input { font: inherit; }
button { cursor: pointer; }
a { color: inherit; }
[hidden] { display: none !important; }
.shell { width: min(1180px, calc(100% - 40px)); margin-inline: auto; }
.ambient { position: fixed; border-radius: 50%; filter: blur(20px); pointer-events: none; z-index: -1; }
.ambient-one { width: 340px; height: 340px; background: rgba(53,170,166,.09); top: 18%; right: -180px; }
.ambient-two { width: 420px; height: 420px; background: rgba(8,46,82,.07); left: -250px; bottom: 4%; }
.topbar {
  width: min(1180px, calc(100% - 40px));
  margin: 18px auto 0;
  min-height: 66px;
  padding: 10px 14px 10px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255,255,255,.8);
  border: 1px solid rgba(216,229,237,.85);
  border-radius: 22px;
  box-shadow: 0 12px 40px rgba(8,46,82,.07);
  backdrop-filter: blur(18px);
  position: sticky;
  top: 12px;
  z-index: 30;
}
.brand-mini { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 800; color: var(--navy); }
.brand-mini img { width: 50px; height: 42px; object-fit: contain; }
.facebook-link { text-decoration: none; color: var(--navy); font-weight: 700; padding: 11px 15px; border-radius: 14px; background: #eef8f8; transition: .2s ease; }
.facebook-link:hover { background: var(--navy); color: #fff; transform: translateY(-1px); }
.hero { min-height: calc(100vh - 110px); padding: 64px 0 54px; display: grid; grid-template-columns: 1.08fr .92fr; gap: 56px; align-items: center; }
.hero-copy { position: relative; z-index: 2; }
.eyebrow { display: inline-flex; align-items: center; gap: 9px; color: var(--teal); font-size: 14px; font-weight: 800; letter-spacing: .02em; }
.eyebrow > span { width: 30px; height: 3px; border-radius: 20px; background: var(--teal); }
.hero-logo { width: 170px; height: 88px; object-fit: contain; object-position: right center; margin: 20px 0 6px; display: block; }
.hero h1 { margin: 0; color: var(--navy-deep); font-size: clamp(37px, 4.6vw, 66px); line-height: 1.18; letter-spacing: -.04em; }
.hero h1 strong { color: var(--teal); font-weight: 900; }
.teacher-name { margin: 20px 0 0; font-size: clamp(22px, 2.1vw, 30px); font-weight: 900; color: var(--navy); }
.hero-description { max-width: 680px; margin: 15px 0 28px; color: var(--muted); font-size: 17px; line-height: 1.9; }
.hero-actions { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 14px; max-width: 650px; }
.primary-action,.secondary-action { border: 0; border-radius: 20px; min-height: 82px; display: flex; align-items: center; gap: 15px; padding: 14px 18px; text-align: right; transition: .25s ease; box-shadow: 0 14px 30px rgba(8,46,82,.12); }
.primary-action { background: linear-gradient(135deg, var(--navy), #0b416f); color: #fff; }
.secondary-action { background: linear-gradient(135deg, #43b8b2, #2d9d99); color: #fff; }
.primary-action:hover,.secondary-action:hover { transform: translateY(-4px); box-shadow: 0 20px 38px rgba(8,46,82,.18); }
.action-icon { width: 48px; height: 48px; border-radius: 15px; display: grid; place-items: center; background: rgba(255,255,255,.16); font-size: 24px; font-weight: 900; flex: 0 0 auto; }
.hero-actions button > span:last-child { display: grid; gap: 4px; font-size: 20px; font-weight: 900; }
.hero-actions small { font-size: 12px; font-weight: 500; opacity: .8; }
.hero-stats { margin-top: 30px; display: flex; gap: 10px; flex-wrap: wrap; }
.hero-stats div { min-width: 126px; padding: 12px 17px; background: rgba(255,255,255,.75); border: 1px solid var(--line); border-radius: 16px; display: flex; align-items: baseline; gap: 8px; }
.hero-stats strong { font-size: 24px; color: var(--navy); }
.hero-stats span { color: var(--muted); font-size: 12px; }
.hero-visual { position: relative; }
.portrait-frame { position: relative; min-height: 610px; border-radius: 44px 44px 120px 44px; overflow: hidden; background: linear-gradient(160deg,#eff9fb,#dceef2); box-shadow: var(--shadow); isolation: isolate; }
.portrait-frame::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 45%, rgba(4,29,53,.12)); z-index: 1; }
.portrait-frame::after { content: ""; position: absolute; width: 260px; height: 260px; border: 1px solid rgba(53,170,166,.28); border-radius: 50%; left: -70px; top: -80px; box-shadow: 0 0 0 32px rgba(53,170,166,.05),0 0 0 72px rgba(53,170,166,.035); }
.portrait-grid { position: absolute; inset: 0; opacity: .28; background-image: linear-gradient(rgba(8,46,82,.08) 1px,transparent 1px),linear-gradient(90deg,rgba(8,46,82,.08) 1px,transparent 1px); background-size: 34px 34px; mask-image: linear-gradient(to bottom,black,transparent 75%); }
.portrait-frame > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; z-index: 0; }
.portrait-badge { position: absolute; z-index: 3; right: 24px; left: 24px; bottom: 22px; padding: 17px 20px; display: grid; gap: 5px; background: rgba(255,255,255,.9); border: 1px solid rgba(255,255,255,.9); border-radius: 20px; backdrop-filter: blur(14px); box-shadow: 0 12px 35px rgba(4,29,53,.15); }
.portrait-badge strong { color: var(--navy); }
.portrait-badge span { color: var(--muted); font-size: 13px; }
.units-section,.player-section { padding: 56px 0 100px; min-height: 70vh; }
.section-heading { display: flex; gap: 18px; align-items: flex-start; margin-bottom: 28px; }
.section-heading h2 { margin: 8px 0 7px; font-size: clamp(28px,4vw,44px); color: var(--navy); }
.section-heading p { margin: 0; color: var(--muted); line-height: 1.8; }
.section-eyebrow { display: flex; }
.icon-button { border: 1px solid var(--line); background: #fff; color: var(--navy); width: 48px; height: 48px; border-radius: 15px; font-size: 24px; font-weight: 900; box-shadow: 0 8px 20px rgba(8,46,82,.08); }
.icon-button:hover { background: var(--navy); color: #fff; }
.unit-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 18px; }
.unit-card { position: relative; border: 1px solid var(--line); background: rgba(255,255,255,.9); border-radius: 24px; padding: 21px; display: flex; gap: 18px; text-align: right; min-height: 150px; overflow: hidden; box-shadow: 0 12px 35px rgba(8,46,82,.07); transition: .25s ease; }
.unit-card::after { content: ""; position: absolute; width: 120px; height: 120px; border-radius: 50%; background: rgba(53,170,166,.08); left: -45px; bottom: -55px; }
.unit-card:hover { transform: translateY(-5px); border-color: rgba(53,170,166,.6); box-shadow: 0 20px 44px rgba(8,46,82,.12); }
.unit-number { width: 68px; height: 68px; border-radius: 20px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg,var(--navy),var(--teal)); font-size: 23px; font-weight: 900; flex: 0 0 auto; box-shadow: 0 12px 25px rgba(8,46,82,.2); }
.unit-content { display: grid; align-content: center; gap: 7px; }
.unit-content small { color: var(--teal); font-weight: 800; }
.unit-content strong { color: var(--navy); font-size: 18px; line-height: 1.55; }
.unit-content em { color: var(--muted); font-style: normal; font-size: 13px; margin-top: 3px; }
.unit-content em b { color: var(--teal); font-size: 17px; }
.modal { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 20px; opacity: 0; visibility: hidden; transition: .2s ease; }
.modal.is-open { opacity: 1; visibility: visible; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(2,19,35,.72); backdrop-filter: blur(8px); }
.modal-card { position: relative; width: min(510px,100%); background: #fff; border-radius: 30px; padding: 34px; box-shadow: 0 30px 100px rgba(0,0,0,.3); transform: translateY(16px) scale(.98); transition: .2s ease; }
.modal.is-open .modal-card { transform: translateY(0) scale(1); }
.modal-close { position: absolute; left: 18px; top: 16px; width: 38px; height: 38px; border: 0; border-radius: 12px; background: #eef3f6; color: var(--navy); font-size: 26px; }
.modal-icon { width: 58px; height: 58px; border-radius: 18px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg,var(--navy),var(--teal)); font-size: 26px; box-shadow: 0 12px 25px rgba(8,46,82,.2); }
.modal-kicker { display: block; color: var(--teal); font-weight: 800; margin-top: 18px; font-size: 13px; }
.modal h2 { margin: 5px 0 7px; color: var(--navy); font-size: 29px; }
.modal-card > p { color: var(--muted); line-height: 1.65; margin: 0 0 20px; }
.modal form { display: grid; gap: 14px; }
.modal label { display: grid; gap: 7px; color: var(--navy); font-size: 13px; font-weight: 800; }
.modal input { width: 100%; height: 52px; border: 1px solid var(--line); background: #f9fbfc; border-radius: 14px; padding: 0 15px; outline: none; color: var(--ink); transition: .2s; }
.modal input:focus { border-color: var(--teal); box-shadow: 0 0 0 4px rgba(53,170,166,.12); background: #fff; }
.code-input { text-align: center; letter-spacing: .45em; font-size: 22px; font-weight: 900; }
.form-error { min-height: 20px; color: var(--danger) !important; font-size: 13px; margin: 0 !important; }
.submit-button { min-height: 56px; border: 0; border-radius: 16px; background: linear-gradient(135deg,var(--navy),#0b416f); color: #fff; font-weight: 900; display: flex; justify-content: space-between; align-items: center; padding: 0 20px; box-shadow: 0 12px 26px rgba(8,46,82,.2); }
.submit-button:disabled { opacity: .65; cursor: wait; }
.submit-button b { font-size: 22px; }
.modal-note { margin-top: 16px; padding: 12px; border-radius: 12px; background: #eef8f8; color: var(--muted); font-size: 12px; text-align: center; }
.quiz-shell { background: rgba(255,255,255,.94); border: 1px solid var(--line); border-radius: 30px; box-shadow: var(--shadow); overflow: hidden; }
.quiz-head { padding: 22px 25px; color: #fff; background: linear-gradient(120deg,var(--navy-deep),var(--navy),#0d5271); display: flex; justify-content: space-between; align-items: center; gap: 15px; }
.quiz-title small { display: block; color: var(--teal-light); font-weight: 800; margin-bottom: 5px; }
.quiz-title strong { font-size: 19px; line-height: 1.5; }
.quiz-meta { display: flex; gap: 9px; align-items: center; }
.meta-pill { min-width: 86px; text-align: center; padding: 10px 13px; border-radius: 14px; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.13); }
.meta-pill small { display: block; opacity: .72; font-size: 10px; margin-bottom: 3px; }
.meta-pill strong { font-size: 18px; }
.timer-warning { background: rgba(199,73,73,.22); border-color: rgba(255,161,161,.45); }
.quiz-progress { height: 7px; background: #e8eef2; }
.quiz-progress span { display: block; height: 100%; background: linear-gradient(90deg,var(--teal),#67d0ca); transition: width .3s ease; }
.quiz-body { padding: clamp(24px,4vw,48px); }
.question-count { color: var(--teal); font-weight: 900; font-size: 13px; margin-bottom: 13px; }
.question-text { margin: 0 0 26px; color: var(--navy-deep); font-size: clamp(22px,3vw,31px); line-height: 1.75; }
.choice-list { display: grid; gap: 12px; }
.choice { border: 1px solid var(--line); background: #fff; border-radius: 17px; padding: 16px 17px; display: flex; align-items: center; gap: 13px; text-align: right; color: var(--ink); transition: .18s ease; }
.choice:hover { border-color: var(--teal); background: #f4fbfb; }
.choice.is-selected { border-color: var(--teal); background: #ecf9f8; box-shadow: 0 0 0 3px rgba(53,170,166,.1); }
.choice-letter { width: 38px; height: 38px; border-radius: 12px; background: #eef3f6; color: var(--navy); display: grid; place-items: center; font-weight: 900; flex: 0 0 auto; }
.choice.is-selected .choice-letter { background: var(--teal); color: #fff; }
.quiz-actions { margin-top: 28px; display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.quiz-actions button { border: 0; min-height: 52px; border-radius: 15px; padding: 0 20px; font-weight: 900; }
.next-button,.check-button,.finish-button { background: linear-gradient(135deg,var(--navy),#0c4a74); color: #fff; min-width: 165px; }
.next-button:disabled,.check-button:disabled { opacity: .45; cursor: not-allowed; }
.exit-button { background: #eef3f6; color: var(--muted); }
.feedback-box { margin-top: 22px; border-radius: 17px; padding: 16px 18px; display: grid; gap: 6px; line-height: 1.7; }
.feedback-box.correct { background: #eaf8f2; border: 1px solid #bce6d4; color: #0d704e; }
.feedback-box.wrong { background: #fff1f1; border: 1px solid #efc8c8; color: #a43e3e; }
.feedback-box strong { font-size: 17px; }
.bank-summary,.result-card { padding: clamp(30px,5vw,60px); text-align: center; }
.result-icon { width: 92px; height: 92px; margin: 0 auto 20px; border-radius: 28px; display: grid; place-items: center; background: linear-gradient(135deg,var(--teal),#58c9c2); color: #fff; font-size: 42px; box-shadow: 0 18px 35px rgba(53,170,166,.25); }
.result-card h2,.bank-summary h2 { color: var(--navy); margin: 0 0 8px; font-size: clamp(28px,4vw,43px); }
.result-card > p,.bank-summary > p { color: var(--muted); line-height: 1.8; }
.score-ring { width: 190px; height: 190px; margin: 26px auto; border-radius: 50%; background: conic-gradient(var(--teal) var(--score),#e7eef2 0); display: grid; place-items: center; position: relative; }
.score-ring::before { content: ""; position: absolute; width: 150px; height: 150px; background: #fff; border-radius: 50%; }
.score-ring div { position: relative; z-index: 2; }
.score-ring strong { display: block; color: var(--navy); font-size: 49px; }
.score-ring span { color: var(--muted); font-size: 13px; }
.result-details { display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; max-width: 700px; margin: 0 auto 25px; }
.result-details div { background: #f4f8fa; border: 1px solid var(--line); padding: 14px; border-radius: 15px; }
.result-details small { display: block; color: var(--muted); margin-bottom: 5px; }
.result-details strong { color: var(--navy); }
.result-buttons { display: flex; justify-content: center; gap: 11px; flex-wrap: wrap; margin: 24px 0; }
.result-buttons button,.result-buttons a { border: 0; text-decoration: none; min-height: 50px; padding: 0 17px; border-radius: 14px; display: inline-flex; align-items: center; justify-content: center; font-weight: 900; }
.download-primary { background: var(--navy); color: #fff; }
.download-secondary { background: var(--teal); color: #fff; }
.facebook-result { background: #eef4f8; color: var(--navy); }
.answers-review { text-align: right; margin-top: 30px; display: grid; gap: 12px; }
.answer-row { border: 1px solid var(--line); border-radius: 16px; padding: 15px; background: #fff; }
.answer-row.correct { border-right: 5px solid var(--success); }
.answer-row.wrong { border-right: 5px solid var(--danger); }
.answer-row strong { color: var(--navy); line-height: 1.65; }
.answer-row p { margin: 7px 0 0; color: var(--muted); line-height: 1.6; font-size: 13px; }
.toast { position: fixed; left: 22px; bottom: 22px; z-index: 120; max-width: 340px; padding: 14px 18px; background: var(--navy-deep); color: #fff; border-radius: 14px; box-shadow: 0 14px 40px rgba(0,0,0,.2); transform: translateY(30px); opacity: 0; pointer-events: none; transition: .25s ease; }
.toast.show { transform: translateY(0); opacity: 1; }
footer { border-top: 1px solid var(--line); background: rgba(255,255,255,.75); }
.footer-inner { padding: 24px 0; display: flex; justify-content: space-between; align-items: center; gap: 20px; color: var(--muted); }
.footer-inner div { display: grid; gap: 5px; }
.footer-inner strong { color: var(--navy); }
.footer-inner a { color: var(--teal); font-weight: 800; text-decoration: none; }
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; padding-top: 45px; }
  .hero-visual { order: -1; max-width: 590px; margin-inline: auto; width: 100%; }
  .portrait-frame { min-height: 520px; }
  .hero-copy { text-align: center; }
  .hero-logo { margin-inline: auto; object-position: center; }
  .eyebrow { justify-content: center; }
  .hero-description,.hero-actions { margin-inline: auto; }
  .hero-stats { justify-content: center; }
}
@media (max-width: 680px) {
  .shell,.topbar { width: min(100% - 24px,1180px); }
  .topbar { min-height: 58px; margin-top: 10px; padding: 8px 10px; top: 7px; }
  .brand-mini span { display: none; }
  .brand-mini img { width: 43px; height: 36px; }
  .facebook-link { font-size: 12px; padding: 10px; }
  .hero { padding: 30px 0 45px; gap: 34px; }
  .portrait-frame { min-height: 430px; border-radius: 30px 30px 80px 30px; }
  .hero-actions { grid-template-columns: 1fr; }
  .hero-stats div { flex: 1 1 30%; min-width: 100px; justify-content: center; padding: 10px; }
  .unit-grid { grid-template-columns: 1fr; }
  .unit-card { min-height: 135px; padding: 17px; }
  .modal-card { padding: 26px 20px; border-radius: 24px; }
  .quiz-head { align-items: flex-start; flex-direction: column; padding: 18px; }
  .quiz-meta { width: 100%; }
  .meta-pill { flex: 1; }
  .quiz-body { padding: 22px 17px; }
  .question-text { font-size: 21px; }
  .quiz-actions { flex-direction: column-reverse; }
  .quiz-actions button { width: 100%; }
  .result-details { grid-template-columns: 1fr; }
  .footer-inner { flex-direction: column; text-align: center; }
}
