* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #0e0f13;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  color: #e8e9ee;
}

#game {
  display: block;
  width: 100vw;
  height: 100vh;
  cursor: crosshair;

  /* Ohne das scrollt und zoomt das Handy beim Steuern mit. */
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

/* Auf dem Handy gibt es keinen Zeiger, den man als Fadenkreuz braucht. */
@media (pointer: coarse) {
  #game { cursor: default; }
}

/* --- Join-Screen -------------------------------------------------------- */

.overlay {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(10, 11, 15, 0.82);
  backdrop-filter: blur(6px);
}

.overlay[hidden] { display: none; }

.card {
  width: min(360px, calc(100vw - 48px));
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 32px 28px;
  border: 1px solid #23262f;
  border-radius: 14px;
  background: #14161d;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
  text-align: center;
}

.card h1 {
  font-size: 26px;
  letter-spacing: -0.02em;
}

.sub {
  font-size: 13px;
  line-height: 1.5;
  color: #8b90a3;
}

.card input {
  width: 100%;
  padding: 12px 14px;
  font: inherit;
  font-size: 16px; /* < 16px zoomt iOS beim Fokus rein */
  text-align: center;
  color: #e8e9ee;
  background: #0e0f13;
  border: 1px solid #2c3040;
  border-radius: 9px;
  outline: none;
}

.card input:focus { border-color: #6a8bff; }

.card button {
  padding: 12px 14px;
  font: inherit;
  font-weight: 600;
  font-size: 15px;
  color: #0e0f13;
  background: #6a8bff;
  border: 0;
  border-radius: 9px;
  cursor: pointer;
}

.card button:hover { background: #839dff; }
.card button:disabled { opacity: 0.5; cursor: default; }

.error {
  font-size: 13px;
  color: #ff5c5c;
}

.error[hidden] { display: none; }

/* --- Warteraum ---------------------------------------------------------- */

/* Leicht: kein Blur, kaum Abdunklung, und Zeiger gehen durch - dahinter
   laeuft die Runde, der man zusieht. */
.overlay.leicht {
  background: rgba(10, 11, 15, 0.35);
  backdrop-filter: none;
  pointer-events: none;
  align-content: start;
  padding-top: clamp(56px, 12vh, 120px);
}

.warteraum-karte {
  width: min(320px, calc(100vw - 48px));
  padding: 22px 24px;
  gap: 10px;
  /* Die Ebene laesst Zeiger durch - die Karte selbst hat Knoepfe. */
  pointer-events: auto;
}

.warteraum-knoepfe {
  display: flex;
  gap: 8px;
}

.warteraum-knoepfe button {
  flex: 1;
  padding: 10px 8px;
  font-size: 13px;
}

.warteraum-knoepfe[hidden] { display: none; }

.warteraum-karte h1 { font-size: 20px; }

.countdown {
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #ffe94a;
  min-height: 36px;
}

.countdown:empty { display: none; }

#warteraum-liste {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  max-height: 150px;
  overflow: hidden;
}

#warteraum-liste li {
  padding: 4px 9px;
  font-size: 12px;
  font-weight: 600;
  color: #e8e9ee;
  background: #0e0f13;
  border: 1px solid #2c3040;
  border-radius: 999px;
}

#warteraum-liste li.ich { border-color: #ffe94a; color: #ffe94a; }
#warteraum-liste li.bot { color: #8b90a3; border-style: dashed; }

.hinweis {
  font-size: 12px;
  color: #5b6070;
}

.hinweis:empty { display: none; }

/* --- Konto ---------------------------------------------------------------- */

.konto-ansicht {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.konto-ansicht[hidden] { display: none; }

.card .links {
  display: flex;
  justify-content: center;
  gap: 16px;
  font-size: 12px;
}

.card a {
  color: #8b90a3;
  text-decoration: none;
}

.card a:hover { color: #e8e9ee; text-decoration: underline; }

.card button.zweitrangig {
  color: #e8e9ee;
  background: #1c1f2a;
  border: 1px solid #2c3040;
}

.card button.zweitrangig:hover { background: #242836; }

.trenner {
  font-size: 12px;
  color: #5b6070;
  margin-top: 4px;
}

.rechtliches {
  display: flex;
  justify-content: center;
  gap: 14px;
  font-size: 11px;
  margin-top: 4px;
}

.rechtliches a { color: #5b6070; }

.konto-zeile {
  font-size: 11px;
  color: #5b6070;
}

.konto-zeile a { color: #8b90a3; text-decoration: none; }
.konto-zeile a:hover { text-decoration: underline; }
.konto-zeile[hidden] { display: none; }

/* --- Rechtsseiten --------------------------------------------------------- */

.text-seite {
  max-width: 680px;
  margin: 0 auto;
  padding: 48px 24px 80px;
  line-height: 1.6;
  font-size: 15px;
}

.text-seite h1 { font-size: 26px; margin-bottom: 20px; }
.text-seite h2 { font-size: 17px; margin: 28px 0 8px; }
.text-seite p, .text-seite ul { margin-bottom: 12px; color: #c8cddb; }
.text-seite ul { padding-left: 20px; }
.text-seite a { color: #6a8bff; }
.text-seite .zurueck { display: inline-block; margin-bottom: 24px; color: #8b90a3; }
