:root{--ink:#302749;--purple:#6854d8;--muted:#857b99;--line:#e9e3f4;--surface:#fff;--green:#368b69}*{box-sizing:border-box}body{margin:0;background:#faf8ff;color:var(--ink);font-family:Arial,"Segoe UI",sans-serif;background-image:radial-gradient(ellipse at 14% 35%,#eee8ff 0,transparent 34%),radial-gradient(ellipse at 90% 65%,#fff0de 0,transparent 32%);min-height:100vh}a{color:var(--purple);text-decoration:none}button,input{font:inherit}button{border:0;border-radius:15px;background:var(--purple);color:#fff;padding:17px 25px;font-weight:700;font-size:18px;cursor:pointer;box-shadow:0 6px 15px #6854d823;transition:transform .15s,background .15s}button:hover{background:#5945c4;transform:translateY(-1px)}button:disabled{opacity:.65;cursor:wait}button span{padding-right:15px}input{border:2px solid var(--line);border-radius:13px;padding:15px 17px;background:#fcfbff;color:var(--ink);width:100%;outline:none}input:focus{border-color:var(--purple);box-shadow:0 0 0 4px #6854d813}a:focus-visible,button:focus-visible{outline:3px solid #a794ec;outline-offset:4px}.top{max-width:1120px;margin:auto;padding:26px 32px;display:flex;align-items:center;justify-content:space-between}.brand{display:flex;gap:9px;align-items:center;color:var(--ink);font-size:21px;font-weight:800}.brand:first-letter{color:var(--purple)}.admin-link{color:var(--muted);font-size:14px}.admin-link span{margin-right:8px}main{max-width:1120px;margin:auto;padding:22px 28px 40px}.welcome{text-align:center;max-width:590px;margin:0 auto}.eyebrow{color:var(--purple);font-size:13px;font-weight:700;letter-spacing:.6px}.star-art{height:120px;width:190px;position:relative;margin:14px auto 5px}.big-star{font-size:108px;line-height:1;color:#ffcb65;text-shadow:0 8px 0 #edaf4540;display:block;transform:rotate(-9deg);filter:drop-shadow(0 12px 20px #efc56f30)}.spark{position:absolute;font-size:29px;color:#a594e4}.one{right:3px;top:13px}.two{left:0;bottom:14px;color:#edb754}.three{right:11px;bottom:2px;font-size:19px}h1{font-size:48px;line-height:1.17;letter-spacing:-1.5px;margin:16px 0}h1 span{color:var(--purple)}.intro{font-size:17px;line-height:1.8;color:var(--muted);margin:18px 0 25px}.start-card{max-width:370px;padding:24px;background:white;border:1px solid var(--line);border-radius:22px;text-align:right;margin:0 auto;box-shadow:0 12px 35px #45307406}.start-card label{display:block;font-weight:700;font-size:14px;margin-bottom:10px}.start-card button{width:100%;margin-top:14px}.form-note{text-align:center;font-size:12px;color:var(--muted);margin:15px 0 0}.features{display:flex;justify-content:center;flex-wrap:wrap;gap:20px;margin:27px 0;color:var(--muted);font-size:13px}footer{text-align:center;color:#a198b0;font-size:12px;padding:20px}.hidden{display:none!important}.play{max-width:670px;margin:20px auto}.game-top{display:flex;align-items:center;justify-content:space-between;gap:12px}.small-heading{font-size:31px;letter-spacing:-.7px}.timer{border:1px solid var(--line);background:white;padding:11px 19px;border-radius:16px;text-align:center;min-width:104px}.timer span{display:block;color:var(--muted);font-size:11px;margin-bottom:5px}.timer strong{font-size:22px;font-variant-numeric:tabular-nums}.progress-label{display:flex;justify-content:space-between;color:var(--muted);font-size:13px;margin-top:23px}.progress-track{height:8px;background:#e8e1f5;border-radius:12px;margin:12px 0;overflow:hidden}.progress-track div{height:100%;background:var(--purple);border-radius:12px;transition:width .35s}.milestones{display:flex;gap:5px;justify-content:space-between;margin:15px 0 26px}.milestones span{width:24px;height:24px;border-radius:50%;background:#ede8f6;color:#b4a8ce;text-align:center;line-height:24px;font-size:13px}.milestones .solved{background:#dfefe7;color:var(--green)}.milestones .current{background:var(--purple);color:white}.question-card{text-align:center;background:white;border:1px solid var(--line);border-radius:28px;padding:29px 30px 18px;box-shadow:0 15px 50px #45307407}.question-badge{display:inline-block;background:#fff5df;color:#a77422;border-radius:20px;padding:7px 13px;font-size:12px;font-weight:700}.question-caption{color:var(--muted);margin:25px 0 8px;font-size:17px}.equation{font-size:65px;font-weight:800;letter-spacing:2px;margin-bottom:23px}#answer-form{max-width:290px;margin:auto}#answer{font-size:37px;text-align:center;height:78px;font-weight:700}#answer-form button{width:100%;margin-top:16px}.feedback{font-size:14px;color:var(--muted);min-height:24px;line-height:1.7;margin:20px 0 4px}.feedback.retry{color:#ad7425}.feedback.success{color:var(--green)}.bottom-hint{text-align:center;color:var(--muted);font-size:12px;margin-top:20px}.result-grid{display:flex;gap:16px;justify-content:center;margin:25px 0}.result-grid>div{background:white;border:1px solid var(--line);padding:24px 35px;border-radius:20px}.result-grid span{color:var(--muted);font-size:13px;display:block}.result-grid strong{display:block;font-size:35px;margin-top:10px}.saved-note{color:var(--green);font-size:14px;margin:25px}.error{color:#b5445e;text-align:center;margin:16px auto;font-size:14px}.login-wrap{max-width:450px;margin:65px auto;text-align:center}.login-wrap h1{font-size:39px}.dashboard{margin:24px auto}.dashboard-head{display:flex;align-items:center;justify-content:space-between;gap:14px}.secondary{background:#eeebf8;color:var(--purple);padding:11px 18px;font-size:14px;box-shadow:none}.secondary:hover{background:#e2dcf4}.muted{color:var(--muted);font-size:13px;line-height:1.7}.stats{display:grid;grid-template-columns:repeat(3,1fr);gap:18px;margin:30px 0}.stats article{background:white;border:1px solid var(--line);border-radius:20px;padding:25px}.stats span{display:block;color:var(--muted);font-size:14px}.stats strong{font-size:35px;display:block;margin-top:15px}.table-card{border:1px solid var(--line);border-radius:21px;background:white;overflow:hidden}.table-card h2{padding:22px 24px;margin:0;font-size:20px}.count{background:#efeaf9;border-radius:20px;padding:4px 10px;font-size:13px;color:var(--purple);margin-right:8px}.table-scroll{overflow-x:auto}table{width:100%;border-collapse:collapse;white-space:nowrap;font-size:14px;text-align:right}th{background:#f7f5fb;color:var(--muted);font-size:12px;font-weight:normal}th,td{padding:18px 24px;border-bottom:1px solid #f0ecf5}tr:last-child td{border-bottom:0}.badge{padding:6px 9px;border-radius:8px;background:#fff5de;color:#9b762a;font-size:12px}.badge.done{background:#e8f5ed;color:var(--green)}.empty{text-align:center;white-space:normal;color:var(--muted);padding:50px 24px}.back{display:block;margin:10px 0 30px;font-size:14px}.pagination{display:flex;gap:25px;justify-content:center;margin:22px;color:var(--muted);font-size:13px}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}@media(max-width:600px){.top{padding:22px 20px}.brand{font-size:18px}.admin-link{font-size:12px}main{padding:16px 18px 30px}h1{font-size:39px}.star-art{height:100px}.big-star{font-size:95px}.intro{font-size:15px}.features{gap:12px;font-size:11px}.play{margin-top:10px}.small-heading{font-size:23px}.timer{min-width:85px;padding:10px}.game-top .eyebrow{font-size:12px}.question-card{padding:23px 20px 18px}.equation{font-size:51px}.milestones{gap:3px}.milestones span{width:15px;height:19px;line-height:19px;font-size:10px}.stats{gap:8px}.stats article{padding:16px 10px}.stats span{font-size:11px}.stats strong{font-size:25px}th,td{padding:16px}.dashboard-head{align-items:flex-start}.result-grid>div{padding:20px}.login-wrap{margin-top:35px}}@media(prefers-reduced-motion:reduce){*{transition:none!important}}
.speed-celebration{position:relative;isolation:isolate;overflow:hidden;padding:27px 20px 24px;margin:8px auto 28px;max-width:490px;border:2px solid #f1ce7c;border-radius:30px;background:radial-gradient(ellipse at 50% 20%,#fff 0,#fff5d9 55%,#ffe9b8 100%);box-shadow:0 15px 45px #e6ad3530;text-align:center;animation:award-enter .6s ease-out}.award-art{display:flex;align-items:center;justify-content:center;gap:26px;margin-bottom:12px}.award-trophy{font-size:80px;line-height:1.2;filter:drop-shadow(0 6px 7px #d5a72c30);animation:trophy-bounce 1.1s ease-out 2}.award-spark{color:#b396e7;font-size:30px}.award-label{font-size:13px;font-weight:700;color:#986b16;letter-spacing:1px}.speed-celebration h2{font-size:49px;line-height:1.2;color:#6854d8;margin:9px 0 10px;letter-spacing:-1px}.speed-celebration p{font-size:20px;font-weight:700;color:#70501c;margin:0}.award-stars{color:#dda22b;font-size:25px;letter-spacing:7px;margin-top:17px}.speed-celebration:not(.hidden)~.star-art{display:none}.confetti{position:absolute;inset:0;z-index:-1;pointer-events:none}.confetti i{position:absolute;top:-20px;width:8px;height:15px;left:8%;background:#a994ec;animation:confetti-fall 3.6s ease-in-out 3;opacity:0}.confetti i:nth-child(2n){background:#ecae48;border-radius:50%;width:10px;height:10px}.confetti i:nth-child(3n){background:#79bfab}.confetti i:nth-child(4n){background:#ef8bb1}.confetti i:nth-child(2){left:16%;animation-delay:.3s}.confetti i:nth-child(3){left:24%;animation-delay:1s}.confetti i:nth-child(4){left:32%;animation-delay:.6s}.confetti i:nth-child(5){left:40%;animation-delay:.2s}.confetti i:nth-child(6){left:48%;animation-delay:.9s}.confetti i:nth-child(7){left:56%;animation-delay:.5s}.confetti i:nth-child(8){left:64%;animation-delay:1.2s}.confetti i:nth-child(9){left:72%;animation-delay:.4s}.confetti i:nth-child(10){left:80%;animation-delay:1.1s}.confetti i:nth-child(11){left:88%;animation-delay:.7s}.confetti i:nth-child(12){left:94%;animation-delay:.1s}@keyframes confetti-fall{0%{opacity:0;transform:translateY(0) rotate(0)}10%{opacity:.9}90%{opacity:.8}100%{opacity:0;transform:translateY(390px) rotate(520deg)}}@keyframes trophy-bounce{0%,100%{transform:translateY(0) rotate(0)}40%{transform:translateY(-10px) rotate(-7deg)}70%{transform:translateY(-3px) rotate(5deg)}}@keyframes award-enter{from{opacity:0;transform:translateY(12px) scale(.94)}to{opacity:1;transform:translateY(0) scale(1)}}@media(max-width:600px){.speed-celebration{padding:22px 15px;margin-top:4px}.speed-celebration h2{font-size:42px}.award-trophy{font-size:65px}.speed-celebration p{font-size:18px}}@media(prefers-reduced-motion:reduce){.speed-celebration,.award-trophy,.confetti i{animation:none}.confetti i{opacity:.65;top:18%}.confetti i:nth-child(2n){top:75%}.confetti i:nth-child(3n){top:40%}}
.game-tools{display:flex;align-items:center;justify-content:flex-end;gap:10px;margin:0 0 16px}.game-tools>span{font-size:11px;color:var(--muted)}.sound-toggle{font-size:13px;padding:9px 13px;background:#eeebf8;color:var(--purple);box-shadow:none;border-radius:12px}.sound-toggle:hover{background:#e4dcf8}.personal-best{font-size:14px;color:#806524;margin:20px auto;background:#fff4da;border:1px solid #f1dfb0;border-radius:14px;padding:12px 17px;max-width:370px;text-align:center}.personal-best strong{display:inline-block;margin-right:7px;font-variant-numeric:tabular-nums;color:var(--ink)}.play-record{max-width:none;text-align:right;margin:20px 0 0}.finish-record{margin:20px auto}.record-banner{display:flex;align-items:center;justify-content:center;gap:15px;flex-wrap:wrap;background:#eaf5ed;color:#287448;border:1px solid #b9ddc5;border-radius:18px;margin:8px auto 20px;padding:17px;max-width:490px}.record-banner strong{font-size:19px}.record-banner button{font-size:12px;padding:9px 12px;background:#fff;color:#287448}@media(max-width:600px){.game-tools{margin-bottom:13px;justify-content:center}.record-banner strong{font-size:17px}.personal-best{font-size:13px}}
.leaderboard{max-width:760px;margin:0 auto 20px;border:1px solid #e5def2;border-radius:22px;background:#fff;overflow:hidden;box-shadow:0 10px 35px #45307406}.leader-head{display:flex;justify-content:space-between;align-items:center;gap:15px;padding:19px 23px;background:linear-gradient(110deg,#fff9e9,#f4efff)}.leader-head h2{font-size:23px;letter-spacing:-.5px;margin:8px 0 0}.leader-note{font-size:12px;color:var(--muted)}.leader-scroll{max-height:280px;overflow:auto}.leader-table{white-space:normal}.leader-table th{padding:10px 23px;font-size:11px}.leader-table td{padding:11px 23px}.leader-table td:first-child{width:90px}.leader-table td:last-child{width:140px;text-align:left;font-variant-numeric:tabular-nums}.rank{display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;background:#f3eff9;color:var(--muted);border-radius:50%;font-size:12px;font-weight:700}.rank-1,.rank-2,.rank-3{font-size:22px;background:transparent}.member-badge{font-size:10px;color:var(--muted);margin-right:9px;white-space:nowrap}.leader-footer{font-size:12px;color:var(--muted);padding:12px 23px;margin:0;background:#fcfbfe}.account-bar{display:flex;justify-content:space-between;align-items:center;gap:13px;max-width:760px;margin:0 auto 18px;font-size:13px;color:var(--muted)}.account-bar form{margin:0}.account-bar .secondary{padding:8px 12px;font-size:12px}.account-bar a{font-weight:700}.member-auth{margin:30px auto}.member-auth label:not(:first-of-type){margin-top:17px}.account-switch{font-size:14px;color:var(--muted);margin:24px 0}.member-auth .intro{font-size:15px}.game-tools{max-width:760px;margin-left:auto;margin-right:auto}input[readonly]{background:#f2eef9;color:var(--purple);border-color:#e3dcf2}@media(max-width:600px){.leader-head{padding:15px;align-items:flex-start;flex-direction:column;gap:6px}.leader-head h2{font-size:21px}.leader-head .eyebrow{font-size:11px}.leader-table th,.leader-table td{padding:9px 12px}.leader-table td:first-child{width:55px}.leader-table td:last-child{width:102px;font-size:13px}.leader-scroll{max-height:245px}.leader-footer{padding:12px 15px;font-size:11px}.member-badge{display:block;margin:4px 0 0}.account-bar{align-items:flex-start;flex-direction:column;gap:9px;padding:0 3px}.member-auth h1{font-size:34px}.member-auth{margin:20px auto}}
