
/* SOTF Global Monitor / World Monitor v38 */
:root {
  --wm-bg: #020503;
  --wm-panel: rgba(5, 12, 8, .74);
  --wm-panel-strong: rgba(2, 8, 5, .88);
  --wm-green: #70ff9a;
  --wm-green-soft: rgba(112, 255, 154, .78);
  --wm-amber: #f0cf77;
  --wm-red: #ff4c4c;
  --wm-blue: #6bb8ff;
  --wm-text: #e8f5df;
  --wm-muted: rgba(232, 245, 223, .66);
}

html,
body.worldmonitor-page {
  width: 100%;
  height: 100%;
  min-height: 100%;
  margin: 0;
  overflow: hidden;
  background: var(--wm-bg);
  color: var(--wm-text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.world-map {
  position: fixed;
  inset: 0;
  z-index: 1;
  background:
    radial-gradient(circle at 50% 50%, rgba(42, 71, 45, .42), transparent 36%),
    linear-gradient(135deg, #06100b, #020503 62%, #000);
}

.wm-map-fallback {
  position: fixed;
  inset: 0;
  z-index: 1;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at center, rgba(112,255,154,.08), transparent 34%),
    linear-gradient(135deg, #06100b, #020503);
  color: var(--wm-green-soft);
  text-align: center;
  padding: 28px;
}

.wm-grid-overlay {
  position: fixed;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  opacity: .22;
  background:
    linear-gradient(rgba(112,255,154,.15) 1px, transparent 1px),
    linear-gradient(90deg, rgba(112,255,154,.11) 1px, transparent 1px);
  background-size: 52px 52px;
  mix-blend-mode: screen;
}

.wm-scanline {
  position: fixed;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  opacity: .15;
  background:
    repeating-linear-gradient(to bottom, rgba(255,255,255,.055) 0 1px, transparent 1px 5px),
    linear-gradient(115deg, transparent 0 42%, rgba(112,255,154,.12) 48%, transparent 54% 100%);
  animation: wmSweep 7s linear infinite;
}

.wm-radar {
  position: fixed;
  right: -190px;
  top: -190px;
  z-index: 4;
  width: 560px;
  height: 560px;
  pointer-events: none;
  border-radius: 50%;
  border: 1px solid rgba(112,255,154,.17);
  background:
    conic-gradient(from 0deg, transparent 0 74%, rgba(112,255,154,.20), transparent 88% 100%),
    repeating-radial-gradient(circle, transparent 0 62px, rgba(112,255,154,.12) 63px, transparent 64px);
  opacity: .45;
  animation: wmRadar 8s linear infinite;
}

.wm-hud {
  position: fixed;
  z-index: 10;
  border: 1px solid rgba(112,255,154,.30);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(5,12,8,.76), rgba(0,0,0,.58)),
    radial-gradient(circle at top left, rgba(112,255,154,.10), transparent 48%);
  box-shadow:
    0 20px 60px rgba(0,0,0,.50),
    0 0 28px rgba(112,255,154,.075),
    inset 0 0 0 1px rgba(255,255,255,.035);
  backdrop-filter: blur(14px) saturate(140%);
}

.wm-top-left {
  top: 22px;
  left: 22px;
  width: min(440px, calc(100vw - 44px));
  padding: 20px;
}

.wm-bottom-left {
  bottom: 22px;
  left: 22px;
  width: min(420px, calc(100vw - 44px));
  padding: 16px;
}

.wm-layer-panel {
  top: 22px;
  right: 22px;
  width: min(360px, calc(100vw - 44px));
  max-height: calc(100vh - 44px);
  overflow: auto;
  padding: 18px;
}

.wm-bottom-right {
  right: 22px;
  bottom: 22px;
  width: min(360px, calc(100vw - 44px));
  max-height: 260px;
  overflow: hidden;
  padding: 16px;
}

.wm-kicker {
  color: var(--wm-green);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.wm-top-left h1 {
  margin: 8px 0 3px;
  color: #fff;
  font-size: clamp(30px, 4vw, 46px);
  line-height: .9;
  letter-spacing: .08em;
  text-transform: uppercase;
  text-shadow: 0 0 22px rgba(112,255,154,.22);
}

.wm-top-left p {
  margin: 0 0 14px;
  color: var(--wm-amber);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: .15em;
  text-transform: uppercase;
}

.wm-status-grid,
.wm-telemetry {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.wm-status-grid div,
.wm-telemetry div {
  padding: 10px;
  border: 1px solid rgba(112,255,154,.16);
  border-radius: 12px;
  background: rgba(0,0,0,.24);
}

.wm-status-grid span,
.wm-telemetry span {
  display: block;
  color: var(--wm-muted);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .11em;
  text-transform: uppercase;
}

.wm-status-grid strong,
.wm-telemetry strong {
  display: block;
  margin-top: 5px;
  color: var(--wm-green);
  font-size: 14px;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.wm-mini-feed {
  margin-top: 14px;
  padding: 12px;
  border-radius: 12px;
  background: rgba(0,0,0,.25);
  font-family: Consolas, Monaco, "Courier New", monospace;
  color: rgba(207,255,219,.82);
  font-size: 12px;
}

.feed-line {
  margin: 4px 0;
}

.feed-line::before {
  content: ">";
  color: var(--wm-amber);
  margin-right: 8px;
}

.wm-panel-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: start;
  margin-bottom: 14px;
}

.wm-panel-head h2 {
  margin: 6px 0 0;
  color: #fff;
  font-size: 23px;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.wm-small-button,
.wm-exit,
.wm-layer-toggle {
  border: 1px solid rgba(112,255,154,.28);
  color: var(--wm-green);
  background: rgba(0,0,0,.32);
  border-radius: 999px;
  cursor: pointer;
  font-weight: 900;
  letter-spacing: .10em;
  text-transform: uppercase;
}

.wm-small-button {
  padding: 8px 10px;
  font-size: 10px;
}

.wm-exit {
  display: inline-block;
  margin-top: 12px;
  padding: 10px 12px;
  text-decoration: none;
  font-size: 11px;
}

.wm-field {
  display: grid;
  gap: 7px;
  margin-bottom: 12px;
}

.wm-field span {
  color: var(--wm-muted);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.wm-field select {
  width: 100%;
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid rgba(112,255,154,.28);
  border-radius: 12px;
  background: #061108;
  color: var(--wm-text);
  font-weight: 900;
  outline: none;
}

.wm-layer-list {
  display: grid;
  gap: 8px;
  margin-top: 16px;
}

.wm-layer-toggle {
  width: 100%;
  display: grid;
  grid-template-columns: 12px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border-radius: 13px;
  text-align: left;
}

.wm-layer-toggle .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  box-shadow: 0 0 14px currentColor;
}

.wm-layer-toggle span.label {
  color: var(--wm-text);
  font-size: 12px;
}

.wm-layer-toggle span.count {
  color: var(--wm-muted);
  font-size: 10px;
}

.wm-layer-toggle:not(.active) {
  opacity: .48;
}

.wm-disclaimer {
  margin-top: 14px;
  padding: 12px;
  border-left: 3px solid var(--wm-amber);
  border-radius: 10px;
  background: rgba(240,207,119,.07);
  color: rgba(232,245,223,.70);
  font-size: 11px;
  line-height: 1.45;
}

.wm-alert-feed {
  margin-top: 10px;
  display: grid;
  gap: 8px;
  font-family: Consolas, Monaco, "Courier New", monospace;
  font-size: 12px;
}

.wm-alert-feed div {
  padding: 8px;
  border-radius: 10px;
  background: rgba(0,0,0,.28);
  color: rgba(207,255,219,.82);
}

.wm-alert-feed strong {
  color: var(--wm-amber);
}

.wm-marker {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  cursor: pointer;
  position: relative;
  box-shadow: 0 0 20px currentColor, 0 0 4px #fff inset;
  animation: wmPulse 1.9s ease-in-out infinite;
}

.wm-marker::before {
  content: "";
  position: absolute;
  inset: -8px;
  border: 1px solid currentColor;
  border-radius: 50%;
  opacity: .42;
}

.wm-marker::after {
  content: attr(data-code);
  position: absolute;
  left: 50%;
  top: -22px;
  transform: translateX(-50%);
  color: #fff;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .08em;
  text-shadow: 0 2px 8px #000;
}

.wm-popup .maplibregl-popup-content {
  border: 1px solid rgba(112,255,154,.35);
  border-radius: 14px;
  background: rgba(2, 8, 5, .94);
  color: var(--wm-text);
  box-shadow: 0 16px 48px rgba(0,0,0,.58), 0 0 26px rgba(112,255,154,.12);
}

.wm-popup .maplibregl-popup-tip {
  border-top-color: rgba(2, 8, 5, .94) !important;
  border-bottom-color: rgba(2, 8, 5, .94) !important;
}

.wm-popup-card {
  min-width: 230px;
}

.wm-popup-card .category {
  color: var(--wm-green);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.wm-popup-card h3 {
  margin: 6px 0 10px;
  color: #fff;
  font-size: 18px;
  line-height: 1.1;
}

.wm-popup-card dl {
  display: grid;
  grid-template-columns: 82px 1fr;
  gap: 5px 8px;
  margin: 0 0 10px;
  font-size: 12px;
}

.wm-popup-card dt {
  color: var(--wm-muted);
  text-transform: uppercase;
  letter-spacing: .08em;
}

.wm-popup-card dd {
  margin: 0;
  color: var(--wm-text);
}

.wm-popup-card p {
  margin: 0;
  color: rgba(232,245,223,.78);
  font-size: 12px;
  line-height: 1.45;
}

.maplibregl-ctrl-bottom-left,
.maplibregl-ctrl-bottom-right {
  display: none !important;
}

@keyframes wmPulse {
  0%, 100% { transform: scale(1); opacity: .86; }
  50% { transform: scale(1.2); opacity: 1; }
}

@keyframes wmRadar {
  to { transform: rotate(360deg); }
}

@keyframes wmSweep {
  from { transform: translateX(-22%); }
  to { transform: translateX(22%); }
}

@media (max-width: 920px) {
  body.worldmonitor-page {
    overflow: auto;
  }

  .world-map {
    position: fixed;
    height: 100vh;
  }

  .wm-top-left,
  .wm-bottom-left,
  .wm-layer-panel,
  .wm-bottom-right {
    position: relative;
    left: auto;
    right: auto;
    top: auto;
    bottom: auto;
    width: calc(100vw - 28px);
    margin: 14px;
  }

  .wm-layer-panel {
    max-height: none;
  }

  .wm-bottom-right {
    margin-bottom: 28px;
  }

  .wm-status-grid,
  .wm-telemetry {
    grid-template-columns: 1fr;
  }
}


/* Live public data source status v39 */
.wm-source-status {
  display: grid;
  gap: 7px;
  margin-top: 14px;
  padding: 12px;
  border: 1px solid rgba(112,255,154,.18);
  border-radius: 12px;
  background: rgba(0,0,0,.26);
}

.wm-source-title {
  color: var(--wm-amber);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.wm-source-status div:not(.wm-source-title) {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: rgba(232,245,223,.72);
  font-size: 11px;
}

.wm-source-status strong {
  color: var(--wm-green);
  font-weight: 900;
}

.wm-source-status span {
  text-align: right;
  color: rgba(232,245,223,.62);
}

.wm-layer-toggle .label {
  display: grid;
  gap: 2px;
}

.wm-layer-toggle .label small {
  display: block;
  color: rgba(232,245,223,.48);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}
