@font-face { font-family: Nunito; src: url(../fonts/Nunito.ttf) format('truetype'); font-weight: 200 1000; font-display: swap; }

:root { --pink: #ff4fa3; --violet: #8a3cff; --night: #1a0f24; --ink: #fff; }
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--night); color: var(--ink); font-family: Nunito, system-ui, sans-serif; overflow: hidden; -webkit-tap-highlight-color: transparent; overscroll-behavior: none; }
body { background: radial-gradient(circle at 20% 10%, #3b1450 0, transparent 45%), radial-gradient(circle at 85% 90%, #4a1035 0, transparent 50%), var(--night); }

#stage { position: fixed; inset: 0; display: flex; justify-content: center; align-items: stretch; }
#game { position: relative; width: 100%; max-width: 480px; height: 100%; overflow: hidden; background: #120a1a; touch-action: manipulation; user-select: none; -webkit-user-select: none; }
@media (min-width: 520px) {
  #stage { align-items: center; padding: 16px; }
  #game { height: min(100%, 900px); aspect-ratio: 10 / 16; width: auto; max-width: 480px; border-radius: 28px; box-shadow: 0 30px 80px #000a, 0 0 0 1px #ffffff14; }
}
.screen { position: absolute; inset: 0; }

/* HUD: day + önbecsülés, above everything except the title */
#hud { position: absolute; top: 0; left: 0; right: 0; height: calc(env(safe-area-inset-top) + 38px); padding: env(safe-area-inset-top) 8px 0; z-index: 900; display: flex; gap: 6px; align-items: center; justify-content: space-between; background: #0d0713; border-bottom: 1px solid #ffffff14; }
#game.hud-on > .screen { top: calc(env(safe-area-inset-top) + 38px); }#hud.hidden { display: none; }
#hud .pill { background: transparent; border: 0; border-radius: 999px; padding: 4px 10px; font-weight: 800; font-size: 13px; display: flex; gap: 6px; align-items: center; }
#hud .bar { width: 90px; height: 7px; border-radius: 4px; background: #ffffff22; overflow: hidden; }
#hud .bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--pink), #ffb3d6); transition: width .6s; }
#hud .bar.low i { background: linear-gradient(90deg, #ff3b3b, #ff8a5c); }
#hud button { pointer-events: auto; font: inherit; color: inherit; background: #000a; border: 1px solid #ffffff22; border-radius: 999px; width: 30px; height: 30px; cursor: pointer; }
#hud .delta { position: absolute; right: 40px; top: 30px; font-weight: 900; animation: hudDelta 1.6s ease-out forwards; }
@keyframes hudDelta { from { opacity: 1; transform: translateY(0); } to { opacity: 0; transform: translateY(18px); } }

/* Title */
.title { display: flex; flex-direction: column; align-items: center; justify-content: space-between; padding: calc(env(safe-area-inset-top) + 28px) 20px calc(env(safe-area-inset-bottom) + 24px); background: radial-gradient(circle at 50% 35%, #ff4fa355 0, transparent 55%), linear-gradient(180deg, #2a0f3a, #120a1a); }
.title canvas { width: 100%; flex: 1; min-height: 0; -webkit-mask-image: linear-gradient(180deg, #000 74%, transparent 98%); mask-image: linear-gradient(180deg, #000 74%, transparent 98%); }
.title .kicker { margin: 0 auto 8px; width: max-content; padding: 4px 12px; border-radius: 999px; background: var(--pink); color: #fff; font-weight: 900; font-size: 15px; letter-spacing: 2px; text-transform: uppercase; transform: rotate(-3deg); box-shadow: 0 3px 0 var(--violet); }
.title h1 { margin: 0; text-align: center; font-size: clamp(34px, 11vw, 50px); line-height: .92; font-weight: 1000; letter-spacing: -1px; text-transform: uppercase; background: linear-gradient(180deg, #fff, #ffc2e2); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 4px 0 #8a3cff) drop-shadow(0 10px 18px #000a); transform: rotate(-3deg); }
.title h1 s { text-decoration-thickness: 6px; text-decoration-color: var(--pink); }
.title .sub { margin: 10px 0 0; text-align: center; opacity: .8; font-weight: 700; }
.title .btns { display: flex; flex-direction: column; gap: 10px; width: 100%; max-width: 320px; }
.btn { font: inherit; font-weight: 900; font-size: 18px; border: 0; border-radius: 999px; padding: 14px 20px; cursor: pointer; color: #fff; background: linear-gradient(90deg, var(--pink), var(--violet)); box-shadow: 0 6px 0 #5a1c8a, 0 12px 24px #0008; transition: transform .1s; }
.btn:active { transform: translateY(3px); box-shadow: 0 3px 0 #5a1c8a; }
.btn.ghost { background: #ffffff14; box-shadow: none; border: 1px solid #ffffff33; }
.title .credit { font-size: 12px; opacity: .55; text-align: center; margin-top: 10px; }
