* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-family: Inter, Arial, sans-serif;
  background: #050505;
  color: white;
}

#app {
  width: 100%;
  height: 100vh;
  display: flex;
}

#sidebar {
  width: 320px;
  background: #0d0d0d;
  border-right: 1px solid #1f1f1f;
  padding: 24px;
  overflow-y: auto;
}

.brand h1 {
  margin: 0;
  font-size: 32px;
  letter-spacing: 2px;
}

.brand p {
  margin-top: 8px;
  color: #999;
  font-size: 13px;
  letter-spacing: 1px;
}

.section-title {
  margin-top: 40px;
  margin-bottom: 16px;
  color: #888;
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 1px;
}

.preset-button {
  width: 100%;
  padding: 16px;
  border: 1px solid #2a2a2a;
  background: #141414;
  color: white;
  border-radius: 16px;
  margin-bottom: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
  font-size: 15px;
}

.preset-button:hover {
  background: #1d1d1d;
}

.preset-button.active {
  background: #2563eb;
  border-color: #60a5fa;
}

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

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

#legend {
  position: absolute;
  bottom: 24px;
  left: 24px;
  background: rgba(0,0,0,0.85);
  border: 1px solid #333;
  padding: 16px;
  border-radius: 18px;
  z-index: 10;
}

.legend-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  font-size: 14px;
}

.legend-color {
  width: 16px;
  height: 16px;
  border-radius: 4px;
}

.green {
  background: #22c55e;
}

.yellow {
  background: #eab308;
}

.red {
  background: #ef4444;
}

.gray {
  background: #444;
}

/* --- Country popup --- */

.country-popup .maplibregl-popup-content {
  background: #111;
  border: 1px solid #2a2a2a;
  border-radius: 14px;
  padding: 0;
  color: #fff;
  font-family: Inter, Arial, sans-serif;
  font-size: 13px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.6);
  min-width: 220px;
}

.country-popup .maplibregl-popup-tip {
  border-top-color: #111;
}

.cp-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 16px 10px;
  border-bottom: 1px solid #1f1f1f;
}

.cp-flag {
  font-size: 22px;
  line-height: 1;
  flex-shrink: 0;
}

.cp-name {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
  color: #f0f0f0;
}

.cp-status {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 500;
  color: #e0e0e0;
}

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

.cp-divider {
  height: 1px;
  background: #1f1f1f;
  margin: 0 16px;
}

.cp-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding: 7px 16px;
  font-size: 12px;
  color: #ccc;
}

.cp-label {
  color: #666;
  flex-shrink: 0;
}

/* --- Attribution --- */

#attribution {
  position: absolute;
  bottom: 8px;
  right: 16px;
  font-size: 11px;
  color: #666;
  z-index: 10;
}

#attribution a {
  color: #888;
  text-decoration: none;
}

#attribution a:hover {
  color: #bbb;
}

.cp-tiny {
  padding: 6px 16px 12px;
  font-size: 11px;
  color: #888;
}
