:root {
  --ink: #121019;
  --ink-raised: #1b1826;
  --gold: #d4af6a;
  --teal: #3f9c9c;
  --wrong: #b5453a;
  --paper: #ede8dc;
  --paper-dim: #a8a396;
  --radius: 14px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

body {
  background:
    radial-gradient(circle at 15% 20%, rgba(63,156,156,0.10), transparent 45%),
    radial-gradient(circle at 85% 80%, rgba(212,175,106,0.10), transparent 45%),
    var(--ink);
  color: var(--paper);
  font-family: 'Inter', sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 24px 16px 48px;
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

/* Scoreboard */
.scoreboard {
  display: flex;
  align-items: baseline;
  gap: 10px;
  background: var(--ink-raised);
  border: 1px solid rgba(212,175,106,0.25);
  border-radius: 999px;
  padding: 10px 22px;
  margin-bottom: 28px;
}
.scoreboard__item { display: flex; flex-direction: column; align-items: center; }
.scoreboard__label {
  font-family: 'Inter', sans-serif;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--paper-dim);
}
.scoreboard__value {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  font-size: 20px;
  color: var(--gold);
}
.scoreboard__divider {
  font-family: 'JetBrains Mono', monospace;
  color: var(--paper-dim);
  font-size: 16px;
  transform: translateY(2px);
}

/* Stage */
.stage {
  width: 100%;
  max-width: 480px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.title {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 700;
  font-size: clamp(28px, 6vw, 40px);
  line-height: 1.05;
  margin: 0 0 4px;
  letter-spacing: 0.01em;
}
.title__or {
  font-style: italic;
  font-weight: 500;
  color: var(--paper-dim);
  padding: 0 4px;
}

.subtitle {
  font-size: 13px;
  color: var(--paper-dim);
  margin: 0 0 28px;
}

/* Feste Breite: Ein langer Titel darf Bild und Knöpfe nicht verschieben. */
.game {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Image frame: a card-corner meets a vinyl groove */
.frame {
  position: relative;
  width: 260px;
  height: 260px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 28px;
}

.frame__ring {
  position: absolute;
  inset: -18px;
  border-radius: 50%;
  border: 1px dashed rgba(63,156,156,0.35);
  pointer-events: none;
}

.frame__notch {
  position: absolute;
  top: -1px;
  left: -1px;
  width: 22px;
  height: 22px;
  border-top: 2px solid var(--gold);
  border-left: 2px solid var(--gold);
  border-top-left-radius: 6px;
  z-index: 3;
}
.frame__notch::after {
  content: "";
  position: absolute;
  bottom: -23px;
  right: -23px;
  width: 22px;
  height: 22px;
  border-bottom: 2px solid var(--gold);
  border-right: 2px solid var(--gold);
  border-bottom-right-radius: 6px;
}

.frame__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: 0 20px 40px -12px rgba(0,0,0,0.6);
  background: var(--ink-raised);
  opacity: 0;
  transform: scale(0.97);
  transition: opacity 0.35s ease, transform 0.35s ease;
}
.frame__image.is-visible {
  opacity: 1;
  transform: scale(1);
}

.frame__feedback {
  position: absolute;
  inset: 0;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Cormorant Garamond', serif;
  font-weight: 600;
  font-size: 22px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}
.frame__feedback.show-correct {
  opacity: 1;
  background: rgba(63,156,156,0.35);
  color: #eafafa;
  border: 2px solid var(--teal);
}
.frame__feedback.show-wrong {
  opacity: 1;
  background: rgba(181,69,58,0.35);
  color: #ffece9;
  border: 2px solid var(--wrong);
}

/* Controls */
/* Fester Platz für bis zu zwei Zeilen Titel, damit darunter nichts springt. */
.reveal-slot {
  width: 100%;
  height: 48px;
  margin: 0 0 18px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.filename-reveal {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--paper-dim);
  background: var(--ink-raised);
  border: 1px solid rgba(212,175,106,0.25);
  border-radius: 8px;
  line-height: 16px;
  max-width: 100%;
  padding: 6px 12px;
  margin: 0;
  opacity: 0;
  transition: opacity 0.2s ease;
  overflow-wrap: anywhere;
  text-wrap: balance;
}
.filename-reveal.is-visible {
  opacity: 1;
}

.controls {
  display: flex;
  gap: 14px;
  width: 100%;
  margin-bottom: 18px;
}

.guess-btn {
  flex: 1;
  padding: 16px 10px;
  border-radius: 10px;
  border: 1px solid rgba(237,232,220,0.15);
  background: var(--ink-raised);
  color: var(--paper);
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  transition: transform 0.12s ease, border-color 0.12s ease, background 0.12s ease;
}
.guess-btn:hover { transform: translateY(-2px); }
.guess-btn:active { transform: translateY(0); }
.guess-btn:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}
.guess-btn--cover:hover { border-color: var(--teal); }
.guess-btn--card:hover { border-color: var(--gold); }
.guess-btn[aria-disabled="true"] { opacity: 0.55; cursor: default; transform: none; }
.zurueck { margin-top: 28px; font-size: 12px; }
.zurueck a { color: var(--paper-dim); }
.zurueck a:hover { color: var(--gold); }

.status {
  font-size: 12px;
  color: var(--paper-dim);
  min-height: 16px;
  margin: 0;
}

/* Eigene display-Regeln würden sonst das hidden-Attribut aushebeln. */
[hidden] { display: none !important; }

/* End screen */
.end-screen {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  padding: 36px 20px;
  background: var(--ink-raised);
  border: 1px solid rgba(212,175,106,0.25);
  border-radius: var(--radius);
}

.end-screen__result {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  font-size: 28px;
  color: var(--gold);
  margin: 0;
}

.end-screen__message {
  font-family: 'Cormorant Garamond', serif;
  font-size: 20px;
  font-style: italic;
  line-height: 1.4;
  color: var(--paper);
  margin: 0;
  max-width: 360px;
}

.end-screen__restart {
  flex: none;
  min-width: 180px;
}
