/* FlagGuessr — spielspezifische Stile. Basis aus game-base.css.
   Spielfarbe Türkis (wie die Kachel auf der Startseite). */

:root { --fg: #2DD4BF; --akzent: #2DD4BF; }
:root[data-theme="light"] { --fg: #0D9488; --akzent: #2DD4BF; }

.fg {
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  padding: 18px 0 56px;
}
.btn-gross { font-size: 1.1rem; padding: 14px 28px; }
.btn-leise { background: var(--bg-panel); color: var(--ink); border: 1px solid var(--line); }

/* ---------- Start ---------- */
.daily-marke {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 10px 0 0;
  padding: 4px 12px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--fg) 14%, var(--bg-panel));
  border: 1px solid color-mix(in srgb, var(--fg) 45%, var(--line));
  font-size: 0.85rem;
  font-weight: 700;
}
.daily-punkt {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--fg);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--fg) 25%, transparent);
}
.fg-titel { font-family: var(--font-display); font-weight: 700; font-size: clamp(2rem, 6vw, 2.9rem); margin: 10px 0 8px; }
.fg-unter { margin: 0 0 14px; color: var(--ink-muted); max-width: 54ch; }
/* kleiner Hinweis unter der Einleitung (grün) */
.fg-info { margin: 0 0 22px; max-width: 54ch; font-size: .92rem; font-weight: 600; line-height: 1.55; color: var(--mint); }
:root[data-theme="light"] .fg-info { color: #0f8a5f; }

.punkte-titel { margin: 4px 0 10px; font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; color: var(--fg); letter-spacing: 0.01em; }
.stufen {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin: 0 0 22px;
  padding: 0;
  max-width: 520px;
}
.stufen li {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 10px 6px;
  border-radius: var(--radius-sm);
  background: var(--bg-panel);
  border: 1px solid var(--line);
  font-size: 0.82rem;
  color: var(--ink-muted);
  text-align: center;
}
.stufen strong { font-family: var(--font-display); font-size: 1.5rem; line-height: 1.1; color: var(--fg); }

.d-fortschritt {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
  max-width: 360px;
  margin: 0 0 26px;
  padding: 0;
}
.d-feld {
  aspect-ratio: 1;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: var(--bg-panel);
  display: grid; place-items: center;
  font-family: var(--font-display); font-weight: 700; color: #1e1b34;
}
.d-feld.p5 { background: var(--mint);  border-color: transparent; }
.d-feld.p3 { background: var(--amber); border-color: transparent; }
.d-feld.p2 { background: #fb923c;      border-color: transparent; }
.d-feld.p1 { background: var(--coral); border-color: transparent; }
.d-feld.p0 { background: color-mix(in srgb, var(--ink-muted) 30%, var(--bg-panel)); color: var(--ink-muted); }

/* ---------- Spiel ---------- */
.fg-spiel { padding-top: 10px; }
.spiel-leiste { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; color: var(--ink-muted); }
.s-stand { flex: 1; text-align: center; font-variant-numeric: tabular-nums; }
.s-stand strong { color: var(--ink); }
.s-punkte {
  padding: 3px 12px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--bg-panel);
  color: var(--ink); font-weight: 700;
}
.s-punkte strong { color: var(--fg); font-variant-numeric: tabular-nums; }

/* Flagge: Vorderseite = Farbbänder, Rückseite = echte Flagge (dreht sich beim letzten Hinweis) */
.buehne { display: flex; flex-direction: column; align-items: center; gap: 14px; perspective: 1200px; }
.flagge {
  position: relative;
  width: min(100%, 420px);
  aspect-ratio: 4 / 3;                 /* wie die Flaggen-Dateien */
  transform-style: preserve-3d;
  transition: transform 0.8s cubic-bezier(.2, .8, .2, 1);
}
.flagge.gedreht { transform: rotateY(180deg); }
.flagge-seite {
  position: absolute; inset: 0;
  border-radius: 14px;
  overflow: hidden;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.08);
}
:root[data-theme="light"] .flagge-seite { box-shadow: 0 12px 32px rgba(60, 45, 20, 0.16), 0 0 0 1px rgba(30, 27, 52, 0.10); }
.flagge-hinten { transform: rotateY(180deg); background: var(--bg-panel); }
/* Rückseite (echte Flagge) gibt es nur, wenn aufgedeckt — nie beim Zurücksetzen sichtbar */
.flagge:not(.gedreht) .flagge-hinten { visibility: hidden; }
.flagge-hinten img { width: 100%; height: 100%; object-fit: cover; display: block; }

.baender { display: flex; width: 100%; height: 100%; }
.band {
  background: var(--farbe);
  min-width: 0;
  transition: flex-grow 0.9s cubic-bezier(.2, .8, .2, 1);
}
.band + .band { box-shadow: inset 1px 0 0 rgba(0, 0, 0, 0.12); }
/* leichter Stoff-Glanz, damit die Fläche wie eine wehende Flagge wirkt */
.flagge-vorne::after {
  content: "";
  position: absolute; inset: 0;
  pointer-events: none;
  background:
    linear-gradient(100deg,
      rgba(255,255,255,.28) 0%, rgba(255,255,255,0) 14%,
      rgba(0,0,0,.16) 30%, rgba(0,0,0,0) 44%,
      rgba(255,255,255,.22) 60%, rgba(255,255,255,0) 74%,
      rgba(0,0,0,.16) 100%),
    linear-gradient(180deg, rgba(255,255,255,.12), rgba(0,0,0,.10));
  mix-blend-mode: soft-light;
}

.legende { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 0; padding: 0; }
.legende li {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 4px 11px 4px 6px;
  border-radius: 999px;
  background: var(--bg-panel);
  border: 1px solid var(--line);
  font-weight: 700; font-size: 0.9rem;
  font-variant-numeric: tabular-nums;
}
.legende .punkt {
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--farbe);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.18);
}

