@import url("https://fonts.googleapis.com/css2?family=Manrope:wght@400;600;800&family=JetBrains+Mono:wght@500&display=swap");

:root {
  --bg: #f4f7fb;
  --panel: #ffffff;
  --ink: #16324f;
  --ink-soft: #4f647a;
  --accent: #0a9396;
  --accent-2: #ee9b00;
  --ok: #3a7d44;
  --bad: #c44536;
  --map: #d9e4ef;
  --map-current: #ee9b00;
  --map-guessed: #0a9396;
  --map-empty: #f8fbff;
  --border: #c6d4e1;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: "Manrope", "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 8% 8%, #d2ecf3 0, transparent 38%),
    radial-gradient(circle at 88% 90%, #f8e6c3 0, transparent 35%),
    var(--bg);
}

.app-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.map-section {
  position: relative;
  height: 52vh;
  min-height: 340px;
  padding: 1rem;
}

#world-map {
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, #f6fbff 0%, #e8f1fb 100%);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: 0 14px 36px rgba(26, 57, 87, 0.15);
}

.country {
  fill: var(--map);
  stroke: #93a7bb;
  stroke-width: 0.6;
}

.country-guessed {
  fill: var(--map-guessed);
  stroke: #0a7476;
}

.country-current {
  fill: var(--map-current);
  stroke: #d48700;
}

.country-unavailable {
  fill: var(--map-empty);
  stroke: #c8d5e0;
}

.corner {
  position: absolute;
  top: 1.6rem;
  z-index: 3;
  padding: 0.4rem 0.7rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(4px);
  border: 1px solid var(--border);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.86rem;
}

.timer {
  right: 1.9rem;
}

.progress {
  left: 1.9rem;
}

.game-section {
  flex: 1;
  padding: 1.2rem 1.2rem 1.4rem;
}

.control-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.control-group {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  flex-wrap: wrap;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 0.65rem 0.9rem;
}

.control-title {
  font-weight: 800;
  font-size: 0.88rem;
  letter-spacing: 0.02em;
}

.prompt-grid {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
}

.prompt-card {
  margin: 0;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--panel);
  padding: 0.9rem;
}

.prompt-card h2 {
  margin: 0;
  font-size: 0.95rem;
  color: var(--ink-soft);
}

.prompt-card p {
  margin: 0.55rem 0 0;
  font-size: 1.2rem;
  font-weight: 700;
  min-height: 1.5rem;
}

.flag-view {
  margin-top: 0.55rem;
  min-height: 1.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  line-height: 1;
}

.flag-hidden {
  color: var(--ink-soft);
  font-size: 1rem;
  border: 1px dashed var(--border);
  border-radius: 8px;
  padding: 0.2rem 0.5rem;
}

.guess-form {
  margin-top: 1rem;
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.guess-form input,
.guess-form button {
  border-radius: 10px;
  border: 1px solid var(--border);
  font-family: inherit;
  font-size: 1rem;
  padding: 0.7rem 0.9rem;
}

.guess-form input {
  flex: 1;
  min-width: 220px;
  background: #ffffff;
}

.guess-form button {
  background: var(--accent);
  color: #ffffff;
  font-weight: 700;
  cursor: pointer;
  min-width: 110px;
}

.guess-form button.secondary {
  background: #ffffff;
  color: var(--ink);
}

.hint-line,
.feedback,
.win-banner {
  margin: 0.65rem 0 0;
}

.feedback.ok {
  color: var(--ok);
}

.feedback.bad {
  color: var(--bad);
}

.win-banner {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--ok);
}

.hidden {
  display: none;
}

@media (max-width: 900px) {
  .prompt-grid {
    grid-template-columns: 1fr;
  }

  .map-section {
    min-height: 300px;
    height: 48vh;
  }

  .corner {
    top: 1.45rem;
  }

  .timer {
    right: 1.5rem;
  }

  .progress {
    left: 1.5rem;
  }
}
