* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #0f172a;
  color: #e2e8f0;
  overflow: hidden;
}

.app {
  display: flex;
  flex-direction: column;
  height: 100vh;
}

.header {
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #334155;
  flex-shrink: 0;
}

.header h1 {
  font-size: 1.5rem;
  font-weight: 700;
  background: linear-gradient(90deg, #fbbf24, #f59e0b);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.header-info {
  display: flex;
  gap: 16px;
  align-items: center;
  font-size: 0.85rem;
  color: #94a3b8;
}

.connected {
  color: #22c55e;
}

.disconnected {
  color: #ef4444;
  animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.controls {
  background: #1e293b;
  padding: 8px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid #334155;
  flex-shrink: 0;
}

.controls label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: #94a3b8;
}

.controls input[type="range"] {
  width: 150px;
  accent-color: #fbbf24;
}

.map-container {
  flex: 1;
  position: relative;
}

#map {
  width: 100%;
  height: 100%;
}

.stats {
  background: #1e293b;
  padding: 8px 20px;
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  color: #94a3b8;
  border-top: 1px solid #334155;
  flex-shrink: 0;
}

.stats span {
  display: flex;
  align-items: center;
  gap: 8px;
}

.maplibregl-popup {
  max-width: 200px !important;
}

.maplibregl-popup-content {
  background: #1e293b !important;
  color: #e2e8f0 !important;
  border: 1px solid #334155 !important;
  border-radius: 8px !important;
  padding: 8px 12px !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5) !important;
}

.maplibregl-popup-tip {
  border-top-color: #1e293b !important;
}

.maplibregl-ctrl-top-right {
  margin: 10px;
}

.maplibregl-ctrl-group {
  background: #1e293b !important;
  border: 1px solid #334155 !important;
  border-radius: 8px !important;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5) !important;
}

.maplibregl-ctrl-group button {
  background: transparent !important;
  border: none !important;
}

.maplibregl-ctrl-group button:hover {
  background: #334155 !important;
}

.maplibregl-ctrl-group button .maplibregl-ctrl-icon {
  filter: invert(1) brightness(0.7);
}

@media (max-width: 768px) {
  .header {
    flex-direction: column;
    gap: 8px;
    align-items: flex-start;
  }

  .header-info {
    flex-direction: column;
    gap: 4px;
    align-items: flex-start;
  }

  .controls {
    flex-wrap: wrap;
  }

  .stats {
    flex-direction: column;
    gap: 4px;
  }
}
