* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  background-color: #121214;
  color: #ffffff;
  user-select: none;
}

#app {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
}

#map {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
  background: #18191c;
}

/* ---------------- Top Bar ---------------- */
.top-bar {
  position: absolute;
  top: 12px;
  left: 12px;
  right: 12px;
  z-index: 1000;
  display: flex;
  justify-content: space-between;
  align-items: center;
  pointer-events: none;
  gap: 8px;
}

.loc-badge, .time-badge {
  pointer-events: auto;
  background: rgba(22, 24, 29, 0.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
  max-width: 60%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.loc-badge .text {
  overflow: hidden;
  text-overflow: ellipsis;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  background-color: #30d158;
  border-radius: 50%;
  box-shadow: 0 0 8px #30d158;
  animation: pulse 1.8s infinite;
  flex-shrink: 0;
}

@keyframes pulse {
  0% { transform: scale(0.9); opacity: 0.8; }
  50% { transform: scale(1.3); opacity: 1; }
  100% { transform: scale(0.9); opacity: 0.8; }
}

/* ---------------- Floating Action Buttons ---------------- */
.fab-container {
  position: absolute;
  top: 64px;
  right: 14px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.fab-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(22, 24, 29, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
  transition: transform 0.15s ease, background 0.2s ease;
}

.fab-btn:active {
  transform: scale(0.92);
  background: rgba(45, 48, 56, 0.95);
}

/* ---------------- Legend ---------------- */
.radar-legend {
  position: absolute;
  bottom: 96px;
  left: 14px;
  right: 14px;
  z-index: 1000;
  background: rgba(20, 22, 27, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 6px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.legend-label {
  font-size: 11px;
  color: #98989f;
  font-weight: 500;
}

.legend-gradient {
  width: 100%;
  height: 6px;
  border-radius: 4px;
  background: linear-gradient(
    to right,
    rgba(0, 160, 255, 0.8),
    rgba(0, 230, 120, 0.85),
    rgba(255, 220, 0, 0.9),
    rgba(255, 120, 0, 0.95),
    rgba(255, 30, 30, 1),
    rgba(200, 0, 255, 1)
  );
}

.legend-ticks {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: #a0a0a8;
}

/* ---------------- Bottom Player Bar ---------------- */
.bottom-player {
  position: absolute;
  bottom: 14px;
  left: 12px;
  right: 12px;
  z-index: 1000;
  background: rgba(22, 24, 29, 0.92);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 20px;
  padding: 10px 14px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.5);
}

.player-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ctrl-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #ffffff;
  border-radius: 50%;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.ctrl-btn:active {
  transform: scale(0.92);
  background: rgba(255, 255, 255, 0.2);
}

.play-btn {
  width: 44px;
  height: 44px;
  background: #2ea6ff;
  border: none;
  box-shadow: 0 4px 14px rgba(46, 166, 255, 0.4);
}

.play-btn:active {
  background: #1c92e5;
}

.hidden {
  display: none !important;
}

.slider-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 3px;
  outline: none;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
  cursor: pointer;
  transition: transform 0.1s ease;
}

input[type="range"]::-webkit-slider-thumb:active {
  transform: scale(1.25);
  background: #2ea6ff;
}

.timeline-labels {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: #8c8c96;
}

.timeline-labels .active {
  color: #2ea6ff;
  font-weight: 600;
}

/* Leaflet attribution styling */
.leaflet-control-attribution {
  background: rgba(0, 0, 0, 0.5) !important;
  color: #888888 !important;
  font-size: 9px !important;
  border-radius: 4px;
  margin: 0 4px 4px 0 !important;
}

.leaflet-control-attribution a {
  color: #aaa !important;
}

/* OpenStreetMap Dark Mode filter - 100% free, no watermarks, full zoom */
.osm-dark-tiles {
  filter: invert(100%) hue-rotate(180deg) brightness(95%) contrast(90%);
}

