/* ============================================================
   GLOBAL WARNING NETWORKS — Earth Portal Design System (2026)
   Live Real-Time USGS Earthwatch 3D Telemetry Interface
   ============================================================ */

@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&family=JetBrains+Mono:wght@400;500;700;800&family=Chakra+Petch:wght@500;700;800&display=swap");

:root {
  /* ---------------- Color Tokens: Core ---------------- */
  --void:           #000000;
  --space:          #06080f;
  --space-deep:     #0a0e1a;
  --space-raised:   #11172a;
  --space-card:     #161e33;
  --space-glass:    rgba(10, 14, 26, 0.82);
  --border-subtle:  #1e2535;
  --border-bright:  #2d3650;

  /* Ocean — Earth Blue */
  --ocean-900:      #0c1a2e;
  --ocean-800:      #142540;
  --ocean-700:      #1e3a64;
  --ocean-600:      #305080;
  --ocean-500:      #4878a8;
  --ocean-400:      #6090c0;
  --ocean-300:      #8eb6db;
  --ocean-cyan:     #5ab0ff;

  /* Alert — Broadcast Seismic Red */
  --alert-900:      #5a0a14;
  --alert-800:      #8a1320;
  --alert-700:      #b01828;
  --alert-600:      #d32034;
  --alert-500:      #e83a4e;
  --alert-400:      #ff5060;
  --alert-glow:     #ff3a50;

  /* Tsunami Warning — Electric Cyan / Teal */
  --tsunami-400:    #00f0ff;
  --tsunami-500:    #00c8e0;
  --tsunami-glow:   rgba(0, 240, 255, 0.45);
  --tsunami-bg:     rgba(0, 240, 255, 0.12);

  /* Flame — Amber Warning Beacon */
  --flame-500:      #f29024;
  --flame-400:      #ffb04a;

  /* Chrome — Metal / Typography */
  --chrome-100:     #f7f7f9;
  --chrome-200:     #e3e6ec;
  --chrome-300:     #c0c4cc;
  --chrome-400:     #9aa0aa;
  --chrome-500:     #707880;
  --chrome-600:     #4a5260;
  --chrome-700:     #2a3040;

  /* Fonts */
  --font-sans:      "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono:      "JetBrains Mono", monospace;
  --font-display:   "Chakra Petch", var(--font-sans);
}

/* ── Reset & Baseline ── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  user-select: none;
  -webkit-user-select: none;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: var(--void);
  color: var(--chrome-100);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── 3D Viewport ── */
#webgl-container {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  cursor: grab;
  outline: none;
}

#webgl-container:active {
  cursor: grabbing;
}

/* ── Starfield & Grid Backdrop Overlay ── */
.hud-grid-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  background:
    radial-gradient(circle at 50% 50%, rgba(30, 58, 100, 0.08) 0%, transparent 70%),
    linear-gradient(rgba(30, 37, 53, 0.15) 1px, transparent 1px),
    linear-gradient(90deg, rgba(30, 37, 53, 0.15) 1px, transparent 1px);
  background-size: 100% 100%, 64px 64px, 64px 64px;
}

/* ── 2D Atlas Map Viewport (Leaflet) ── */
#atlas-map {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 3;
  display: none;
  background: #0a0e1a;
}

body.atlas-active #atlas-map {
  display: block;
}

body.atlas-active #webgl-container,
body.atlas-active .hud-grid-overlay {
  visibility: hidden;
}

/* Leaflet chrome tuned to the portal dark theme */
#atlas-map .leaflet-control-zoom a {
  background: var(--space-glass);
  color: var(--chrome-100);
  border-color: var(--border-bright);
}

#atlas-map .leaflet-control-zoom a:hover {
  background: var(--space-raised);
  color: var(--ocean-cyan);
}

#atlas-map .leaflet-control-attribution {
  background: rgba(6, 8, 15, 0.72);
  color: var(--chrome-400);
  font-family: var(--font-mono);
  font-size: 9px;
}

