:root { --accent: #1768e8; --canvas: #f5f8ff; }
body { overflow-x: hidden; }
.save-state { padding: 8px 11px; color: #23825b; background: #ebf8f2; border-radius: 10px; font-size: 13px; font-weight: 800; }
.builder { min-height: calc(100vh - 70px); display: grid; grid-template-columns: 78px 360px minmax(0, 1fr); }
.side-nav { padding: 20px 13px; border-right: 1px solid #dfe6f3; background: #fff; }
.side-nav button { width: 50px; min-height: 50px; display: grid; place-items: center; gap: 3px; margin-bottom: 9px; border: 0; border-radius: 13px; color: #6c7890; background: transparent; font-weight: 900; }
.side-nav button span { font-size: 8px; }
.side-nav button.active { color: var(--accent); background: #eaf1ff; }
.editor { padding: 30px 26px; overflow-y: auto; border-right: 1px solid #dfe6f3; background: #fff; }
.editor h1 { font-size: 30px; letter-spacing: -.04em; }
.editor .field { margin-bottom: 15px; }
.answers-editor { display: grid; gap: 9px; margin: 18px 0; }
.answer-edit { display: grid; grid-template-columns: 24px 1fr; align-items: center; gap: 8px; }
.answer-edit input[type="radio"] { width: 18px; height: 18px; accent-color: var(--accent); }
.answer-edit input[type="text"] { padding: 10px 11px; border: 1px solid #dfe4ed; border-radius: 10px; }
.full { width: 100%; }
.embed-box { display: grid; gap: 8px; margin-top: 24px; padding: 15px; border-radius: 15px; background: #f5f7fb; font-size: 13px; }
.embed-box code { overflow: hidden; padding: 8px; border-radius: 8px; color: #455066; background: #fff; white-space: nowrap; text-overflow: ellipsis; }
.embed-box button { justify-self: start; border: 0; padding: 0; color: var(--accent); background: transparent; font-weight: 900; }
.preview-shell { min-width: 0; padding: 28px; background: linear-gradient(145deg, #eef4ff, #f8faff); }
.preview-top { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 18px; }
.preview-top div { display: grid; }
.preview-top div span, .preview-top > span { color: var(--muted); font-size: 12px; }
.quiz-card { width: min(720px, 100%); min-height: 580px; display: flex; flex-direction: column; align-items: center; margin: 0 auto; padding: 30px 42px; position: relative; overflow: hidden; text-align: center; border: 1px solid #dce6fa; border-radius: 26px; background: #fff; box-shadow: 0 25px 60px rgba(35,83,164,.12); }
.quiz-card::before, .quiz-card::after { content: ""; position: absolute; width: 250px; height: 250px; z-index: 0; border-radius: 42%; background: color-mix(in srgb, var(--accent) 12%, white); }
.quiz-card::before { left: -155px; bottom: -120px; transform: rotate(22deg); }
.quiz-card::after { right: -165px; top: 10px; transform: rotate(-25deg); }
.quiz-card > * { position: relative; z-index: 1; }
.progress-row { width: 100%; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 14px; color: var(--muted); font-size: 12px; }
.progress { height: 9px; overflow: hidden; border-radius: 9px; background: #e8edf6; }
.progress i { display: block; width: 33%; height: 100%; border-radius: inherit; background: var(--accent); transition: width .2s ease; }
.planet { width: 92px; height: 92px; display: grid; place-items: center; margin: 44px auto 18px; border-radius: 50%; color: #fff; background: radial-gradient(circle at 34% 30%, #ffbf67, #d74331 70%); box-shadow: 0 16px 30px rgba(199,73,53,.22); font-size: 43px; font-weight: 900; }
.quiz-card h2 { max-width: 540px; min-height: 68px; margin-bottom: 28px; font-size: clamp(25px, 4vw, 37px); line-height: 1.15; letter-spacing: -.04em; }
.answers { width: min(520px, 100%); display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.answer { min-height: 58px; border: 1px solid #d9e0ec; border-radius: 13px; color: #293247; background: #fff; font-weight: 800; }
.answer:hover { border-color: var(--accent); }
.answer.selected { color: #fff; border-color: var(--accent); background: var(--accent); }
.answer.correct { color: #fff; border-color: #20a263; background: #20a263; }
.answer.wrong { color: #fff; border-color: #dc4250; background: #dc4250; }
.quiz-footer { width: min(520px, 100%); display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: auto; padding-top: 24px; }
.timer { padding: 11px 14px; border-radius: 12px; background: #f0f3f7; font-variant-numeric: tabular-nums; }
.play-overlay { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 20px; background: rgba(18,31,57,.72); backdrop-filter: blur(9px); }
.play-overlay[hidden] { display: none; }
.live-quiz { width: min(760px, 100%); max-height: calc(100vh - 40px); overflow: auto; }
.live-result { padding: 45px; text-align: center; border-radius: 26px; background: #fff; }
.live-result h2 { font-size: 42px; }
@media (max-width: 950px) { .builder { grid-template-columns: 64px 320px minmax(0,1fr); } .quiz-card { padding: 25px 22px; } }
@media (max-width: 780px) { .builder { grid-template-columns: 1fr; } .side-nav { display: none; } .editor { border-right: 0; } .preview-shell { padding: 16px 10px; } .save-state { display: none; } .answers { grid-template-columns: 1fr; } }
