@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&family=VT323&display=swap');

:root {
  --bg: #0b0714;
  --panel: #150f24;
  --panel-raised: #1c1430;
  --magenta: #ff2ea8;
  --cyan: #2af3ff;
  --amber: #ffb800;
  --danger: #ff3355;
  --text: #f4f0ff;
  --text-muted: #a89ec9;
  --font-display: 'Press Start 2P', monospace;
  --font-body: 'VT323', monospace;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 20px;
}

body {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2.5rem 1.25rem 4rem;
}

/* Dezentes Scanline-Overlay über der gesamten Seite */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.025) 0px,
    rgba(255, 255, 255, 0.025) 1px,
    transparent 2px,
    transparent 3px
  );
}

.page {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 720px;
}

a {
  color: var(--cyan);
}

.brand {
  text-align: center;
  margin-bottom: 2.5rem;
}

.brand__title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  letter-spacing: 2px;
  line-height: 1.8;
}

.brand__games {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.brand__sep {
  color: var(--magenta);
  animation: blink 1.3s steps(1) infinite;
}

.brand__game-name {
  color: var(--cyan);
  text-shadow: 0 0 6px var(--cyan), 0 0 16px rgba(42, 243, 255, 0.5);
}

@keyframes blink {
  0%, 45% { opacity: 1; }
  50%, 95% { opacity: 0.15; }
  100% { opacity: 1; }
}

.cabinet {
  background: var(--panel);
  border: 3px solid var(--magenta);
  border-radius: 4px;
  box-shadow: 6px 6px 0 rgba(255, 46, 168, 0.35), 0 0 24px rgba(255, 46, 168, 0.12);
  padding: 2rem;
  margin-bottom: 1.5rem;
}

.cabinet--cyan {
  border-color: var(--cyan);
  box-shadow: 6px 6px 0 rgba(42, 243, 255, 0.3), 0 0 24px rgba(42, 243, 255, 0.1);
}

.cabinet h1, .cabinet h2 {
  font-family: var(--font-display);
  font-size: 1rem;
  line-height: 1.8;
  margin-top: 0;
}

.game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
}

.game-tile {
  display: block;
  text-decoration: none;
  color: var(--text);
  background: var(--panel-raised);
  border: 2px solid var(--text-muted);
  border-radius: 4px;
  padding: 1.5rem;
  text-align: center;
  transition: transform 0.12s ease, border-color 0.12s ease, box-shadow 0.12s ease;
}

.game-tile:hover {
  border-color: var(--cyan);
  box-shadow: 0 0 18px rgba(42, 243, 255, 0.35);
  transform: translateY(-2px);
}

.game-tile__name {
  font-family: var(--font-display);
  font-size: 0.85rem;
  color: var(--cyan);
  margin-bottom: 0.5rem;
}

.game-tile--soon {
  opacity: 0.4;
  cursor: default;
}

.game-tile--soon:hover {
  transform: none;
  border-color: var(--text-muted);
  box-shadow: none;
}

label {
  display: block;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
  font-size: 1.05rem;
}

input[type="text"] {
  width: 100%;
  background: #0b0714;
  border: 2px solid var(--text-muted);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.2rem;
  padding: 0.6rem 0.75rem;
  border-radius: 3px;
  margin-bottom: 1.25rem;
}

input[type="text"]:focus {
  outline: none;
  border-color: var(--cyan);
  box-shadow: 0 0 10px rgba(42, 243, 255, 0.4);
}

.btn {
  font-family: var(--font-display);
  font-size: 0.8rem;
  color: var(--bg);
  background: var(--magenta);
  border: none;
  border-radius: 3px;
  padding: 0.9rem 1.4rem;
  cursor: pointer;
  box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.4);
  transition: transform 0.08s ease, box-shadow 0.08s ease;
}

.btn:hover {
  transform: translate(-1px, -1px);
  box-shadow: 5px 5px 0 rgba(0, 0, 0, 0.4);
}

.btn:active {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0 rgba(0, 0, 0, 0.4);
}

.btn--cyan {
  background: var(--cyan);
}

.btn--full {
  width: 100%;
}

.errors {
  border: 2px solid var(--danger);
  color: var(--danger);
  background: rgba(255, 51, 85, 0.08);
  padding: 0.75rem 1rem;
  border-radius: 3px;
  margin-bottom: 1.25rem;
  font-size: 1.05rem;
}

.room-code {
  font-family: var(--font-display);
  font-size: 1.8rem;
  letter-spacing: 4px;
  color: var(--amber);
  text-shadow: 0 0 10px rgba(255, 184, 0, 0.5);
  text-align: center;
  margin: 1rem 0;
}

.hint {
  color: var(--text-muted);
  font-size: 1rem;
  text-align: center;
}

.blink {
  animation: blink 1.3s steps(1) infinite;
}

.players {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin: 1rem 0 1.5rem;
  flex-wrap: wrap;
}

.player-chip {
  border: 2px solid var(--text-muted);
  border-radius: 3px;
  padding: 0.4rem 0.9rem;
  font-size: 1rem;
}

.player-chip--you {
  border-color: var(--cyan);
  color: var(--cyan);
}

.player-chip--offline {
  opacity: 0.4;
}

.dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-muted);
  margin-right: 6px;
}

.dot--online {
  background: var(--cyan);
  box-shadow: 0 0 6px var(--cyan);
}

/* Hangman */
.hangman-figure {
  display: flex;
  justify-content: center;
  gap: 4px;
  margin: 1.5rem 0;
}

.hangman-figure__life {
  width: 22px;
  height: 22px;
}

.word-display {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin: 1.5rem 0;
  font-family: var(--font-display);
  font-size: 1.6rem;
}

.word-display__slot {
  min-width: 1ch;
  border-bottom: 3px solid var(--text-muted);
  padding: 0 0.15em;
  text-align: center;
}

.word-display__slot--space {
  border-bottom: none;
  min-width: 0.6em;
}

.letters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  justify-content: center;
  margin-top: 1.5rem;
}

.letter-btn {
  font-family: var(--font-display);
  font-size: 0.8rem;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 3px;
  border: 2px solid var(--text-muted);
  background: var(--panel-raised);
  color: var(--text);
  cursor: pointer;
}

.letter-btn:hover:not(:disabled) {
  border-color: var(--cyan);
  box-shadow: 0 0 10px rgba(42, 243, 255, 0.4);
}

.letter-btn:disabled {
  cursor: default;
  opacity: 0.35;
}

.letter-btn--correct {
  border-color: var(--cyan);
  color: var(--cyan);
}

.letter-btn--wrong {
  border-color: var(--danger);
  color: var(--danger);
}

.status-line {
  text-align: center;
  font-size: 1.2rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.status-line--your-turn {
  color: var(--cyan);
}

.result-banner {
  text-align: center;
  font-family: var(--font-display);
  font-size: 1.1rem;
  padding: 1rem;
  margin: 1rem 0;
  border-radius: 4px;
}

.result-banner--win {
  color: var(--cyan);
  border: 2px solid var(--cyan);
  box-shadow: 0 0 16px rgba(42, 243, 255, 0.35);
}

.result-banner--lose {
  color: var(--danger);
  border: 2px solid var(--danger);
  box-shadow: 0 0 16px rgba(255, 51, 85, 0.35);
}

.copy-row {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.copy-row input {
  margin-bottom: 0;
  flex: 1;
}

.flash-wrong {
  animation: flash-wrong 0.4s ease;
}

@keyframes flash-wrong {
  0% { background: rgba(255, 51, 85, 0.25); }
  100% { background: transparent; }
}
