:root{--bg: #071027;--card: #0b1220;--accent: #2563eb;--accent-600: #1e40af;--muted: #9aa6b2;--text: #e6eef8;--type-base: 18px;--type-sm: 14px;--type-lg: 20px;--type-xl: 24px;--heading-weight: 600;--body-weight: 500;--radius: 12px}[data-theme=light]{--bg:#f7fafc;--card:#ffffff;--accent:#2563eb;--muted:#6b7280;--text:#0b1220 }[data-theme=light] body{background:linear-gradient(180deg,#fbfdff 0%,#f8fafc 100%)}*{box-sizing:border-box}body{margin:0;font-family:Inter,ui-sans-serif,system-ui,-apple-system,Segoe UI,Roboto,Helvetica Neue,Arial;background:linear-gradient(180deg,#071029 0%,#081827 100%);color:var(--text);min-height:100vh;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-size:var(--type-base);line-height:1.6;font-weight:var(--body-weight)}.app{max-width:1200px;margin:20px auto;padding:18px;width:calc(100% - 32px)}@media (min-width:900px){body{font-size:20px}.app{padding:28px}.studyShell .cardArea{flex-direction:row;align-items:flex-start;gap:20px}.studyShell .cardArea .flashcard{flex:1;max-width:none}.studyShell .cardArea .controlsRow{width:320px;display:flex;flex-direction:column;gap:14px}.studyShell .cardArea .controlsRow .button{width:100%}}@media (min-width:1200px){.app{max-width:1400px}}.header{display:flex;align-items:center;justify-content:space-between;margin-bottom:14px}.brand{display:flex;gap:12px;align-items:center}.brand h1{font-size:1.5rem;margin:0}@media (max-width:520px){.app{padding:12px;margin:12px}.grid{gap:10px}.card{padding:12px 10px;border-radius:10px}.brand h1{font-size:22px}.unitRow{padding:12px}.progressBadge{font-size:.75rem;padding:6px 8px}.button{padding:10px 12px;font-size:.95rem}.header{flex-direction:column;align-items:flex-start;gap:8px}.header>div:last-child{width:100%;text-align:left}.unitRow{flex-direction:column;align-items:stretch;gap:8px}.unitRow>div:last-child{align-items:flex-start;min-width:0;margin-top:8px}.controlsRow{flex-direction:column-reverse;gap:10px}.controlsRow .button,.controlsRow .button.ghost{width:100%}}.unitRow{display:flex;align-items:center;justify-content:space-between;padding:12px;border-radius:10px;background:rgba(255,255,255,.01);margin-bottom:12px}.unitRow .unitActions{display:flex;flex-direction:column;align-items:flex-end;min-width:120px}.unitRow .unitActions .progressContainer{width:100%;max-width:160px}.unitRow .unitActions .actionButtons{display:flex;gap:8px}@media (max-width:520px){.unitRow .unitActions{align-items:flex-start;min-width:0;width:100%}.unitRow .unitActions .progressContainer{max-width:100%}.unitRow .unitActions .actionButtons{flex-direction:column;gap:8px}.unitRow .unitActions .actionButtons .button{width:100%}}.unitMeta{display:flex;flex-direction:column}.unitMeta .title{font-weight:var(--heading-weight);font-size:var(--type-lg)}.controls{display:flex;gap:8px;align-items:center}.button{background:var(--accent);color:#fff;padding:10px 14px;border-radius:10px;border:none;font-weight:600;font-size:1.05rem;cursor:pointer}.button.large{padding:14px 22px;font-size:1.08rem;min-width:140px;height:60px;border-radius:12px;box-shadow:0 6px 18px #0206171f}.button.large.pill{background:linear-gradient(90deg,#3358d6,#2563eb);border:none;color:#fff;box-shadow:0 10px 30px #2563eb1f}.controlsRow .button.large{flex:1}.ghost{background:transparent;border:1px solid rgba(255,255,255,.06);color:var(--text)}.button.ghost.disabled,.button.ghost[disabled]{opacity:.45;pointer-events:none}.cardNumber{position:absolute;top:10px;right:18px;font-size:44px;color:#ffffff0a;font-weight:600;pointer-events:none}.progressBadge{background:rgba(255,255,255,.03);padding:8px 10px;border-radius:999px;font-size:.95rem;color:var(--muted);font-weight:600}.studyShell{display:flex;flex-direction:column;gap:16px}.cardArea{display:flex;flex-direction:column;gap:12px;align-items:center}.flashcard{width:100%;max-width:980px;min-height:320px;background:var(--card);border-radius:14px;display:flex;align-items:center;justify-content:center;padding:24px;box-shadow:0 6px 24px #02061759;position:relative;perspective:1200px;transition:transform .18s ease,box-shadow .22s ease}.flashcard:hover{transform:translateY(-6px);box-shadow:0 18px 60px #0206178c}.flashcardInner{width:100%;height:100%;border-radius:12px;transition:transform .55s cubic-bezier(.2,.9,.2,1);transform-style:preserve-3d;position:relative}.flashcardInner.flipped{transform:rotateY(180deg)}.flashcardInner.flipped .side{transition:opacity .28s ease}@keyframes popIn{0%{opacity:0;transform:translateY(6px) scale(.995)}to{opacity:1;transform:translateY(0) scale(1)}}.flashcard{animation:popIn .28s ease both}h1,h2,h3,h4{font-weight:var(--heading-weight);line-height:1.25;color:var(--text);margin:0 0 .35em}h1{font-size:var(--type-xl)}h2{font-size:1.5rem}@media (max-width:900px){.flashcard{max-width:720px;min-height:280px;padding:18px}}@media (max-width:640px){.flashcard{min-height:260px;padding:16px}}@media (max-width:420px){.flashcard{min-height:220px;padding:12px}}.choicesGrid{grid-template-columns:repeat(2,1fr);transition:all .18s ease}@media (max-width:640px){.choicesGrid{grid-template-columns:1fr}}.side{position:absolute;top:0;right:0;bottom:0;left:0;backface-visibility:hidden;display:flex;align-items:center;justify-content:center;padding:32px;font-size:var(--type-lg)}.questionPanel{width:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:0 18px;background:none!important;border-radius:0;box-shadow:none!important;margin:0}.questionPanel>*{width:100%;background:none!important;margin:0;padding:12px 0;text-align:center}.questionPanel .small{margin-top:14px;font-size:var(--type-sm)}.questionPanel .questionText{font-size:22px;line-height:1.5;font-weight:var(--heading-weight)}.flashcard .side>div,.flashcard .side>div *{background:transparent!important;box-shadow:none!important;border:none!important;padding:0!important;margin:0!important}.flashcard .side{display:flex!important;align-items:center!important;justify-content:center!important;padding:0!important}.flashcard .side .questionPanel{padding:0 20px!important}.front{background:linear-gradient(180deg,#0f1a2a,#081426)}.back{background:linear-gradient(180deg,#081426,#071029);transform:rotateY(180deg)}.controlsRow{display:flex;gap:12px;align-items:center}@media (max-width:640px){.flashcard{height:300px;padding:16px}.brand h1{font-size:1rem}}.small{font-size:1rem;color:var(--muted);line-height:1.45}.nav{display:flex;gap:8px;align-items:center}.progressBar{height:8px;background:rgba(255,255,255,.06);width:100%;border-radius:999px;overflow:hidden;box-shadow:inset 0 1px #ffffff05}.progressBar>i{display:block;height:100%;background:linear-gradient(90deg,var(--accent),var(--accent-600));width:0%;transition:width .45s cubic-bezier(.2,.9,.2,1);will-change:width}.footer{margin-top:18px;color:var(--muted);font-size:.85rem;display:flex;justify-content:space-between}@keyframes popScale{0%{transform:scale(.6);opacity:0}to{transform:scale(1);opacity:1}}.resultMark{animation:popScale .22s cubic-bezier(.2,.9,.2,1)}.themeToggle{position:fixed;top:18px;right:18px;z-index:60;display:flex;align-items:center;justify-content:center;width:44px;height:44px;border-radius:999px;background:rgba(255,255,255,.04);border:1px solid rgba(255,255,255,.06);cursor:pointer;color:var(--text);box-shadow:0 6px 18px #02061759}.themeToggle:hover{transform:translateY(-1px)}[data-theme=light] .themeToggle{background:#fff;border:1px solid rgba(2,6,23,.06);box-shadow:0 6px 18px #0206170f}.button:focus,.themeToggle:focus,.unitRow .button:focus{outline:3px solid rgba(124,58,237,.22);outline-offset:3px;border-radius:8px}.button:focus:not(:focus-visible){outline:none}.button:focus-visible{box-shadow:0 8px 30px #0206171f}.choiceLabel{display:inline-flex;align-items:center;justify-content:center;width:40px;height:40px;border-radius:10px;background:rgba(0,0,0,.06);color:var(--muted);font-weight:600;font-size:1rem;flex:0 0 40px}[data-theme=light] .choiceLabel{background:rgba(2,6,23,.04);color:var(--muted)}.button.large.pill .choiceLabel{background:rgba(255,255,255,.06)}.button.selected{border:1px solid rgba(37,99,235,.32);background:rgba(37,99,235,.04)}.button.choice-correct{background:linear-gradient(90deg,#16a34a,#22c55e);color:#fff;border-color:#10b9812e;box-shadow:0 8px 30px #10b9810f}.button.choice-wrong{background:rgba(239,68,68,.06);border:1px solid rgba(239,68,68,.14);color:var(--text)}.resultMark{margin-left:auto;display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;border-radius:6px;font-weight:600;font-size:13px;color:#fff}.resultMark.correct{background:#16a34a}.resultMark.wrong{background:#ef4444}.choicesGrid .button{display:flex;align-items:flex-start;gap:14px;padding:14px;height:auto;min-height:72px;font-size:1.05rem;text-align:left;white-space:normal;transition:box-shadow .18s,transform .12s}.choicesGrid .button:hover{transform:translateY(-2px)}.choicesGrid .button>span:last-child{flex:1;white-space:normal;word-break:break-word;overflow-wrap:anywhere}.choicesGrid{grid-auto-rows:minmax(72px,auto)}[data-theme=light] .choicesGrid .button{background:var(--card);border:1px solid rgba(2,6,23,.04)}
