* {
  box-sizing: border-box;
}

/* =======================
   BASE
======================= */

body {
  margin: 0;
  font-family: "Segoe UI", system-ui, Arial;
  background: #ffffff;

  overflow-x: hidden;
  overflow-y: auto;

  color: #1f2d3d;
}

/* =======================
   GRID (BOTTOM LAYER)
======================= */

body::before {
  content: "";
  position: fixed;
  inset: 0;

  background-image:
    linear-gradient(to right, rgba(0,0,0,0.08) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(0,0,0,0.08) 1px, transparent 1px);

  background-size: 30px 30px;

  z-index: 0;
  pointer-events: none;
}

/* =======================
   PARTICLES (MIDDLE LAYER)
======================= */

.particle {
  position: fixed;

  border-radius: 50%;
  opacity: 0.65;

  box-shadow: 0 0 10px rgba(0,0,0,0.2);

  pointer-events: none;

  z-index: 2;
}

.green { background: #2ecc71; }
.yellow { background: #f1c40f; }
.orange { background: #e67e22; }
.red { background: #e74c3c; }

/* =======================
   MAP
======================= */

#map {
  height: 100vh;
  width: 100vw;

  position: fixed;
  top: 0;
  left: 0;

  z-index: 1;
}

/* Leaflet internal layers must stay under UI */
.leaflet-pane {
  z-index: 1 !important;
}

.leaflet-top,
.leaflet-bottom {
  z-index: 2 !important;
}

/* =======================
   PARTICLES (ABOVE MAP, BELOW UI)
======================= */

.particle {
  position: fixed;

  border-radius: 50%;
  opacity: 0.65;

  box-shadow: 0 0 10px rgba(0,0,0,0.2);

  pointer-events: none;

  z-index: 0; /* 👈 KEY CHANGE */
}

/* =======================
   FOREGROUND CONTENT
======================= */

.container {
  position: relative;
  z-index: 10;

  max-width: 900px;
  margin: 80px auto;
  text-align: center;
}

h1 {
  font-size: 52px;
  color: #174a7a;
  margin-bottom: 10px;
}

p {
  color: #4b5b6b;
  font-size: 17px;
}

/* =======================
   ABOUT CARDS
======================= */

.about-card {
  background: #0b2a4a;
  color: white;

  padding: 22px;
  border-radius: 14px;
  margin-top: 18px;

  box-shadow: 0 10px 25px rgba(0,0,0,0.15);

  text-align: left;
  line-height: 1.6;
}

.about-card h3 {
  margin-top: 0;
  font-size: 18px;
}

.about-card p {
  color: rgba(255,255,255,0.85);
  font-size: 15px;
}

/* =======================
   TOP BANNER
======================= */

.top-banner {
  background: #0b2a4a;
  color: white;

  padding: 16px 24px;
  font-size: 22px;
  font-weight: 600;

  position: relative;
  z-index: 9999;
}

/* =======================
   NAVBAR
======================= */

.navbar {
  position: relative;
  z-index: 9999;

  display: flex;
  justify-content: center;
  gap: 12px;

  background: #0f3b66;
  padding: 10px;
}

.navbar a {
  color: white;
  text-decoration: none;

  padding: 8px 14px;
  border-radius: 8px;

  background: #1f5fa8;
}

.navbar a:hover {
  background: #2c7be5;
}

/* =======================
   PM PANEL
======================= */

.pm-toggle {
  position: absolute;
  top: 160px;
  right: 15px;

  z-index: 3000;

  background: #0b2a4a;
  padding: 12px;
  border-radius: 12px;

  width: 130px;

  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pm-title {
  color: white;
  font-size: 12px;
  text-align: center;
  font-weight: 600;
}

.pm-toggle button {
  background: rgba(255,255,255,0.1);
  color: white;

  border: none;
  padding: 6px;

  border-radius: 6px;

  cursor: pointer;
}

.pm-toggle button.active {
  background: white;
  color: #0b2a4a;
}

/* =======================
   DATA TILES
======================= */

#data-panel {
  position: absolute;
  top: 160px;
  left: 15px;

  z-index: 3000;

  display: flex;
  flex-direction: column;
  gap: 10px;
}

.tile {
  width: 140px;
  height: 110px;

  background: rgba(11, 42, 74, 0.92);
  color: white;

  border-radius: 14px;

  box-shadow: 0 10px 25px rgba(0,0,0,0.25);

  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.tile .label {
  font-size: 11px;
  opacity: 0.75;
}

.tile .value {
  font-size: 28px;
  font-weight: 700;
  margin-top: 6px;
}

/* =======================
   HEAT DOTS
======================= */

.heat-dot {
  position: absolute;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;

  filter: blur(18px);
  opacity: 0.35;
}

.heat-green { background: #2ecc71; }
.heat-yellow { background: #f1c40f; }
.heat-orange { background: #e67e22; }
.heat-red { background: #e74c3c; }