#atlas-map .leaflet-control-attribution a {
  color: var(--ocean-cyan);
}

#atlas-map .leaflet-tooltip {
  background: var(--space-glass);
  border: 1px solid var(--border-bright);
  color: var(--chrome-100);
  font-family: var(--font-mono);
  font-size: 10px;
  box-shadow: none;
}

#atlas-map .leaflet-tooltip::before {
  border-top-color: var(--border-bright);
}

/* Keep the Leaflet stack under the portal HUD panels */
#atlas-map .leaflet-top,
#atlas-map .leaflet-bottom {
  z-index: 400;
}

#atlas-map .leaflet-top.leaflet-left {
  margin-top: 96px;
}

/* ── Basemap View Switcher ── */
.view-switcher {
  position: absolute;
  top: 76px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}

.view-segment {
  display: flex;
  background: var(--space-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-bright);
  border-radius: 6px;
  overflow: hidden;
}

.view-btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
  padding: 7px 14px;
  background: transparent;
  border: none;
  border-right: 1px solid var(--border-subtle);
  color: var(--chrome-400);
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease;
}

.view-btn:last-child {
  border-right: none;
}

.view-btn:hover {
  background: rgba(90, 176, 255, 0.08);
  color: var(--chrome-200);
}

.view-btn.active {
  background: rgba(90, 176, 255, 0.16);
  color: var(--ocean-cyan);
  box-shadow: inset 0 -2px 0 var(--ocean-cyan);
}

.view-btn-main {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.view-btn-sub {
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--chrome-500);
}

.view-btn.active .view-btn-sub {
  color: var(--ocean-400);
}

.labels-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 12px;
  background: var(--space-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-bright);
  border-radius: 6px;
  color: var(--chrome-400);
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: color 0.18s ease, border-color 0.18s ease;
}

.labels-toggle .labels-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--chrome-600);
  transition: background 0.18s ease, box-shadow 0.18s ease;
}

.labels-toggle.active {
  color: var(--ocean-cyan);
  border-color: var(--ocean-600);
}

.labels-toggle.active .labels-dot {
  background: var(--ocean-cyan);
  box-shadow: 0 0 8px var(--ocean-cyan);
}

@media (max-width: 860px) {
  .view-switcher {
    top: 70px;
    gap: 6px;
  }

  .view-btn {
    padding: 6px 9px;
  }

  .view-btn-main {
    font-size: 9px;
  }

  .view-btn-sub {
    display: none;
  }
}

/* ── Top Header Navigation Bar ── */
.portal-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 64px;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  background: linear-gradient(180deg, rgba(6, 8, 15, 0.94) 0%, rgba(6, 8, 15, 0.5) 80%, transparent 100%);
  border-bottom: 1px solid rgba(30, 37, 53, 0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.brand-section {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-icon-wrap {
  width: 36px;
  height: 36px;
  border-radius: 6px;
  background: var(--space-raised);
  border: 1px solid var(--ocean-cyan);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 14px rgba(90, 176, 255, 0.3);
  position: relative;
}

.brand-icon-wrap svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: var(--ocean-cyan);
  stroke-width: 2;
}

.brand-title {
  display: flex;
  flex-direction: column;
}

.brand-name {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--chrome-100);
  line-height: 1.1;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.2);
}

.brand-sub {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ocean-cyan);
}

.header-telemetry {
  display: flex;
  align-items: center;
  gap: 18px;
}

.live-badge {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 4px 10px;
  border-radius: 4px;
  background: rgba(211, 32, 52, 0.12);
  border: 1px solid rgba(255, 58, 80, 0.4);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--alert-glow);
}

.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--alert-glow);
  box-shadow: 0 0 8px var(--alert-glow);
  animation: radar-pulse 1.4s infinite ease-out;
}

@keyframes radar-pulse {
  0% { transform: scale(0.9); opacity: 0.9; }
  50% { transform: scale(1.4); opacity: 0.4; }
  100% { transform: scale(0.9); opacity: 0.9; }
}