/* Hinweise */
.tipps {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 22px 0 16px;
  padding: 0;
}
.tipps li {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  column-gap: 10px;
  align-items: center;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  background: var(--bg-panel);
  border: 1px solid var(--line);
  opacity: 0.5;
  transition: opacity 0.25s ease, border-color 0.25s ease;
}
.tipps li.offen { opacity: 1; }
.tipps li.aktiv { border-color: var(--fg); box-shadow: 0 0 0 3px color-mix(in srgb, var(--fg) 22%, transparent); }
.t-pkt {
  grid-row: 1 / 3;
  width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center;
  font-family: var(--font-display); font-weight: 700; font-size: 1.05rem;
  background: color-mix(in srgb, var(--fg) 18%, var(--bg-panel));
  color: var(--fg);
}
.t-name { font-size: 0.78rem; color: var(--ink-muted); text-transform: uppercase; letter-spacing: 0.04em; font-weight: 700; }
.t-wert { font-weight: 700; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tipps li:not(.offen) .t-wert { color: var(--ink-muted); }

/* Raten */
.raten { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; }
.raten .btn { padding: 12px 26px; font-size: 1.05rem; }
.eingabe {
  font: inherit; font-size: 1.1rem;
  width: 100%;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--bg-panel);
  color: var(--ink);
}
.eingabe:focus-visible { outline: none; border-color: var(--fg); box-shadow: 0 0 0 3px color-mix(in srgb, var(--fg) 35%, transparent); }

.versuche { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 0; padding: 0; }
.versuche li {
  padding: 3px 10px; border-radius: 999px;
  background: color-mix(in srgb, var(--coral) 14%, var(--bg-panel));
  border: 1px solid color-mix(in srgb, var(--coral) 40%, var(--line));
  font-size: 0.85rem; font-weight: 600;
  text-decoration: line-through;
  text-decoration-color: color-mix(in srgb, var(--coral) 70%, transparent);
}
.meldung { min-height: 1.5em; margin: 12px 0 0; font-weight: 600; }
.meldung.ja { color: var(--mint); }
.meldung.nein { color: var(--coral); }
.meldung.info { color: var(--ink-muted); }
:root[data-theme="light"] .meldung.ja { color: #0f9a70; }
:root[data-theme="light"] .meldung.nein { color: #d13f3a; }

.runde-fuss { display: flex; justify-content: center; gap: 10px; margin-top: 14px; }
.runde-fuss .btn { min-width: min(100%, 220px); }

/* ---------- Ende ---------- */
.ende { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; padding-top: 16px; }
.ende .daily-marke { margin: 0; }
.ende-titel { font-family: var(--font-display); font-weight: 700; font-size: clamp(1.8rem, 5vw, 2.4rem); margin: 0; }
.ende-score { margin: 0; font-size: 1.3rem; }
.ende-score strong { color: var(--fg); font-size: 1.6rem; }
.end-liste { list-style: none; margin: 6px 0 14px; padding: 0; width: 100%; max-width: 520px; display: flex; flex-direction: column; gap: 6px; text-align: left; }
.end-liste li {
  display: flex; align-items: center; gap: 12px;
  padding: 8px 12px;
  background: var(--bg-panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}
.end-liste img { width: 32px; height: 24px; object-fit: cover; border-radius: 3px; box-shadow: 0 0 0 1px rgba(0,0,0,.25); flex: none; }
.el-land { flex: 1; display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.el-land small { color: var(--ink-muted); }
.el-farben { display: flex; gap: 3px; }
.el-farben i { width: 12px; height: 12px; border-radius: 50%; background: var(--farbe); box-shadow: inset 0 0 0 1px rgba(0,0,0,.2); }
.el-pkt { font-weight: 800; min-width: 1.6em; text-align: right; font-variant-numeric: tabular-nums; font-family: var(--font-display); font-size: 1.15rem; }
.el-pkt.p5 { color: var(--mint); } .el-pkt.p3 { color: var(--amber); } .el-pkt.p2 { color: #fb923c; }
.el-pkt.p1 { color: var(--coral); } .el-pkt.p0 { color: var(--ink-muted); }
:root[data-theme="light"] .el-pkt.p5 { color: #0f9a70; }
:root[data-theme="light"] .el-pkt.p3 { color: #b47a00; }
:root[data-theme="light"] .el-pkt.p2 { color: #c2570c; }
:root[data-theme="light"] .el-pkt.p1 { color: #d13f3a; }

.d-naechste { margin: 4px 0 6px; color: var(--ink-muted); }
.d-naechste strong { color: var(--ink); font-variant-numeric: tabular-nums; }
.aktionen { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.aktionen a.btn { text-decoration: none; display: inline-flex; align-items: center; }
.teilen-status { min-height: 1.3em; margin: 4px 0 0; color: var(--mint); font-weight: 600; }
.teilen-text {
  width: 100%; max-width: 360px;
  font: inherit; padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--bg-panel); color: var(--ink);
}

@media (max-width: 560px) {
  .stufen { grid-template-columns: repeat(2, 1fr); }
  .tipps { gap: 6px; }
  .tipps li { padding: 7px 10px; }
  .t-pkt { width: 30px; height: 30px; font-size: 0.95rem; }
  .flagge { width: min(100%, 300px); }
  .raten .btn { padding: 12px 18px; }
}
@media (prefers-reduced-motion: reduce) {
  .flagge, .band, .tipps li { transition: none; }
}
/* Handy: lange Hinweise („South America“) umbrechen statt abschneiden */
@media (max-width: 560px) { .t-wert { white-space: normal; overflow: visible; text-overflow: clip; line-height: 1.2; } }
