/* styles.css - small additions on top of Tailwind */
html, body {
  height: 100%;
  overscroll-behavior: contain;
  -webkit-tap-highlight-color: transparent;
}
#globe-container { position: relative; }
#tooltip { pointer-events: none; position: fixed; }
.star { fill: white; }
/* Allow D3/Three to capture pinch/drag gestures on the render surface */
#globe-svg { touch-action: none; user-select: none; -webkit-user-select: none; }
#globe-container canvas { touch-action: none; user-select: none; -webkit-user-select: none; }

/* Skeleton loading styles */
.skeleton {
  position: relative;
  overflow: hidden;
  background-color: #1f2937; /* gray-800 */
  border-radius: 0.375rem; /* rounded-md */
}
.skeleton::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background-image: linear-gradient(90deg, rgba(31,41,55,0) 0%, rgba(156,163,175,0.15) 50%, rgba(31,41,55,0) 100%);
  animation: shimmer 1.6s infinite;
}

@keyframes shimmer {
  100% { transform: translateX(100%); }
}

.skeleton-line {
  height: 0.75rem;
  background-color: #111827; /* gray-900 */
  border-radius: 0.375rem;
}
.skeleton-line.thin { height: 0.5rem; }
.skeleton-line.tall { height: 1rem; }

.skeleton-avatar {
  width: 3rem;
  height: 3rem;
  border-radius: 0.375rem;
  background-color: #111827;
}

.skeleton-badge {
  display: inline-block;
  height: 1.25rem;
  width: 5rem;
  border-radius: 9999px;
  background-color: #111827;
}

.skeleton-flag {
  width: 100%;
  height: 8rem;
  border-radius: 0.375rem;
  background-color: #0b1220; /* deep backdrop */
  border: 1px solid #374151; /* gray-700 */
}

/* Country Hunt mini-game styles */
.game-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.25rem 0.6rem;
  border-radius: 9999px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  background: linear-gradient(135deg, #1d4ed8, #06b6d4);
  color: #f9fafb;
  box-shadow: 0 0 0 1px rgba(15,23,42,0.8), 0 6px 10px rgba(0,0,0,0.5);
}

.game-badge-found {
  background: linear-gradient(135deg, #22c55e, #a3e635);
  color: #022c22;
}

.game-feedback {
  padding: 0.4rem 0.55rem;
  border-radius: 0.5rem;
  border-width: 1px;
  border-style: solid;
}

.game-feedback-neutral {
  background-color: rgba(15,23,42,0.8);
  border-color: rgba(55,65,81,0.9);
  color: #e5e7eb;
}

.game-feedback-good {
  background: linear-gradient(135deg, rgba(16,185,129,0.18), rgba(74,222,128,0.15));
  border-color: rgba(34,197,94,0.7);
  color: #bbf7d0;
}

.game-feedback-great {
  background: radial-gradient(circle at top, rgba(250,204,21,0.4), rgba(34,197,94,0.4));
  border-color: rgba(250,204,21,0.9);
  color: #fef9c3;
}

.game-feedback-bad {
  background: linear-gradient(135deg, rgba(248,113,113,0.12), rgba(239,68,68,0.18));
  border-color: rgba(239,68,68,0.8);
  color: #fecaca;
}

/* Country Hunt popups and confetti */
.game-popup-backdrop {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(15,23,42,0.75);
  z-index: 60;
}

.game-popup {
  max-width: 20rem;
  width: 90%;
  border-radius: 0.75rem;
  padding: 0.9rem 1rem;
  background: radial-gradient(circle at top, #0f172a, #020617);
  border: 1px solid rgba(148,163,184,0.7);
  box-shadow: 0 18px 40px rgba(0,0,0,0.75);
}

.game-popup-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #fbbf24;
  margin-bottom: 0.35rem;
}

.game-popup-body {
  font-size: 0.8rem;
  color: #e5e7eb;
  margin-bottom: 0.7rem;
}

.game-popup-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.3rem 0.85rem;
  border-radius: 9999px;
  font-size: 0.8rem;
  font-weight: 600;
  background: linear-gradient(135deg, #22c55e, #4ade80);
  color: #022c22;
  border: none;
  cursor: pointer;
}

.game-popup-button-secondary {
  background: linear-gradient(135deg, #0ea5e9, #22d3ee);
  color: #0b1120;
}

.confetti-piece {
  position: fixed;
  width: 6px;
  height: 10px;
  border-radius: 2px;
  opacity: 0.9;
  z-index: 55;
  pointer-events: none;
  animation: confetti-fall 1.2s ease-out forwards;
}

@keyframes confetti-fall {
  0% { transform: translateY(-10vh) rotate(0deg); opacity: 1; }
  100% { transform: translateY(60vh) rotate(360deg); opacity: 0; }
}

/* Big pulsing focus ring to highlight the target country centroid */
.game-focus-ring {
  position: fixed;
  width: 180px; /* large enough for tiny countries */
  height: 180px;
  border-radius: 9999px;
  border: 4px solid rgba(250,204,21,0.95); /* amber */
  box-shadow: 0 0 0 8px rgba(250,204,21,0.25), 0 0 40px rgba(250,204,21,0.35);
  pointer-events: none;
  z-index: 65;
  animation: focus-pulse 1.3s ease-out infinite;
}

@keyframes focus-pulse {
  0% { transform: scale(0.85); opacity: 1; }
  60% { transform: scale(1.05); opacity: 0.9; }
  100% { transform: scale(0.9); opacity: 0.95; }
}

/* Hide native fullscreen button in Webkit to use custom wrapper fullscreen */
video::-webkit-media-controls-fullscreen-button {
  display: none !important;
}