.utc-clock {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  color: var(--chrome-400);
  letter-spacing: 0.08em;
  display: flex;
  align-items: center;
  gap: 6px;
}

.utc-clock span {
  color: var(--chrome-200);
  font-weight: 700;
}

.poll-status-chip {
  font-family: var(--font-mono);
  font-size: 9px;
  padding: 3px 8px;
  border-radius: 3px;
  background: var(--space-raised);
  border: 1px solid var(--border-bright);
  color: var(--ocean-cyan);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* ── Audio Control Button ── */
.btn-audio {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--space-raised);
  border: 1px solid var(--border-bright);
  color: var(--chrome-300);
  padding: 6px 12px;
  border-radius: 5px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.18s ease;
}

.btn-audio:hover {
  border-color: var(--ocean-cyan);
  color: var(--chrome-100);
  box-shadow: 0 0 10px rgba(90, 176, 255, 0.2);
}

.audio-bars {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 12px;
}

.audio-bar {
  width: 2px;
  background: var(--ocean-cyan);
  border-radius: 1px;
  height: 3px;
  transition: height 0.15s ease;
}

.btn-audio.active .audio-bar:nth-child(1) { animation: eq-1 0.7s infinite alternate ease-in-out; }
.btn-audio.active .audio-bar:nth-child(2) { animation: eq-2 0.5s infinite alternate ease-in-out 0.1s; }
.btn-audio.active .audio-bar:nth-child(3) { animation: eq-3 0.9s infinite alternate ease-in-out 0.2s; }
.btn-audio.active .audio-bar:nth-child(4) { animation: eq-4 0.6s infinite alternate ease-in-out 0.05s; }

@keyframes eq-1 { 0% { height: 3px; } 100% { height: 11px; } }
@keyframes eq-2 { 0% { height: 4px; } 100% { height: 13px; } }
@keyframes eq-3 { 0% { height: 2px; } 100% { height: 9px; } }
@keyframes eq-4 { 0% { height: 5px; } 100% { height: 12px; } }

/* ── Cyber Frame Corners ── */
.frame-corner {
  position: absolute;
  width: 10px;
  height: 10px;
  border-color: var(--ocean-cyan);
  border-style: solid;
  pointer-events: none;
}
.frame-corner.tl { top: -1px; left: -1px; border-width: 2px 0 0 2px; }
.frame-corner.tr { top: -1px; right: -1px; border-width: 2px 2px 0 0; }
.frame-corner.bl { bottom: -1px; left: -1px; border-width: 0 0 2px 2px; }
.frame-corner.br { bottom: -1px; right: -1px; border-width: 0 2px 2px 0; }

/* ── Live Telemetry Sidebar Card ── */
.telemetry-sidebar {
  position: absolute;
  top: 84px;
  left: 24px;
  width: 310px;
  z-index: 15;
  background: var(--space-glass);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 14px 16px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.6);
  pointer-events: auto;
}

/* ── Major Quakes Sidebar (right) ── */
.major-sidebar {
  position: absolute;
  top: 84px;
  right: 24px;
  width: 310px;
  z-index: 15;
  background: var(--space-glass);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 14px 16px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.6);
  pointer-events: auto;
}

.telemetry-title.major span {
  color: var(--flame-400);
}

.major-subtitle {
  font-family: var(--font-mono);
  font-size: 9px;
  line-height: 1.4;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--chrome-500);
  margin-bottom: 10px;
}

.major-feed-list {
  max-height: 420px;
}

.alert-feed-item.major {
  border-left-color: var(--flame-500);
  display: flex;
  align-items: center;
  gap: 10px;
}

.alert-feed-item.major.severe {
  border-left-color: var(--alert-glow);
}

.alert-feed-item.major.selected {
  background: var(--space-card);
  box-shadow: inset 0 0 0 1px var(--ocean-600);
}

.major-mag {
  flex: 0 0 auto;
  min-width: 44px;
  padding: 5px 0;
  text-align: center;
  border-radius: 4px;
  background: rgba(242, 144, 36, 0.14);
  border: 1px solid rgba(242, 144, 36, 0.4);
  color: var(--flame-400);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
}

