/* =====================================================================
 * game.css
 * Tela de jogo (Tradicional/Relíquia): header, imagem, mapa, controles,
 * fallback de imagem, tela de feedback, tela de resultado, marcadores
 * customizados do Leaflet.
 * ===================================================================== */

/* ========== GAME SCREEN ========== */
.game-screen { gap: 0; }

.game-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: var(--color-surface);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  flex-shrink: 0;
}

.round-info {
  font-size: 0.9rem;
  font-weight: 600;
}
.round-info span { color: var(--color-accent); }

.score-display {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--color-accent);
}

/* ========== IMAGE CONTAINER ========== */
.game-image-container {
  position: relative;
  width: 100%;
  max-height: 45vh;
  overflow: hidden;
  background: var(--color-surface);
  flex-shrink: 0;
}
.game-image-container img {
  width: 100%;
  height: 100%;
  max-height: 45vh;
  object-fit: cover;
}

.image-fallback {
  width: 100%;
  height: 35vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--color-surface), #0f1e30);
}
.fallback-content {
  text-align: center;
  color: var(--color-muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 20px;
}
.fallback-icon { font-size: 3rem; display: block; margin-bottom: 8px; }
.fallback-text { font-size: 0.95rem; font-weight: 600; }

.era-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(8px);
  color: var(--color-accent);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 700;
  font-family: var(--font-serif);
}

/* ========== MAP CONTAINER ========== */
.game-map-container {
  flex: 1;
  min-height: 40vh;
  position: relative;
}
#game-map {
  width: 100%;
  height: 100%;
  min-height: 40vh;
  z-index: 1;
}

/* ========== CONTROLS ========== */
.game-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--color-surface);
  border-top: 1px solid rgba(255,255,255,0.06);
  flex-shrink: 0;
}
.btn-confirm { flex: 1; max-width: 280px; }

.btn-hint {
  background: rgba(243,156,18,0.15);
  color: var(--color-accent);
  border: 2px solid var(--color-accent);
  white-space: nowrap;
}

.hint-revealed {
  position: absolute;
  bottom: 60px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0,0,0,0.85);
  backdrop-filter: blur(10px);
  color: var(--color-accent);
  padding: 10px 20px;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-style: italic;
  text-align: center;
  max-width: 90%;
  z-index: 10;
  animation: fadeIn 0.4s ease;
}

/* ========== FEEDBACK SCREEN ========== */
.feedback-screen {
  align-items: center;
  padding: 24px;
  gap: 16px;
}
.feedback-score {
  text-align: center;
  margin-top: 8px;
}
.feedback-points {
  font-size: 3rem;
  font-weight: 800;
  line-height: 1.1;
}
.feedback-points.excellent { color: var(--color-success); }
.feedback-points.good { color: #58d68d; }
.feedback-points.ok { color: var(--color-accent); }
.feedback-points.bad { color: #e67e22; }
.feedback-points.terrible { color: var(--color-danger); }

.feedback-slang {
  font-size: 1rem;
  color: var(--color-text);
  margin-top: 8px;
  font-style: italic;
}

.feedback-details {
  display: flex;
  gap: 24px;
  justify-content: center;
  flex-wrap: wrap;
}
.detail-item { text-align: center; }
.detail-label {
  font-size: 0.75rem;
  color: var(--color-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.detail-value {
  font-size: 1.1rem;
  font-weight: 700;
}

.feedback-map-container {
  width: 100%;
  max-width: 600px;
  height: 250px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 2px solid rgba(255,255,255,0.08);
}
#feedback-map { width: 100%; height: 100%; }

.feedback-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

/* ========== RESULTS SCREEN ========== */
.results-screen {
  align-items: center;
  justify-content: center;
  padding: 24px;
  gap: 20px;
  text-align: center;
}
.results-screen h2 {
  font-size: 1.6rem;
  color: var(--color-accent);
}
.results-total {
  font-size: 3.5rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--color-accent), #f7dc6f);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.1;
}
.results-title {
  font-size: 1.1rem;
  color: var(--color-muted);
}
.results-title strong { color: var(--color-text); }

.round-summary {
  width: 100%;
  max-width: 420px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.round-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: var(--color-surface);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
}
.round-row-name { flex: 1; text-align: left; }
.round-row-score {
  font-weight: 700;
  color: var(--color-accent);
  min-width: 60px;
  text-align: right;
}
.results-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

/* ========== CUSTOM MAP MARKERS ========== */
.marker-pin {
  width: 24px;
  height: 24px;
  border-radius: 50% 50% 50% 0;
  position: absolute;
  transform: rotate(-45deg);
  left: 50%;
  top: 50%;
  margin: -20px 0 0 -12px;
}
.marker-pin::after {
  content: '';
  width: 10px;
  height: 10px;
  border-radius: 50%;
  position: absolute;
  top: 7px;
  left: 7px;
}
.marker-pin.guess {
  background: var(--color-primary);
  border: 3px solid #fff;
}
.marker-pin.guess::after { background: #fff; }

.marker-pin.real {
  background: var(--color-success);
  border: 3px solid #fff;
}
.marker-pin.real::after { background: #fff; }

.guess-marker, .real-marker {
  background: transparent !important;
  border: none !important;
}
