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

:root {
    --bg: #0a0a0f;
    --surface: #111118;
    --border: #1e1e2e;
    --accent: #00ff88;
    --accent-dim: #00ff8833;
    --text: #e0e0e0;
    --muted: #555570;
    --danger: #ff4466;
    --mono: 'JetBrains Mono', monospace;
    --sans: 'Inter', sans-serif;
}
html, body {
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  overflow: hidden;
}
 
/* ── Layout ── */
body {
  display: flex;
}
 
.sidebar {
  width: 300px;
  min-width: 300px;
  height: 100vh;
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 24px 20px;
  gap: 20px;
  overflow: hidden;
}
 
.map-container {
  flex: 1;
  position: relative;
}
 
#map {
  width: 100%;
  height: 100%;
  background: #0d0d1a;
}
 
/* ── Logo ── */
header {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
 
.logo {
  font-family: var(--mono);
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -1px;
  color: var(--text);
}
 
.logo-bracket {
  color: var(--muted);
}
 
.logo-accent {
  color: var(--accent);
}
 
.tagline {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 2px;
  text-transform: uppercase;
}
 
/* ── Status bar ── */
.status-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 8px 12px;
}
 
.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--muted);
  flex-shrink: 0;
  transition: background 0.3s;
}
 
.status-dot.active {
  background: var(--accent);
  box-shadow: 0 0 6px var(--accent);
  animation: pulse 2s infinite;
}
 
.status-dot.error {
  background: var(--danger);
}
 
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.4; }
}
 
/* ── Stats ── */
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
 
.stat {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 10px 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-align: center;
}
 
.stat-label {
  font-family: var(--mono);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--muted);
}
 
.stat-value {
  font-family: var(--mono);
  font-size: 20px;
  font-weight: 700;
  color: var(--accent);
}
 
/* ── Log list ── */
.log-list {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}
 
.log-empty {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
  text-align: center;
  padding: 20px 0;
}
 
.log-item {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  cursor: pointer;
  transition: border-color 0.15s;
}
 
.log-item:hover {
  border-color: var(--accent);
}
 
.log-item.latest {
  border-color: var(--accent-dim);
}
 
.log-ip {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
}
 
.log-location {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text);
}
 
.log-isp {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
 
.log-time {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--muted);
}
 
/* ── Clear button ── */
.clear-btn {
  font-family: var(--mono);
  font-size: 12px;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted);
  padding: 8px;
  border-radius: 6px;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: border-color 0.15s, color 0.15s;
}
 
.clear-btn:hover {
  border-color: var(--danger);
  color: var(--danger);
}
 
/* ── Map overlay ── */
.map-overlay {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 1000;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 8px 14px;
}
 
.current-ip {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--accent);
}
 
/* ── Leaflet overrides ── */
.leaflet-container {
  background: #0d0d1a !important;
  font-family: var(--mono) !important;
}
 
.leaflet-tile {
  filter: invert(1) hue-rotate(180deg) brightness(0.85) saturate(0.7);
}
 
.leaflet-popup-content-wrapper {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  box-shadow: 0 4px 20px #00000088;
}
 
.leaflet-popup-tip {
  background: var(--surface);
}
 
.leaflet-popup-content {
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.7;
  margin: 12px 16px;
}
 
.popup-ip {
  font-size: 14px;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 4px;
}
 
.popup-label {
  color: var(--muted);
}
 