.alert-feed-item.major.severe .major-mag {
  background: rgba(255, 58, 80, 0.14);
  border-color: rgba(255, 58, 80, 0.45);
  color: var(--alert-400);
}

.major-body {
  min-width: 0;
}

.major-place {
  font-size: 12px;
  font-weight: 700;
  color: var(--chrome-100);
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.major-meta {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.06em;
  color: var(--chrome-500);
  margin-top: 3px;
}

/* ── Sidebar Filters ── */
.filter-block {
  margin-bottom: 12px;
}

.filter-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--chrome-500);
  margin-bottom: 7px;
}

.filter-value {
  color: var(--ocean-cyan);
  letter-spacing: 0.06em;
}

.range-chips {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
}

.range-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  padding: 6px 2px;
  background: var(--space-raised);
  border: 1px solid var(--border-subtle);
  border-radius: 5px;
  color: var(--chrome-400);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.range-chip:hover {
  background: var(--space-card);
  color: var(--chrome-200);
}

.range-chip.active {
  background: rgba(90, 176, 255, 0.16);
  border-color: var(--ocean-600);
  color: var(--ocean-cyan);
}

.range-chip.loading {
  opacity: 0.55;
}

.chip-main {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.chip-sub {
  font-family: var(--font-mono);
  font-size: 7px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--chrome-600);
}

.range-chip.active .chip-sub {
  color: var(--ocean-400);
}

/* Dual magnitude range slider */
.mag-slider {
  position: relative;
  height: 22px;
}

.mag-track,
.mag-track-fill {
  position: absolute;
  top: 9px;
  height: 4px;
  border-radius: 2px;
  pointer-events: none;
}

.mag-track {
  left: 0;
  right: 0;
  background: var(--space-raised);
  border: 1px solid var(--border-subtle);
}

.mag-track-fill {
  background: linear-gradient(90deg, var(--ocean-cyan), var(--flame-500), var(--alert-glow));
}

.mag-slider input[type="range"] {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 22px;
  margin: 0;
  background: none;
  appearance: none;
  -webkit-appearance: none;
  pointer-events: none;
}

.mag-slider input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--space-card);
  border: 2px solid var(--ocean-cyan);
  box-shadow: 0 0 6px rgba(90, 176, 255, 0.5);
  cursor: pointer;
  pointer-events: auto;
}

.mag-slider input[type="range"]::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--space-card);
  border: 2px solid var(--ocean-cyan);
  cursor: pointer;
  pointer-events: auto;
}

.mag-scale {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 8px;
  color: var(--chrome-600);
  margin-top: 2px;
}

.feed-empty {
  padding: 14px 10px;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--chrome-500);
}

@media (max-width: 1180px) {
  .major-sidebar {
    display: none;
  }
}

.telemetry-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-subtle);
}

.telemetry-title {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--chrome-200);
  display: flex;
  align-items: center;
  gap: 6px;
}

.telemetry-title span {
  color: var(--alert-glow);
}

.telemetry-count {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  background: var(--space-raised);
  border: 1px solid var(--border-bright);
  border-radius: 3px;
  color: var(--ocean-cyan);
}

.alert-feed-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 280px;
  overflow-y: auto;
}

.alert-feed-list::-webkit-scrollbar {
  width: 4px;
}
.alert-feed-list::-webkit-scrollbar-thumb {
  background: var(--border-bright);
  border-radius: 2px;
}

.alert-feed-item {
  padding: 8px 10px;
  background: var(--space-raised);
  border-radius: 5px;
  border-left: 3px solid transparent;
  transition: all 0.15s ease;
  cursor: pointer;
}

.alert-feed-item:hover {
  background: var(--space-card);
  transform: translateX(2px);
}

.alert-feed-item.earthquake {
  border-left-color: var(--alert-glow);
}

.alert-feed-item.tsunami {
  border-left-color: var(--tsunami-400);
}

.alert-item-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}

