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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: #f0f4f8;
  color: #2d3748;
}

header {
  background: #1a365d;
  color: white;
  padding: 1.2rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}

header h1 {
  font-size: 1.4rem;
  font-weight: 700;
}

#status-bar {
  font-size: 0.85rem;
  opacity: 0.85;
  display: flex;
  gap: 1.2rem;
  flex-wrap: wrap;
}

#status-bar span {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

#pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #68d391;
  animation: pulse 2s infinite;
  display: inline-block;
}

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

  50% {
    opacity: 0.3;
  }
}

#map-container {
  position: relative;
}

#map {
  width: 100%;
  height: calc(100vh - 130px);
  min-height: 400px;
}

#rider-panel {
  position: absolute;
  bottom: 2rem;
  right: 1rem;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-width: 220px;
}

.rider-card {
  background: white;
  border: 2px solid transparent;
  border-radius: 8px;
  padding: 0.6rem 0.9rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.88rem;
}

.rider-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}

.rider-name {
  font-weight: 600;
  flex: 1;
}

.rider-speed {
  font-size: 0.8rem;
  color: #718096;
  white-space: nowrap;
}

.rider-age {
  font-size: 0.75rem;
  color: #a0aec0;
  margin-top: 1px;
}

.rider-stale {
  opacity: 0.7;
  border-color: #718096;
  border-style: dotted;
}

.rider-marker-dot {
  width: 18px;
  height: 18px;
  border-radius: 75%;
  border: 3px solid #718096;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
}

.rider-marker-stale {
  opacity: 0.7;
  border-color: #718096;
  border-style: dotted;
}

#not-started-banner {
  display: none;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1000;
  background: rgba(26, 54, 93, 0.92);
  color: white;
  padding: 1.5rem 2.5rem;
  border-radius: 12px;
  text-align: center;
  font-size: 1.1rem;
  pointer-events: none;
}

#not-started-banner strong {
  display: block;
  font-size: 1.4rem;
  margin-bottom: 0.4rem;
}

.waypoint-label {
  background: white;
  border: none;
  border-radius: 4px;
  padding: 2px 6px;
  font-size: 0.75rem;
  font-weight: 600;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
  white-space: nowrap;
}

.distance-waypoint-badge {
  display: inline-block;
  transform: translate(-50%, -50%);
  background: #1e1cc1;
  color: white;
  border-radius: 6px;
  padding: 2px 7px;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
}

.distance-waypoint-icon {
  width: auto !important;
  height: auto !important;
  background: none;
  border: none;
}

footer {
  background: #1a365d;
  color: rgba(255, 255, 255, 0.6);
  text-align: center;
  font-size: 0.75rem;
  padding: 0.4rem;
}
