/* Neon Game 2024 — чисто, без внешних зависимостей */
:root{
  --bg0:#05070c;
  --bg1:#070b14;
  --neon:#18ffb8;
  --neon2:#00c8ff;
  --hot:#ff2bd6;
  --text:#d8f7ff;
  --muted:rgba(216,247,255,.65);
  --card:rgba(5, 10, 18, .68);
  --border:rgba(24,255,184,.22);
  --shadow: 0 18px 60px rgba(0,0,0,.55);
  --radius:22px;
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, "Noto Sans", "Apple Color Emoji", "Segoe UI Emoji";
  color:var(--text);
  background: radial-gradient(1200px 600px at 50% 55%, rgba(24,255,184,.06), transparent 60%),
              radial-gradient(900px 500px at 70% 30%, rgba(0,200,255,.05), transparent 55%),
              linear-gradient(180deg, var(--bg0), var(--bg1));
  overflow-x:hidden;
}

.bg{position:fixed; inset:0; pointer-events:none; z-index:-1;}
.vignette{
  position:absolute; inset:-40px;
  background: radial-gradient(circle at 50% 40%, transparent 45%, rgba(0,0,0,.65) 78%);
  filter: blur(2px);
}
.grain{
  position:absolute; inset:0;
  opacity:.06;
  background-image:url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="160" height="160"><filter id="n"><feTurbulence type="fractalNoise" baseFrequency="0.8" numOctaves="2" stitchTiles="stitch"/></filter><rect width="100%25" height="100%25" filter="url(%23n)" opacity="0.9"/></svg>');
  mix-blend-mode: overlay;
}

.wrap{
  min-height:100%;
  display:flex;
  flex-direction:column;
  align-items:center;
  padding: min(5vh, 40px) 18px 26px;
  gap:18px;
}

.hero{
  width:min(980px, 100%);
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
  padding: 8px 6px;
}
.title{display:flex; flex-direction:column; gap:6px;}
.logo{
  margin:0;
  font-weight:800;
  letter-spacing:.25em;
  text-transform:uppercase;
  font-size: clamp(30px, 4vw, 54px);
  color: var(--neon);
  text-shadow: 0 0 24px rgba(24,255,184,.40), 0 0 56px rgba(24,255,184,.18);
  filter: drop-shadow(0 0 14px rgba(24,255,184,.25));
}
.logo span{color:rgba(24,255,184,.92)}
.subtitle{
  color:var(--muted);
  letter-spacing:.12em;
  text-transform:uppercase;
  font-size: 12px;
}

.social{display:flex; gap:12px; align-items:center; flex-wrap:wrap; justify-content:flex-end;}
.iconbtn{
  width:52px; height:52px;
  border-radius:16px;
  border:1px solid var(--border);
  background: rgba(5, 10, 18, .55);
  box-shadow: 0 0 0 rgba(0,0,0,0);
  display:grid;
  place-items:center;
  cursor:pointer;
  transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
  text-decoration:none;
}
.iconbtn:hover{
  transform: translateY(-1px);
  border-color: rgba(24,255,184,.45);
  box-shadow: 0 0 18px rgba(24,255,184,.18);
}
.iconbtn:active{transform: translateY(0px) scale(.98);}
.iconbtn svg{width:24px; height:24px; fill: rgba(216,247,255,.92); filter: drop-shadow(0 0 10px rgba(24,255,184,.25));}

.card{
  width:min(980px, 100%);
  background: var(--card);
  border: 1px solid rgba(24,255,184,.18);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
  overflow:hidden;
}

.hud{
  padding: 14px 14px 0;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  flex-wrap:wrap;
}
.hud-left{display:flex; gap:10px; flex-wrap:wrap;}
.pill{
  padding: 10px 12px;
  border-radius: 14px;
  border:1px solid rgba(24,255,184,.16);
  background: rgba(0,0,0,.18);
  color:rgba(216,247,255,.92);
  letter-spacing:.02em;
}
.pill span{color:var(--neon); font-weight:700; text-shadow: 0 0 14px rgba(24,255,184,.2);}
.hud-right{display:flex; gap:10px; flex-wrap:wrap; justify-content:flex-end;}

