﻿:root {
  color-scheme: dark;
  --panel: rgba(16, 19, 31, 0.78);
  --panel-strong: rgba(24, 28, 43, 0.92);
  --text: #f7f8ff;
  --muted: #a8adc5;
  --line: rgba(255, 255, 255, 0.12);
  --cyan: #39e6ff;
  --coral: #ff5b7f;
  --gold: #ffd166;
  --green: #69f0ae;
  --violet: #8a7dff;
  --void: #151420;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html, body { width: 100%; min-height: 100%; cursor: url("cur.png") 3 2, auto; }
button, .cube { cursor: url("cur.png") 3 2, pointer; }
body {
  margin: 0;
  overflow-x: hidden;
  color: var(--text);
  background:
    radial-gradient(circle at 18% 18%, rgba(57, 230, 255, 0.18), transparent 28rem),
    radial-gradient(circle at 86% 16%, rgba(255, 91, 127, 0.16), transparent 25rem),
    radial-gradient(circle at 50% 105%, rgba(255, 209, 102, 0.12), transparent 26rem),
    linear-gradient(135deg, #08090f 0%, #151728 48%, #0b111c 100%);
  user-select: none;
}
button { border: 0; color: var(--text); font: inherit; }
.shell { min-height: 100vh; display: grid; grid-template-rows: auto 1fr auto; gap: 18px; padding: clamp(16px, 2.3vw, 30px); }
.hud, .control-panel { width: min(1240px, 100%); margin: 0 auto; border: 1px solid var(--line); background: var(--panel); backdrop-filter: blur(18px); box-shadow: 0 24px 80px rgba(0,0,0,0.26); }
.hud { min-height: 92px; display: grid; grid-template-columns: 0.8fr 1.35fr auto; align-items: center; gap: 18px; padding: 16px 18px; border-radius: 18px; }
.brand { display: flex; align-items: center; gap: 14px; min-width: 0; }
.mark { width: 46px; height: 46px; flex: 0 0 auto; border-radius: 12px; background: conic-gradient(from 35deg, var(--cyan), var(--green), var(--gold), var(--coral), var(--violet), var(--cyan)); box-shadow: 0 0 30px rgba(57,230,255,0.38), inset 0 0 18px rgba(255,255,255,0.24); transform: rotateX(58deg) rotateZ(45deg); animation: markSpin 5s ease-in-out infinite; }
.eyebrow, .brand h1, .control-panel h2, .control-panel p { margin: 0; }
.eyebrow { color: var(--muted); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.16em; }
.brand h1 { font-size: clamp(1.35rem, 2.4vw, 2.35rem); line-height: 1; letter-spacing: 0; }
.stats { display: grid; grid-template-columns: repeat(5, minmax(74px, 1fr)); gap: 10px; }
.stat { min-width: 74px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,0.055); }
.stat span { display: block; color: var(--muted); font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.12em; }
.stat strong { display: block; margin-top: 4px; font-size: clamp(1.08rem, 1.7vw, 1.55rem); line-height: 1; }
.actions { display: flex; gap: 10px; }
.actions button { min-height: 44px; padding: 0 15px; border-radius: 12px; background: linear-gradient(135deg, rgba(57,230,255,0.94), rgba(105,240,174,0.9)); color: #051017; font-weight: 800; box-shadow: 0 14px 32px rgba(57,230,255,0.2); transition: transform 160ms ease, filter 160ms ease, opacity 160ms ease; }
.actions button:hover { transform: translateY(-1px); filter: brightness(1.08); }
.actions button:disabled { opacity: 0.45; transform: none; }
.actions button + button { color: var(--text); background: rgba(255,255,255,0.08); border: 1px solid var(--line); box-shadow: none; }
.actions button[aria-pressed="true"], #blastButton.ready { background: linear-gradient(135deg, rgba(255,209,102,0.96), rgba(255,91,127,0.9)); color: #17080d; }
.stage-wrap { position: relative; width: min(1240px, 100%); min-height: min(68vh, 760px); margin: 0 auto; display: grid; place-items: center; overflow: hidden; border-radius: 24px; border: 1px solid var(--line); background: linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px), radial-gradient(circle at center, rgba(57,230,255,0.1), transparent 34rem), rgba(8,9,15,0.74); background-size: 42px 42px, 42px 42px, auto, auto; box-shadow: inset 0 -60px 120px rgba(0,0,0,0.24), 0 30px 110px rgba(0,0,0,0.36); }
.stage-wrap.shake { animation: shake 300ms linear; }
.stage-wrap.level-up { animation: levelPulse 700ms ease-out; }
.stage-glow { position: absolute; width: 64%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, rgba(57,230,255,0.22), rgba(255,91,127,0.09) 44%, transparent 68%); filter: blur(18px); transform: translateY(12%); }
.scan { position: absolute; inset: -20%; opacity: 0.28; background: linear-gradient(115deg, transparent 0%, transparent 44%, rgba(255,255,255,0.18) 50%, transparent 56%, transparent 100%); transform: translateX(-45%); animation: scan 4s linear infinite; }
.stage { position: relative; width: min(78vmin, 720px); aspect-ratio: 1; display: grid; place-items: center; perspective: 980px; z-index: 2; }
.board { --rx: 58deg; --rz: -42deg; --scale: 1; width: 78%; aspect-ratio: 1; display: grid; grid-template-columns: repeat(9, 1fr); gap: clamp(6px, 1vmin, 10px); padding: clamp(10px, 1.5vmin, 16px); transform-style: preserve-3d; transform: rotateX(var(--rx)) rotateZ(var(--rz)) scale(var(--scale)); transition: transform 220ms ease; }
.cube { position: relative; min-width: 0; aspect-ratio: 1; border-radius: 8px; background: var(--cube); box-shadow: 0 12px 0 color-mix(in srgb, var(--cube), #000 44%), 0 18px 28px rgba(0,0,0,0.28), inset 0 1px 0 rgba(255,255,255,0.72), inset -10px -12px 20px rgba(0,0,0,0.18); transform: translateZ(var(--z, 0px)); transition: transform 160ms ease, filter 160ms ease, box-shadow 160ms ease, opacity 160ms ease; }
.cube::before, .cube::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; }
.cube::before { background: linear-gradient(135deg, rgba(255,255,255,0.55), transparent 42%); mix-blend-mode: screen; }
.cube::after { border: 1px solid rgba(255,255,255,0.28); }
.cube:hover, .cube:focus-visible, .cube.active { --z: 22px; outline: none; filter: saturate(1.24) brightness(1.16); box-shadow: 0 12px 0 color-mix(in srgb, var(--cube), #000 42%), 0 24px 36px rgba(0,0,0,0.34), 0 0 28px color-mix(in srgb, var(--cube), transparent 32%), inset 0 1px 0 rgba(255,255,255,0.84); }
.cube.hot { animation: pulse 900ms ease-in-out infinite; }
.cube.burst { animation: burst 380ms ease-out; }
.cube.power { --cube: var(--gold); animation: powerFloat 1.25s ease-in-out infinite; }
.cube.wild { --cube: #ffffff; animation: wildFlash 650ms linear infinite; }
.cube.hazard { --cube: var(--void); opacity: 0.92; box-shadow: 0 12px 0 #07070b, 0 0 24px rgba(255,91,127,0.22), inset 0 0 18px rgba(255,91,127,0.28); }
.cube.hazard::before { background: radial-gradient(circle, rgba(255,91,127,0.55), transparent 42%); }
.fx { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 4; }
.message { position: absolute; left: 50%; bottom: clamp(16px, 3vw, 28px); z-index: 5; width: min(720px, calc(100% - 32px)); transform: translateX(-50%); padding: 13px 18px; border: 1px solid var(--line); border-radius: 999px; background: rgba(8,9,15,0.72); color: var(--muted); text-align: center; backdrop-filter: blur(16px); }
.score-pop { position: absolute; z-index: 8; pointer-events: none; color: var(--text); font-weight: 900; text-shadow: 0 0 18px currentColor; animation: scorePop 760ms ease-out forwards; }
.control-panel { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; overflow: hidden; border-radius: 16px; background: var(--line); }
.control-panel > div { min-height: 96px; padding: 16px 18px; background: var(--panel-strong); }
.control-panel h2 { font-size: 0.78rem; color: var(--gold); text-transform: uppercase; letter-spacing: 0.14em; }
.control-panel p { margin-top: 8px; color: var(--muted); line-height: 1.45; }
.meter { height: 10px; margin-top: 12px; overflow: hidden; border-radius: 999px; background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.1); }
.meter span { display: block; width: 0%; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--cyan), var(--green), var(--gold), var(--coral)); box-shadow: 0 0 18px rgba(57,230,255,0.58); transition: width 180ms ease; }
@keyframes markSpin { 0%,100% { transform: rotateX(58deg) rotateZ(45deg); } 50% { transform: rotateX(62deg) rotateZ(135deg); } }
@keyframes pulse { 0%,100% { transform: translateZ(12px) scale(1); } 50% { transform: translateZ(34px) scale(1.08); } }
@keyframes powerFloat { 0%,100% { transform: translateZ(20px) scale(1.02); filter: brightness(1.1); } 50% { transform: translateZ(42px) scale(1.12); filter: brightness(1.28); } }
@keyframes wildFlash { 0%,100% { filter: hue-rotate(0deg) brightness(1.1); transform: translateZ(18px); } 50% { filter: hue-rotate(180deg) brightness(1.45); transform: translateZ(38px) scale(1.08); } }
@keyframes burst { 0% { transform: translateZ(34px) scale(1.08); } 100% { transform: translateZ(4px) scale(0.9); } }
@keyframes scan { 0% { transform: translateX(-48%); } 100% { transform: translateX(48%); } }
@keyframes shake { 0%,100% { transform: translateX(0); } 20% { transform: translateX(-8px); } 40% { transform: translateX(7px); } 60% { transform: translateX(-5px); } 80% { transform: translateX(4px); } }
@keyframes levelPulse { 0% { box-shadow: 0 0 0 rgba(255,209,102,0), 0 30px 110px rgba(0,0,0,0.36); } 45% { box-shadow: 0 0 70px rgba(255,209,102,0.38), 0 30px 110px rgba(0,0,0,0.36); } 100% { box-shadow: 0 0 0 rgba(255,209,102,0), 0 30px 110px rgba(0,0,0,0.36); } }
@keyframes scorePop { 0% { opacity: 0; transform: translate(-50%, 8px) scale(0.8); } 20% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -54px) scale(1.18); } }
@media (max-width: 1040px) { .hud { grid-template-columns: 1fr; } .stats, .actions, .control-panel { width: 100%; } .actions button { flex: 1; } }
@media (max-width: 880px) { .control-panel { grid-template-columns: 1fr; } .stage-wrap { min-height: 58vh; } .board { width: 88%; gap: 6px; } }
@media (max-width: 560px) { .shell { padding: 10px; } .hud { padding: 14px; border-radius: 14px; } .stats { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; } .stat { min-width: 0; padding: 8px 6px; } .stat span { font-size: 0.62rem; } .stage-wrap { border-radius: 18px; } .message { border-radius: 14px; } }