.alert-type-badge {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 1px 5px;
  border-radius: 2px;
}

.alert-feed-item.earthquake .alert-type-badge {
  color: var(--alert-glow);
  background: rgba(255, 58, 80, 0.14);
}

.alert-feed-item.tsunami .alert-type-badge {
  color: var(--tsunami-400);
  background: var(--tsunami-bg);
}

.alert-time {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--chrome-500);
}

.alert-location {
  font-size: 11px;
  font-weight: 600;
  color: var(--chrome-200);
  line-height: 1.3;
}

.alert-specs {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--chrome-400);
  margin-top: 3px;
  display: flex;
  gap: 8px;
}

.alert-specs strong {
  color: var(--chrome-100);
}

/* ── Interactive Earthquake Detail Modal Overlay ── */
#event-modal {
  position: absolute;
  /* Anchored bottom-right so it never covers the Major Quakes panel above it. */
  bottom: 96px;
  right: 24px;
  width: 320px;
  max-height: 46vh;
  overflow-y: auto;
  z-index: 25;
  background: var(--space-glass);
  border: 1px solid var(--ocean-cyan);
  border-radius: 8px;
  padding: 16px;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.75), 0 0 20px rgba(90, 176, 255, 0.2);
  display: none;
}

#event-modal.active {
  display: block;
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.modal-close {
  background: none;
  border: none;
  color: var(--chrome-400);
  font-size: 16px;
  cursor: pointer;
  line-height: 1;
}
.modal-close:hover { color: var(--chrome-100); }

/* ── 2 Prominent 3D Buttons (Bottom Center) ── */
/* ── Copyright Line (between the portal buttons and the ticker) ── */
.portal-copyright {
  position: absolute;
  bottom: 48px;
  left: 0;
  right: 0;
  z-index: 22;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--chrome-500);
  pointer-events: none;
}

