@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700;800&family=Space+Grotesk:wght@400;500;600;700&display=swap');

:root {
  color-scheme: dark;
  --bg: #0b1020;
  --panel: #121a2d;
  --panel-2: #172238;
  --text: #f4f7ff;
  --muted: #91a0b9;
  --line: rgba(166, 185, 218, .13);
  --green: #38e59a;
  --red: #ff5b6e;
  --blue: #6ea8ff;
}
* { box-sizing: border-box; }
html { min-width: 320px; background: var(--bg); }
body {
  margin: 0; min-height: 100vh; color: var(--text);
  font-family: 'DM Sans', system-ui, sans-serif;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(39, 78, 137, .22), transparent 48%),
    var(--bg);
}
button, a { font: inherit; }
button { cursor: pointer; }
.page-shell { width: min(100% - 40px, 980px); margin: 0 auto; }
.topbar { height: 82px; display:flex; align-items:center; justify-content:space-between; border-bottom:1px solid var(--line); }
.brand { display:flex; align-items:center; gap:11px; color:var(--text); text-decoration:none; font:700 15px 'Space Grotesk',sans-serif; letter-spacing:1.2px; }
.brand-mark { display:grid; place-items:center; width:34px; height:34px; border-radius:11px; color:#07131a; background:var(--green); font-size:19px; font-weight:800; }
.brand-light { color:#8fa0bc; font-weight:500; }
.header-actions { display:flex; align-items:center; gap:9px; color:var(--muted); font-size:10px; font-weight:700; letter-spacing:1px; }
.status-dot { width:7px; height:7px; border-radius:50%; background:var(--green); box-shadow:0 0 12px rgba(56,229,154,.65); }
.lang-toggle { margin-left:14px; padding:8px 11px; border:1px solid var(--line); border-radius:8px; color:var(--text); background:rgba(255,255,255,.025); font-size:11px; font-weight:700; }
.lang-toggle span { color:var(--muted); padding:0 3px; }
.intro { text-align:center; padding:65px 0 34px; }
.eyebrow { color:var(--green); font-size:10px; font-weight:800; letter-spacing:2px; }
h1,h2,h3,p { margin-top:0; }
h1 { margin:15px 0 14px; font:700 clamp(38px, 7vw, 61px)/1.02 'Space Grotesk',sans-serif; letter-spacing:-2.8px; }
h1 span { color:var(--green); }
.intro-copy { max-width:510px; margin:0 auto; color:var(--muted); font-size:14px; line-height:1.7; }
.game-card { padding:18px; border:1px solid var(--line); border-radius:18px; background:linear-gradient(145deg, rgba(23,34,56,.96), rgba(15,24,42,.96)); box-shadow:0 22px 70px rgba(0,0,0,.22); }
.game-meta { display:flex; justify-content:space-between; align-items:center; padding:2px 3px 14px; color:var(--muted); font-size:10px; font-weight:800; letter-spacing:1.2px; }
.best-label strong { margin-left:8px; color:var(--green); font-size:12px; }
.game-area { position:relative; overflow:hidden; width:100%; min-height:300px; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:13px; border:1px solid rgba(255,255,255,.08); border-radius:12px; color:white; background:#702d3b; transition:background .16s ease, transform .12s ease; }
.game-area.idle { background:linear-gradient(135deg,#732e40,#512a49); }
.game-area.waiting { background:linear-gradient(135deg,#7a3042,#51233d); }
.game-area.go { background:linear-gradient(135deg,#087e61,#075c53); }
.game-area.too-soon { background:linear-gradient(135deg,#8a4c24,#693b25); }
.game-area.done { background:linear-gradient(135deg,#183c58,#1a3150); }
.game-area:focus-visible { outline:3px solid var(--blue); outline-offset:3px; }
.signal { width:22px; height:22px; border-radius:50%; background:rgba(255,255,255,.9); box-shadow:0 0 30px rgba(255,255,255,.28); }
.game-area.go .signal { background:var(--green); box-shadow:0 0 34px rgba(56,229,154,.8); }
.game-message { font:700 clamp(17px,3vw,23px) 'Space Grotesk',sans-serif; letter-spacing:1.2px; text-align:center; }
.game-hint { color:rgba(255,255,255,.72); font-size:12px; text-align:center; }
.game-footer { display:grid; grid-template-columns:1fr 1fr 1fr; padding:19px 4px 3px; }
.metric { display:flex; flex-direction:column; gap:6px; }
.metric-center { align-items:center; border-left:1px solid var(--line); border-right:1px solid var(--line); }
.metric-right { align-items:flex-end; }
.metric-label { color:var(--muted); font-size:9px; font-weight:800; letter-spacing:1.2px; }
.metric strong { font:600 23px 'Space Grotesk',sans-serif; }
.metric strong small { color:var(--muted); font:500 11px 'DM Sans',sans-serif; }
.primary-actions { display:flex; align-items:center; justify-content:center; gap:14px; padding:19px 0 65px; }
.start-button { min-width:220px; padding:16px 22px; border:0; border-radius:10px; color:#061b15; background:var(--green); font-size:11px; font-weight:900; letter-spacing:1px; box-shadow:0 8px 28px rgba(56,229,154,.16); }
.start-button:hover { filter:brightness(1.08); transform:translateY(-1px); }
.start-button span { padding-left:12px; font-size:17px; vertical-align:-1px; }
.reset-button { padding:14px 16px; border:1px solid var(--line); border-radius:10px; color:var(--muted); background:transparent; font-size:11px; font-weight:700; }
.howto { padding:0 0 52px; }
.section-heading { text-align:center; margin-bottom:25px; }
.section-heading h2 { margin:8px 0 0; font:600 25px 'Space Grotesk',sans-serif; letter-spacing:-.7px; }
.steps { display:grid; grid-template-columns:repeat(3,1fr); gap:14px; }
.step { padding:20px; border:1px solid var(--line); border-radius:13px; background:rgba(255,255,255,.018); }
.step-number { color:var(--green); font:700 12px 'Space Grotesk',sans-serif; }
.step h3 { margin:14px 0 7px; font:600 15px 'Space Grotesk',sans-serif; }
.step p { margin:0; color:var(--muted); font-size:12px; line-height:1.65; }
.ad-slot { min-height:112px; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:7px; margin:0 0 34px; border:1px dashed rgba(145,160,185,.3); border-radius:12px; color:#7f8da5; background:rgba(255,255,255,.012); font-size:10px; font-weight:800; letter-spacing:1.3px; }
.ad-slot small { font-size:10px; font-weight:400; letter-spacing:0; color:#66758d; }
.footer { min-height:75px; display:flex; justify-content:space-between; align-items:center; border-top:1px solid var(--line); color:#6f7d95; font-size:11px; }
.footer nav { display:flex; gap:20px; }
.footer a { color:#8997ae; text-decoration:none; }
.footer a:hover { color:var(--green); }
.toast { position:fixed; left:50%; bottom:22px; z-index:5; max-width:calc(100% - 30px); padding:12px 17px; border:1px solid rgba(255,255,255,.12); border-radius:10px; color:white; background:#202d43; box-shadow:0 12px 40px rgba(0,0,0,.35); font-size:12px; opacity:0; transform:translate(-50%,12px); pointer-events:none; transition:.2s ease; }
.toast.show { opacity:1; transform:translate(-50%,0); }
@media (max-width:640px) {
  .page-shell { width:min(100% - 26px, 560px); }
  .topbar { height:68px; }
  .online-label { display:none; }
  .intro { padding:48px 0 27px; }
  h1 { letter-spacing:-1.8px; }
  .intro-copy { font-size:13px; padding:0 8px; }
  .game-card { padding:11px; border-radius:14px; }
  .game-area { min-height:260px; }
  .game-footer { padding-top:15px; }
  .metric strong { font-size:20px; }
  .metric-label { font-size:8px; letter-spacing:.7px; }
  .primary-actions { padding:15px 0 50px; }
  .start-button { min-width:0; flex:1; padding:16px 12px; }
  .steps { grid-template-columns:1fr; }
  .step { padding:16px; }
  .step h3 { margin-top:8px; }
  .footer { gap:12px; font-size:10px; }
  .footer nav { gap:12px; }
}
