/* ==========================================================
   CORE LAYOUT + ANIMATIONS – SPARKADE Neon Maps
   Base HTML, map wrapper, sync overlay, transitions
   ========================================================== */

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: #000;
  color: #0ff;
  font-family: monospace;
}

/* ---------- Fade Transitions ---------- */
.fade-out {
  opacity: 0;
  transition: opacity 0.8s ease;
  pointer-events: none;
}
.fade-in {
  opacity: 1;
  transition: opacity 1s ease;
}

/* ---------- Map Wrapper ---------- */
#map-wrapper {
  width: 100%;
  height: calc(100vh - 120px);
  opacity: 1;
  transition: opacity 1s ease;
}
#map {
  width: 100%;
  height: 100%;
}

/* ---------- Action Buttons ---------- */
#action-buttons {
  display: flex;
  justify-content: center;
  gap: 12px;
  padding: 10px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 1s ease;
}
.action-btn {
  padding: 8px 14px;
  border: 1px solid #0ff;
  background: rgba(0, 0, 0, 0.4);
  color: #0ff;
  border-radius: 8px;
  cursor: pointer;
  font-weight: bold;
  transition: all 0.2s ease;
}
.action-btn:hover {
  background: rgba(0, 255, 255, 0.1);
}

/* ---------- Footer ---------- */
footer {
  text-align: center;
  padding: 8px;
  color: #888;
  font-size: 0.8em;
}

/* ---------- UPLAND SYNC SPLASH ---------- */
#upland-sync-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.95);
  color: #0ff;
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  z-index: 9999;
  transition: opacity 0.5s ease;
}
#upland-sync-overlay.active {
  display: flex;
}

#upland-sync-text {
  font-size: 1.1em;
  margin-top: 10px;
  color: #0ff;
  text-shadow: 0 0 10px #0ff;
}

/* ---------- Loader ---------- */
.neon-loader {
  width: 60px;
  height: 60px;
  border: 4px solid #39ff14;
  border-top: 4px solid transparent;
  border-radius: 50%;
  margin: 20px auto;
  animation: spin 1s linear infinite;
}

/* ---------- Progress Bar ---------- */
#upland-progress-bar {
  width: 240px;
  height: 8px;
  background: rgba(0, 255, 255, 0.1);
  border: 1px solid #0ff;
  border-radius: 10px;
  overflow: hidden;
  margin: 10px auto 20px auto;
  box-shadow: 0 0 10px #00ffff55;
}
#upland-progress-fill {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, #39ff14, #0ff, #b300ff);
  box-shadow: 0 0 15px #39ff14, 0 0 25px #0ff;
  animation: pulseGlow 2.5s ease-in-out infinite alternate, colorShift 6s linear infinite;
  transition: width 0.8s ease;
}

/* ---------- Keyframes ---------- */
@keyframes spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
@keyframes pulseGlow {
  0%   { filter: brightness(1); box-shadow: 0 0 15px #39ff14, 0 0 25px #0ff; }
  50%  { filter: brightness(1.4); box-shadow: 0 0 25px #39ff14, 0 0 40px #b300ff; }
  100% { filter: brightness(1); box-shadow: 0 0 15px #0ff, 0 0 25px #b300ff; }
}
@keyframes colorShift {
  0%   { background: linear-gradient(90deg, #39ff14, #0ff); }
  50%  { background: linear-gradient(90deg, #0ff, #b300ff); }
  100% { background: linear-gradient(90deg, #b300ff, #39ff14); }
}