.btn{
  border:1px solid rgba(24,255,184,.22);
  background: rgba(24,255,184,.13);
  color: rgba(216,247,255,.96);
  padding: 10px 14px;
  border-radius: 14px;
  cursor:pointer;
  transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease, opacity .12s ease;
  letter-spacing:.04em;
  font-weight:700;
}
.btn:hover{
  border-color: rgba(24,255,184,.55);
  box-shadow: 0 0 20px rgba(24,255,184,.18);
  transform: translateY(-1px);
}
.btn:active{transform: translateY(0) scale(.99);}
.btn:disabled{opacity:.45; cursor:not-allowed; box-shadow:none; transform:none;}
.btn.ghost{
  background: rgba(0,0,0,.15);
  border-color: rgba(216,247,255,.12);
}
.btn.big{padding: 12px 18px; border-radius: 16px; font-size: 15px;}

.stage{
  position:relative;
  margin: 14px;
  border-radius: 18px;
  border: 1px solid rgba(24,255,184,.16);
  background:
     radial-gradient(700px 360px at 50% 55%, rgba(24,255,184,.08), transparent 60%),
     radial-gradient(560px 320px at 72% 35%, rgba(0,200,255,.07), transparent 58%),
     linear-gradient(180deg, rgba(0,0,0,.55), rgba(0,0,0,.22));
  overflow:hidden;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.25);
}

canvas#game{
  display:block;
  width:100%;
  height:auto;
  aspect-ratio: 16/9;
}

.overlay{
  position:absolute; inset:0;
  display:flex;
  align-items:center;
  justify-content:center;
  padding: 18px;
  background: radial-gradient(640px 340px at 50% 50%, rgba(0,0,0,.65), rgba(0,0,0,.86));
}
.overlay.hidden{display:none;}
.overlay-inner{
  width:min(560px, 100%);
  border-radius: 20px;
  border:1px solid rgba(24,255,184,.18);
  background: rgba(5,10,18,.58);
  box-shadow: 0 0 30px rgba(24,255,184,.12);
  padding: 18px 18px 14px;
  text-align:center;
}
.overlay-title{
  font-weight:900;
  letter-spacing:.22em;
  color: var(--neon);
  text-shadow: 0 0 24px rgba(24,255,184,.35);
  font-size: 20px;
  margin-bottom:10px;
}
.overlay-text{
  color: rgba(216,247,255,.78);
  line-height:1.45;
  font-size: 14px;
}
.overlay-actions{
  display:flex; gap:10px; justify-content:center; flex-wrap:wrap;
  margin: 14px 0 10px;
}
.overlay-hint{color: rgba(216,247,255,.55); font-size: 12px; letter-spacing:.08em;}

.tips{
  display:flex;
  gap:10px;
  padding: 0 14px 14px;
  flex-wrap:wrap;
}
.tip{
  display:flex;
  align-items:center;
  gap:10px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(0,0,0,.14);
  border:1px solid rgba(216,247,255,.10);
  color: rgba(216,247,255,.72);
  font-size: 13px;
}
.dot{
  width:10px; height:10px;
  border-radius:50%;
  background: var(--neon);
  box-shadow: 0 0 16px rgba(24,255,184,.35);
}

.footer{
  width:min(980px, 100%);
  display:flex;
  justify-content:center;
  padding: 6px 0 0;
}
.small{color: rgba(216,247,255,.55); font-size: 12px; letter-spacing:.08em;}

@media (max-width: 620px){
  .hero{flex-direction:column; align-items:flex-start;}
  .social{justify-content:flex-start;}
  .iconbtn{width:48px; height:48px; border-radius:14px;}
}

.back-btn {
    position: fixed;
    top: 25px;
    right: 25px;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: rgba(0, 255, 200, 0.15);
    border: 1px solid rgba(0, 255, 200, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(6px);
    box-shadow: 0 0 18px rgba(0,255,200,.7);
    transition: 0.25s ease;
    z-index: 999;
}

.back-btn:hover {
    transform: scale(1.15);
    box-shadow: 0 0 35px rgba(0,255,200,1);
}
