/* GeoFill — spielspezifische Stile. Basis aus game-base.css; Karte und
   Zoom-Knöpfe im selben Look wie Capture the Map. */

:root {
  --gold: #ffc83d;
  --land-grau: #3a3566;      /* noch nicht gefunden */
  --land-rand: #57508f;
  --fremd: #24203f;          /* Land anderer Kontinente */
}

.gf {
  width: 100%;
  max-width: 940px;
  margin: 0 auto;
  padding: 18px 0 56px;
}

/* ---------- Start ---------- */
.gf-titel {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2rem, 6vw, 2.9rem);
  margin: 10px 0 8px;
}
.gf-unter { margin: 0 0 26px; color: var(--ink-muted); max-width: 56ch; }

.optionen { display: flex; flex-direction: column; gap: 18px; margin-bottom: 26px; }
.gruppe {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-panel);
  padding: 14px 16px 16px;
  margin: 0;
}
.gruppe legend { padding: 0 6px; font-family: var(--font-display); font-weight: 600; color: var(--ink-muted); }
.wahl-reihe { display: flex; flex-wrap: wrap; gap: 8px; }
.wahl { cursor: pointer; }
.wahl input { position: absolute; opacity: 0; pointer-events: none; }
.wahl span {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  padding: 9px 15px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--bg);
  font-weight: 600;
  transition: border-color 0.12s ease, background 0.12s ease;
}
.wahl em { font-style: normal; color: var(--ink-muted); font-weight: 400; font-variant-numeric: tabular-nums; }
.wahl-modus span { flex-direction: column; gap: 2px; border-radius: var(--radius-sm); align-items: flex-start; }
.wahl-modus strong { font-family: var(--font-display); font-weight: 600; }
.wahl input:checked + span { border-color: var(--gold); background: color-mix(in srgb, var(--gold) 16%, var(--bg)); }
.wahl input:focus-visible + span { box-shadow: 0 0 0 3px color-mix(in srgb, var(--gold) 45%, transparent); }

.btn-gross { font-size: 1.1rem; padding: 14px 28px; }
.btn-leise { background: var(--bg-panel); color: var(--ink); border: 1px solid var(--line); }
.btn:disabled { opacity: 0.45; cursor: default; filter: none; }

/* ---------- Spiel ---------- */
.gf-spiel { padding-top: 10px; }
.spiel-leiste {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 12px;
  color: var(--ink-muted);
  flex-wrap: wrap;
}
.kontinent-name { font-family: var(--font-display); font-weight: 600; font-size: 1.25rem; color: var(--ink); flex: 1; }
.zaehler, .uhr { font-variant-numeric: tabular-nums; }
.zaehler strong { color: var(--gold); font-size: 1.15rem; }
.uhr {
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--bg-panel);
  color: var(--ink);
  font-weight: 700;
}

