/* ---------- Schriften (selbst gehostet, OFL) ---------- */
@font-face { font-family: "Press Start 2P"; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/pressstart2p.woff2) format("woff2"); }
@font-face { font-family: "Rajdhani"; font-style: normal; font-weight: 500; font-display: swap; src: url(fonts/rajdhani-500.woff2) format("woff2"); }
@font-face { font-family: "Rajdhani"; font-style: normal; font-weight: 700; font-display: swap; src: url(fonts/rajdhani-700.woff2) format("woff2"); }

:root {
  --bg: #0b0820;
  --panel: #14103a;
  --panel2: #1d1750;
  --line: #3a2f8a;
  --text: #eaf6ff;
  --muted: #9ea3d6;
  --accent: #ffe14d;
  --accent2: #ff9e2c;
  --cyan: #19f0ff;
  --magenta: #ff2bd6;
  --good: #3dff8a;
  --bad: #ff4a6e;
  --font-arcade: "Press Start 2P", "Courier New", ui-monospace, monospace;
  --font-ui: "Rajdhani", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
}
* { box-sizing: border-box; }
html, body {
  margin: 0; height: 100%; overflow: hidden; background: var(--bg); color: var(--text);
  font-family: var(--font-ui); font-weight: 500; font-size: 17px;
  -webkit-user-select: none; user-select: none; -webkit-tap-highlight-color: transparent;
}
canvas#game { position: fixed; inset: 0; width: 100vw; height: 100vh; height: 100dvh; display: block; touch-action: none; }
.hidden { display: none !important; }

/* CRT-Scanlines: billig, ein einziges statisches Overlay */
body::after {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 9000;
  background:
    repeating-linear-gradient(to bottom, rgba(0,0,0,.18) 0, rgba(0,0,0,.18) 1px, transparent 1px, transparent 3px),
    radial-gradient(ellipse at center, transparent 62%, rgba(0,0,10,.42) 100%);
}

