/* =====================================================================
   ARCBALL — Spielseiten-Chrome
   ---------------------------------------------------------------------
   Vollbild-Canvas auf Nachtblau. Der Anthologie-Rahmen trägt die
   Noir-Deco-Marke von remade.games (Rück-Link, Schriften selbst
   gehostet aus ../shared/fonts); der Tisch selbst trägt die
   Arcan-Identität (Nachtblau/Werkstatt-Grün).
   ===================================================================== */

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

:root {
  --night-deep: #04041a;
  --night: #060647;
  --green: #006a00;
  --green-glow: #25c625;
  --gold: #c8a24a;
  --gold-bright: #ecc977;
  --paper: #e8e0cd;
  --display: 'Limelight', 'Cormorant Garamond', Georgia, serif;
  --body: 'Cormorant Garamond', Georgia, serif;
  --ease: cubic-bezier(0.16, 0.84, 0.34, 1);
}

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

html, body {
  height: 100%;
  overflow: hidden;
  background: var(--night-deep);
  color: var(--paper);
  font-family: var(--body);
}

canvas#game {
  display: block;
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  touch-action: none;
}

/* Rück-Link zur Sammlung — Noir-Deco, dezenter Glow bei Hover. */
.backlink {
  position: fixed;
  top: 15px; left: 18px;
  z-index: 30;
  font-size: 15px;
  font-style: italic;
  letter-spacing: 0.04em;
  text-decoration: none;
  color: var(--gold);
  opacity: 0.55;
  padding: 4px;
  transition: opacity 0.25s var(--ease), color 0.25s var(--ease), text-shadow 0.25s var(--ease);
  user-select: none;
}
.backlink:hover, .backlink:focus-visible {
  opacity: 1;
  color: var(--gold-bright);
  text-shadow: 0 0 14px rgba(224, 162, 58, 0.5);
  outline: none;
}

/* Screens-Overlay (Titel/Ergebnis ab Phase 5). */
.screens {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  pointer-events: none;
}

/* Einzelner Screen (Titel / Feierabend) — Noir-Deco. */
.screen {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 1.5rem;
  background: radial-gradient(ellipse at center, rgba(6, 6, 71, 0.82) 0%, rgba(4, 4, 26, 0.96) 100%);
  pointer-events: auto;
}
.screen-card {
  max-width: 34rem;
  width: 100%;
  text-align: center;
  padding: 2.6rem 2.2rem 2.2rem;
  background: rgba(4, 4, 26, 0.7);
  border: 1px solid rgba(200, 162, 74, 0.55);
  box-shadow: 0 0 0 4px rgba(4, 4, 26, 0.7), 0 0 0 5px rgba(200, 162, 74, 0.3),
              0 24px 70px rgba(0, 0, 0, 0.6);
}
.screen-kicker {
  font-family: var(--body);
  font-size: 0.8rem;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--gold);
  opacity: 0.85;
  margin-bottom: 1.1rem;
}
.screen-title {
  font-family: var(--display);
  font-weight: 400;
  /* So bemessen, dass auch das längste Wort („FEIERABEND") in die Karte
     passt — Limelight ist eine breite Display-Schrift. */
  font-size: clamp(2.2rem, 9vw, 3.2rem);
  letter-spacing: 0.08em;
  color: var(--paper);
  text-shadow: 0 0 26px rgba(37, 198, 37, 0.45);
  margin-bottom: 0.6rem;
}
.screen-sub {
  font-family: var(--body);
  font-style: italic;
  font-size: 1.05rem;
  color: rgba(232, 224, 205, 0.8);
  margin-bottom: 1.8rem;
}
.screen-btn {
  font-family: var(--body);
  font-size: 0.9rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--gold-bright);
  background: transparent;
  border: 1.5px solid var(--gold);
  padding: 0.8rem 2.2rem;
  cursor: pointer;
  transition: background 0.25s var(--ease), color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.screen-btn:hover, .screen-btn:focus-visible {
  background: var(--gold);
  color: #04041a;
  box-shadow: 0 0 22px rgba(224, 162, 58, 0.5);
  outline: none;
}
.screen-hint {
  font-family: var(--body);
  font-size: 0.85rem;
  color: rgba(232, 224, 205, 0.55);
  margin-top: 1.4rem;
}
.screen-score {
  font-family: var(--display);
  font-size: 1.7rem;
  letter-spacing: 0.08em;
  color: var(--green-glow);
  margin-bottom: 0.4rem;
}
.screen-best {
  font-family: var(--body);
  font-size: 1rem;
  letter-spacing: 0.1em;
  color: var(--gold);
  margin-bottom: 1.6rem;
}

/* =====================================================================
   Touch-Steuerung (mobil)
   ===================================================================== */
.touch-zone {
  position: fixed;
  z-index: 10;
  touch-action: none;
  -webkit-user-select: none; user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.touch-plunger {
  position: fixed;
  z-index: 11;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  padding: 0.7rem 1.6rem;
  font-family: var(--body);
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--green-glow);
  background: rgba(4, 4, 26, 0.6);
  border: 1.5px solid rgba(37, 198, 37, 0.5);
  border-radius: 999px;
  touch-action: none;
  -webkit-user-select: none; user-select: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.touch-plunger:active {
  background: rgba(37, 198, 37, 0.25);
  box-shadow: 0 0 18px rgba(37, 198, 37, 0.4);
}

@media (prefers-reduced-motion: reduce) {
  .backlink { transition: none; }
}
