[hidden] { display: none !important; }

.btn-secondary { background: var(--secondary); color: white; }
.btn-secondary:hover { background: var(--secondary-dark); }

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  gap: 10px;
  flex-wrap: wrap;
}

.topbar h1 {
  margin: 0;
  font-size: 1.5rem;
  color: var(--primary-dark);
  text-align: center;
  flex: 1;
}

.screen {
  padding: 10px 20px 50px;
  display: flex;
  justify-content: center;
}

.card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 28px;
  max-width: 560px;
  width: 100%;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  text-align: center;
}

.card h2 { margin-top: 0; color: var(--primary-dark); }

.choice-row {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin: 14px 0 20px;
}

.choice-btn {
  flex: 1 1 120px;
  border: 3px solid transparent;
  background: #f1f1f1;
  border-radius: 16px;
  padding: 14px 10px;
  font-family: inherit;
  font-weight: bold;
  cursor: pointer;
  font-size: 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.choice-btn .label { font-size: 0.85rem; }
.choice-btn.selected { border-color: var(--primary); background: #fff0eb; }

/* ---------- Game layout ---------- */
.game-wrap {
  display: flex;
  justify-content: center;
  width: 100%;
}

.board-area {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 560px;
  width: 100%;
}

.prompt-banner {
  width: min(460px, 90vw);
  background: linear-gradient(135deg, #ff9f6b, #ff7a59);
  border-radius: 18px;
  padding: 14px 20px;
  margin-bottom: 14px;
  color: white;
  text-align: center;
  box-shadow: 0 6px 14px rgba(255,122,89,0.35);
}

.prompt-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.prompt-label {
  font-size: 1rem;
  opacity: 0.9;
}

.prompt-name {
  font-size: 1.6rem;
  font-weight: 800;
}

.repeat-btn {
  border: none;
  background: rgba(255,255,255,0.25);
  border-radius: 999px;
  width: 38px;
  height: 38px;
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.repeat-btn:hover { background: rgba(255,255,255,0.4); }

.prompt-meta {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin-top: 8px;
  font-size: 0.9rem;
}

.progress-label, .score-label {
  background: rgba(255,255,255,0.25);
  padding: 3px 12px;
  border-radius: 999px;
  white-space: nowrap;
}

.board {
  width: min(460px, 88vw);
  aspect-ratio: 720 / 800;
  background: #d6ecff;
  border-radius: 10px;
  overflow: hidden;
}

.board svg {
  width: 100%;
  height: 100%;
  display: block;
}

.country-outline {
  fill: #eaf4ff;
  stroke: #2b6cb0;
  stroke-width: 4;
  stroke-linejoin: round;
  pointer-events: none;
}

.pin-shape {
  fill: #c3d3e6;
  stroke: #8ea0b8;
  stroke-width: 1.2;
  cursor: pointer;
  transition: fill 0.25s ease, stroke 0.25s ease;
}
.pin-shape:hover {
  fill: #aebfd6;
}
.pin-shape.correct {
  fill: #8dd6a8;
  stroke: #4d9c6c;
  cursor: default;
}
.pin-shape.revealed {
  fill: #ffd166;
  stroke: #d9a520;
  cursor: default;
}
.pin-shape.wrong-flash {
  fill: #ff8f8f !important;
  stroke: #d94b4b !important;
}

.pin-label {
  font-size: 9px;
  font-weight: 800;
  fill: #33404d;
  text-anchor: middle;
  dominant-baseline: middle;
  pointer-events: none;
  paint-order: stroke;
  stroke: #ffffff;
  stroke-width: 2.5px;
  stroke-linejoin: round;
}

.feedback-banner {
  margin-top: 12px;
  width: min(460px, 90vw);
  text-align: center;
  font-weight: bold;
  font-size: 1.1rem;
  padding: 10px 16px;
  border-radius: 14px;
}
.feedback-banner.good {
  background: #d9f5e3;
  color: #2f7a4d;
}
.feedback-banner.bad {
  background: #ffe3e3;
  color: #b23b3b;
}
.feedback-banner.hint {
  background: #fff3d6;
  color: #9a6b0a;
}

#confettiCanvas {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1200;
  display: none;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(20, 20, 30, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1300;
}

.modal {
  background: white;
  border-radius: var(--radius);
  padding: 30px;
  max-width: 420px;
  width: 90%;
  text-align: center;
  box-shadow: 0 12px 40px rgba(0,0,0,0.3);
}

.modal-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 18px;
  flex-wrap: wrap;
}

@media (max-width: 720px) {
  .topbar h1 { font-size: 1.25rem; }
}
