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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #0f0f1a;
  color: #fff;
  overflow: hidden;
  height: 100vh;
  width: 100vw;
}

#app {
  position: relative;
  width: 100%;
  height: 100%;
}

#map {
  width: 100%;
  height: 100%;
  z-index: 1;
}

/* Stats bar */
#stats {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(15, 15, 26, 0.85);
  backdrop-filter: blur(10px);
  padding: 10px 20px;
  border-radius: 25px;
  font-size: 13px;
  color: #aaa;
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 10px;
}

#stats #plane-count {
  color: #00d4ff;
  font-weight: 600;
}

#stats .separator {
  color: #333;
}

/* Sidebar */
.sidebar {
  position: fixed;
  top: 0;
  right: 0;
  width: 320px;
  height: 100%;
  background: rgba(15, 15, 26, 0.92);
  backdrop-filter: blur(20px);
  z-index: 1001;
  padding: 20px;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border-left: 1px solid rgba(0, 212, 255, 0.1);
}

.sidebar.visible {
  transform: translateX(0);
}

.sidebar.hidden {
  transform: translateX(100%);
}

.close-btn {
  position: absolute;
  top: 15px;
  right: 15px;
  background: none;
  border: none;
  color: #666;
  font-size: 28px;
  cursor: pointer;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s;
}

.close-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

/* Flight info */
.flight-header {
  margin-bottom: 25px;
  padding-bottom: 15px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.callsign {
  display: block;
  font-size: 24px;
  font-weight: 700;
  color: #00d4ff;
  letter-spacing: 1px;
}

.country {
  display: block;
  font-size: 13px;
  color: #666;
  margin-top: 4px;
}

.flight-details {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.detail-row .label {
  color: #666;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.detail-row .value {
  color: #ddd;
  font-size: 15px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

/* Aircraft marker */
.aircraft-marker {
  transition: transform 0.1s linear;
}

.aircraft-marker svg {
  filter: drop-shadow(0 0 4px rgba(0, 212, 255, 0.4));
}

.aircraft-marker.selected svg {
  filter: drop-shadow(0 0 8px rgba(0, 212, 255, 0.8));
}

/* Leaflet customizations */
.leaflet-control-zoom {
  border: none !important;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3) !important;
}

.leaflet-control-zoom a {
  background: rgba(15, 15, 26, 0.9) !important;
  color: #aaa !important;
  border: none !important;
  width: 36px !important;
  height: 36px !important;
  line-height: 36px !important;
  font-size: 18px !important;
}

.leaflet-control-zoom a:hover {
  background: rgba(30, 30, 50, 0.95) !important;
  color: #00d4ff !important;
}

.leaflet-control-attribution {
  background: rgba(15, 15, 26, 0.7) !important;
  color: #444 !important;
  font-size: 10px !important;
}

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

/* Mobile */
@media (max-width: 768px) {
  .sidebar {
    width: 100%;
    height: 50%;
    top: auto;
    bottom: 0;
    transform: translateY(100%);
    border-left: none;
    border-top: 1px solid rgba(0, 212, 255, 0.1);
    border-radius: 20px 20px 0 0;
  }

  .sidebar.visible {
    transform: translateY(0);
  }

  .sidebar.hidden {
    transform: translateY(100%);
  }

  #stats {
    bottom: 10px;
    font-size: 12px;
    padding: 8px 16px;
  }
}
