/* WURM – eigenes Blatt.
   Wie bei Revier fehlt die gemeinsame Lobby-Basis mit Absicht: dieses Spiel
   hat keine Lobby, keine vier Bildschirme und keine Raumliste. Uebernommen
   ist nur die Farbwelt der anderen Spiele, damit die Seite dazugehoert –
   hier ins Kuehle gedreht, weil die Schlangen selbst die bunten sind. */

:root {
  --bg: #050a12;
  --bg2: #0a1422;
  --panel: rgba(14, 28, 46, .82);
  --line: rgba(90, 200, 255, .18);
  --ink: #eaf6ff;
  --muted: #7fa0bd;
  --akzent: #35e6ff;
  --akzent2: #52ffa8;
  --gold: #ffd447;
  --bad: #ff4d5e;
  --r: 14px;
  --shadow: 0 10px 30px rgba(0, 0, 0, .55);
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; overflow: hidden; }
body {
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.45 system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-tap-highlight-color: transparent;
  -webkit-user-select: none; user-select: none;
  touch-action: none;
  overscroll-behavior: none;
}

/* Fadenkreuz statt Pfeil: mit der Maus wird gezielt, und die Spitze des
   Zeigepfeils sitzt nicht dort, wo man sie vermutet. */
#feld {
  position: fixed; inset: 0; width: 100%; height: 100%; display: block;
  cursor: crosshair;
}

/* ── Meldungsstreifen ───────────────────────────────────────────────────── */
#status {
  position: fixed; top: 0; left: 0; right: 0; z-index: 60; text-align: center;
  font-size: 13px; color: var(--bg); background: var(--gold); padding: 2px 0;
}
#status:empty { display: none; }

/* ── Anzeige waehrend des Spiels ────────────────────────────────────────── */
#hud[hidden] { display: none; }

#eigen {
  position: fixed; z-index: 20;
  top: calc(env(safe-area-inset-top, 0px) + 10px); left: 12px;
  display: flex; flex-direction: column; line-height: 1.15;
  text-shadow: 0 2px 8px rgba(0, 0, 0, .8);
  pointer-events: none;
}
#eigenName { font-size: 13px; color: var(--muted); }
#eigenMasse { font-size: 30px; font-weight: 900; letter-spacing: -.02em; }
.klein { font-size: 12px; color: var(--muted); }

#bestenliste {
  position: fixed; z-index: 20;
  top: calc(env(safe-area-inset-top, 0px) + 10px); right: 12px;
  margin: 0; padding: 8px 10px; list-style: none;
  background: var(--panel); border: 1px solid var(--line); border-radius: 10px;
  font-size: 12px; min-width: 132px; backdrop-filter: blur(6px);
  pointer-events: none;
}
#bestenliste li {
  display: flex; align-items: center; gap: 6px;
  padding: 1px 0; white-space: nowrap;
}
#bestenliste li.ich { color: var(--gold); font-weight: 700; }
#bestenliste .punkt { width: 8px; height: 8px; border-radius: 50%; flex: none; }
#bestenliste .nam { flex: 1; overflow: hidden; text-overflow: ellipsis; }
#bestenliste .wert { color: var(--muted); font-variant-numeric: tabular-nums; }
#bestenliste li.ich .wert { color: var(--gold); }

#minikarte {
  position: fixed; z-index: 20;
  right: 12px; bottom: calc(env(safe-area-inset-bottom, 0px) + 92px);
  width: 88px; height: 88px;
  border: 1px solid var(--line); border-radius: 8px;
  background: rgba(5, 10, 18, .92); pointer-events: none;
}

/* Der Turboknopf wird gehalten, nicht getippt – deshalb gross und dort, wo
   der Daumen der rechten Hand ohnehin liegt. */
#turboBtn {
  position: fixed; z-index: 21;
  right: 12px; bottom: calc(env(safe-area-inset-bottom, 0px) + 12px);
  width: 72px; height: 72px; border-radius: 50%;
  background: rgba(53, 230, 255, .12); color: var(--akzent);
  border: 2px solid rgba(53, 230, 255, .45);
  font-size: 11px; font-weight: 800; letter-spacing: .08em;
}
#turboBtn.an {
  background: rgba(53, 230, 255, .38); color: #04121a;
  border-color: var(--akzent);
}

#hilfeBtn {
  position: fixed; z-index: 21;
  left: 12px; bottom: calc(env(safe-area-inset-bottom, 0px) + 12px);
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--panel); color: var(--muted);
  border: 1px solid var(--line); font-size: 17px; font-weight: 700;
}

/* ── Karten ueber der Welt ──────────────────────────────────────────────── */
#start, #hilfe, #tot {
  position: fixed; inset: 0; z-index: 40;
  display: flex; align-items: center; justify-content: center;
  padding: 18px; overflow: auto;
  background: radial-gradient(900px 700px at 50% 0%, rgba(10, 20, 34, .92), rgba(5, 10, 18, .95));
}
#start[hidden], #hilfe[hidden], #tot[hidden] { display: none; }
#tot { background: rgba(5, 10, 18, .55); pointer-events: none; }

.karte {
  width: 100%; max-width: 420px;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--r);
  box-shadow: var(--shadow); backdrop-filter: blur(10px);
  padding: 20px 18px;
  display: flex; flex-direction: column; gap: 12px;
  text-align: center;
}
#tot .karte { max-width: 320px; padding: 16px; }

.logo {
  margin: 0; font-size: clamp(40px, 12vw, 64px); font-weight: 900;
  letter-spacing: -.04em; line-height: .95;
  background: linear-gradient(100deg, #fff 5%, var(--akzent) 45%, var(--akzent2) 95%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.logo span { opacity: .9; }
.tag { margin: 0; color: var(--muted); font-size: 14px; }
.muted { color: var(--muted); }
h2 { margin: 0; font-size: 20px; }
#tot p { margin: 0; }

.feldname { font-size: 13px; color: var(--muted); text-align: left; }
input#name {
  width: 100%; padding: 13px 14px; font-size: 17px;
  background: rgba(0, 0, 0, .35); color: var(--ink);
  border: 1px solid var(--line); border-radius: 10px;
}
input#name:focus { outline: 2px solid var(--akzent); }

.btn {
  padding: 13px 16px; font-size: 16px; font-weight: 700;
  border: 1px solid var(--line); border-radius: 10px;
  background: rgba(255, 255, 255, .06); color: var(--ink);
}
.btn.primary {
  border: 0; color: #04121a;
  background: linear-gradient(100deg, var(--akzent), var(--akzent2));
  font-size: 18px; padding: 15px;
}
.btn:active { transform: translateY(1px); }

.regeln {
  margin: 4px 0 0; padding-left: 18px; text-align: left;
  font-size: 13.5px; color: var(--muted);
}
.regeln li { margin-bottom: 7px; }
.regeln b { color: var(--ink); font-weight: 600; }

.zurueck { color: var(--muted); font-size: 13px; text-decoration: none; }
.zurueck:hover { color: var(--ink); }

.zaehler { margin: 0; font-size: 32px; font-weight: 900; color: var(--gold); }
#totTitel { color: var(--bad); }