.steuer { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.eingabe {
  font: inherit;
  font-size: 1.05rem;
  flex: 1 1 260px;
  min-width: 0;
  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(--gold); box-shadow: 0 0 0 3px color-mix(in srgb, var(--gold) 35%, transparent); }
.eingabe:disabled { opacity: 0.6; }
.aufgabe { margin: 0; font-size: 1.15rem; flex: 1; }
.aufgabe strong { font-family: var(--font-display); font-size: 1.45rem; color: var(--gold); margin-left: 4px; }
.versuche { color: var(--gold); letter-spacing: 0.2em; font-size: 0.9rem; }

.meldung { min-height: 1.5em; margin: 8px 0 10px; font-weight: 600; }
.meldung.ja   { color: var(--mint); }
.meldung.nein { color: var(--coral); }
.meldung.info { color: var(--ink-muted); }

/* ---------- Karte ---------- */
.karte-rahmen {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  background: #15122a;
}
.karte {
  display: block;
  width: 100%;
  height: auto;
  max-height: 70dvh;
  cursor: grab;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}
.karte.modus-klicken { cursor: pointer; }
.karte.zieht { cursor: grabbing; }

.meer { fill: #15122a; }
.netz { fill: none; stroke: rgba(167, 162, 207, 0.07); stroke-width: 0.8; }
.fremd path { fill: var(--fremd); stroke: #2e2a52; stroke-width: 0.6; stroke-linejoin: round; }
.land {
  fill: var(--land-grau);
  stroke: var(--land-rand);
  stroke-width: 0.9;
  stroke-linejoin: round;
  transition: fill 0.2s ease;
}
.netz, .fremd path, .land { vector-effect: non-scaling-stroke; }
.modus-klicken .land:not(.gefunden):not(.verpasst):hover { fill: #4d4685; }

.land.gefunden {
  fill: var(--gold);
  stroke: #fff1a8;
  filter: drop-shadow(0 0 5px color-mix(in srgb, var(--gold) 70%, transparent));
  animation: aufleuchten 0.6s ease-out;
}
.land.verpasst { fill: var(--coral); stroke: #ffb3b3; }
.land.blink { animation: blinken 0.7s ease; }
@keyframes aufleuchten { 0% { fill: #ffffff; } 100% { fill: var(--gold); } }
@keyframes blinken { 0%, 100% { fill: var(--land-grau); } 30% { fill: var(--coral); } }

/* Klickpunkte für Kleinstaaten */
.punkt { fill: var(--land-grau); stroke: #a39cd6; stroke-width: 1.5; }
.punkt.gefunden { fill: var(--gold); stroke: #fff1a8; }
.punkt.verpasst { fill: var(--coral); stroke: #ffb3b3; }

/* Ländernamen über aufgedeckten Ländern: klein, dünn, mit feinem dunklem Rand,
   damit sie auf Gold und Rot lesbar bleiben, ohne die Karte zu übertönen */
.etikett {
  font-family: var(--font-body);
  font-weight: 400;
  letter-spacing: 0.01em;
  fill: rgba(255, 255, 255, 0.95);
  stroke: rgba(21, 18, 42, 0.6);
  stroke-linejoin: round;
  paint-order: stroke;
  pointer-events: none;
  user-select: none;
}

/* Name beim Überfahren aufgedeckter Länder: klein und unaufdringlich */
.hover-name {
  position: absolute;
  left: 0;
  top: 0;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(21, 18, 42, 0.82);
  border: 1px solid rgba(167, 162, 207, 0.25);
  color: var(--ink);
  font-size: 0.76rem;
  font-weight: 600;
  line-height: 1.4;
  white-space: nowrap;
  pointer-events: none;
  transform: translate(10px, calc(-100% - 8px));
  z-index: 2;
}
.hover-name.verpasst { color: #ffc2c2; }

/* Zoom-Knöpfe (wie Capture the Map) */
.zoom { position: absolute; top: 12px; right: 12px; display: flex; flex-direction: column; gap: 6px; }
.zoom-btn {
  font: inherit;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 600;
  line-height: 1;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg-panel) 88%, transparent);
  color: var(--ink);
  cursor: pointer;
}
.zoom-btn:hover:not(:disabled) { border-color: var(--gold); background: var(--bg-panel-2); }
.zoom-btn:focus-visible { outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--gold) 50%, transparent); }
.zoom-btn:disabled { opacity: 0.4; cursor: default; }
.zoom-reset { font-size: 1.1rem; }
.zoom-tipp {
  position: absolute;
  left: 12px;
  bottom: 10px;
  margin: 0;
  padding: 4px 10px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--bg) 75%, transparent);
  color: var(--ink-muted);
  font-size: 0.8rem;
  pointer-events: none;
}

/* ---------- Ergebnis ---------- */
.ergebnis {
  margin-top: 18px;
  padding: 20px 22px;
  border-radius: var(--radius);
  border: 1px solid color-mix(in srgb, var(--gold) 45%, var(--line));
  background: color-mix(in srgb, var(--gold) 8%, var(--bg-panel));
}
.e-titel { margin: 0 0 4px; font-family: var(--font-display); font-weight: 700; font-size: clamp(1.5rem, 4.5vw, 2rem); }
.e-text { margin: 0 0 12px; color: var(--ink-muted); font-variant-numeric: tabular-nums; }
.e-verpasst h3 { margin: 6px 0 8px; font-family: var(--font-display); font-weight: 600; font-size: 1rem; color: var(--coral); }
.e-liste { list-style: none; margin: 0 0 14px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.e-liste li {
  padding: 4px 10px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--coral) 16%, var(--bg));
  border: 1px solid color-mix(in srgb, var(--coral) 45%, var(--line));
  font-size: 0.9rem;
}
.aktionen { display: flex; gap: 10px; flex-wrap: wrap; }

@media (max-width: 560px) {
  .zoom-btn { width: 36px; height: 36px; }
  .zoom-tipp { display: none; }
  .kontinent-name { flex-basis: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .land, .wahl span { transition: none; }
  .land.gefunden, .land.blink { animation: none; }
}