.portal-copyright a {
  pointer-events: auto;
  color: var(--ocean-cyan);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.portal-copyright a:hover {
  color: var(--chrome-100);
  border-bottom-color: var(--ocean-cyan);
}

.bottom-3d-portals-section {
  position: absolute;
  bottom: 76px;
  left: 0;
  right: 0;
  z-index: 22;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  pointer-events: none;
}

.btn-3d-portal {
  pointer-events: auto;
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 14px 28px;
  text-decoration: none;
  border-radius: 8px;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.15s cubic-bezier(0.2, 0.8, 0.2, 1);
  transform: translateY(0);
}

/* 3D Desktop Portal Button (Broadcast Cyber Theme) */
.btn-3d-portal.btn-desktop {
  background: linear-gradient(180deg, #1e3a64 0%, #0d1b33 100%);
  border: 1px solid #5ab0ff;
  color: #ffffff;
  box-shadow:
    0 6px 0 #060e1d,
    0 12px 28px rgba(0, 0, 0, 0.8),
    0 0 24px rgba(90, 176, 255, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.btn-3d-portal.btn-desktop:hover {
  transform: translateY(-2px);
  background: linear-gradient(180deg, #254a80 0%, #112444 100%);
  box-shadow:
    0 8px 0 #060e1d,
    0 16px 34px rgba(0, 0, 0, 0.85),
    0 0 32px rgba(90, 176, 255, 0.6),
    inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

.btn-3d-portal.btn-desktop:active {
  transform: translateY(4px);
  box-shadow:
    0 2px 0 #060e1d,
    0 6px 14px rgba(0, 0, 0, 0.6),
    0 0 16px rgba(90, 176, 255, 0.4);
}

/* 3D Mobile Portal Button (Cyber Tsunami Cyan Theme) */
.btn-3d-portal.btn-mobile {
  background: linear-gradient(180deg, #0b4550 0%, #062228 100%);
  border: 1px solid #00f0ff;
  color: #ffffff;
  box-shadow:
    0 6px 0 #031418,
    0 12px 28px rgba(0, 0, 0, 0.8),
    0 0 24px rgba(0, 240, 255, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.btn-3d-portal.btn-mobile:hover {
  transform: translateY(-2px);
  background: linear-gradient(180deg, #105967 0%, #0a3038 100%);
  box-shadow:
    0 8px 0 #031418,
    0 16px 34px rgba(0, 0, 0, 0.85),
    0 0 32px rgba(0, 240, 255, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

.btn-3d-portal.btn-mobile:active {
  transform: translateY(4px);
  box-shadow:
    0 2px 0 #031418,
    0 6px 14px rgba(0, 0, 0, 0.6),
    0 0 16px rgba(0, 240, 255, 0.35);
}

/* GWN Web Portal Button (Violet Portal Theme) */
.btn-3d-portal.btn-portal {
  background: linear-gradient(180deg, #3a1c5e 0%, #1a0f2e 100%);
  border: 1px solid #a855f7;
  color: #ffffff;
  box-shadow:
    0 6px 0 #0d0718,
    0 12px 28px rgba(0, 0, 0, 0.8),
    0 0 24px rgba(168, 85, 247, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.btn-3d-portal.btn-portal:hover {
  transform: translateY(-2px);
  background: linear-gradient(180deg, #4c247a 0%, #24133d 100%);
  box-shadow:
    0 8px 0 #0d0718,
    0 16px 34px rgba(0, 0, 0, 0.85),
    0 0 32px rgba(168, 85, 247, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

.btn-3d-portal.btn-portal:active {
  transform: translateY(4px);
  box-shadow:
    0 2px 0 #0d0718,
    0 6px 14px rgba(0, 0, 0, 0.6),
    0 0 16px rgba(168, 85, 247, 0.35);
}

.btn-3d-icon {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-3d-icon svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
}

.btn-3d-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.1;
}

.btn-3d-main-text {
  font-size: 13px;
  letter-spacing: 0.16em;
}

.btn-3d-sub-text {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.12em;
  opacity: 0.85;
  margin-top: 2px;
}

/* ── Bottom Marquee Ticker Bar ── */
.portal-footer-ticker {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 42px;
  z-index: 20;
  display: flex;
  align-items: center;
  background: rgba(6, 8, 15, 0.95);
  border-top: 1px solid var(--border-subtle);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 0 18px;
}

.ticker-label {
  display: flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--alert-glow);
  background: var(--space-deep);
  border: 1px solid rgba(255, 58, 80, 0.35);
  padding: 4px 10px;
  border-radius: 4px;
  flex-shrink: 0;
  margin-right: 14px;
}

.ticker-feed-wrap {
  flex: 1;
  overflow: hidden;
  position: relative;
  height: 100%;
  display: flex;
  align-items: center;
}

.ticker-track {
  display: flex;
  align-items: center;
  gap: 36px;
  white-space: nowrap;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--chrome-300);
  will-change: transform;
  animation: marquee-scroll 55s linear infinite;
}

.ticker-track:hover {
  animation-play-state: paused;
}

@keyframes marquee-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

.ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.ticker-item strong {
  color: var(--chrome-100);
}

.ticker-item .sep {
  color: var(--ocean-cyan);
  font-weight: 700;
}

/* ── Responsiveness / Mobile Adaptations ── */
@media (max-width: 768px) {
  .portal-header {
    padding: 0 14px;
    height: 56px;
  }

  .brand-name {
    font-size: 13px;
  }

  .utc-clock, .poll-status-chip {
    display: none;
  }

  .telemetry-sidebar {
    display: none;
  }

  .portal-copyright {
    bottom: 44px;
    font-size: 9px;
  }

  .bottom-3d-portals-section {
    bottom: 68px;
    flex-direction: column;
    gap: 10px;
    padding: 0 16px;
  }

  .btn-3d-portal {
    width: 100%;
    justify-content: center;
    padding: 11px 20px;
  }

  .portal-footer-ticker {
    height: 38px;
    padding: 0 12px;
  }

  .ticker-label {
    font-size: 9px;
    padding: 3px 7px;
    margin-right: 8px;
  }
}
