@font-face { font-family: "Space Grotesk"; font-weight: 700; font-style: normal; font-display: swap; src: url("assets/fonts/space-grotesk-latin-700-normal.woff2") format("woff2"); }
:root { --bg: #10162e; --fg: #fff; --muted: #c4cbe6; --pink: #ff3d7f; --gold: #ffc81a; --cyan: #3dd6ff; --green: #3dffb5; --violet: #7b5cff; --card: rgba(16, 20, 46, .86); }
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; color: var(--fg); overflow: hidden; overscroll-behavior: none; touch-action: none; -webkit-user-select: none; user-select: none; -webkit-tap-highlight-color: transparent; }
body { font-family: "Space Grotesk", "Segoe UI", Roboto, Arial, sans-serif; }
#app { position: fixed; inset: 0; }
#screen { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.hidden { display: none !important; }
.ic { width: 1.05em; height: 1.05em; vertical-align: -0.17em; }

/* ---------- Himmel ---------- */
html { background: #10162e; }
body { background: linear-gradient(180deg, var(--skyTop, #62b6ff), var(--skyBot, #ffe2c8)); transition: background 2s; }
#stars { position: absolute; inset: 0; opacity: 0; transition: opacity 2s; pointer-events: none;
  background-image: radial-gradient(1.5px 1.5px at 10% 20%, #fff, transparent), radial-gradient(1px 1px at 30% 70%, #fff, transparent), radial-gradient(2px 2px at 55% 15%, #fff, transparent), radial-gradient(1px 1px at 75% 45%, #fff, transparent), radial-gradient(1.5px 1.5px at 90% 80%, #fff, transparent), radial-gradient(1px 1px at 20% 90%, #fff, transparent), radial-gradient(1.5px 1.5px at 65% 85%, #fff, transparent), radial-gradient(1px 1px at 42% 40%, #fff, transparent);
  background-size: 260px 260px; }
body.night #stars { opacity: .9; }

/* ---------- HUD ---------- */
#hud { position: absolute; inset: 0; pointer-events: none; z-index: 5; }
#hud > * { pointer-events: none; }
#hud #btnPause { pointer-events: auto; position: absolute; top: calc(env(safe-area-inset-top) + 10px); left: 10px; width: 44px; height: 44px; border-radius: 14px; border: 2px solid rgba(255,255,255,.45); background: rgba(10,14,34,.45); color: #fff; display: grid; place-items: center; cursor: pointer; }
.hs { position: absolute; top: calc(env(safe-area-inset-top) + 6px); left: 50%; transform: translateX(-50%); text-align: center; text-shadow: 0 3px 0 rgba(0,0,0,.35), 0 0 14px rgba(0,0,0,.25); }
#hScore { font-size: 48px; line-height: 1; font-variant-numeric: tabular-nums; }
#hCombo { font-size: 20px; color: var(--gold); min-height: 24px; }
.hc { position: absolute; top: calc(env(safe-area-inset-top) + 14px); right: 12px; font-size: 20px; padding: 4px 10px; border-radius: 12px; background: rgba(10,14,34,.45); font-variant-numeric: tabular-nums; }
#hPowers { position: absolute; top: calc(env(safe-area-inset-top) + 64px); left: 10px; display: flex; flex-direction: column; gap: 6px; }
.pwi { position: relative; width: 34px; height: 34px; border-radius: 50%; background: var(--c); color: #111; display: grid; place-items: center; font-size: 15px; box-shadow: 0 0 12px var(--c); overflow: hidden; }
.pwi i { position: absolute; left: 0; bottom: 0; height: 4px; background: #fff; }
#hold { position: absolute; left: 50%; bottom: calc(env(safe-area-inset-bottom) + 26px); transform: translateX(-50%); display: flex; gap: 10px; align-items: center; opacity: .8; }
#hold span { width: 54px; height: 54px; border-radius: 50%; border: 3px solid rgba(255,255,255,.7); display: grid; place-items: center; font-size: 22px; background: rgba(10,14,34,.35); transition: background .08s, transform .08s; }
#hold .r { opacity: .45; } #hold.on .r { background: var(--pink); opacity: 1; transform: scale(1.12); }
#hold:not(.on) .l { background: var(--violet); }
#hint { position: absolute; left: 50%; bottom: calc(env(safe-area-inset-bottom) + 96px); transform: translate(-50%, 10px); width: min(88vw, 440px); text-align: center; font-size: 20px; padding: 12px 16px; border-radius: 16px; background: rgba(10,14,34,.72); border: 2px solid var(--cyan); opacity: 0; transition: opacity .3s, transform .3s; }
#hint.show { opacity: 1; transform: translate(-50%, 0); }
#pops { position: absolute; inset: 0; pointer-events: none; z-index: 6; overflow: hidden; }
.pop { position: absolute; transform: translate(-50%, -100%); text-align: center; animation: popup .9s ease-out forwards; white-space: nowrap; }
.pop b { display: block; font-size: 24px; color: #fff; -webkit-text-stroke: 1px rgba(0,0,0,.35); text-shadow: 0 3px 0 rgba(0,0,0,.35); }
.pop.perfekt b { font-size: 30px; color: var(--gold); }
.pop small { font-size: 18px; color: #fff; text-shadow: 0 2px 0 rgba(0,0,0,.4); }
@keyframes popup { 0% { opacity: 0; transform: translate(-50%, -60%) scale(.6); } 15% { opacity: 1; transform: translate(-50%, -110%) scale(1.15); } 30% { transform: translate(-50%, -115%) scale(1); } 100% { opacity: 0; transform: translate(-50%, -190%); } }
#toast { position: absolute; left: 50%; top: 22%; transform: translateX(-50%) scale(.8); padding: 8px 18px; border-radius: 18px; background: linear-gradient(90deg, var(--pink), var(--violet)); font-size: 17px; line-height: 1.25; text-align: center; width: max-content; max-width: min(90vw, 440px); opacity: 0; pointer-events: none; z-index: 20; box-shadow: 0 6px 20px rgba(0,0,0,.35); }
#toast.show { animation: toast 1.8s ease forwards; }
@keyframes toast { 0% { opacity: 0; transform: translateX(-50%) scale(.6); } 12% { opacity: 1; transform: translateX(-50%) scale(1.06); } 20% { transform: translateX(-50%) scale(1); } 80% { opacity: 1; } 100% { opacity: 0; transform: translateX(-50%) translateY(-14px); } }

/* ---------- Bildschirme ---------- */
#ui { position: absolute; inset: 0; pointer-events: none; z-index: 10; }
.scr { pointer-events: auto; position: absolute; inset: 0; overflow-y: auto; padding: calc(env(safe-area-inset-top) + 58px) 16px calc(env(safe-area-inset-bottom) + 70px); display: flex; flex-direction: column; align-items: center; gap: 12px; background: linear-gradient(180deg, rgba(10,14,40,.55), rgba(10,14,40,.82)); touch-action: pan-y; }
.scr > * { width: 100%; max-width: 520px; }
.scr.title { justify-content: flex-end; background: linear-gradient(180deg, rgba(10,14,40,0) 35%, rgba(10,14,40,.7) 78%); padding-bottom: calc(env(safe-area-inset-bottom) + 64px); }
.scr.run { display: none; }
.scr.cont { justify-content: center; background: rgba(10,14,40,.45); }
.bar { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.pill { padding: 6px 12px; border-radius: 999px; background: rgba(10,14,34,.7); border: 1.5px solid rgba(255,255,255,.2); font-size: 16px; display: inline-flex; align-items: center; gap: 6px; }
.pill.mult { color: var(--gold); }
.logo { display: flex; flex-direction: column; align-items: center; line-height: .86; font-size: clamp(52px, 15vw, 88px); letter-spacing: -.02em; transform: rotate(-4deg); margin: 6px 0 0; filter: drop-shadow(0 6px 0 rgba(0,0,0,.35)); }
.logo .crown { width: 1.1em; height: .7em; margin-bottom: -.06em; transform: rotate(6deg); }
.logo span { padding-top: .14em; margin-top: -.1em; background: linear-gradient(180deg, #fff 0%, #ffe680 40%, var(--gold) 55%, #ff7a1a 100%); -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-stroke: 2px #2a0f3a; }
.logo span + span { background: linear-gradient(180deg, #fff 0%, #ffc2d4 40%, var(--pink) 60%, #a01850 100%); -webkit-background-clip: text; background-clip: text; font-size: .92em; margin-left: .5em; }
.claim { text-align: center; margin: 0; color: var(--muted); font-size: 16px; }
.best { text-align: center; margin: 0; color: var(--muted); font-size: 15px; }
.best b { color: var(--gold); }
h2 { margin: 4px 0; text-align: center; font-size: 28px; text-shadow: 0 3px 0 rgba(0,0,0,.35); }
h3 { margin: 0 0 8px; font-size: 17px; }
h3 small { color: var(--muted); font-weight: 700; font-size: 13px; }
.card { background: var(--card); border: 1.5px solid rgba(255,255,255,.14); border-radius: 18px; padding: 14px 16px; box-shadow: 0 10px 30px rgba(0,0,0,.25); }
.card.center { text-align: center; }
.row { display: flex; gap: 10px; }
.row .btn { flex: 1; }
.btn { appearance: none; border: 0; border-radius: 16px; padding: 13px 16px; font: 700 17px/1.1 "Space Grotesk", sans-serif; color: #fff; background: linear-gradient(180deg, #4a5296, #2e3470); box-shadow: 0 4px 0 #1b1f4a, 0 8px 18px rgba(0,0,0,.25); cursor: pointer; touch-action: manipulation; }
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 #1b1f4a; }
.btn.big { font-size: 26px; padding: 18px; letter-spacing: .04em; background: linear-gradient(180deg, #ff6b9a, var(--pink) 50%, #d81e5f); box-shadow: 0 5px 0 #8e0f3c, 0 10px 26px rgba(255,61,127,.4); }
.btn.big:active { box-shadow: 0 1px 0 #8e0f3c; }
.btn.small { font-size: 15px; padding: 9px 12px; border-radius: 12px; width: auto; }
.btn.buy { background: linear-gradient(180deg, #ffd84a, #f0a800); color: #3a2400; box-shadow: 0 3px 0 #9a6a00; }
.btn[disabled] { opacity: .45; filter: grayscale(.5); cursor: default; }
.btn small { color: var(--gold); }
.link { appearance: none; background: none; border: 0; color: var(--muted); font: 700 15px "Space Grotesk", sans-serif; text-decoration: underline; cursor: pointer; padding: 6px; }
.missions { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.missions li { display: grid; grid-template-columns: 26px 1fr auto; grid-template-rows: auto auto; gap: 2px 8px; align-items: center; font-size: 15px; }
.missions .chk { grid-row: span 2; width: 24px; height: 24px; border-radius: 50%; border: 2px solid rgba(255,255,255,.4); display: grid; place-items: center; color: #10162e; font-size: 15px; }
.missions li.ok .chk { background: var(--green); border-color: var(--green); }
.missions li.ok .mt { color: var(--green); }
.missions .mbar { grid-column: 2; height: 6px; border-radius: 3px; background: rgba(255,255,255,.15); overflow: hidden; }
.missions .mbar i { display: block; height: 100%; background: linear-gradient(90deg, var(--cyan), var(--green)); }
.missions small { grid-row: 1 / span 2; grid-column: 3; color: var(--muted); font-size: 13px; }
.note { color: var(--muted); font-size: 13px; margin: 10px 0; }
.result { text-align: center; }
.rec { color: var(--gold); font-size: 20px; letter-spacing: .06em; animation: pop .5s infinite alternate; }
.big-score { font-size: 54px; line-height: 1.05; text-shadow: 0 4px 0 rgba(0,0,0,.35); }
.stats { display: flex; justify-content: center; gap: 16px; color: var(--muted); font-size: 16px; flex-wrap: wrap; }
.up { text-align: center; padding: 10px; border-radius: 14px; background: linear-gradient(90deg, rgba(61,255,181,.25), rgba(61,214,255,.25)); border: 1.5px solid var(--green); }
.tabs { display: flex; gap: 6px; }
.tab { flex: 1; appearance: none; border: 1.5px solid rgba(255,255,255,.2); background: rgba(10,14,34,.6); color: var(--muted); border-radius: 12px; padding: 9px 6px; font: 700 14px "Space Grotesk", sans-serif; cursor: pointer; }
.tab.on { background: var(--violet); color: #fff; border-color: #fff; }
.list { display: flex; flex-direction: column; gap: 10px; }
.item { display: grid; grid-template-columns: 46px 1fr auto; gap: 10px; align-items: center; padding: 8px; border-radius: 14px; background: rgba(255,255,255,.04); }
.item.sel { outline: 2px solid var(--green); }
.it { display: flex; flex-direction: column; gap: 2px; }
.it small { color: var(--muted); font-size: 13px; line-height: 1.3; }
.sw { width: 46px; height: 46px; border-radius: 12px; background: linear-gradient(135deg, var(--b) 0 34%, var(--a) 34% 100%); border: 2px solid rgba(255,255,255,.4); }
.pwic { width: 46px; height: 46px; border-radius: 50%; background: var(--c); color: #111; display: grid; place-items: center; font-size: 20px; box-shadow: 0 0 14px var(--c); }
.dots { display: flex; gap: 4px; margin-top: 3px; }
.dots i { width: 14px; height: 6px; border-radius: 3px; background: rgba(255,255,255,.2); }
.dots i.on { background: var(--green); }
.tag { font-size: 13px; color: var(--green); padding: 0 6px; }
.sl { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; font-size: 15px; }
.sl input { width: 100%; accent-color: var(--pink); }
.seg { display: flex; gap: 6px; }
.seg button { flex: 1; appearance: none; border: 1.5px solid rgba(255,255,255,.2); background: rgba(10,14,34,.6); color: var(--muted); border-radius: 10px; padding: 8px 4px; font: 700 14px "Space Grotesk", sans-serif; cursor: pointer; }
.seg button.on { background: var(--pink); color: #fff; }
.help p, .help li { font-size: 15px; line-height: 1.45; color: #e6e9f7; }
.help ul { padding-left: 18px; margin: 8px 0 0; }
.ring { position: relative; width: 96px; height: 96px; margin: 8px auto; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 8; }
.ring .bg { stroke: rgba(255,255,255,.15); }
.ring .fg { stroke: var(--gold); stroke-dasharray: 276; stroke-linecap: round; transition: stroke-dashoffset .1s linear; }
.ring span { position: absolute; inset: 0; display: grid; place-items: center; font-size: 34px; }
.noscript { padding: 20px; }
@media (min-height: 760px) { .scr.title { padding-bottom: calc(env(safe-area-inset-bottom) + 90px); } }
@media (orientation: landscape) and (max-height: 520px) {
  .scr { padding-top: 12px; gap: 8px; }
  .logo { font-size: 48px; }
  .scr.title { justify-content: center; }
  .btn.big { padding: 12px; font-size: 22px; }
  #hint { bottom: 84px; font-size: 16px; padding: 8px 12px; } .hs #hScore { font-size: 38px; }
}
@media (prefers-reduced-motion: reduce) { .rec { animation: none; } }

.card.center .btn { display: block; width: 100%; margin-top: 6px; }
.card.center .link { display: block; margin: 8px auto 0; }
@media (min-aspect-ratio: 6/5) and (min-width: 700px) {
  .scr.title { align-items: flex-end; justify-content: center; padding-right: max(5vw, 24px); background: linear-gradient(90deg, rgba(10,14,40,0) 30%, rgba(10,14,40,.78) 68%); }
  .scr.title > * { max-width: 460px; }
}

.st { display: grid; grid-template-columns: 62px 1fr; align-items: center; gap: 6px; font-size: 11px; color: var(--muted); margin-top: 2px; }
.st em { font-style: normal; }
.st i { height: 5px; border-radius: 3px; background: rgba(255,255,255,.15); overflow: hidden; }
.st i b { display: block; height: 100%; background: linear-gradient(90deg, var(--cyan), var(--pink)); }