/* ---------- Bildschirme ---------- */
.screen {
  position: fixed; inset: 0; display: flex; align-items: center; justify-content: center;
  padding: max(12px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
  /* bewusst ohne backdrop-filter: bremst ohne Grafikbeschleunigung (v. a. Firefox) von 60 auf 13 Bilder/s */
  background: rgba(8, 5, 28, .86); overflow-y: auto;
}
#title {
  background:
    radial-gradient(ellipse at 50% 0%, rgba(255,43,214,.28), transparent 60%),
    radial-gradient(ellipse at 50% 100%, rgba(25,240,255,.18), transparent 55%),
    linear-gradient(#0b0820, #150a38);
}
.panel {
  background: linear-gradient(180deg, rgba(26,20,72,.96), rgba(16,12,46,.96));
  border: 2px solid var(--cyan); border-radius: 14px;
  box-shadow: 0 0 0 1px rgba(0,0,0,.6), 0 0 14px rgba(25,240,255,.55), 0 0 40px rgba(255,43,214,.25), inset 0 0 22px rgba(25,240,255,.12);
  padding: 22px; width: min(720px, 100%); max-height: 100%; overflow-y: auto; margin: auto;
}
.small-panel { width: min(420px, 100%); text-align: center; }
.small-panel { border-color: var(--magenta); box-shadow: 0 0 0 1px rgba(0,0,0,.6), 0 0 14px rgba(255,43,214,.6), 0 0 40px rgba(25,240,255,.22), inset 0 0 22px rgba(255,43,214,.12); }

h1 { margin: 0 0 4px; text-align: center; }
h2 {
  margin: 0 0 8px; font-family: var(--font-arcade); font-weight: 400; font-size: clamp(15px, 4.4vw, 22px);
  line-height: 1.4; color: var(--cyan); text-shadow: 0 0 6px var(--cyan), 0 0 18px rgba(25,240,255,.6); letter-spacing: 1px;
}
h3 { margin: 14px 0 8px; font-family: var(--font-arcade); font-weight: 400; font-size: 11px; color: var(--magenta);
  text-transform: uppercase; letter-spacing: 1px; text-shadow: 0 0 8px rgba(255,43,214,.7); }
h3 small { color: var(--muted); font-family: var(--font-ui); font-weight: 500; text-shadow: none; }
.sub { color: var(--muted); margin: 6px 0 14px; text-align: center; }
.hint { color: var(--muted); font-size: 14px; text-align: center; margin-top: 16px; }
.version { color: var(--muted); opacity: 0.45; font-size: 11px; text-align: right; margin: 6px 0 -6px; letter-spacing: 0.05em; }
.label { font-family: var(--font-arcade); font-size: 10px; color: var(--accent); margin: 16px 0 9px; letter-spacing: 1px; text-shadow: 0 0 8px rgba(255,225,77,.5); }
.err { color: var(--bad); text-align: center; min-height: 1.2em; margin: 8px 0 0; font-weight: 700; }
.row { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 12px; }
.col { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }

/* Logo */
.logo {
  font-family: var(--font-arcade); font-weight: 400; line-height: 1.25; letter-spacing: 2px;
  font-size: clamp(26px, 8vw, 62px); margin: 10px 0 12px;
}
.logo, .logo span { display: block; }
.logo {
  color: #ffe14d;
  text-shadow: 0 0 4px #fff3a0, 0 0 12px #ffb300, 0 0 28px #ff7a00, 0 4px 0 #8a3b00;
  animation: logo-flicker 5s infinite;
}
.logo span {
  color: #8cfaff; margin-top: .15em; letter-spacing: 6px;
  text-shadow: 0 0 4px #d8ffff, 0 0 12px #19f0ff, 0 0 30px #1a7bff, 0 4px 0 #0a3b7a;
  animation: logo-flicker 7s infinite 1.3s;
}
@keyframes logo-flicker {
  0%, 18%, 22%, 62%, 64%, 100% { opacity: 1; }
  20%, 63% { opacity: .55; }
  21% { opacity: .9; }
}

/* ---------- Eingaben / Buttons ---------- */
.field { display: flex; align-items: center; gap: 10px; font-weight: 700; justify-content: center; }
input {
  font: inherit; font-weight: 700; color: var(--cyan); background: #07051a; border: 2px solid var(--line);
  border-radius: 8px; padding: 9px 12px; outline: none; -webkit-user-select: text; user-select: text;
  box-shadow: inset 0 0 10px rgba(0,0,0,.6);
}
input:focus { border-color: var(--cyan); box-shadow: 0 0 10px rgba(25,240,255,.7), inset 0 0 10px rgba(0,0,0,.6); }
#code { width: 120px; text-transform: uppercase; text-align: center; letter-spacing: 4px; font-family: var(--font-arcade); font-size: 14px; }

.btn {
  font-family: var(--font-arcade); font-size: 12px; line-height: 1.3; font-weight: 400; color: var(--cyan); background: #120d3a;
  border: 2px solid var(--cyan); border-radius: 8px; padding: 13px 16px; cursor: pointer; text-transform: uppercase;
  text-shadow: 0 0 6px rgba(25,240,255,.8);
  box-shadow: 0 0 10px rgba(25,240,255,.45), inset 0 0 10px rgba(25,240,255,.15), 0 4px 0 #050318;
  transition: transform .05s, background .1s, box-shadow .1s;
}
.btn:hover { background: #1b1458; box-shadow: 0 0 16px rgba(25,240,255,.8), inset 0 0 12px rgba(25,240,255,.25), 0 4px 0 #050318; }
.btn:active { transform: translateY(3px); box-shadow: 0 0 10px rgba(25,240,255,.5), 0 1px 0 #050318; }
.btn:disabled { opacity: .4; cursor: default; box-shadow: 0 4px 0 #050318; }
.btn.primary {
  color: #1b0a00; background: linear-gradient(#fff07a, #ffb400); border-color: #fff3a0; text-shadow: none;
  box-shadow: 0 0 14px rgba(255,200,0,.75), 0 0 34px rgba(255,120,0,.35), 0 4px 0 #7a3b00;
  animation: pulse-glow 2.2s ease-in-out infinite;
}
.btn.primary:hover { background: linear-gradient(#fff9b0, #ffc933); }
.btn.primary:disabled { animation: none; }
@keyframes pulse-glow { 50% { box-shadow: 0 0 22px rgba(255,200,0,1), 0 0 48px rgba(255,120,0,.55), 0 4px 0 #7a3b00; } }
.btn.small { padding: 7px 10px; font-size: 9px; }
.btn.on { background: #3a1a6a; border-color: var(--magenta); color: #ffd0f5; text-shadow: 0 0 6px var(--magenta); box-shadow: 0 0 12px rgba(255,43,214,.7), 0 4px 0 #050318; }
button:focus-visible, [data-nav]:focus-visible, .btn:focus-visible {
  outline: 3px solid #fff; outline-offset: 3px;
  box-shadow: 0 0 0 6px var(--magenta), 0 0 24px 8px rgba(255,43,214,.8);
}

/* ---------- Bot-Auswahl ---------- */
.bot-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
@media (max-width: 560px) { .bot-grid { grid-template-columns: repeat(3, 1fr); } }
.bot-card {
  background: radial-gradient(circle at 50% 35%, #2a2078, #130e3c); border: 2px solid var(--line); border-radius: 10px; padding: 6px 4px;
  cursor: pointer; text-align: center; color: var(--text); font-family: var(--font-ui); font-weight: 700; font-size: 15px;
  transition: box-shadow .12s, border-color .12s, transform .08s;
}
.bot-card:hover { border-color: var(--cyan); box-shadow: 0 0 12px rgba(25,240,255,.5); }
.bot-card canvas { width: 64px; height: 64px; display: block; margin: 0 auto; }
.bot-card.sel { border-color: var(--accent); background: radial-gradient(circle at 50% 35%, #5a3a9a, #2a1a64); color: var(--accent);
  box-shadow: 0 0 14px rgba(255,225,77,.8), inset 0 0 14px rgba(255,225,77,.22); transform: translateY(-2px); }
.bot-desc { min-height: 2.6em; text-align: center; color: var(--muted); margin: 10px 0 0; }

.code { font-family: var(--font-arcade); color: var(--accent); letter-spacing: 6px; text-shadow: 0 0 10px rgba(255,225,77,.8); }
.lobby-players { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 8px; }
.lobby-player { background: var(--panel2); border-radius: 10px; padding: 8px; display: flex; align-items: center; gap: 8px; border: 2px solid var(--magenta);
  box-shadow: 0 0 10px rgba(255,43,214,.35); font-weight: 700; }
.lobby-player canvas { width: 44px; height: 44px; }
.lobby-player .host { color: var(--accent); font-size: 13px; text-shadow: 0 0 6px rgba(255,225,77,.6); }

/* ---------- HUD ---------- */
#hud { position: fixed; inset: 0; pointer-events: none; padding: max(10px, env(safe-area-inset-top)) 12px; font-family: var(--font-ui); }
.hud-left { position: absolute; left: max(12px, env(safe-area-inset-left)); top: max(10px, env(safe-area-inset-top)); width: min(240px, 42vw); }
.bar { position: relative; height: 22px; background: #07051a; border: 2px solid var(--line); border-radius: 4px; margin-bottom: 6px; overflow: hidden;
  box-shadow: 0 0 8px rgba(25,240,255,.3); }
.bar .fill { position: absolute; inset: 0; width: 0; background: linear-gradient(#ff7a95, var(--bad)); box-shadow: 0 0 10px var(--bad); transition: width .15s; }
.bar.xp { height: 14px; }
.bar.xp .fill { background: linear-gradient(#8cfaff, #19a0ff); box-shadow: 0 0 10px var(--cyan); }
.bar span { position: relative; display: block; text-align: center; font-family: var(--font-arcade); font-weight: 400; font-size: 9px; line-height: 18px; text-shadow: 0 1px 2px #000, 0 0 4px #000; }
.bar.xp span { font-size: 7px; line-height: 10px; }
.schrott { display: flex; align-items: center; gap: 6px; font-family: var(--font-arcade); font-size: 14px; color: var(--accent); text-shadow: 0 0 8px rgba(255,225,77,.8), 0 2px 2px #000; }
.schrott.big { font-size: 16px; }
.cog { width: 20px; height: 20px; border-radius: 50%; background: #bff8ff; border: 4px dotted var(--cyan); display: inline-block; box-shadow: 0 0 8px var(--cyan); }
.hud-center { position: absolute; left: 50%; transform: translateX(-50%); top: max(10px, env(safe-area-inset-top)); text-align: center; text-shadow: 0 2px 3px #000; }
#hud-wave { font-family: var(--font-arcade); font-size: 10px; color: var(--magenta); text-shadow: 0 0 8px var(--magenta), 0 2px 2px #000; }
#hud-time { font-family: var(--font-arcade); font-size: 28px; margin-top: 4px; color: #fff; text-shadow: 0 0 6px var(--cyan), 0 0 18px var(--cyan), 0 2px 2px #000; }
#hud-time.low { color: var(--bad); text-shadow: 0 0 6px var(--bad), 0 0 18px var(--bad), 0 2px 2px #000; animation: blink-fast .7s steps(2) infinite; }
@keyframes blink-fast { 50% { opacity: .55; } }
.hud-timer { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 4px; }
.hud-timer #hud-time { margin-top: 0; white-space: nowrap; }
#hud-xb { --xc: var(--accent); display: flex; flex-direction: column; align-items: center; gap: 3px; min-width: 54px; }
#hud-xb b { font-family: var(--font-arcade); font-weight: 400; font-size: 24px; color: var(--xc); text-shadow: 0 0 10px var(--xc), 0 2px 2px #000; }
#hud-xb i { display: block; width: 100%; height: 4px; background: #07051a; border: 1px solid var(--line); border-radius: 2px; overflow: hidden; }
#hud-xb u { display: block; height: 100%; background: var(--xc); }
#hud-xb.t2 { --xc: #ff9e2c; }
#hud-xb.t3 { --xc: var(--cyan); }
#hud-xb.t4 { --xc: var(--muted); }
#hud-xb.t4 i { visibility: hidden; }
#hud-xb.drop b { animation: xb-drop .45s ease-out; }
@keyframes xb-drop { 0% { transform: scale(1.5); } 100% { transform: scale(1); } }
.shop-xb { margin-left: 10px; font-size: .75em; color: var(--accent); white-space: nowrap; }
.hud-right { position: absolute; right: calc(64px + env(safe-area-inset-right)); top: max(10px, env(safe-area-inset-top)); display: flex; flex-direction: column; gap: 4px; }
.mate { display: flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 700; text-shadow: 0 1px 2px #000; }
.mate .mbar { width: 60px; height: 7px; background: #000; border-radius: 3px; overflow: hidden; border: 1px solid var(--line); }
.mate .mbar div { height: 100%; background: var(--good); box-shadow: 0 0 6px var(--good); }
.mate.dead { opacity: .5; }
.icon-btn { pointer-events: auto; position: absolute; right: max(12px, env(safe-area-inset-right)); top: max(10px, env(safe-area-inset-top)); width: 42px; height: 42px;
  border-radius: 8px; border: 2px solid var(--cyan); background: rgba(18,13,58,.85); color: var(--cyan); font-family: var(--font-arcade); font-size: 12px;
  box-shadow: 0 0 10px rgba(25,240,255,.5); text-shadow: 0 0 6px var(--cyan); }
#hud-dead { position: absolute; left: 50%; bottom: 18%; transform: translateX(-50%); background: rgba(20,5,30,.8); border: 2px solid var(--bad);
  box-shadow: 0 0 16px rgba(255,74,110,.7); padding: 10px 18px; border-radius: 8px; font-weight: 700; text-align: center; color: #ffd0da; }

/* ---------- Shop ---------- */
.shop-panel { width: min(1100px, 100%); padding: 16px; display: flex; flex-direction: column; }
.shop-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.shop-body { display: grid; grid-template-columns: 1fr 300px; gap: 16px; }
@media (max-width: 960px) { .shop-body { grid-template-columns: 1fr; } }
.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
@media (max-width: 820px) { .cards { grid-template-columns: repeat(2, 1fr); } }
.card {
  --tcg: var(--tc, var(--line));
  background: linear-gradient(180deg, #221a63, #130e3c); border: 2px solid var(--tc, var(--line)); border-radius: 10px; padding: 10px;
  display: flex; flex-direction: column; gap: 6px; min-height: 210px; position: relative;
  box-shadow: 0 0 10px var(--tc, transparent), inset 0 0 14px rgba(0,0,0,.4);
}
.card.empty { opacity: .35; justify-content: center; align-items: center; border-style: dashed; box-shadow: none; }
.card canvas { width: 64px; height: 64px; align-self: center; }
.card .nm { font-weight: 700; font-size: 18px; text-align: center; line-height: 1.1; }
.card .tp { font-family: var(--font-arcade); font-size: 8px; text-align: center; color: var(--tc); text-transform: uppercase; letter-spacing: 1px; text-shadow: 0 0 6px var(--tc); }
.card .ds { font-size: 15px; line-height: 1.15; color: var(--muted); flex: 1; text-align: center; }
.card .acts { display: flex; gap: 6px; }
.card .acts .btn { flex: 1; padding: 9px 6px; font-size: 10px; }
.card .lock { flex: 0 0 auto !important; }
.card.locked { box-shadow: 0 0 0 3px var(--cyan) inset, 0 0 14px rgba(25,240,255,.7); }
.card.level { min-height: 0; cursor: pointer; color: var(--text); font-family: var(--font-ui); font-weight: 700; font-size: 18px; padding: 18px 10px; }
.card.level:hover { background: linear-gradient(180deg, #34288a, #1c1458); }
.list { display: flex; flex-direction: column; gap: 6px; }
.wrow { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; background: var(--panel2); border-radius: 8px; padding: 4px 6px; border-left: 4px solid var(--tc);
  box-shadow: -4px 0 10px -4px var(--tc); }
.wrow canvas { width: 36px; height: 36px; }
.wrow .nm { flex: 1; min-width: 0; font-size: 16px; font-weight: 700; }
.wrow .btn { padding: 6px 8px; font-size: 9px; }
.wrow .nm, .wrow canvas { cursor: pointer; }
.wrow .wi-name { all: unset; flex: 1 1 120px; min-width: 0; font-size: 16px; font-weight: 700; cursor: pointer; }
.wrow .wi-name:hover, .wrow .wi-name:focus-visible { color: var(--cyan); text-decoration: underline; }
body.pad-nav .wrow .wi-name:focus { outline: 2px solid #fff; outline-offset: 2px; }
.wrow-btn { width: 100%; color: var(--text); border-width: 0 0 0 4px; border-style: solid; border-color: var(--tc); cursor: pointer; font-family: var(--font-ui); text-align: left; }
.wrow-btn:hover, .wrow-btn:focus-visible { background: #34288a; }
body.pad-nav .wrow-btn:focus { outline: 2px solid #fff; }
.pause-weapons { display: flex; flex-direction: column; gap: 5px; margin-bottom: 12px; text-align: left; }
.pause-weapons h3 { margin: 6px 0 2px; }
.wi-panel { width: min(520px, 100%); text-align: left; }
.wi-panel h3 { margin: 12px 0 5px; }
.wi-head { display: flex; align-items: center; gap: 12px; padding-left: 10px; border-left: 4px solid var(--tc); }
.wi-head h2 { margin: 0; text-align: left; }
.wi-icon canvas { display: block; width: 64px; height: 64px; }
.wi-tier { color: var(--tc); font-weight: 700; font-size: 16px; }
.wi-grid { display: grid; grid-template-columns: 1fr auto; gap: 2px 14px; font-size: 17px; }
.wi-grid span { color: var(--muted); }
.wi-grid b { text-align: right; }
.wi-note { color: var(--muted); font-size: 14px; line-height: 1.2; margin: 6px 0 0; }
.wi-list { margin: 0; padding-left: 20px; font-size: 16px; line-height: 1.25; }
.wi-list small { color: var(--muted); }
.wi-panel .col { margin-top: 14px; }
.chips { display: flex; flex-wrap: wrap; gap: 5px; }
.chip { font-size: 14px; font-weight: 700; padding: 2px 9px; border-radius: 20px; background: var(--panel2); border: 2px solid var(--tc); box-shadow: 0 0 6px var(--tc); }
.stats { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; font-size: 15px; }
.stats .pos { color: var(--good); text-shadow: 0 0 6px rgba(61,255,138,.6); }
.stats .neg { color: var(--bad); }
.stat-max { color: var(--accent); font-size: .8em; letter-spacing: .5px; text-shadow: 0 0 6px rgba(255,225,77,.7); }
.shop-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 14px; flex-wrap: wrap; }
.ready-list { display: flex; gap: 8px; flex-wrap: wrap; }
.ready-list span { padding: 3px 10px; border-radius: 20px; background: var(--panel2); font-size: 14px; font-weight: 700; border: 1px solid var(--line); }
.ready-list span.ok { background: #0f4a2c; border-color: var(--good); box-shadow: 0 0 8px rgba(61,255,138,.6); }
#btn-ready { min-width: 180px; font-size: 14px; }
#btn-ready.on { background: linear-gradient(#8bffbb, var(--good)); border-color: #cfffe2; color: #00240f; box-shadow: 0 0 18px rgba(61,255,138,.8), 0 4px 0 #0a5a2a; animation: none; }

#toast { position: fixed; left: 50%; top: 20%; transform: translateX(-50%); background: rgba(8,5,28,.92); border: 2px solid var(--magenta);
  box-shadow: 0 0 16px rgba(255,43,214,.7); padding: 10px 18px; border-radius: 8px; font-weight: 700; z-index: 9500; text-align: center; max-width: 92vw; }

.sound-row { display: flex; gap: 18px; justify-content: center; flex-wrap: wrap; margin-top: 14px; font-size: 15px; color: var(--muted); font-weight: 700; }
.sound-row label { display: flex; align-items: center; gap: 8px; }
.sound-row input[type=range] { width: 120px; padding: 0; accent-color: var(--magenta); box-shadow: none; }
@media (max-width: 560px) {
  .hud-left { width: 44vw; }
  .hud-center { top: auto; bottom: max(14px, env(safe-area-inset-bottom)); }
  .hud-right { right: 12px; top: 62px; }
  .panel { padding: 16px 12px; }
  .btn { font-size: 11px; padding: 12px 12px; }
}

.settings { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 16px; }
@media (max-width: 640px) { .settings { grid-template-columns: 1fr; } }
.seg { display: flex; flex-wrap: wrap; gap: 6px; }
.seg .btn { padding: 8px 10px; font-size: 9px; box-shadow: 0 0 8px rgba(25,240,255,.35), 0 3px 0 #050318; }
.seg .btn.sel { background: linear-gradient(#fff07a, #ffb400); color: #1b0a00; border-color: #fff3a0; text-shadow: none; animation: none;
  box-shadow: 0 0 14px rgba(255,200,0,.8), 0 3px 0 #7a3b00; }
.seg .btn:disabled { opacity: 1; cursor: default; }
.seg .btn:disabled:not(.sel) { opacity: .4; }

.buffs { display: flex; flex-direction: column; gap: 4px; margin-top: 6px; }
.buffs span { align-self: flex-start; font-size: 14px; font-weight: 700; padding: 1px 9px; border-radius: 20px;
  background: rgba(8,5,28,.7); border: 2px solid var(--c); color: var(--c); text-shadow: 0 0 6px var(--c); box-shadow: 0 0 8px var(--c); }
.tip { font-size: 14px; color: var(--muted); margin: -4px 0 8px; }
#weapon-count.full { color: var(--bad); font-weight: 800; }

.scores-panel { width: min(820px, 100%); }
.tabs { justify-content: center; margin-bottom: 12px; }
.scores-table table { width: 100%; border-collapse: collapse; font-size: 16px; }
.scores-table th { text-align: left; color: var(--magenta); font-family: var(--font-arcade); font-weight: 400; font-size: 8px; text-transform: uppercase; padding: 8px 6px; border-bottom: 2px solid var(--magenta); }
.scores-table td { padding: 7px 6px; border-bottom: 1px solid rgba(58,47,138,.7); vertical-align: top; font-weight: 700; }
.scores-table tr.me td { background: rgba(255,225,77,.14); box-shadow: inset 0 0 10px rgba(255,225,77,.15); }
.scores-table .rk { font-family: var(--font-arcade); font-size: 11px; color: var(--accent); width: 40px; text-shadow: 0 0 6px rgba(255,225,77,.7); }
.scores-table .pts { font-family: var(--font-arcade); font-size: 11px; color: var(--cyan); text-shadow: 0 0 6px rgba(25,240,255,.7); }
.scores-table .names span { display: inline-block; margin-right: 8px; white-space: nowrap; }
.scores-table .names i { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 4px; box-shadow: 0 0 6px currentColor; }
.scores-table .win { color: var(--good); }
.scores-empty { text-align: center; color: var(--muted); padding: 24px; }
.support-hint { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 10px; margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--line); color: var(--muted); }
.support-hint p { margin: 0; }
.support-hint.due { flex-direction: column; color: var(--text); text-align: center; border: 2px solid var(--accent); border-radius: 10px; padding: 12px; box-shadow: 0 0 14px rgba(255,225,77,.45); }
.over-score { font-family: var(--font-arcade); font-size: 16px; line-height: 1.5; color: var(--accent); margin: 0 0 6px; text-shadow: 0 0 10px rgba(255,225,77,.8); }
@media (max-width: 560px) { .scores-table .opt { display: none; } }

/* ---------- Splash ---------- */
#splash {
  position: fixed; inset: 0; z-index: 10000; overflow: hidden; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: linear-gradient(#07031a 0%, #1a0838 55%, #3a0a52 100%);
  transition: opacity .6s ease, transform .6s ease;
}
#splash.out { opacity: 0; transform: scale(1.06); pointer-events: none; }
#splash-bg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
#splash::after { /* eigene Scanlines, liegt ueber dem Splash */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(to bottom, rgba(0,0,0,.2) 0, rgba(0,0,0,.2) 1px, transparent 1px, transparent 3px);
}
.splash-title { position: relative; z-index: 1; margin: 0; text-align: center; line-height: 1.2; font-family: var(--font-arcade); font-weight: 400; padding: 0 8px; }
.splash-row { display: block; white-space: nowrap; }
.splash-row.r1 { font-size: clamp(20px, 7.6vw, 78px); color: #ffe14d; letter-spacing: 2px; }
.splash-row.r2 { font-size: clamp(26px, 10.4vw, 108px); color: #8cfaff; letter-spacing: 6px; margin-top: .25em; }
.splash-row i {
  font-style: normal; display: inline-block; opacity: 0; transform: translateY(-120vh) scale(2.4);
  animation: letter-in .7s cubic-bezier(.2, 1.4, .4, 1) forwards; animation-delay: calc(var(--i) * 85ms + 300ms);
}
.r1 i { text-shadow: 0 0 4px #fff3a0, 0 0 14px #ffb300, 0 0 34px #ff7a00, 0 5px 0 #8a3b00; }
.r2 i { text-shadow: 0 0 4px #d8ffff, 0 0 14px #19f0ff, 0 0 36px #1a7bff, 0 5px 0 #0a3b7a; }
@keyframes letter-in {
  0% { opacity: 0; transform: translateY(-120vh) scale(2.4); }
  60% { opacity: 1; transform: translateY(8px) scale(1); }
  75% { opacity: .5; } 82% { opacity: 1; } 90% { opacity: .7; } 100% { opacity: 1; transform: none; }
}
.splash-title.pulse { animation: title-pulse 2.4s ease-in-out infinite; }
@keyframes title-pulse { 50% { filter: brightness(1.35) drop-shadow(0 0 18px rgba(255,43,214,.7)); } }
.splash-tag { position: relative; z-index: 1; margin: 22px 0 0; font-family: var(--font-arcade); font-size: clamp(8px, 2.2vw, 13px); color: var(--magenta);
  text-shadow: 0 0 8px var(--magenta); letter-spacing: 3px; text-align: center; opacity: 0; transition: opacity .8s; }
.splash-tag.show { opacity: 1; }
.splash-start { position: absolute; z-index: 1; left: 0; right: 0; bottom: max(8vh, 40px); text-align: center; padding: 0 12px; opacity: 0; transition: opacity .6s; }
.splash-start.show { opacity: 1; }
.splash-start b { display: block; font-family: var(--font-arcade); font-weight: 400; font-size: clamp(14px, 3.6vw, 26px); color: #fff;
  text-shadow: 0 0 6px var(--cyan), 0 0 18px var(--cyan); animation: blink 1.1s steps(2, jump-none) infinite; }
.splash-start small { display: block; margin-top: 12px; font-size: clamp(14px, 3vw, 18px); color: var(--muted); letter-spacing: 1px; }
@keyframes blink { 0% { opacity: 1; } 100% { opacity: .15; } }

@media (prefers-reduced-motion: reduce) {
  .logo, .logo span, .btn.primary, #hud-time.low, #hud-xb.drop b, .splash-start b, .splash-title.pulse { animation: none !important; }
  .splash-row i { animation: none !important; opacity: 1; transform: none; }
  #splash, #splash.out { transition-duration: .01s; transform: none; }
  .splash-tag, .splash-start { transition: none; }
}

/* Controller-Fokus: deutlich sichtbar, auch ohne :focus-visible */
body.pad-nav button:focus, body.pad-nav [data-nav]:focus, body.pad-nav input:focus {
  outline: 3px solid #fff; outline-offset: 3px;
  box-shadow: 0 0 0 6px var(--magenta), 0 0 24px 8px rgba(255,43,214,.8);
  transform: scale(1.04);
  position: relative; z-index: 2;
}
body.pad-nav .card:focus-within { border-color: #fff; box-shadow: 0 0 22px rgba(255,43,214,.7); }
.pad-hint { font-size: 13px; color: var(--muted); display: flex; gap: 6px 10px; flex-wrap: wrap; align-items: center; }
.pad-hint b { color: var(--cyan); font-family: var(--font-arcade); font-size: 11px; }

/* ---------- Lokaler Mehrspieler ---------- */
.coop-panel { width: min(900px, 100%); }
.coop-keys { display: flex; flex-wrap: wrap; gap: 6px 18px; justify-content: center; font-size: 14px; color: var(--muted); margin-bottom: 14px; }
.coop-keys b { color: var(--cyan); }
.coop-slots { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
@media (max-width: 760px) { .coop-slots { grid-template-columns: repeat(2, 1fr); } }
.coop-slot { border: 3px dashed var(--line); border-radius: 14px; padding: 12px 8px; text-align: center; min-height: 190px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; background: rgba(0,0,0,.25); }
.coop-slot.on { border-style: solid; border-color: var(--pc, var(--cyan)); box-shadow: 0 0 18px var(--pc, var(--cyan)); }
.coop-slot.ready { background: rgba(61,255,138,.12); }
.coop-slot canvas { width: 72px; height: 72px; }
.coop-slot .dev { font-size: 12px; color: var(--muted); }
.coop-slot .pn { font-family: var(--font-arcade); font-size: 11px; color: var(--pc, var(--text)); }
.coop-slot .bn { font-weight: 700; }
.coop-slot .st { font-size: 13px; font-weight: 700; }
.coop-slot.ready .st { color: var(--good); }
.coop-slot .x { font-size: 12px; padding: 3px 8px; }
.hud-coop { position: absolute; left: 12px; top: max(10px, env(safe-area-inset-top)); display: flex; flex-wrap: wrap; gap: 8px; max-width: calc(100% - 240px); }
.hud-coop .pc { background: rgba(10,8,30,.75); border: 2px solid var(--pc); border-radius: 10px; padding: 5px 8px; min-width: 150px;
  box-shadow: 0 0 10px var(--pc); font-size: 13px; }
.hud-coop .pc.dead { opacity: .45; }
.hud-coop .pc .top { display: flex; justify-content: space-between; gap: 8px; font-weight: 700; }
.hud-coop .pc .hpb { height: 8px; background: #000; border-radius: 4px; overflow: hidden; margin: 3px 0; }
.hud-coop .pc .hpb div { height: 100%; background: var(--bad); }
.hud-coop .pc .xpb { height: 4px; background: #000; border-radius: 2px; overflow: hidden; }
.hud-coop .pc .xpb div { height: 100%; background: #5fa8e8; }
.hud-coop .pc .bf { font-size: 11px; color: var(--muted); margin-top: 2px; }
@media (max-width: 560px) { .hud-coop { max-width: 100%; top: 70px; } .hud-coop .pc { min-width: 120px; } }
.shop-who { display: inline-block; padding: 2px 10px; border-radius: 8px; border: 2px solid var(--pc); color: var(--pc); margin-left: 8px; font-size: .8em; }

/* Scrollbalken im Neon-Design */
* { scrollbar-width: thin; scrollbar-color: var(--cyan) rgba(10, 8, 32, .7); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: rgba(10, 8, 32, .7); border-radius: 10px; box-shadow: inset 0 0 0 1px rgba(25, 240, 255, .15); }
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--cyan), var(--magenta)); border-radius: 10px;
  border: 2px solid rgba(10, 8, 32, .9); box-shadow: 0 0 8px rgba(25, 240, 255, .6);
}
::-webkit-scrollbar-thumb:hover { background: linear-gradient(180deg, #8ffcff, #ff7be6); }
::-webkit-scrollbar-corner { background: transparent; }

/* ---------- Bildschirmtastatur (osk.js) ---------- */
.osk {
  position: fixed; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center;
  padding: max(10px, env(safe-area-inset-top)) 8px max(10px, env(safe-area-inset-bottom));
  background: rgba(5, 3, 20, .92); overflow-y: auto;
}
.osk-panel {
  width: min(640px, 100%); margin: auto; padding: 16px 14px 12px; text-align: center;
  background: linear-gradient(180deg, rgba(26,20,72,.97), rgba(16,12,46,.97));
  border: 2px solid var(--magenta); border-radius: 14px;
  box-shadow: 0 0 14px rgba(255,43,214,.6), 0 0 40px rgba(25,240,255,.25), inset 0 0 22px rgba(255,43,214,.12);
}
.osk-title { margin: 0 0 10px; }
.osk-disp {
  min-height: 44px; margin-bottom: 12px; padding: 10px 12px; border: 2px solid var(--cyan); border-radius: 8px;
  background: #07051a; color: var(--cyan); font-family: var(--font-arcade); font-size: clamp(12px, 3.6vw, 16px);
  line-height: 1.4; letter-spacing: 2px; text-align: left; white-space: pre; overflow: hidden;
  box-shadow: 0 0 10px rgba(25,240,255,.4), inset 0 0 10px rgba(0,0,0,.6);
}
.osk-cursor { color: var(--accent); animation: osk-blink 1s steps(1) infinite; }
@keyframes osk-blink { 50% { opacity: 0; } }
.osk-grid { display: grid; grid-template-columns: repeat(10, 1fr); gap: 5px; }
.osk-key {
  min-height: 44px; min-width: 0; padding: 0 2px; cursor: pointer;
  font-family: var(--font-arcade); font-size: clamp(10px, 3vw, 14px); color: var(--cyan); background: #120d3a;
  border: 2px solid var(--line); border-radius: 7px; text-shadow: 0 0 6px rgba(25,240,255,.7);
  box-shadow: inset 0 0 8px rgba(25,240,255,.12), 0 3px 0 #050318;
}
.osk-key:hover { background: #1b1458; border-color: var(--cyan); }
.osk-key:active { transform: translateY(2px); box-shadow: none; }
.osk-wide { font-size: clamp(8px, 2.4vw, 11px); text-transform: uppercase; }
.osk-key.on { background: #3a1a6a; border-color: var(--magenta); color: #ffd0f5; }
.osk-ok { color: #1b0a00; background: linear-gradient(#fff07a, #ffb400); border-color: #fff3a0; text-shadow: none; }
.osk-ok:hover { background: linear-gradient(#fff9b0, #ffc933); }
.osk-cancel { color: var(--bad); border-color: var(--bad); text-shadow: 0 0 6px rgba(255,74,110,.7); }
.osk button:focus, .osk-key:focus-visible {
  outline: 3px solid #fff; outline-offset: 2px; position: relative; z-index: 2; transform: scale(1.06);
  box-shadow: 0 0 0 4px var(--magenta), 0 0 20px 6px rgba(255,43,214,.8);
}
.osk-hint { margin-top: 10px; font-size: 13px; color: var(--muted); line-height: 1.4; }
@media (max-width: 400px) { .osk-grid { gap: 3px; } .osk-key { min-height: 40px; } .osk-panel { padding: 12px 8px 10px; } }

/* ---------- Konto ---------- */
.title-panel { width: min(860px, 100%); }
.acct-bar { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); min-height: 44px; }
.acct-side { display: flex; align-items: center; gap: 8px; min-width: 0; flex-wrap: wrap; }
#acct-right { justify-content: flex-end; }
.acct-me { all: unset; display: inline-flex; align-items: center; gap: 8px; cursor: pointer; padding: 3px 12px 3px 3px; border: 2px solid var(--cyan); border-radius: 26px; box-shadow: 0 0 8px rgba(25,240,255,.35); font-weight: 700; color: var(--text); max-width: 100%; }
.acct-me:hover, .acct-me:focus-visible { background: rgba(25,240,255,.14); box-shadow: 0 0 12px rgba(25,240,255,.7); }
.acct-pic { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; flex: none; display: inline-flex; align-items: center; justify-content: center; background: var(--panel2); font-size: 20px; overflow: hidden; }
.acct-who { display: flex; flex-direction: column; line-height: 1.1; min-width: 0; }
.acct-who b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct-who small { color: var(--muted); font-weight: 500; font-size: 12px; }
.play-tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 10px; }
.play-tabs .btn { padding: 12px 8px; font-size: 11px; line-height: 1.4; white-space: normal; animation: none; }
.play-tabs .btn.sel { background: linear-gradient(#fff07a, #ffb400); color: #1b0a00; border-color: #fff3a0; text-shadow: none; }
.play-panel { margin-top: 10px; padding: 4px 16px 16px; border: 2px solid var(--line); border-radius: 12px; background: rgba(10, 8, 32, .45); }
.play-go .btn { min-width: min(320px, 100%); }
.play-join { margin-top: 10px; border-top: 1px solid var(--line); text-align: center; }
.play-join .row.join { margin-top: 0; }
.play-join .online-box { text-align: left; margin-top: 12px; }
.play-continue:has(.hidden) { display: none; }
.title-menu { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 8px; margin-top: 6px; }
.title-menu .btn { display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 11px; padding: 11px 8px; text-align: center; text-decoration: none; }
@media (max-width: 560px) {
  .acct-bar { grid-template-columns: 1fr auto; }
  .acct-bar #acct-left { grid-column: 1 / -1; }
  .play-tabs .btn { font-size: 9px; padding: 10px 4px; }
  .play-panel { padding: 2px 10px 12px; }
  .title-menu { grid-template-columns: 1fr 1fr; }
}
.acct-bar .btn { padding: 7px 11px; font-size: 10px; }
.acct-bar .hint { animation: acctNudge 2.4s ease-in-out infinite; }
@keyframes acctNudge { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(-5px); } }
@media (prefers-reduced-motion: reduce) { .acct-bar .hint { animation: none; } }
.acct-bar b { color: var(--cyan); }
.account-panel { text-align: left; }
.account-panel h2, .account-panel .sub { text-align: center; }
.acct-form { display: flex; flex-direction: column; gap: 10px; }
.acct-form label { display: flex; flex-direction: column; gap: 4px; font-weight: 700; }
.acct-form label small { color: var(--muted); font-weight: 500; }
.acct-form input { width: 100%; }
.acct-form .ok { color: var(--good); }
/* ---------- Welten ---------- */
.world-row { grid-column: 1 / -1; }
.world-desc { color: var(--muted); font-size: 14px; margin: 6px 0 0; min-height: 1.2em; }
.seg .btn.locked { opacity: .5; }
.coop-slot .coop-name { width: 100%; max-width: 160px; text-align: center; padding: 5px 8px; font-size: 14px; }
.coop-slot .ytip { font-size: 11px; color: var(--muted); }

.diag { position: absolute; left: 12px; bottom: 12px; margin: 0; padding: 8px 10px; background: rgba(5,4,20,.8); border: 1px solid var(--cyan);
  border-radius: 8px; font: 12px/1.4 ui-monospace, monospace; color: #bff0ff; pointer-events: none; }
.ds .neg { color: var(--bad); }
.ds .pos { color: var(--good); }

/* Endboss-Lebensleiste */
.hud-boss { position: absolute; left: 50%; transform: translateX(-50%); top: calc(max(10px, env(safe-area-inset-top)) + 72px);
  width: min(560px, 70vw); text-align: center; }
.hud-boss .bn { font-family: var(--font-arcade); font-size: 12px; color: var(--accent); text-shadow: 0 0 8px rgba(255,158,44,.8); margin-bottom: 4px; }
.hud-boss .bb { height: 14px; background: #0b0820; border: 2px solid var(--accent); border-radius: 7px; overflow: hidden; box-shadow: 0 0 12px rgba(255,158,44,.6); }
.hud-boss .bb div { height: 100%; background: linear-gradient(90deg, #ff4a6e, #ff9e2c); transition: width .15s; }
@media (max-width: 560px) { .hud-boss { top: 70px; width: 86vw; } }
/* Werkstatt: Werte kompakt unter den Angeboten */
.stats-wide { grid-template-columns: repeat(4, minmax(0, 1fr) auto); column-gap: 14px; row-gap: 3px; }
@media (max-width: 1000px) { .stats-wide { grid-template-columns: repeat(3, minmax(0, 1fr) auto); } }
@media (max-width: 640px) { .stats-wide { grid-template-columns: repeat(2, minmax(0, 1fr) auto); } }

/* Ansager: großer Schriftzug wie in Arena-Shootern */
.announce { position: fixed; left: 0; right: 0; top: 26%; text-align: center; pointer-events: none; z-index: 20; }
.announce span { display: inline-block; font-family: var(--font-arcade); font-size: clamp(26px, 6vw, 64px); color: var(--ac, #9fe8ff);
  text-shadow: 0 0 12px var(--ac, #9fe8ff), 0 0 32px var(--ac, #9fe8ff), 0 4px 0 #0b0820; letter-spacing: 3px;
  animation: announceIn 2s ease-out forwards; }
.announce small { display: block; font-family: var(--font-arcade); font-size: clamp(12px, 2vw, 18px); color: #fff; margin-top: 10px; animation: announceIn 2s ease-out forwards; }
@keyframes announceIn {
  0% { transform: scale(2.6); opacity: 0; filter: blur(6px); }
  12% { transform: scale(0.92); opacity: 1; filter: blur(0); }
  20% { transform: scale(1.05); }
  28% { transform: scale(1); }
  80% { opacity: 1; }
  100% { transform: scale(1.08); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) { .announce span, .announce small { animation: none; } }
#hud-time.frozen { color: #9fe8ff; text-shadow: 0 0 10px #9fe8ff, 0 0 22px #5fd3ff; }

/* Warnung bei wenig Leben: roter Puls am Bildschirmrand */
body.lowhp::after {
  content: ''; position: fixed; inset: 0; pointer-events: none; z-index: 4;
  box-shadow: inset 0 0 90px 20px rgba(255, 40, 70, .55);
  animation: lowhpPulse 0.9s ease-in-out infinite;
}
@keyframes lowhpPulse { 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { body.lowhp::after { animation: none; } }
/* Wagnis-Level-Up: Malus rot */
.card.level .malus { color: #ff6b7d; font-weight: 700; font-size: 13px; margin-top: 2px; }
/* Werte in der Werkstatt: drei Spalten (Grundwerte | Chancen | Trefferstärke) */
.stat-cols { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px 20px; align-items: start; }
.stat-cols h4 { margin: 0 0 4px; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.stat-cols .stats { font-size: 14px; }
@media (max-width: 900px) { .stat-cols { grid-template-columns: 1fr 1fr; } }
@media (max-width: 460px) { .stat-cols { grid-template-columns: 1fr; } }
/* Erste-Hilfe-Punkte im HUD */
.medpts { font-family: var(--font-arcade); font-size: 12px; color: #5ee36a; text-shadow: 0 0 8px rgba(94,227,106,.8), 0 2px 2px #000; }

/* Online-Spieler (Titel und Lobby) */
.online-box { margin: 8px 0; padding: 8px 10px; border: 2px solid var(--line); border-radius: 12px; background: rgba(10, 8, 32, .5); font-size: 14px; }
.online-box .on-head { font-weight: 700; margin-bottom: 4px; }
.online-box .on-head small, .online-box .on-row small { color: var(--muted); font-weight: 500; }
.online-box .on-row { display: flex; align-items: center; gap: 8px; padding: 3px 0; flex-wrap: wrap; }
.online-box .on-row .dot { width: 8px; height: 8px; border-radius: 50%; background: #3dff8a; box-shadow: 0 0 6px #3dff8a; }
.online-box .on-row .btn { margin-left: auto; }
.online-box .on-note { display: block; margin-top: 4px; color: var(--muted); }
.online-box > small { color: var(--muted); }
/* Hinweisfenster: Einladungen und Beitrittsanfragen */
.notices { position: fixed; top: 12px; left: 50%; transform: translateX(-50%); z-index: 50; display: flex; flex-direction: column; gap: 8px; width: min(420px, calc(100vw - 32px)); }
.notice { padding: 12px 14px; border: 2px solid var(--accent); border-radius: 12px; background: rgba(16, 10, 48, .96); box-shadow: 0 0 18px rgba(255, 225, 77, .35); font-size: 15px; }
.notice .row { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.notice kbd { font-size: 10px; opacity: .7; margin-left: 4px; font-family: inherit; }

/* Nachrichten an den Admin */
.msg-panel textarea { width: 100%; box-sizing: border-box; margin-top: 8px; padding: 10px; border-radius: 10px; border: 2px solid var(--line);
  background: rgba(10, 8, 32, .7); color: inherit; font: inherit; font-size: 15px; resize: vertical; }
.msg-mine { margin-top: 12px; max-height: 260px; overflow-y: auto; text-align: left; }
.msg-mine h3 { font-size: 14px; margin: 0 0 6px; }
.msg-item { padding: 8px 10px; margin-bottom: 8px; border: 2px solid var(--line); border-radius: 10px; font-size: 14px; }
.msg-item.done { opacity: .7; }
.msg-head { color: var(--muted); font-size: 12px; margin-bottom: 4px; }
.msg-text { white-space: pre-wrap; }
.msg-reply { margin-top: 6px; padding: 6px 8px; border-left: 3px solid var(--good); background: rgba(61, 255, 138, .08); border-radius: 6px; white-space: pre-wrap; }
.badge { display: inline-block; min-width: 18px; padding: 0 5px; margin-left: 4px; border-radius: 9px; background: var(--bad); color: #fff; font-size: 12px; line-height: 18px; }
/* Neuigkeiten */
.news-panel { max-width: 560px; }
.news-list { text-align: left; margin: 8px 0 12px; font-size: 15px; line-height: 1.4; max-height: 55vh; overflow-y: auto; }
.news-list ul { padding-left: 18px; margin: 4px 0 10px; }
.news-list li { margin-bottom: 8px; }
.news-list h3 { margin: 8px 0 4px; }
.btn.continue { width: 100%; font-size: 13px; padding: 15px 14px; line-height: 1.5; }
.btn.continue small { display: block; font-family: var(--font-ui); font-weight: 700; font-size: 15px; text-transform: none; letter-spacing: 0; }
.news-hide { display: flex; align-items: center; gap: 8px; justify-content: center; font-size: 14px; color: var(--muted); margin-bottom: 8px; }

/* Testarena-Panel (nur Admins) */
.test-panel { position: fixed; left: 10px; top: 120px; z-index: 30; width: 260px; max-height: calc(100vh - 140px); overflow-y: auto; padding: 8px 10px;
  border: 2px solid var(--line); border-radius: 12px; background: rgba(10, 8, 32, .9); font-size: 13px; }
.test-panel .tp-head { display: flex; justify-content: space-between; align-items: center; }
.test-panel .tp-sec { margin: 8px 0 4px; font-weight: 700; color: var(--muted); font-size: 12px; text-transform: uppercase; }
.test-panel .tp-w { display: flex; gap: 4px; margin-bottom: 3px; }
.lab-tiers { display: grid; grid-template-columns: 1fr auto auto; gap: 2px 8px; font-size: 13px; font-weight: 700; margin-bottom: 4px; }
.lab-tiers small { color: var(--muted); font-weight: 500; text-align: right; }
.test-panel.is-lab .tp-test-only { display: none; }
.test-panel select { flex: 1; min-width: 0; font-size: 12px; padding: 2px; background: #120d3a; color: inherit; border: 1px solid var(--line); border-radius: 6px; }
.test-panel .tp-stats { display: grid; grid-template-columns: 1fr; gap: 2px; }
.test-panel .tp-stats label { display: flex; justify-content: space-between; align-items: center; gap: 6px; }
.test-panel .tp-stats input { width: 70px; padding: 2px 4px; font-size: 12px; }
.test-panel .row { display: flex; gap: 6px; margin-top: 6px; flex-wrap: wrap; }
.test-panel .tp-hint { color: var(--muted); font-size: 11px; margin: 6px 0 0; }
.test-panel .tp-def { display: grid; grid-template-columns: auto 1fr; gap: 2px 8px; margin: 4px 0 6px; font-size: 12px; }
.test-panel .tp-def b { text-align: right; }
.test-panel .tp-def .pos { color: var(--good); } .test-panel .tp-def .neg { color: var(--bad); }
.test-panel .tp-wave { display: flex; justify-content: space-between; align-items: center; gap: 6px; }
.test-panel .tp-wave input { width: 60px; padding: 2px 4px; font-size: 12px; }

/* ---------- Achievements und Profile ---------- */
.plink { all: unset; cursor: pointer; display: inline-flex; align-items: center; gap: 5px; margin-right: 8px; font-weight: 700; color: var(--text); }
.plink:hover, .plink:focus-visible { color: var(--cyan); text-decoration: underline; }
body.pad-nav .plink:focus { outline: 2px solid #fff; }
.scores-table .names .plink i { margin-right: 0; }
.mini-av { width: 22px; height: 22px; border-radius: 50%; object-fit: cover; border: 1px solid var(--cyan); vertical-align: middle; }
.crown { display: block; filter: drop-shadow(0 0 5px rgba(255, 210, 63, .7)); }
.crown.mini { width: 19px; height: 13px; }
.crown.big { position: absolute; left: 50%; top: -30px; width: 68px; height: 47px; transform: translateX(-50%) rotate(-7deg); z-index: 1; }

.ach-panel, .profile-panel { width: min(900px, 100%); }
.ach-head { display: flex; align-items: center; gap: 18px; justify-content: center; flex-wrap: wrap; margin: 6px 0 12px; }
.ach-ring { width: 104px; height: 104px; flex: none; }
.ach-ring circle { fill: none; stroke-width: 9; }
.ach-ring .bg { stroke: rgba(58, 47, 138, .8); }
.ach-ring .fg { stroke: var(--accent); stroke-linecap: round; filter: drop-shadow(0 0 5px rgba(255, 225, 77, .8)); }
.ach-ring text { fill: var(--text); text-anchor: middle; font-family: var(--font-ui); font-weight: 700; }
.ach-ring .big { font-size: 30px; }
.ach-ring .small { font-size: 13px; fill: var(--muted); }
.ach-points { font-family: var(--font-arcade); font-size: 20px; color: var(--accent); text-shadow: 0 0 10px rgba(255, 225, 77, .7); }
.ach-points small { font-size: 9px; color: var(--muted); text-shadow: none; }
.ach-tiers { display: flex; gap: 6px 12px; flex-wrap: wrap; margin-top: 8px; font-weight: 700; font-size: 15px; }
.ach-tiers .t-bronze { color: #e5a06a; } .ach-tiers .t-silber { color: #d5dde8; } .ach-tiers .t-gold { color: #ffd23f; } .ach-tiers .t-platin { color: #8ff6ff; }
.ach-guest { color: var(--cyan); margin: 8px 0 0; font-size: 15px; }
.ach-rank { font-weight: 700; color: var(--cyan); margin-top: 6px; font-size: 16px; }
.ach-rank small { display: block; font-weight: 500; color: var(--muted); font-size: 13px; }
.ach-rank .ach-bar { max-width: 280px; }
.ach-section { grid-column: 1 / -1; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 8px; font-weight: 700; font-size: 16px; color: var(--accent); }
.ach-section:first-child { margin-top: 0; }
.ach-section small { color: var(--muted); font-weight: 500; font-size: 13px; }
.area-bars { display: grid; grid-template-columns: repeat(auto-fill, minmax(215px, 1fr)); gap: 6px 14px; margin-bottom: 10px; font-size: 13px; }
.area-bars span { display: flex; justify-content: space-between; color: var(--muted); }
.users-tools { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; align-items: center; margin-bottom: 6px; }
.users-tools input { flex: 1 1 160px; max-width: 240px; padding: 6px 10px; }
.scores-table .on { color: var(--good); }
.ach-tabs { justify-content: center; margin-bottom: 12px; }
.ach-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(255px, 1fr)); gap: 9px; }

.t-bronze { --m1: #ffd6ab; --m2: #b5692b; --m3: #5f3213; --glow: rgba(229, 138, 70, .55); }
.t-silber { --m1: #ffffff; --m2: #a5b3c4; --m3: #4a5667; --glow: rgba(205, 222, 240, .5); }
.t-gold { --m1: #fff7b8; --m2: #f4b81f; --m3: #8a5400; --glow: rgba(255, 205, 50, .7); }
.t-platin { --m1: #ffffff; --m2: #7ff5ff; --m3: #b05cff; --glow: rgba(140, 245, 255, .75); }
.ach { position: relative; display: flex; align-items: center; gap: 11px; padding: 9px 11px; border-radius: 12px; background: linear-gradient(135deg, rgba(40, 32, 105, .9), rgba(16, 12, 48, .95)); border: 1px solid rgba(58, 47, 138, .9); overflow: hidden; }
.ach.got { border-color: var(--m2); box-shadow: inset 0 0 18px -8px var(--glow), 0 0 9px -3px var(--glow); }
.ach.locked { background: rgba(14, 11, 38, .85); }
.medal { position: relative; flex: none; width: 58px; height: 64px; }
.medal::before, .medal-in { position: absolute; clip-path: polygon(50% 0, 96% 25%, 96% 75%, 50% 100%, 4% 75%, 4% 25%); }
.medal::before { content: ""; inset: 0; background: linear-gradient(145deg, var(--m1), var(--m2) 48%, var(--m3)); }
.medal-in { inset: 5px; display: flex; align-items: center; justify-content: center; font-size: 25px; background: radial-gradient(circle at 35% 25%, rgba(255, 255, 255, .28), transparent 45%), linear-gradient(160deg, var(--m3), #171036 80%); }
.ach.got .medal { filter: drop-shadow(0 0 6px var(--glow)); }
.ach.got.t-gold .medal::after, .ach.got.t-platin .medal::after { content: ""; position: absolute; inset: 0; clip-path: polygon(50% 0, 96% 25%, 96% 75%, 50% 100%, 4% 75%, 4% 25%); background: linear-gradient(115deg, transparent 38%, rgba(255, 255, 255, .65) 50%, transparent 62%); background-size: 260% 100%; animation: medalSheen 5.5s ease-in-out infinite; }
@keyframes medalSheen { 0%, 62% { background-position: 130% 0; } 100% { background-position: -60% 0; } }
.ach.locked .medal { filter: grayscale(1) brightness(.55); }
.medal-lock { position: absolute; right: -2px; bottom: 0; font-size: 15px; filter: grayscale(0); }
.ach-txt { min-width: 0; flex: 1; }
.ach-tier { font-family: var(--font-arcade); font-size: 7px; text-transform: uppercase; letter-spacing: 1px; color: var(--m2); }
.ach-name { font-weight: 700; font-size: 17px; line-height: 1.15; margin-top: 2px; }
.ach.locked .ach-name { color: var(--muted); }
.ach-desc { font-size: 14px; line-height: 1.15; color: var(--muted); }
.ach-date { font-size: 13px; color: var(--good); margin-top: 2px; }
.ach-bar { height: 6px; border-radius: 4px; background: rgba(58, 47, 138, .75); margin-top: 5px; overflow: hidden; }
.ach-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--m3), var(--m2)); border-radius: 4px; }
.ach-num { font-size: 12px; color: var(--muted); margin-top: 1px; }

.ach-pop { position: fixed; left: 50%; top: max(14px, env(safe-area-inset-top)); z-index: 8000; display: flex; align-items: center; gap: 12px; width: min(420px, calc(100vw - 24px)); padding: 10px 16px 10px 10px; pointer-events: none; overflow: hidden; border-radius: 14px; border: 2px solid var(--m2); background: linear-gradient(135deg, #2a1f73, #120c35); box-shadow: 0 0 26px var(--glow); opacity: 0; transform: translate(-50%, -130%) scale(.9); transition: transform .38s cubic-bezier(.2, 1.4, .4, 1), opacity .25s; }
.ach-pop.show { opacity: 1; transform: translate(-50%, 0) scale(1); }
.ach-pop .ach { padding: 0; background: none; border: 0; box-shadow: none; overflow: visible; }
.pop-rays { position: absolute; left: 39px; top: 50%; width: 300px; height: 300px; margin: -150px 0 0 -150px; background: repeating-conic-gradient(var(--glow) 0 12deg, transparent 12deg 30deg); opacity: .35; animation: popRays 7s linear infinite; }
@keyframes popRays { to { transform: rotate(360deg); } }
.pop-txt { position: relative; display: flex; flex-direction: column; min-width: 0; line-height: 1.15; }
.pop-txt small { font-family: var(--font-arcade); font-size: 7px; color: var(--m2); margin-bottom: 4px; line-height: 1.3; }
.pop-txt b { font-size: 20px; }
.pop-txt span { font-size: 14px; color: var(--muted); }

.p-head { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; padding-top: 26px; }
.p-avatar { position: relative; flex: none; }
.p-pic { width: 112px; height: 112px; border-radius: 50%; overflow: hidden; border: 3px solid var(--cyan); box-shadow: 0 0 18px rgba(25, 240, 255, .55); background: var(--panel2); display: flex; align-items: center; justify-content: center; }
.p-pic img, .p-pic canvas { width: 100%; height: 100%; object-fit: cover; display: block; }
.p-who h2 { margin: 0; text-align: left; }
.p-crown { font-weight: 700; margin-top: 4px; }
.p-meta { color: var(--muted); margin-top: 3px; }
.p-seen .on { color: var(--good); font-weight: 700; }
.p-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(135px, 1fr)); gap: 8px; margin-top: 14px; }
.p-tile { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 9px 5px; border-radius: 10px; background: var(--panel2); border: 1px solid var(--line); }
.p-tile span { font-size: 20px; }
.p-tile b { font-size: 21px; color: var(--cyan); line-height: 1.2; }
.p-tile b em { font-size: 13px; font-style: normal; color: var(--muted); }
.p-tile small { font-size: 13px; color: var(--muted); line-height: 1.1; }
.profile-panel h3 { margin: 16px 0 7px; }
.profile-panel h3 small { color: var(--muted); }
.p-list { display: flex; flex-direction: column; gap: 5px; }
.p-row { display: flex; align-items: center; gap: 10px; padding: 5px 9px; border-radius: 9px; background: var(--panel2); flex-wrap: wrap; }
.p-ic canvas { display: block; width: 40px; height: 40px; }
.p-main { flex: 1 1 150px; min-width: 120px; }
.p-main small { color: var(--accent); margin-left: 4px; }
.p-bar { height: 7px; margin-top: 4px; border-radius: 4px; background: rgba(8, 5, 28, .8); overflow: hidden; }
.p-bar i { display: block; height: 100%; border-radius: 4px; background: linear-gradient(90deg, var(--magenta), var(--cyan)); }
.p-nums { display: flex; gap: 4px 13px; flex-wrap: wrap; font-size: 14px; color: var(--muted); }
.p-nums b { color: var(--text); font-size: 16px; }
.p-best { display: flex; gap: 8px 22px; flex-wrap: wrap; margin-bottom: 7px; }
.p-best small { color: var(--muted); }
.p-medals { display: flex; flex-wrap: wrap; gap: 5px; }
.p-medals .ach { padding: 0; background: none; border: 0; box-shadow: none; overflow: visible; }
.p-medals .medal { width: 42px; height: 47px; }
.p-medals .medal-in { font-size: 17px; inset: 4px; }
@media (prefers-reduced-motion: reduce) { .pop-rays, .medal::after { animation: none !important; } }
