body[data-page="math-blaster"] { background: radial-gradient(circle at 10% 0%,rgba(100,240,214,.2),transparent 26rem),radial-gradient(circle at 100% 12%,rgba(166,90,255,.2),transparent 30rem),#0e1530 !important; color:#f7f8ff; }
body[data-page="math-blaster"]::before { opacity:.15; }
.battle-nav { background:rgba(18,27,57,.86); border-color:rgba(255,255,255,.12); }
.battle-nav .brand,.battle-nav .nav-links a { color:#e9edff; }
.battle-nav .nav-more summary { color:#e9edff; }
.battle-nav .nav-more summary:hover,.battle-nav .nav-more[open] summary,.battle-nav .nav-more.active summary { color:#17233b; background:#74f1d5; }
.battle-nav .nav-pill { color:#17233b !important; background:#74f1d5 !important; }
.battle-hero { width:min(1160px,calc(100% - 32px)); margin:24px auto 36px; padding:clamp(34px,6vw,68px); display:grid; grid-template-columns:1.15fr .85fr; gap:34px; align-items:center; overflow:hidden; border:1px solid rgba(255,255,255,.12); border-radius:36px; background:radial-gradient(circle at 85% 15%,rgba(255,212,95,.22),transparent 22rem),linear-gradient(145deg,#1c2854,#111936); box-shadow:0 30px 80px rgba(0,0,0,.3); }
.battle-kicker { margin:0; color:#74f1d5; font-size:.8rem; font-weight:900; letter-spacing:.1em; text-transform:uppercase; }
.battle-hero h1 { margin:10px 0 15px; font-size:clamp(3.3rem,7vw,6.4rem); line-height:.9; letter-spacing:-.055em; }
.battle-hero h1 span { color:#ffd45f; }
.battle-hero p:not(.battle-kicker) { max-width:650px; color:#bec8e1; font-size:1.08rem; line-height:1.7; }
.battle-hero a { display:inline-block; margin-top:10px; padding:13px 18px; color:#17233b; border-radius:14px; background:#74f1d5; text-decoration:none; font-weight:900; }
.hero-battle { min-height:280px; display:flex; align-items:center; justify-content:center; gap:22px; }
.hero-stick,.hero-monster { width:126px; height:150px; display:grid; place-items:center; border-radius:45%; font-size:5rem; background:rgba(255,255,255,.1); animation:battle-float 2.4s ease-in-out infinite; }
.hero-stick { color:#74f1d5; }.hero-monster { animation-delay:-1.2s; }
.hero-battle i { width:70px; height:9px; border-radius:20px; background:linear-gradient(90deg,#74f1d5,#fff,#ffd45f); box-shadow:0 0 25px #74f1d5; }
@keyframes battle-float{50%{transform:translateY(-13px) rotate(3deg)}}
.battle-main { width:min(1120px,calc(100% - 32px)); margin:0 auto 80px; }
.battle-intro,.battle-tips { margin-bottom:22px; display:grid; grid-template-columns:repeat(3,1fr); gap:13px; }
.battle-intro article,.battle-tips div { padding:22px; border:1px solid rgba(255,255,255,.11); border-radius:22px; background:rgba(255,255,255,.07); }
.battle-intro span,.battle-tips span { font-size:2rem; }.battle-intro h2,.battle-tips h3 { margin:10px 0 5px; }.battle-intro p,.battle-tips p { margin:0; color:#b9c3da; line-height:1.5; }
.battle-shell { overflow:hidden; border:1px solid rgba(255,255,255,.14); border-radius:30px; background:#141e40; box-shadow:0 28px 70px rgba(0,0,0,.35); }
.battle-hud { padding:15px 20px; display:grid; grid-template-columns:repeat(5,1fr); gap:8px; background:#0b122a; }
.battle-hud div { text-align:center; }.battle-hud span { display:block; color:#8190b2; font-size:.7rem; font-weight:900; text-transform:uppercase; }.battle-hud strong { color:#fff; font-size:1.22rem; }
.battle-hud .hud-time strong { color:#74f1d5; }
.arena-frame { position:relative; background:#182447; }
#battle-canvas { width:100%; height:auto; display:block; aspect-ratio:2/1; touch-action:none; }
.battle-overlay { position:absolute; inset:0; z-index:5; padding:24px; display:flex; flex-direction:column; align-items:center; justify-content:center; background:rgba(7,12,29,.82); backdrop-filter:blur(7px); text-align:center; }
.overlay-badge { padding:6px 11px; color:#17233b; border-radius:999px; background:#74f1d5; font-size:.72rem; font-weight:900; letter-spacing:.08em; }
.battle-overlay h2 { margin:10px 0 5px; font-size:clamp(2rem,5vw,4rem); }.battle-overlay p { max-width:560px; margin:0 0 18px; color:#c1cae0; line-height:1.6; }
.battle-overlay button { padding:13px 22px; color:#17233b; border:0; border-radius:14px; background:#ffd45f; cursor:pointer; font-weight:900; box-shadow:0 10px 28px rgba(255,212,95,.25); }
.battle-overlay.victory-screen { background:rgba(7,12,29,.72); }
.victory-stick { width:108px; height:142px; margin:14px 0 4px; display:none; position:relative; animation:victory-bounce 1s ease-in-out infinite; }
.victory-screen .victory-stick { display:block; }
.golden-hat { position:absolute; left:25px; top:-16px; z-index:3; font-style:normal; font-size:3.5rem; line-height:1; filter:drop-shadow(0 5px 7px rgba(255,212,95,.4)); transform:rotate(-4deg); }
.victory-head { width:40px; height:40px; position:absolute; left:34px; top:30px; border:6px solid #fff; border-radius:50%; background:#17233b; }
.victory-body { width:7px; height:53px; position:absolute; left:51px; top:70px; border-radius:8px; background:#fff; }
.victory-arms,.victory-legs { width:75px; height:7px; position:absolute; left:18px; top:83px; border-radius:8px; background:#fff; transform:rotate(-14deg); }
.victory-legs { top:119px; transform:rotate(0); background:linear-gradient(55deg,transparent 45%,#fff 46% 53%,transparent 54%),linear-gradient(-55deg,transparent 45%,#fff 46% 53%,transparent 54%); height:40px; }
@keyframes victory-bounce{50%{transform:translateY(-8px) rotate(2deg)}}
.level-banner { position:absolute; left:50%; top:50%; z-index:4; padding:18px 28px; color:#17233b; border-radius:18px; background:#ffd45f; box-shadow:0 16px 50px rgba(0,0,0,.35); font:800 clamp(1.4rem,4vw,2.5rem) "Baloo 2",sans-serif; transform:translate(-50%,-50%); text-align:center; }
.battle-console { padding:20px; display:grid; grid-template-columns:250px 1fr; gap:20px; }
.move-panel { padding:18px; border-radius:20px; background:#0d1733; }
.move-panel>p { margin:0 0 12px; }.move-panel>p strong,.move-panel>p span { display:block; }.move-panel>p span { color:#8492b2; font-size:.84rem; }
.move-buttons { display:grid; grid-template-columns:1fr 1fr; gap:9px; }
.move-buttons button { min-height:52px; color:#17233b; border:0; border-radius:13px; background:#74f1d5; cursor:pointer; font-size:1.2rem; font-weight:900; }
.enemy-card { margin-top:14px; padding:14px; border-radius:14px; background:rgba(255,255,255,.07); }
.enemy-card span,.enemy-card strong,.enemy-card small { display:block; }.enemy-card span { color:#ffb879; font-size:.7rem; text-transform:uppercase; }.enemy-card strong { margin:2px 0 8px; }
.health-track { height:10px; overflow:hidden; border-radius:10px; background:#293555; }.health-track i { width:100%; height:100%; display:block; border-radius:inherit; background:linear-gradient(90deg,#ff6c77,#ffb24e); transition:width .35s; }
.enemy-card small { margin-top:6px; color:#97a4c3; }
.question-panel { padding:22px; border-radius:20px; background:#f7f8ff; color:#17233b; }
.question-label { margin:0; color:#6947bd; font-size:.76rem; font-weight:900; letter-spacing:.08em; text-transform:uppercase; }
.question-panel h2 { margin:6px 0 13px; font-size:clamp(2rem,5vw,3.5rem); line-height:1; }
.answer-instruction { margin:0 0 10px; display:flex; align-items:center; justify-content:space-between; gap:12px; color:#68738a; font-size:.82rem; }
.answer-instruction strong { color:#17233b; font-size:.9rem; }
.question-timer { margin:0 0 12px; padding:10px 12px; border:1px solid #ded8f1; border-radius:13px; background:#f0edfa; }
.question-timer>div:first-child { display:flex; align-items:center; justify-content:space-between; gap:10px; color:#68738a; font-size:.78rem; font-weight:800; }
.question-timer strong { color:#4f34a4; }
.timer-track { height:9px; margin-top:7px; overflow:hidden; border-radius:99px; background:#dcd6ed; }
.timer-track i { width:100%; height:100%; display:block; border-radius:inherit; background:linear-gradient(90deg,#29b889,#74f1d5); transform-origin:left; transition:background .2s; }
.question-timer.urgent { border-color:#f1a4af; background:#fff0f2; animation:timer-pulse .55s ease-in-out infinite alternate; }
.question-timer.urgent strong { color:#b52e44; }
.question-timer.urgent .timer-track i { background:linear-gradient(90deg,#ff6c77,#ffb24e); }
@keyframes timer-pulse{to{box-shadow:0 0 0 4px rgba(255,108,119,.13)}}
.answer-grid { display:grid; grid-template-columns:repeat(4,1fr); gap:11px; }
.answer-grid button { min-height:76px; padding:9px 14px 9px 9px; display:grid; grid-template-columns:46px 1fr; gap:9px; align-items:center; color:#17233b; border:2px solid #e1def0; border-radius:17px; background:#fff; cursor:pointer; font-weight:900; transition:transform .15s,border-color .15s,background .15s,box-shadow .15s; }
.answer-shortcut { width:42px; height:52px; display:grid; grid-template-rows:auto 1fr; place-items:center; overflow:hidden; color:#6446b6; border:1px solid #ddd5fa; border-radius:11px; background:#f2eeff; line-height:1; }
.answer-shortcut small { width:100%; padding:4px 2px 3px; color:#745bc1; background:#e7e0ff; font-size:.52rem; letter-spacing:.08em; }
.answer-shortcut b { font-size:1.18rem; }
.answer-value { padding-right:32px; font:800 clamp(1.45rem,3vw,2rem) "Baloo 2",sans-serif; text-align:center; }
.answer-grid button:hover { transform:translateY(-3px); border-color:#7758e8; box-shadow:0 9px 18px rgba(119,88,232,.13); }
.answer-grid button.correct { color:#07583f; border-color:#29b889; background:#dff8ee; }
.answer-grid button.correct .answer-shortcut { color:#07583f; border-color:#8bdabd; background:#c9f2e2; }
.answer-grid button.correct .answer-shortcut small { color:#07583f; background:#afe8d2; }
.answer-grid button.wrong { color:#8b2131; border-color:#ef6776; background:#ffe8eb; }
.answer-grid button.wrong .answer-shortcut { color:#8b2131; border-color:#f2a2ad; background:#ffd4d9; }
.answer-grid button.wrong .answer-shortcut small { color:#8b2131; background:#ffc2ca; }
.answer-grid button:disabled { cursor:default; }
.battle-status { min-height:24px; margin:12px 0 0; color:#68738a; font-weight:800; }
.level-map { margin:70px 0; }.level-map h2 { margin:7px 0 20px; font-size:clamp(2.2rem,5vw,3.6rem); }
.level-path { display:grid; grid-template-columns:repeat(4,1fr); gap:12px; }
.level-path article { min-height:210px; padding:20px; position:relative; border:1px solid rgba(255,255,255,.12); border-radius:22px; background:#172343; }
.level-path article>b { position:absolute; right:15px; top:14px; color:#7583a5; }.level-path article>span { font-size:2.5rem; }.level-path h3 { margin:26px 0 5px; }.level-path p { margin:0; color:#aeb9d2; line-height:1.45; }
.level-path .boss-stop { border-color:rgba(255,178,78,.45); background:#2d213a; }.level-path .final-stop { grid-column:span 2; border-color:rgba(116,241,213,.5); background:linear-gradient(145deg,#153c47,#18264a); }
.battle-tips { margin-top:30px; }
@media(max-width:820px){.battle-hero{grid-template-columns:1fr}.hero-battle{min-height:190px}.battle-console{grid-template-columns:1fr}.move-panel{display:grid;grid-template-columns:1fr 1fr;gap:12px}.move-panel>p,.enemy-card{grid-column:1/-1}.level-path{grid-template-columns:repeat(2,1fr)}}
@media(max-width:620px){.battle-intro,.battle-tips{grid-template-columns:1fr}.battle-hud{grid-template-columns:repeat(3,1fr)}.battle-hud .hud-time{grid-column:span 2}.answer-grid{grid-template-columns:repeat(2,1fr)}.answer-instruction{align-items:flex-start;flex-direction:column;gap:1px}.battle-console{padding:12px}.move-panel{display:block}.enemy-card{margin-top:12px}.level-path{grid-template-columns:1fr}.level-path .final-stop{grid-column:auto}.hero-battle{min-height:150px}.hero-stick,.hero-monster{width:92px;height:110px;font-size:3.6rem}.hero-battle i{width:42px}}
