:root {
  --bg: #0b0f14;
  --panel: rgb(15 20 28 / 85%);
  --border: rgb(255 255 255 / 8%);
  --text: #e6edf3;
  --muted: #8b98a5;
  --accent: #35d0ba;
  --dot-live: #35d0ba;
  --dot-dead: #e5534b;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

body {
  display: flex;
  overflow: hidden;
}

#map {
  flex: 1;
  min-width: 0;
  min-height: 0;
  margin: 16px;
  border-radius: 12px;
  overflow: hidden;
  background: var(--bg);
  position: relative;
}

#map-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

#map-svg .land {
  fill: #1c2733;
  stroke: rgb(255 255 255 / 6%);
  stroke-width: 0.5;
}

.hud {
  position: fixed;
  z-index: 1000;
  pointer-events: none;
}

.hud > * {
  pointer-events: auto;
}

.header {
  top: 16px;
  left: 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 16px;
  backdrop-filter: blur(6px);
  max-width: min(90vw, 360px);
}

.header-top {
  display: flex;
  align-items: center;
  gap: 10px;
}

.header h1 {
  font-size: 15px;
  font-weight: 600;
  margin: 0;
  letter-spacing: 0.02em;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--dot-dead);
  box-shadow: 0 0 6px var(--dot-dead);
  transition: background 0.2s, box-shadow 0.2s;
}

.status-dot.live {
  background: var(--dot-live);
  box-shadow: 0 0 6px var(--dot-live);
}

.stats {
  font-variant-numeric: tabular-nums;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.feed {
  width: 280px;
  flex-shrink: 0;
  height: 100%;
  overflow-y: auto;
  background: var(--panel);
  border-left: 1px solid var(--border);
  backdrop-filter: blur(6px);
}

.feed h2 {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin: 0;
  padding: 12px 14px 8px;
  position: sticky;
  top: 0;
  background: var(--panel);
}

.feed-item {
  padding: 8px 14px;
  border-top: 1px solid var(--border);
  font-size: 13px;
  display: flex;
  justify-content: space-between;
  gap: 8px;
  animation: fade-in 0.3s ease-out;
}

.feed-item .place {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.feed-item .ip {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}

@keyframes fade-in {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (width <= 640px) {
  body {
    flex-direction: column;
  }

  #map {
    margin: 10px;
  }

  .header {
    top: 10px;
    left: 10px;
    padding: 8px 12px;
    gap: 8px;
  }

  .header h1 {
    font-size: 13px;
  }

  .stats {
    font-size: 11px;
  }

  .feed {
    width: auto;
    height: 30vh;
    border-left: none;
    border-top: 1px solid var(--border);
  }
}
