/*
 * ARENA — Spiel No. 15 von games.rackpc.de
 * Nacht-Fragfest im Schmelztiegel. WebGL2, kein Build.
 */

@font-face {
  font-family: 'Limelight';
  src: url('../shared/fonts/limelight-400.woff2') format('woff2');
  font-display: swap;
}
@font-face {
  font-family: 'Cormorant Garamond';
  src: url('../shared/fonts/cormorant-400.woff2') format('woff2');
  font-display: swap;
}

:root {
  --ink: #07080c;
  --ink-2: #0d0f16;
  --warn: #ffb020;
  --ember: #ff6a2a;
  --white: #f2efe6;
  --steel: #6aa8ff;
  --health: #6ee06e;
  --display: 'Limelight', cursive;
  --body: 'Cormorant Garamond', serif;
  --mono: 'Courier New', monospace;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

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

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--ink);
  font-family: var(--mono);
}

body {
  position: fixed;
  overscroll-behavior: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
}

#game, #hud {
  position: fixed;
  top: 0;
  left: 0;
  display: block;
  touch-action: none;
}
#hud { pointer-events: none; }

#screens {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: 10;
  background: radial-gradient(ellipse at center, rgba(7,8,12,0.25) 0%, rgba(7,8,12,0.72) 100%);
}
#screens.active { pointer-events: auto; }
#screens:not(.active) { background: none; }

.screen {
  text-align: center;
  color: var(--white);
  font-family: var(--mono);
  max-width: 94vw;
  padding: 2rem 2.4rem;
  background: rgba(7,8,12,0.55);
  border: 1px solid rgba(255,176,32,0.16);
  box-shadow: 0 0 70px rgba(0,0,0,0.65);
  backdrop-filter: blur(2px);
}

.screen h1 {
  font-family: var(--display);
  font-size: clamp(2.6rem, 9vw, 6rem);
  color: var(--warn);
  text-shadow: 0 0 24px var(--ember), 0 0 80px rgba(255,106,42,0.4);
  letter-spacing: 0.22em;
  margin-bottom: 0.25em;
}

.screen .subtitle {
  font-family: var(--body);
  font-size: clamp(0.95rem, 2.4vw, 1.35rem);
  color: var(--ember);
  opacity: 0.9;
  margin-bottom: 1.2em;
}

.menu-options {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  margin: 0 auto 1.3rem;
  width: min(640px, 92vw);
}

.opt {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: center;
}

.opt-label {
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  color: rgba(242,239,230,0.5);
  min-width: 5.5em;
  text-align: right;
}

.opt-btn {
  font-family: var(--mono);
  font-size: clamp(0.72rem, 1.7vw, 0.9rem);
  color: rgba(242,239,230,0.75);
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(242,239,230,0.2);
  padding: 0.4em 0.8em;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.opt-btn:hover { border-color: rgba(255,176,32,0.6); color: var(--warn); }
.opt-btn.selected {
  background: rgba(255,176,32,0.18);
  border-color: var(--warn);
  color: var(--warn);
}

.menu-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 1.1rem;
}

.menu-btn {
  font-family: var(--mono);
  font-size: clamp(0.9rem, 2.2vw, 1.1rem);
  color: var(--ink);
  background: var(--warn);
  border: 2px solid var(--warn);
  padding: 0.7em 1.8em;
  cursor: pointer;
  letter-spacing: 0.1em;
  transition: background 0.2s, transform 0.1s, color 0.2s;
}
.menu-btn:hover { background: #ffc640; }
.menu-btn:active { transform: scale(0.96); }
.menu-btn--ghost {
  background: transparent;
  color: var(--warn);
}
.menu-btn--ghost:hover { background: rgba(255,176,32,0.16); }

.start-btn { margin-top: 0.4rem; }

.screen .hint {
  font-size: clamp(0.66rem, 1.5vw, 0.82rem);
  color: rgba(242,239,230,0.45);
  margin-top: 1.3em;
  line-height: 1.65;
  letter-spacing: 0.02em;
}

.standings {
  margin: 0.6rem auto 1.2rem;
  border-collapse: collapse;
  width: min(520px, 90vw);
  font-size: clamp(0.72rem, 1.8vw, 0.92rem);
}
.standings th {
  color: rgba(242,239,230,0.45);
  font-weight: normal;
  letter-spacing: 0.12em;
  font-size: 0.72em;
  padding: 0.35em 0.6em;
  border-bottom: 1px solid rgba(255,176,32,0.3);
  text-align: left;
}
.standings th:nth-child(n+3), .standings td:nth-child(n+3) { text-align: right; }
.standings td {
  padding: 0.32em 0.6em;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  color: var(--white);
}
.standings tr.me td { background: rgba(255,176,32,0.1); }

.backlink {
  position: fixed;
  bottom: 1rem;
  left: 1rem;
  color: rgba(255,176,32,0.45);
  text-decoration: none;
  font-family: var(--body);
  font-size: 0.85rem;
  z-index: 20;
  transition: color 0.3s;
}
.backlink:hover { color: var(--warn); }

@media (max-width: 720px) {
  .backlink {
    left: 50%;
    transform: translateX(-50%);
    bottom: calc(0.5rem + var(--safe-bottom));
    font-size: 0.72rem;
  }
  .opt-label { min-width: auto; width: 100%; text-align: center; }
}
