/* ==============================================
   🌍 FUTURISTIC WORLD MAP — RESPONSIVE & SMOOTH
   Works on all devices (mobile → 4K)
   ============================================== */

/* Base Page Setup */
html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background: radial-gradient(circle at 50% 30%, #f9f9f9 0%, #eaeaea 100%);
  color: #111;
  overflow-x: hidden;
  overflow-y: auto;
  font-family: "Inter", "Segoe UI", Roboto, sans-serif;
}

/* ==============================================
   🗺️ MAP SECTION
   ============================================== */
.map-container {
  position: relative;
  width: 100%;
  background: radial-gradient(circle at 60% 40%, #ffffff 0%, #f3f4f6 100%);
  border-top: 1px solid rgba(0, 0, 0, 0.05);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  box-sizing: border-box;
  padding: 10px;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
}

/* SVG Map */
.map-container svg {
  width: 100%;
  height: auto;
  display: block;
  max-width: 1600px;
  aspect-ratio: 2 / 1;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.06));
  transition: transform 0.25s ease-in-out;
}

/* Country Shapes */
.country {
  fill: #fdfdfd;
  stroke: #b5b5b5;
  stroke-width: 0.5px;
  transition: all 0.2s ease;
  cursor: pointer;
}

.country:hover {
  fill: #d9f3ff;
  stroke: #0078d4;
  stroke-width: 1.2px;
  transform: scale(1.02);
  filter: drop-shadow(0 0 6px rgba(0, 120, 212, 0.3));
}

.country.active {
  fill: #0078d4;
  stroke: #004d99;
  stroke-width: 1.5px;
}

/* ==============================================
   🌍 TOOLTIP CIRCLE STYLE
   ============================================== */
.tooltip {
  position: absolute;
  background: rgba(0, 120, 212, 0.9);
  color: #fff;
  padding: 6px 12px;
  border-radius: 50%;
  text-align: center;
  font-size: 13px;
  pointer-events: none;
  display: none;
  backdrop-filter: blur(4px);
  white-space: nowrap;
  z-index: 9999;
  transition: all 0.2s ease-in-out;
  transform: translate(-50%, -100%) scale(1);
}

/* ==============================================
   🌐 ZOOM CONTROL (VERTICAL SLIDER + BUTTONS)
   ============================================== */
.zoom-controls {
  position: fixed;
  bottom: 100px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  background: rgba(0, 0, 0, 0.4);
  padding: 10px;
  border-radius: 16px;
  backdrop-filter: blur(6px);
  color: #fff;
  font-family: "Poppins", sans-serif;
}

/* Buttons */
.zoom-controls button {
  background: #00ffea;
  color: #000;
  font-size: 1.2rem;
  font-weight: bold;
  border: none;
  border-radius: 50%;
  width: 38px;
  height: 38px;
  cursor: pointer;
  transition: 0.2s;
}

.zoom-controls button:hover {
  background: #00e0c0;
  transform: scale(1.1);
}

/* Vertical Slider */
.zoom-controls input[type="range"] {
  -webkit-appearance: slider-vertical;
  writing-mode: bt-lr;
  width: 8px;
  height: 140px;
  accent-color: #00ffea;
  cursor: pointer;
  margin: -8px 0 10px 0;
}

/* Zoom Level Display */
#zoom-level {
  font-size: 0.9rem;
  color: #00ffea;
  font-weight: 600;
  margin-top: 5px;
}

/* ==============================================
   🔍 CURSOR BEHAVIOR
   ============================================== */
svg {
  cursor: grab;
}
svg.zoom-in {
  cursor: zoom-in;
}
svg.zoom-out {
  cursor: zoom-out;
}

/* ==============================================
   🌀 LOADING OVERLAY (transparent background)
   ============================================== */
#loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(255, 255, 255, 0); /* transparent instead of white */
  display: flex;
  align-items: center;      /* Centers vertically */
  justify-content: center;  /* Centers horizontally */
  z-index: 9999;
  font-family: 'Segoe UI', Roboto, sans-serif;
  cursor: progress;
  transition: opacity 0.3s ease;
  pointer-events: none; /* allow clicks to pass through */
}

/* 🧩 Centered container for spinner + text */
.loading-box {
  display: flex;
  flex-direction: column;   /* Stack spinner + text vertically */
  align-items: center;      /* Center horizontally */
  justify-content: center;  /* Balance content vertically */
  text-align: center;
  color: #222;
  pointer-events: auto;     /* only spinner/message is interactive */
}

/* 🔵 Spinner circle */
.spinner {
  border: 4px solid #ddd;
  border-top: 4px solid #0078ff;
  border-radius: 50%;
  width: 48px;
  height: 48px;
  animation: spin 1s linear infinite;
  margin-bottom: 12px;
}

/* 🔁 Rotation animation */
@keyframes spin {
  0%   { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* ✨ Hide overlay after fade-out */
#loading-overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

/* ==============================================
   📱 RESPONSIVE MEDIA QUERIES
   ============================================== */
@media (max-width: 480px) {
  .map-container {
    padding: 5px;
  }
  .map-container svg {
    aspect-ratio: 1.3 / 1;
  }
  .tooltip {
    font-size: 11px;
    padding: 5px 8px;
  }
  .zoom-controls {
    bottom: 15px;
    right: 15px;
    gap: 6px;
    padding: 8px 10px;
  }
  .zoom-controls input[type="range"] {
    width: 100px;
  }
}

@media (min-width: 481px) and (max-width: 768px) {
  .map-container svg {
    aspect-ratio: 1.6 / 1;
  }
}

@media (min-width: 769px) and (max-width: 1200px) {
  .map-container svg {
    max-width: 1400px;
  }
}

@media (min-width: 1600px) {
  .map-container svg {
    max-width: 2000px;
    filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.08));
  }
}
