@import url("https://fonts.googleapis.com/css2?family=Creepster&family=Special+Elite&display=swap");
:root { color-scheme: dark; --bg: #050303; --fg: #d8cfc0; --muted: #8a7d70; --accent: #b3000c; --border: #3a1a1a; --radius: 4px; --font: "Special Elite", monospace; }
* { box-sizing: border-box; }
html, body, #root { margin: 0; height: 100%; background: var(--bg); color: var(--fg); font-family: var(--font); overflow: hidden; }
button { font-family: inherit; cursor: pointer; }
button:focus-visible { outline: 2px solid #ff4444; outline-offset: 2px; }
.menu { position: relative; height: 100%; overflow-y: auto; display: flex; justify-content: center; align-items: center;
  background: radial-gradient(ellipse at 50% 120%, #3a0004 0%, #0a0000 50%, #000 80%); animation: flick 7s infinite; }
@keyframes flick { 0%,93%,100% { filter: brightness(1); } 94% { filter: brightness(.3); } 95% { filter: brightness(1.4); } 96% { filter: brightness(.2); } }
.fog { position: fixed; inset: -20%; background: repeating-radial-gradient(circle at 30% 60%, rgba(120,0,0,.06) 0 40px, transparent 40px 120px);
  animation: drift 30s linear infinite; pointer-events: none; }
@keyframes drift { to { transform: translateX(10%) rotate(8deg); } }
.eyes { position: fixed; top: 18%; left: 50%; transform: translateX(-50%); display: flex; gap: 46px; pointer-events: none; animation: blink 6s infinite; }
.eyes span { width: 14px; height: 7px; border-radius: 50%; background: #ff1a00; box-shadow: 0 0 22px 6px #ff1a00aa; }
@keyframes blink { 0%,40%,46%,100% { opacity: .85; } 43% { opacity: 0; } 70% { opacity: .2; } }
.menu-inner { position: relative; z-index: 2; width: min(32rem, 92vw); text-align: center; padding: 6rem 0 2rem; }
.title { font-family: "Creepster", cursive; font-size: clamp(3.5rem, 13vw, 6.5rem); line-height: .9; margin: 0; color: #c00010;
  text-shadow: 0 0 20px #f00a, 0 6px 0 #300; letter-spacing: 4px; animation: shake 4s infinite; }
@keyframes shake { 0%,90%,100% { transform: none; } 91% { transform: translate(-3px,2px) skewX(4deg); } 93% { transform: translate(3px,-1px); } }
.sub { color: var(--muted); letter-spacing: 3px; margin: .5rem 0 1.5rem; }
.tokens { margin-bottom: 1.5rem; color: #e0c070; }
.btns { display: flex; flex-direction: column; gap: .7rem; }
.hbtn { background: linear-gradient(#1a0505, #0a0000); color: var(--fg); border: 1px solid var(--border); padding: .9rem; font-size: 1.05rem;
  letter-spacing: 3px; border-radius: var(--radius); transition: .2s; }
.hbtn:hover:not(:disabled) { border-color: #c00010; color: #fff; box-shadow: 0 0 18px #c0001066; }
.hbtn:disabled { opacity: .4; cursor: not-allowed; }
.hbtn.main { background: linear-gradient(#5a0008, #200002); border-color: #c00010; font-size: 1.3rem; }
.hbtn.small { padding: .4rem; font-size: .8rem; letter-spacing: 1px; }
.codein { background: #0a0505; border: 1px solid #5a1010; color: #eee; padding: 12px; font: inherit; text-align: center; letter-spacing: .2em; border-radius: 4px; width: 100%; box-sizing: border-box; }
.codein.sel { width: auto; letter-spacing: 0; }
.rank { list-style: none; padding: 0; margin: .5rem 0; width: 100%; max-width: 22rem; }
.rank li { display: flex; gap: .6rem; padding: .4rem .2rem; border-bottom: 1px solid #3a0a0a; }
.rank li span { flex: 1; overflow: hidden; text-overflow: ellipsis; }
.rank li em { color: #ff4a4a; font-style: normal; }
.link { background: none; border: 0; color: var(--muted); margin-top: .8rem; font-size: 1rem; }
.muted { color: var(--muted); font-size: .85rem; }
.shop { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: .7rem; }
.skin { border: 1px solid var(--border); background: #0c0303; padding: .7rem; display: flex; flex-direction: column; gap: .35rem; align-items: center; border-radius: var(--radius); }
.skin.on { border-color: #c00010; }
.avatar { width: 64px; height: 64px; border-radius: 50%; }
.shop .link { grid-column: 1 / -1; }
.win { color: #7dffb0; font-family: "Creepster"; font-size: 2.4rem; margin: 0; }
.dead { color: #f01020; font-family: "Creepster"; font-size: 3rem; margin: 0; }
.game { position: fixed; inset: 0; touch-action: none; }
.game canvas { width: 100%; height: 100%; display: block; }
.dance-btn { position: absolute; right: 14px; bottom: 90px; z-index: 5; display: flex; flex-direction: column; gap: 8px; }
.dance-btn button { background: rgba(20,0,0,.7); color: #f0e6d8; border: 1px solid #7a1010; border-radius: 24px; padding: 10px 16px; font-size: 1rem; cursor: pointer; }
.hud { position: absolute; top: 12px; left: 12px; right: 12px; color: #d8cfc0; font-size: .9rem; text-shadow: 0 0 6px #000; pointer-events: none; }
.vignette { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(ellipse at center, transparent 45%, #000 100%); }
.scare { position: absolute; inset: 0; background: #000; display: flex; align-items: center; justify-content: center; animation: scare .12s infinite; }
.scare svg { height: 110vh; animation: zoom .4s ease-out; }
@keyframes zoom { from { transform: scale(.3); } to { transform: scale(1.15); } }
@keyframes scare { 50% { background: #300; transform: translate(6px,-4px); } }
