/**
 * Situation Monitor Styles
 * Matches Noteworthy News design system
 */

/* Music Controls Panel */
.music-controls-panel {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.25rem;
  background: rgba(7, 21, 42, 0.3);
  border: 1px solid rgba(34, 211, 238, 0.2);
  border-radius: 8px;
}

.music-play-pause-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0.375rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.9);
  transition: color 0.2s ease;
  min-width: 32px;
  min-height: 32px;
}

.music-play-pause-btn:hover {
  color: #22d3ee;
}

.music-play-pause-btn svg {
  width: 18px;
  height: 18px;
}

.music-skip-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0.375rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.9);
  transition: color 0.2s ease;
  min-width: 32px;
  min-height: 32px;
}

.music-skip-btn:hover {
  color: #22d3ee;
}

.music-skip-btn svg {
  width: 18px;
  height: 18px;
}

.volume-control {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.volume-icon-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0.375rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.9);
  transition: color 0.2s ease;
  min-width: 32px;
  min-height: 32px;
}

.volume-icon-btn:hover {
  color: #22d3ee;
}

.volume-icon-btn svg {
  width: 18px;
  height: 18px;
}

.volume-slider {
  width: 80px;
  height: 4px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 2px;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
}

.volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 12px;
  height: 12px;
  background: #22d3ee;
  border-radius: 50%;
  cursor: pointer;
  transition: background 0.2s ease;
}

.volume-slider::-webkit-slider-thumb:hover {
  background: #4A90E2;
}

.volume-slider::-moz-range-thumb {
  width: 12px;
  height: 12px;
  background: #22d3ee;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  transition: background 0.2s ease;
}

.volume-slider::-moz-range-thumb:hover {
  background: #4A90E2;
}

/* GLOBAL: Remove ALL bullets from navigation lists - must be first */
body.situation-monitor-page header ul,
body.situation-monitor-page header ol,
body.situation-monitor-page header li,
body.situation-monitor-page .main-nav ul,
body.situation-monitor-page .main-nav ol,
body.situation-monitor-page .main-nav li,
body.situation-monitor-page nav ul,
body.situation-monitor-page nav ol,
body.situation-monitor-page nav li {
  list-style: none !important;
  list-style-type: none !important;
  padding-left: 0 !important;
  margin-left: 0 !important;
}

body.situation-monitor-page header ul li::before,
body.situation-monitor-page header ol li::before,
body.situation-monitor-page .main-nav ul li::before,
body.situation-monitor-page .main-nav ol li::before {
  content: none !important;
  display: none !important;
}

/* Page Wrapper - matches site container width */
/* Ensure situation monitor container is visible and not blocked by header or loader */
#situation-monitor-container {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  margin-top: 0;
  padding-top: 0;
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
}

/* CRITICAL: Ensure loader doesn't block content */
#nn-intel-loader.nn-il-hidden,
#nn-intel-loader[style*="display: none"],
#nn-intel-loader[style*="display:none"],
#nn-intel-loader.nn-il-fade-out {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
  z-index: -999999 !important;
}

/* CRITICAL: Force hide loader after 30 seconds (safety fallback) */
#nn-intel-loader {
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

/* Ensure loader never blocks content after page load */
body.situation-monitor-page #nn-intel-loader.nn-il-hidden,
body.situation-monitor-page #nn-intel-loader[style*="display: none"] {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
  z-index: -999999 !important;
  position: fixed !important;
  top: -9999px !important;
  left: -9999px !important;
  width: 0 !important;
  height: 0 !important;
}

/* Ensure dark theme background on situation monitor page */
html.situation-monitor-page {
  background: linear-gradient(180deg, #07152a 0%, #0d1f3a 100%) !important;
  background-color: #07152a !important;
  min-height: 100vh;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

body.situation-monitor-page {
  background: linear-gradient(180deg, #07152a 0%, #0d1f3a 100%) !important;
  background-color: #07152a !important;
  color: white !important;
  min-height: 100vh;
  margin: 0;
  padding: 0;
  --sitmon-header-height: 60px;
  --sitmon-ticker-height: 34px;
  --sitmon-top-offset: calc(var(--sitmon-header-height) + var(--sitmon-ticker-height) + 16px);
  padding-top: var(--sitmon-top-offset) !important; /* Space for header + ticker */
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  line-height: 1.6;
  overflow-x: hidden !important;
}

body.situation-monitor-page a,
body.situation-monitor-page a:visited {
  color: #7db7ff;
  text-decoration: none;
}

body.situation-monitor-page a:hover,
body.situation-monitor-page a:focus {
  color: #a7d1ff;
  text-decoration: underline;
}

/* Animated background overlay for depth */
body.situation-monitor-page::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: 
    radial-gradient(circle at 20% 80%, rgba(74, 158, 255, 0.08) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(91, 181, 255, 0.08) 0%, transparent 50%),
    radial-gradient(circle at 40% 80%, rgba(155, 89, 182, 0.1) 0%, transparent 50%);
  z-index: -2 !important; /* Ensure it's behind everything */
  pointer-events: none !important;
}

body.situation-monitor-page main.situation-monitor-page {
  padding-top: 0 !important;
  margin-top: 0 !important;
  background: transparent !important;
  color: white !important;
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  position: relative !important;
  z-index: 1 !important;
  min-height: calc(100vh - var(--sitmon-top-offset)) !important;
}

.situation-monitor-page {
  min-height: 100vh;
  background: transparent;
  color: white;
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
}

/* Ensure main content area has proper styling */
body.situation-monitor-page main {
  background: transparent !important;
  color: white !important;
  min-height: calc(100vh - var(--sitmon-top-offset)) !important;
  position: relative !important;
  z-index: 1 !important;
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  padding-top: 0 !important;
}

/* OSINT Control Room Layout - High Density, 12-Column Grid */
.sitmon-page-wrapper {
  max-width: 1920px; /* Expanded for OSINT wall */
  margin: 0 auto;
  padding: 12px 16px; /* Tightened spacing */
  width: 100%;
  box-sizing: border-box;
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  position: relative !important;
  z-index: 1 !important;
  isolation: isolate;
  background: rgba(3, 8, 18, 0.95); /* Darker base for operational feel */
  overflow-x: hidden;
}

/* OSINT Scanline Effect - Page Wrapper */
.sitmon-page-wrapper::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(34, 211, 238, 0.02) 2px,
    rgba(34, 211, 238, 0.02) 4px
  );
  pointer-events: none;
  z-index: 0;
}

/* Page Header */
/* OSINT Header - Compact, Operational */
.sitmon-page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
  padding: 12px 16px;
  background: rgba(5, 12, 28, 0.85);
  border-radius: 6px;
  border: 1px solid rgba(34, 211, 238, 0.2);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(4px);
  min-height: 80px;
  position: relative;
  overflow: visible;
}

.sitmon-header-left {
  flex: 1;
}

.sitmon-page-title {
  font-size: 1.25rem; /* Smaller, more operational */
  font-weight: 700;
  color: #22d3ee;
  margin: 0 0 2px 0; /* Tighter margin */
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-family: 'Inter', -apple-system, sans-serif; /* Keep sans-serif for titles */
}

.sitmon-page-subtitle {
  font-size: 0.75rem; /* Smaller, more operational */
  color: rgba(255, 255, 255, 0.6); /* Dimmer */
  margin: 0 0 4px 0; /* Tighter */
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-family: 'SF Mono', 'Monaco', 'Consolas', monospace;
}

.sitmon-status-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: rgba(34, 211, 238, 0.15);
  border: 1px solid rgba(34, 211, 238, 0.3);
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 600;
  color: #22d3ee;
  font-family: 'SF Mono', 'Monaco', 'Consolas', monospace;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  position: relative;
}

.sitmon-header-right {
  display: flex;
  gap: 10px;
  align-items: center;
  flex: 1 1 auto;
  flex-wrap: wrap;
  justify-content: flex-end;
}

/* Fix for auto-refresh toggle label being squashed */
.sitmon-auto-refresh-toggle {
  display: inline-flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 6px !important;
  white-space: nowrap !important;
  min-width: 110px !important;
  flex-shrink: 0 !important;
  padding: 6px 10px;
  background: rgba(34, 211, 238, 0.1);
  border: 1px solid rgba(34, 211, 238, 0.2);
  border-radius: 6px;
  cursor: pointer;
}

.sitmon-auto-refresh-toggle span {
  white-space: nowrap !important;
  display: inline !important;
}

/* Music Controls */
.sitmon-music-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem;
  background: rgba(7, 21, 42, 0.4);
  border: 1px solid rgba(34, 211, 238, 0.2);
  border-radius: 8px;
}

.sitmon-music-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0.375rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.9);
  transition: all 0.2s ease;
  min-width: 32px;
  min-height: 32px;
  border-radius: 4px;
}

.sitmon-music-btn:hover {
  color: #22d3ee;
  background: rgba(34, 211, 238, 0.1);
}

.sitmon-music-btn svg {
  width: 18px;
  height: 18px;
}

.sitmon-volume-slider {
  width: 80px;
  height: 4px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 2px;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
  transition: background 0.2s ease;
}

.sitmon-volume-slider:hover {
  background: rgba(255, 255, 255, 0.3);
}

.sitmon-volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 12px;
  height: 12px;
  background: #22d3ee;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 0 8px rgba(34, 211, 238, 0.5);
}

.sitmon-volume-slider::-webkit-slider-thumb:hover {
  background: #4A90E2;
  transform: scale(1.2);
  box-shadow: 0 0 12px rgba(74, 144, 226, 0.7);
}

.sitmon-volume-slider::-moz-range-thumb {
  width: 12px;
  height: 12px;
  background: #22d3ee;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 0 8px rgba(34, 211, 238, 0.5);
}

.sitmon-volume-slider::-moz-range-thumb:hover {
  background: #4A90E2;
  transform: scale(1.2);
  box-shadow: 0 0 12px rgba(74, 144, 226, 0.7);
}

.music-skip-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0.375rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.9);
  transition: all 0.2s ease;
  min-width: 32px;
  min-height: 32px;
  border-radius: 4px;
}

.music-skip-btn:hover {
  color: #22d3ee;
  background: rgba(34, 211, 238, 0.1);
}

.music-skip-btn svg {
  width: 18px;
  height: 18px;
}

/* Ensure all icons in header are constrained */
.sitmon-header-right svg,
.sitmon-header-right .sitmon-icon {
  width: 18px !important;
  height: 18px !important;
  max-width: 18px !important;
  max-height: 18px !important;
  flex-shrink: 0;
}

/* Icon Sizing System - Prevents icons from becoming massive */
/* Global rule: ALL SVGs in situation monitor must be constrained (except the world map) */
.sitmon-page-wrapper svg:not(.sitmon-map svg),
.situation-monitor-page svg:not(.sitmon-map svg),
.sitmon-page-wrapper svg:not(#sitmon-map svg),
.situation-monitor-page svg:not(#sitmon-map svg) {
  max-width: 24px !important;
  max-height: 24px !important;
}

/* Explicitly exclude map container from icon sizing */
.sitmon-map svg,
#sitmon-map svg,
.sitmon-map-container svg {
  max-width: none !important;
  max-height: none !important;
  width: 100% !important;
  height: 100% !important;
}

.sitmon-icon {
  width: 18px !important;
  height: 18px !important;
  flex: 0 0 18px !important;
  display: inline-block !important;
  vertical-align: middle !important;
  max-width: 18px !important;
  max-height: 18px !important;
}

.sitmon-icon svg {
  width: 100% !important;
  height: 100% !important;
  display: block !important;
  max-width: 18px !important;
  max-height: 18px !important;
}

.sitmon-refresh-btn {
  padding: 4px 8px; /* Tighter padding */
  font-size: 0.75rem; /* Smaller */
  background: rgba(74, 158, 255, 0.2);
  border: 1px solid rgba(74, 158, 255, 0.4);
  border-radius: 8px;
  color: #fff;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  white-space: nowrap;
  height: auto;
  line-height: 1;
  min-height: 36px;
  max-height: 40px;
}

.sitmon-refresh-btn .sitmon-icon {
  flex-shrink: 0;
  width: 18px !important;
  height: 18px !important;
}

.sitmon-refresh-btn svg {
  width: 18px !important;
  height: 18px !important;
  max-width: 18px !important;
  max-height: 18px !important;
  flex-shrink: 0;
}

.sitmon-refresh-btn:hover {
  background: rgba(74, 158, 255, 0.3);
  border-color: rgba(74, 158, 255, 0.6);
  transform: translateY(-1px);
}

.sitmon-tab-btn {
  padding: 4px 8px; /* Tighter */
  background: rgba(34, 211, 238, 0.15);
  border: 1px solid rgba(34, 211, 238, 0.3);
  border-radius: 4px; /* Tighter */
  color: #22d3ee;
  cursor: pointer;
  font-size: 0.7rem; /* Smaller */
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.sitmon-tab-btn:hover {
  background: rgba(34, 211, 238, 0.3);
  border-color: rgba(34, 211, 238, 0.6);
  transform: translateY(-1px);
}

.sitmon-tab-btn.active {
  background: rgba(34, 211, 238, 0.4);
  border-color: #22d3ee;
  color: #fff;
}

.sitmon-auto-refresh-toggle {
  display: inline-flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 4px !important;
  font-size: 0.7rem !important;
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  user-select: none;
  white-space: nowrap !important;
  height: auto;
  line-height: 1;
  min-height: auto;
  font-family: 'SF Mono', 'Monaco', 'Consolas', monospace;
  writing-mode: horizontal-tb !important;
  min-width: max-content !important;
  flex-shrink: 0 !important;
  width: auto !important;
}

.sitmon-auto-refresh-toggle span {
  white-space: nowrap !important;
  writing-mode: horizontal-tb !important;
  display: inline !important;
  width: auto !important;
}

.sitmon-auto-refresh-toggle input[type="checkbox"] {
  cursor: pointer;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin: 0;
  padding: 0;
}

/* OSINT 12-Column Grid System */
.sitmon-osint-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 8px 12px; /* Tight vertical, moderate horizontal */
  margin-bottom: 12px;
  align-items: start;
  position: relative;
}

/* OSINT Scanline Effect - OSINT Grid */
.sitmon-osint-grid::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 3px,
    rgba(34, 211, 238, 0.015) 3px,
    rgba(34, 211, 238, 0.015) 6px
  );
  pointer-events: none;
  z-index: 0;
}

/* Intel Wall Layout - Map as Tactical Node (not hero) */
.sitmon-intel-wall {
  position: relative;
  width: 100%;
  margin-bottom: 12px;
  isolation: isolate;
  grid-column: 1 / -1; /* Full width for now, will be refined */
  overflow: visible; /* Allow HUD overlays to be positioned */
}

/* Grid column positioning - applied only on desktop */
@media (min-width: 769px) {
  .sitmon-grid-col-1-8 {
    grid-column: 1 / 8 !important;
  }
  .sitmon-grid-col-8-13 {
    grid-column: 8 / 13 !important;
  }
}

.sitmon-map-container {
  position: relative;
  width: 100%;
  height: clamp(550px, 65vh, 850px); /* BIGGER map */
  min-height: clamp(550px, 65vh, 850px);
  border-radius: 12px;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(5, 15, 35, 0.95) 0%, rgba(7, 21, 42, 0.95) 100%);
  border: 1px solid rgba(34, 211, 238, 0.3);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5), inset 0 0 80px rgba(34, 211, 238, 0.04);
  isolation: isolate;
  /* Subtle scanline texture */
  background-image: 
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 1px,
      rgba(34, 211, 238, 0.02) 1px,
      rgba(34, 211, 238, 0.02) 2px
    );
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

/* Ensure HUDs are positioned within map container */
.sitmon-map-container .sitmon-hud {
  position: absolute;
  /* HUDs are children of map-container, so they're contained */
}

.sitmon-map-container:hover {
  border-color: rgba(34, 211, 238, 0.35);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5), inset 0 0 80px rgba(34, 211, 238, 0.05);
}

/* Corner indicators for operational feel */
.sitmon-map-container::before,
.sitmon-map-container::after {
  content: '';
  position: absolute;
  width: 8px;
  height: 8px;
  border: 1px solid rgba(34, 211, 238, 0.3);
  z-index: 5;
  pointer-events: none;
}

.sitmon-map-container::before {
  top: 0;
  left: 0;
  border-right: none;
  border-bottom: none;
}

.sitmon-map-container::after {
  bottom: 0;
  right: 0;
  border-left: none;
  border-top: none;
}

/* HUD Overlays - Positioned absolutely over map */
.sitmon-hud {
  position: absolute;
  z-index: 10;
  pointer-events: auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-height: calc(100% - 2rem);
  overflow-y: auto;
  overflow-x: hidden;
  /* Ensure HUD stays within map container bounds */
  max-width: calc(100% - 32px); /* Account for padding */
  position: relative;
}

/* OSINT Scanline Effect - HUD Panels */
.sitmon-hud::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(34, 211, 238, 0.025) 2px,
    rgba(34, 211, 238, 0.025) 4px
  );
  pointer-events: none;
  z-index: 0;
  border-radius: 6px;
}

.sitmon-hud-left {
  top: 16px;
  left: 16px;
  width: 280px;
}

.sitmon-hud-right {
  top: 16px;
  right: 16px;
  width: 320px;
  max-height: calc(100% - 32px); /* Ensure it doesn't overflow map container */
  overflow: visible; /* Allow internal scrolling */
}

.sitmon-hud-card {
  background: rgba(5, 12, 28, 0.92);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(70, 180, 255, 0.2);
  border-radius: 6px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  overflow: hidden;
  transition: all 0.3s ease;
  position: relative;
  display: flex;
  flex-direction: column;
  max-height: 100%;
}

.sitmon-hud-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(34, 211, 238, 0.3), transparent);
  pointer-events: none;
  z-index: 1;
}

/* OSINT Scanline Effect - HUD Cards */
.sitmon-hud-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(34, 211, 238, 0.02) 2px,
    rgba(34, 211, 238, 0.02) 4px
  );
  pointer-events: none;
  z-index: 0;
  border-radius: 6px;
}

.sitmon-hud-card:hover {
  border-color: rgba(70, 180, 255, 0.3);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.sitmon-hud-header {
  padding: 0.75rem 1rem;
  background: rgba(7, 21, 42, 0.6);
  border-bottom: 1px solid rgba(70, 180, 255, 0.15);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.sitmon-hud-title {
  font-size: 0.75rem;
  font-weight: 700;
  color: #22d3ee;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin: 0;
}

.sitmon-hud-badge {
  background: rgba(34, 211, 238, 0.2);
  color: #22d3ee;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 600;
}

.sitmon-hud-close {
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.7);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s;
}

.sitmon-hud-close:hover {
  color: #fff;
}

.sitmon-hud-body {
  padding: 1rem;
  max-height: 400px;
  overflow-y: auto;
  overflow-x: hidden;
  position: relative;
}

/* Ensure live feed body is properly contained */
.sitmon-hud-body.sitmon-feed-list {
  max-height: 300px;
  overflow-y: auto !important;
  overflow-x: hidden !important;
}

/* Stats */
.sitmon-stat-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(70, 180, 255, 0.1);
}

.sitmon-stat-item:last-child {
  border-bottom: none;
}

.sitmon-stat-label {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.7);
}

.sitmon-stat-value {
  font-size: 1rem;
  font-weight: 700;
  color: #22d3ee;
}

.sitmon-stat-critical {
  color: #ff6b6b;
}

.sitmon-stat-high {
  color: #ffaa00;
}

/* Filters */
.sitmon-filter-group {
  margin-bottom: 1rem;
}

.sitmon-filter-group:last-child {
  margin-bottom: 0;
}

.sitmon-filter-label {
  display: block;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.6);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}

.sitmon-filter-buttons {
  display: flex;
  gap: 0.5rem;
}

.sitmon-filter-btn {
  flex: 1;
  padding: 0.5rem;
  background: rgba(7, 21, 42, 0.5);
  border: 1px solid rgba(70, 180, 255, 0.2);
  border-radius: 4px;
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s;
}

.sitmon-filter-btn:hover {
  background: rgba(7, 21, 42, 0.7);
  border-color: rgba(70, 180, 255, 0.4);
}

.sitmon-filter-btn.active {
  background: rgba(34, 211, 238, 0.2);
  border-color: #22d3ee;
  color: #22d3ee;
}

.sitmon-filter-checkboxes {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.sitmon-filter-checkboxes label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.8);
  cursor: pointer;
}

.sitmon-filter-checkboxes input[type="checkbox"] {
  cursor: pointer;
}

/* Live Feed */
.sitmon-feed-list {
  max-height: 300px;
  padding: 0;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  position: relative;
}

.sitmon-feed-item {
  padding: 0.5rem;
  border-bottom: 1px solid rgba(70, 180, 255, 0.1);
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.sitmon-feed-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: rgba(34, 211, 238, 0);
  transition: background 0.2s ease;
}

.sitmon-feed-item:hover {
  background: rgba(70, 180, 255, 0.12);
  padding-left: 0.75rem;
}

.sitmon-feed-item:hover::before {
  background: rgba(34, 211, 238, 0.6);
}

.sitmon-feed-item.critical {
  border-left: 2px solid #ff6b6b;
  background: rgba(255, 107, 107, 0.05);
}

.sitmon-feed-item.critical:hover {
  background: rgba(255, 107, 107, 0.12);
}

.sitmon-feed-item:last-child {
  border-bottom: none;
}

.sitmon-feed-item-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 0.25rem;
  line-height: 1.3;
}

.sitmon-feed-item-meta {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.6);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.sitmon-feed-item-severity {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 0.5rem;
}

.sitmon-feed-empty {
  padding: 2rem;
  text-align: center;
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.85rem;
}

/* Pinned Event */
.sitmon-pinned-content {
  font-size: 0.85rem;
}

.sitmon-pinned-title {
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.5rem;
}

.sitmon-pinned-meta {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 1rem;
}

.sitmon-pinned-location {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 1rem;
}

.sitmon-pinned-summary {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.5;
  margin-bottom: 1rem;
}

.sitmon-pinned-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.sitmon-pinned-btn {
  padding: 0.5rem 1rem;
  background: rgba(7, 21, 42, 0.5);
  border: 1px solid rgba(70, 180, 255, 0.3);
  border-radius: 4px;
  color: #fff;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s;
}

.sitmon-pinned-btn:hover {
  background: rgba(7, 21, 42, 0.7);
  border-color: #22d3ee;
}

/* Pulse animation for critical events */
@keyframes pulse {
  0%, 100% {
    opacity: 0.6;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.1);
  }
}

/* OSINT Status Strip - Replaces old status bar */
.sitmon-osint-status-strip {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 24px;
  background: rgba(3, 8, 18, 0.95);
  border-top: 1px solid rgba(34, 211, 238, 0.15);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  z-index: 10;
  pointer-events: auto;
  font-family: 'SF Mono', 'Monaco', 'Consolas', monospace;
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.6);
}

/* OSINT Scanline Effect - Status Strip */
.sitmon-osint-status-strip::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 1px,
    rgba(34, 211, 238, 0.03) 1px,
    rgba(34, 211, 238, 0.03) 2px
  );
  pointer-events: none;
  z-index: 0;
}

.sitmon-status-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
}

.sitmon-status-label {
  color: rgba(255, 255, 255, 0.6);
}

.sitmon-status-value {
  color: #22d3ee;
  font-weight: 600;
}

.sitmon-status-online {
  color: #4ade80;
}

.sitmon-status-toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  color: rgba(255, 255, 255, 0.8);
}

.sitmon-status-toggle input[type="checkbox"] {
  cursor: pointer;
}

/* Legacy Dashboard Grid (kept for backward compatibility) */
.sitmon-dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 1.5rem;
  margin-bottom: 2rem;
  align-items: start;
  position: relative;
  z-index: 1;
  min-height: 0;
  max-height: clamp(420px, 55vh, 640px);
  isolation: isolate;
}

/* Map Card */
.sitmon-map-card {
  background: linear-gradient(135deg, rgba(5, 15, 35, 0.95) 0%, rgba(7, 21, 42, 0.95) 100%);
  border-radius: 16px;
  border: 1px solid rgba(34, 211, 238, 0.3);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(10px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: clamp(520px, 62vh, 820px);
  min-height: clamp(520px, 62vh, 820px);
  max-height: clamp(520px, 62vh, 820px);
  position: relative;
  z-index: 1;
  isolation: isolate;
}

.sitmon-map-card .sitmon-card-body {
  flex: 1;
  padding: 0;
  position: relative;
  min-height: clamp(520px, 62vh, 820px);
  height: 100%;
  overflow: hidden;
}

.sitmon-map {
  width: 100% !important;
  height: 100% !important;
  min-height: clamp(520px, 62vh, 820px) !important;
  position: relative !important;
  background: linear-gradient(135deg, rgba(5, 15, 35, 0.95) 0%, rgba(7, 21, 42, 0.95) 100%) !important;
  overflow: hidden !important;
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  border-radius: 12px;
}

.sitmon-map svg {
  width: 100% !important;
  height: 100% !important;
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  z-index: 1 !important;
}

/* Panels Stack - Right Side of OSINT Grid */
.sitmon-panels-stack {
  display: flex;
  flex-direction: column;
  gap: 8px; /* Tighter gap */
  position: relative;
  z-index: 1;
  /* Match map height for alignment */
  height: clamp(480px, 55vh, 720px);
  max-height: clamp(480px, 55vh, 720px);
  min-height: 0;
  overflow: visible;
  isolation: isolate;
  width: 100%;
  box-sizing: border-box;
}

/* Panel Card Base */
/* Panel Surface - OSINT Data Surface (not card) */
.sitmon-panel-card {
  background: rgba(5, 12, 28, 0.9);
  border-radius: 12px;
  border: 1px solid rgba(34, 211, 238, 0.25);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(8px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex !important;
  flex-direction: column !important;
  position: relative;
  overflow: visible !important;
  z-index: 1;
  min-height: 450px !important; /* MUCH BIGGER - easier to see */
  max-height: none;
  isolation: isolate;
  contain: layout paint;
  width: 100%;
  box-sizing: border-box;
  /* Subtle grid texture */
  background-image: 
    linear-gradient(rgba(34, 211, 238, 0.01) 1px, transparent 1px),
    linear-gradient(90deg, rgba(34, 211, 238, 0.01) 1px, transparent 1px);
  background-size: 20px 20px;
}

/* OSINT Scanline Effect - Panel Cards */
.sitmon-panel-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(34, 211, 238, 0.02) 2px,
    rgba(34, 211, 238, 0.02) 4px
  );
  pointer-events: none;
  z-index: 0;
  border-radius: 6px; /* Match card border-radius */
}

/* Enhanced hover effect for panels */
.sitmon-panel-card:hover {
  border-color: rgba(34, 211, 238, 0.3);
  box-shadow: 0 2px 8px rgba(34, 211, 238, 0.15);
  transform: translateY(-1px);
}

/* Critical panel indicator */
.sitmon-panel-card.has-critical::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, #ff6b6b, transparent);
  animation: criticalPulse 2s ease-in-out infinite;
  z-index: 2;
}

@keyframes criticalPulse {
  0%, 100% {
    opacity: 0.6;
    box-shadow: 0 0 4px rgba(255, 107, 107, 0.5);
  }
  50% {
    opacity: 1;
    box-shadow: 0 0 12px rgba(255, 107, 107, 0.8);
  }
}

/* Panels in the stack should be smaller and scroll independently */
.sitmon-panels-stack > .sitmon-panel-card {
  flex: 1 1 0 !important; /* Equal distribution of space */
  min-height: 120px !important; /* Minimum usable height */
  max-height: none !important; /* Remove max-height constraint, let flex handle it */
  height: auto !important; /* Let content + flex determine height */
  position: relative;
  z-index: 1;
  isolation: isolate; /* Create new stacking context */
  overflow: visible !important; /* Allow resize handle to be interactive */
  contain: layout paint; /* Removed 'style' for better resize behavior */
  width: 100%;
  box-sizing: border-box;
}

/* Override flex constraints when panel is manually resized */
.sitmon-panels-stack > .sitmon-panel-card.sitmon-manually-resized,
.sitmon-panels-stack > .sitmon-panel-card[style*="height"] {
  flex: none !important; /* Completely disable flex sizing */
  min-height: 120px !important;
  max-height: none !important;
  /* Height is controlled by inline style */
}

/* Ensure card body in stacked panels can scroll */
.sitmon-panels-stack > .sitmon-panel-card > .sitmon-card-body {
  flex: 1 1 0 !important;
  min-height: 0 !important;
  max-height: 100% !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
}

/* Secondary grid panels - MUCH BIGGER for visibility */
.sitmon-secondary-grid > .sitmon-panel-card {
  max-height: none !important;
  min-height: 550px !important; /* BIGGER minimum for readability */
  height: auto !important;
  flex-shrink: 0 !important;
  position: relative;
  z-index: 1;
  isolation: isolate;
  overflow: visible !important;
  contain: layout paint;
  width: 100%;
  box-sizing: border-box;
}

/* Live Cams panel - no height restrictions, can be as big as needed */
.sitmon-secondary-grid > #sitmon-panel-livecams {
  max-height: none !important; /* Remove max-height restriction */
  min-height: calc(100vh - 200px) !important; /* Minimum to fill viewport */
  height: auto !important; /* Allow it to grow as needed */
  overflow: visible !important; /* Allow content to expand */
  flex-shrink: 0 !important; /* Don't shrink */
  grid-row: span 10 !important; /* Allow it to span multiple rows if needed */
  align-self: stretch !important; /* Stretch to fill available space */
}

.sitmon-secondary-grid > #sitmon-panel-livecams .sitmon-card-body {
  overflow: visible !important; /* Allow live cams content to expand */
  height: auto !important; /* Let content determine height */
  min-height: calc(100vh - 250px) !important; /* Minimum height */
  max-height: none !important; /* No max height restriction */
}

/* Override constraints when panel is manually resized */
.sitmon-secondary-grid > .sitmon-panel-card.sitmon-manually-resized,
.sitmon-secondary-grid > .sitmon-panel-card[style*="height"] {
  max-height: none !important; /* Allow resizing beyond default max */
  min-height: 150px !important; /* Keep reasonable minimum */
  flex: none !important; /* Disable flex sizing */
  /* Height is controlled by inline style */
}

/* Ensure card body in secondary grid can scroll */
.sitmon-secondary-grid > .sitmon-panel-card > .sitmon-card-body {
  flex: 1 1 0 !important;
  min-height: 0 !important;
  max-height: 100% !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  height: 100% !important;
}

.sitmon-panel-card:hover {
  border-color: rgba(34, 211, 238, 0.4);
  box-shadow: 0 8px 24px rgba(34, 211, 238, 0.1);
}

.sitmon-card-header {
  padding: 14px 18px; /* BIGGER padding */
  background: linear-gradient(180deg, rgba(7, 21, 42, 0.6) 0%, rgba(5, 12, 28, 0.5) 100%);
  border-bottom: 1px solid rgba(74, 158, 255, 0.2);
  flex-shrink: 0 !important;
  position: relative;
  z-index: 2;
  min-height: auto !important;
  height: auto !important;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.sitmon-card-header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(74, 158, 255, 0.2), transparent);
}

/* Resize handle for panels - Enhanced visibility and functionality */
.sitmon-panel-resize-handle {
  position: absolute;
  bottom: -4px; /* Extend slightly below panel for easier grabbing */
  left: 0;
  right: 0;
  height: 20px; /* Larger hit area */
  cursor: ns-resize;
  background: linear-gradient(to bottom, transparent 0%, rgba(34, 211, 238, 0.08) 50%, rgba(34, 211, 238, 0.15) 100%);
  z-index: 100; /* Higher z-index to ensure it's above content */
  transition: all 0.15s ease;
  border-top: 2px solid rgba(34, 211, 238, 0.25);
  border-bottom-left-radius: 6px;
  border-bottom-right-radius: 6px;
}

.sitmon-panel-resize-handle:hover {
  background: linear-gradient(to bottom, transparent 0%, rgba(34, 211, 238, 0.15) 30%, rgba(34, 211, 238, 0.3) 100%);
  border-top-color: rgba(34, 211, 238, 0.6);
  height: 24px;
  bottom: -6px;
}

.sitmon-panel-resize-handle::before {
  content: '⋮⋮⋮';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 80px;
  height: 10px;
  background: rgba(34, 211, 238, 0.5);
  border-radius: 5px;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  color: rgba(34, 211, 238, 1);
  letter-spacing: 3px;
  line-height: 1;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.sitmon-panel-resize-handle::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  margin-bottom: 8px;
  padding: 6px 12px;
  background: rgba(5, 12, 28, 0.98);
  border: 1px solid rgba(34, 211, 238, 0.4);
  border-radius: 6px;
  font-size: 0.7rem;
  color: rgba(230, 240, 255, 0.95);
  white-space: nowrap;
  pointer-events: none;
  z-index: 1000;
  font-family: 'SF Mono', 'Monaco', 'Consolas', monospace;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.6);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.sitmon-panel-resize-handle:hover::before {
  background: rgba(34, 211, 238, 0.85);
  color: #fff;
  width: 100px;
  height: 12px;
  box-shadow: 0 0 12px rgba(34, 211, 238, 0.5), 0 2px 8px rgba(0, 0, 0, 0.4);
}

.sitmon-panel-resize-handle:hover::after {
  opacity: 1;
}

.sitmon-panel-resize-handle:active {
  background: linear-gradient(to bottom, transparent 0%, rgba(34, 211, 238, 0.25) 20%, rgba(34, 211, 238, 0.4) 100%);
  border-top-color: #22d3ee;
  height: 28px;
  bottom: -8px;
}

.sitmon-panel-resize-handle:active::before {
  background: #22d3ee;
  color: rgba(3, 8, 18, 0.95);
  box-shadow: 0 0 16px rgba(34, 211, 238, 0.8), 0 2px 8px rgba(0, 0, 0, 0.4);
  width: 120px;
  height: 14px;
}

/* Visual feedback during resize */
body.resizing-panel {
  cursor: ns-resize !important;
  user-select: none;
}

body.resizing-panel * {
  cursor: ns-resize !important;
  user-select: none !important;
}

/* Panel resizing state */
.sitmon-panel-card.sitmon-panel-resizing {
  border-color: rgba(34, 211, 238, 0.5);
  box-shadow: 0 0 16px rgba(34, 211, 238, 0.3);
  transition: none; /* Disable transitions during resize */
}

.sitmon-panel-resize-handle.sitmon-resize-active {
  background: linear-gradient(to bottom, transparent 0%, rgba(34, 211, 238, 0.3) 20%, rgba(34, 211, 238, 0.5) 100%) !important;
  border-top-color: #22d3ee !important;
  height: 28px !important;
  bottom: -8px !important;
}

.sitmon-panel-resize-handle.sitmon-resize-active::before {
  background: #22d3ee !important;
  color: rgba(3, 8, 18, 0.95) !important;
  box-shadow: 0 0 16px rgba(34, 211, 238, 0.8), 0 2px 8px rgba(0, 0, 0, 0.4) !important;
  width: 120px !important;
  height: 14px !important;
}

/* CRITICAL: Manually resized panels - override ALL flex and height constraints */
.sitmon-panel-card.sitmon-manually-resized {
  flex: none !important;
  flex-shrink: 0 !important;
  flex-grow: 0 !important;
  max-height: none !important;
  min-height: 150px !important;
  /* Height is set via inline style */
}


.sitmon-card-title {
  font-size: 1rem; /* BIGGER for visibility */
  font-weight: 700;
  color: #22d3ee;
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-family: 'Inter', -apple-system, sans-serif;
}

.sitmon-card-body {
  padding: 16px 20px; /* More padding for readability */
  flex: 1 1 0 !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  min-height: 350px !important; /* Bigger minimum content area */
  max-height: none !important;
  height: auto !important;
  min-width: 0 !important;
  line-height: 1.6; /* Better line height for readability */
  font-size: 0.95rem; /* Slightly larger text */
  word-break: break-word;
  overflow-wrap: break-word;
  position: relative;
  z-index: 1;
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: rgba(74, 158, 255, 0.2) rgba(5, 15, 35, 0.5);
  box-sizing: border-box;
  isolation: isolate;
  contain: layout style paint;
  width: 100%;
  font-size: 0.875rem; /* Slightly smaller base font */
}

/* Secondary Panels Grid - OSINT 12-Column Layout */
.sitmon-secondary-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 8px 12px; /* Tight spacing */
  align-items: start !important;
  align-content: start;
  grid-auto-rows: minmax(280px, auto); /* Slightly reduced min height */
  position: relative;
  z-index: 1;
  min-height: 0;
  isolation: isolate;
  width: 100%;
  box-sizing: border-box;
}

/* Panel column spans - asymmetric OSINT layout */
.sitmon-secondary-grid > .sitmon-panel-card:nth-child(1) {
  grid-column: span 3; /* News: 3 columns */
}
.sitmon-secondary-grid > .sitmon-panel-card:nth-child(2) {
  grid-column: span 3; /* Markets: 3 columns */
}
.sitmon-secondary-grid > .sitmon-panel-card:nth-child(3) {
  grid-column: span 3; /* Earthquakes: 3 columns */
}
.sitmon-secondary-grid > .sitmon-panel-card:nth-child(4) {
  grid-column: span 3; /* Weather: 3 columns */
}
.sitmon-secondary-grid > .sitmon-panel-card:nth-child(5) {
  grid-column: span 4; /* RSS: 4 columns (wider) */
}
.sitmon-secondary-grid > .sitmon-panel-card:nth-child(6) {
  grid-column: span 8; /* Live Cams: 8 columns if shown */
}

/* Panel Content Styles */
.sitmon-panel-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  color: rgba(255, 255, 255, 0.7);
  min-height: 200px;
}

.sitmon-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(74, 158, 255, 0.2);
  border-top-color: #4A90E2;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 1rem;
}

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

/* Event Markers and Clusters */
.event-marker,
.event-cluster {
  transition: opacity 0.2s ease;
}

.event-marker circle,
.event-cluster circle {
  transition: r 0.2s ease, opacity 0.2s ease;
}

@keyframes pulse {
  0%, 100% {
    opacity: 0.6;
    transform: scale(1);
  }
  50% {
    opacity: 0.9;
    transform: scale(1.1);
  }
}

.event-marker[data-severity="5"] circle:first-child {
  animation: pulse 2s ease-in-out infinite;
}

.sitmon-panel-error {
  padding: 1rem;
  text-align: center;
  color: rgba(255, 107, 107, 0.9);
}

.sitmon-error-message {
  margin-bottom: 1rem;
}

.sitmon-retry-btn {
  padding: 0.5rem 1rem;
  background: rgba(74, 158, 255, 0.2);
  border: 1px solid rgba(74, 158, 255, 0.4);
  border-radius: 8px;
  color: #fff;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
  transition: all 0.2s ease;
}

.sitmon-retry-btn:hover {
  background: rgba(74, 158, 255, 0.3);
  border-color: rgba(74, 158, 255, 0.6);
}

/* Empty State */
.sitmon-empty-state {
  padding: 2rem;
  text-align: center;
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.9rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 200px;
}

.sitmon-empty-state-icon {
  width: 48px;
  height: 48px;
  margin-bottom: 1rem;
  opacity: 0.5;
  color: rgba(74, 158, 255, 0.6);
}

/* News Panel Styles */
.sitmon-news-list {
  display: flex;
  flex-direction: column;
  gap: 4px; /* Tighter gap */
  width: 100%;
  box-sizing: border-box;
  overflow: visible;
}

.sitmon-news-item {
  padding: 6px 10px; /* Tighter padding */
  background: rgba(7, 21, 42, 0.25); /* More subdued */
  border-radius: 4px; /* Tighter radius */
  border-left: 2px solid rgba(74, 158, 255, 0.4); /* Thinner border */
  transition: border-color 0.15s ease;
  width: 100%;
  box-sizing: border-box;
  flex-shrink: 0;
  overflow: hidden;
  word-wrap: break-word;
  overflow-wrap: break-word;
  margin-bottom: 4px; /* Tighter gap */
}

.sitmon-news-item:hover {
  background: rgba(7, 21, 42, 0.4);
  border-left-color: #4A90E2;
}

.sitmon-news-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 4px; /* Tighter */
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.6); /* Dimmer for normal items */
}

.sitmon-news-source {
  font-weight: 600;
  color: rgba(74, 158, 255, 0.8); /* Slightly dimmer */
  font-size: 0.7rem;
}

.sitmon-news-time {
  font-family: 'SF Mono', 'Monaco', 'Consolas', monospace;
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.5);
}

.sitmon-news-title {
  margin: 4px 0; /* Tighter */
  font-size: 0.875rem; /* Smaller */
  line-height: 1.3;
  overflow-wrap: anywhere;
  color: rgba(255, 255, 255, 0.9); /* Slightly dimmer for normal */
}

/* Critical/High severity items are brighter */
.sitmon-news-item[data-severity="5"] .sitmon-news-title,
.sitmon-news-item[data-severity="4"] .sitmon-news-title {
  color: #fff;
  font-weight: 600;
}

.sitmon-news-item[data-severity="5"] .sitmon-news-header,
.sitmon-news-item[data-severity="4"] .sitmon-news-header {
  color: rgba(255, 255, 255, 0.8);
}

/* Critical event visual enhancement */
.sitmon-news-item[data-severity="5"] {
  border-left-color: #ff6b6b !important;
  background: rgba(255, 107, 107, 0.08) !important;
  box-shadow: 0 0 8px rgba(255, 107, 107, 0.2);
  animation: criticalGlow 3s ease-in-out infinite;
}

.sitmon-news-item[data-severity="4"] {
  border-left-color: #ffaa00 !important;
  background: rgba(255, 170, 0, 0.06) !important;
}

@keyframes criticalGlow {
  0%, 100% {
    box-shadow: 0 0 8px rgba(255, 107, 107, 0.2);
  }
  50% {
    box-shadow: 0 0 16px rgba(255, 107, 107, 0.4);
  }
}

.sitmon-news-title a {
  color: #fff;
  text-decoration: none;
  transition: color 0.2s ease;
}

.sitmon-news-title a:hover {
  color: #4A90E2;
}

.sitmon-news-description {
  margin: 4px 0 0 0; /* Tighter */
  font-size: 0.8rem; /* Smaller */
  color: rgba(255, 255, 255, 0.7); /* Dimmer */
  line-height: 1.4;
  overflow-wrap: anywhere;
}

/* Markets Panel */
.sitmon-markets-list {
  display: flex;
  flex-direction: column;
  gap: 4px; /* Tighter gap */
}

.sitmon-market-item {
  padding: 6px 10px; /* Tighter padding */
  background: rgba(7, 21, 42, 0.25);
  border-radius: 4px;
  margin-bottom: 4px;
}

.sitmon-market-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.sitmon-market-name {
  font-weight: 600;
  color: #4A90E2;
}

.sitmon-market-price {
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff;
  margin: 0.5rem 0;
}

.sitmon-market-change {
  font-size: 0.9rem;
  font-weight: 600;
}

.sitmon-market-change.positive {
  color: #4ecdc4;
}

.sitmon-market-change.negative {
  color: #ff6b6b;
}

/* Earthquake Panel */
.sitmon-earthquakes-list {
  display: flex;
  flex-direction: column;
  gap: 4px; /* Tighter gap */
  width: 100%;
  box-sizing: border-box;
  overflow: visible;
}

.sitmon-alerts-list {
  display: flex;
  flex-direction: column;
  gap: 4px; /* Tighter gap */
  width: 100%;
  box-sizing: border-box;
  overflow: visible;
}

.sitmon-earthquake-item {
  padding: 6px 10px; /* Tighter padding */
  background: rgba(7, 21, 42, 0.25);
  border-radius: 4px;
  border-left: 2px solid #ff6b6b;
  width: 100%;
  box-sizing: border-box;
  overflow: hidden;
  word-wrap: break-word;
  overflow-wrap: break-word;
  flex-shrink: 0;
  margin-bottom: 4px;
}

.sitmon-earthquake-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 4px; /* Tighter */
  align-items: center;
}

.sitmon-earthquake-magnitude {
  font-size: 1rem; /* Slightly smaller */
  font-weight: 700;
  color: #ff6b6b;
  font-family: 'SF Mono', 'Monaco', 'Consolas', monospace;
}

.sitmon-earthquake-time {
  font-family: 'SF Mono', 'Monaco', 'Consolas', monospace;
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.5);
}

.sitmon-earthquake-place {
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9); /* Slightly dimmer */
  margin: 4px 0; /* Tighter */
  overflow-wrap: anywhere;
  font-size: 0.85rem;
}

.sitmon-earthquake-details {
  font-size: 0.75rem; /* Smaller */
  color: rgba(255, 255, 255, 0.6); /* Dimmer */
  margin-top: 4px; /* Tighter */
  overflow-wrap: anywhere;
  font-family: 'SF Mono', 'Monaco', 'Consolas', monospace;
}

.sitmon-earthquake-details a {
  color: #4A90E2;
  text-decoration: none;
}

.sitmon-earthquake-details a:hover {
  text-decoration: underline;
}

.sitmon-earthquake-precise-time {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.5);
  font-family: 'Courier New', monospace;
  margin: 0.25rem 0;
}

.sitmon-earthquake-actions {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  margin-top: 0.5rem;
  flex-wrap: wrap;
}

.sitmon-earthquake-media-link {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  font-size: 1rem;
  transition: color 0.2s ease;
}

.sitmon-earthquake-media-link:hover {
  color: #4A90E2;
}

.sitmon-earthquake-link {
  color: #4A90E2;
  text-decoration: none;
  font-size: 0.85rem;
  transition: color 0.2s ease;
}

.sitmon-earthquake-link:hover {
  color: #6BA3E8;
  text-decoration: underline;
}

.sitmon-earthquake-badge {
  display: inline-block;
  background: rgba(74, 158, 255, 0.2);
  color: #4A90E2;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  margin: 0 2px;
}

/* Weather Alerts Panel */
.sitmon-alerts-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.sitmon-alert-item {
  padding: 6px 10px; /* Tighter padding */
  background: rgba(7, 21, 42, 0.25);
  border-radius: 4px;
  border-left: 2px solid;
  width: 100%;
  box-sizing: border-box;
  overflow: hidden;
  word-wrap: break-word;
  overflow-wrap: break-word;
  flex-shrink: 0;
  margin-bottom: 4px;
}

.sitmon-alert-extreme {
  border-left-color: #ff3333;
}

.sitmon-alert-severe {
  border-left-color: #ff6b6b;
}

.sitmon-alert-moderate {
  border-left-color: #ffaa00;
}

.sitmon-alert-minor {
  border-left-color: #4A90E2;
}

.sitmon-alert-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 4px; /* Tighter */
  flex-wrap: wrap;
  gap: 4px; /* Tighter */
  align-items: flex-start;
}

.sitmon-alert-event {
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9); /* Slightly dimmer for normal */
  overflow-wrap: anywhere;
  font-size: 0.85rem;
}

/* Critical alerts are brighter */
.sitmon-alert-extreme .sitmon-alert-event,
.sitmon-alert-severe .sitmon-alert-event {
  color: #fff;
  font-weight: 700;
}

.sitmon-alert-severity {
  font-size: 0.7rem; /* Smaller */
  font-weight: 600;
  padding: 2px 6px; /* Tighter */
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.08);
  font-family: 'SF Mono', 'Monaco', 'Consolas', monospace;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.sitmon-alert-headline {
  margin: 4px 0; /* Tighter */
  font-size: 0.8rem; /* Smaller */
  color: rgba(255, 255, 255, 0.8); /* Dimmer */
  overflow-wrap: anywhere;
}

.sitmon-alert-areas {
  font-size: 0.75rem; /* Smaller */
  color: rgba(255, 255, 255, 0.6); /* Dimmer */
  margin-top: 4px; /* Tighter */
  overflow-wrap: anywhere;
  font-family: 'SF Mono', 'Monaco', 'Consolas', monospace;
}

/* Character/Intel Panel */
.sitmon-characters-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.sitmon-character-item {
  padding: 6px 10px; /* Tighter padding */
  background: rgba(7, 21, 42, 0.25);
  border-radius: 4px;
  margin-bottom: 4px;
}

.sitmon-character-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.sitmon-character-name {
  font-weight: 600;
  color: #4A90E2;
}

.sitmon-character-count {
  font-weight: 700;
  color: #fff;
  background: rgba(74, 158, 255, 0.2);
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
}

.sitmon-character-details {
  display: flex;
  gap: 1rem;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.7);
}

/* Correlation Panel */
.sitmon-correlations-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.sitmon-correlation-item {
  padding: 6px 10px; /* Tighter padding */
  background: rgba(7, 21, 42, 0.25);
  border-radius: 4px;
  border-left: 2px solid #22d3ee; /* Thinner */
  margin-bottom: 4px;
}

.sitmon-correlation-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.sitmon-correlation-topic {
  font-weight: 600;
  color: #22d3ee;
  text-transform: capitalize;
}

.sitmon-correlation-count {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.7);
}

.sitmon-correlation-momentum {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.8);
  margin: 0.5rem 0;
}

.sitmon-correlation-items {
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px solid rgba(74, 158, 255, 0.2);
}

.sitmon-correlation-item-link {
  margin: 0.25rem 0;
  font-size: 0.85rem;
  overflow-wrap: anywhere;
}

.sitmon-correlation-item-link a {
  color: #4A90E2;
  text-decoration: none;
}

.sitmon-correlation-item-link a:hover {
  text-decoration: underline;
}

/* Narrative Panel */
.sitmon-narrative-stats {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(74, 158, 255, 0.2);
}

.sitmon-narrative-stat {
  flex: 1;
  text-align: center;
  padding: 0.5rem;
  background: rgba(7, 21, 42, 0.3);
  border-radius: 8px;
}

.sitmon-stat-label {
  display: block;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 0.25rem;
}

.sitmon-stat-value {
  display: block;
  font-size: 1.5rem;
  font-weight: 700;
  color: #4A90E2;
}

.sitmon-narrative-section {
  margin: 1rem 0;
}

.sitmon-narrative-section h4 {
  font-size: 1rem;
  color: #4A90E2;
  margin-bottom: 0.5rem;
}

.sitmon-narrative-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.sitmon-narrative-item {
  padding: 0.75rem;
  background: rgba(7, 21, 42, 0.3);
  border-radius: 8px;
  border-left: 3px solid;
}

.sitmon-narrative-crossing {
  border-left-color: #ffaa00;
}

.sitmon-narrative-fringe {
  border-left-color: #ff6b6b;
}

.sitmon-narrative-title {
  margin-bottom: 0.25rem;
}

.sitmon-narrative-title a {
  color: #fff;
  text-decoration: none;
  font-weight: 600;
}

.sitmon-narrative-title a:hover {
  color: #4A90E2;
}

.sitmon-narrative-source {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.7);
  margin: 0.25rem 0;
}

.sitmon-narrative-keywords {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.8);
  margin-top: 0.5rem;
}

.sitmon-keyword {
  display: inline-block;
  padding: 0.125rem 0.5rem;
  background: rgba(74, 158, 255, 0.2);
  border-radius: 4px;
  margin: 0.125rem;
  font-size: 0.8rem;
}

/* Monitors Panel */
.sitmon-monitor-form-container {
  margin-bottom: 1.5rem;
  padding: 1rem;
  background: rgba(7, 21, 42, 0.3);
  border-radius: 8px;
}

.sitmon-monitor-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.sitmon-form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.sitmon-form-group label {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.8);
  font-weight: 600;
}

.sitmon-form-group input {
  padding: 0.5rem;
  background: rgba(5, 15, 35, 0.8);
  border: 1px solid rgba(74, 158, 255, 0.3);
  border-radius: 6px;
  color: #fff;
  font-size: 0.9rem;
}

.sitmon-form-group input:focus {
  outline: none;
  border-color: #4A90E2;
}

.sitmon-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.sitmon-form-submit {
  padding: 0.75rem;
  background: rgba(74, 158, 255, 0.2);
  border: 1px solid rgba(74, 158, 255, 0.4);
  border-radius: 8px;
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  min-height: 44px;
}

.sitmon-form-submit:hover {
  background: rgba(74, 158, 255, 0.3);
  border-color: rgba(74, 158, 255, 0.6);
}

.sitmon-monitors-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.sitmon-monitor-item {
  padding: 1rem;
  background: rgba(7, 21, 42, 0.3);
  border-radius: 8px;
  border-left: 3px solid;
}

.sitmon-monitor-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.sitmon-monitor-name {
  font-weight: 600;
  color: #4A90E2;
}

.sitmon-monitor-remove {
  background: transparent;
  border: none;
  color: rgba(255, 107, 107, 0.8);
  cursor: pointer;
  font-size: 1.2rem;
  padding: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  min-width: 44px;
}

.sitmon-monitor-remove:hover {
  color: #ff6b6b;
}

.sitmon-monitor-keywords {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.8);
  margin: 0.5rem 0;
}

.sitmon-monitor-location {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.7);
  margin: 0.25rem 0;
}

.sitmon-monitor-matches {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.9);
  margin-top: 0.5rem;
}

.sitmon-monitor-matches strong {
  color: #4A90E2;
  font-size: 1.1rem;
}

/* Tooltip */
.sitmon-tooltip {
  font-family: system-ui, -apple-system, sans-serif;
  position: absolute !important;
  z-index: 10 !important; /* Only above map, not other content */
  pointer-events: none !important;
  max-width: 300px;
  word-wrap: break-word;
}

/* Ensure tooltip only appears within map container */
.sitmon-map-card .sitmon-tooltip {
  position: absolute !important;
  z-index: 10 !important;
}

/* Hide tooltips outside map area */
body > .sitmon-tooltip {
  display: none !important;
}

/* Scrollbar Styling */
.sitmon-card-body::-webkit-scrollbar {
  width: 8px;
}

.sitmon-card-body::-webkit-scrollbar-track {
  background: rgba(5, 15, 35, 0.5);
  border-radius: 4px;
}

.sitmon-card-body::-webkit-scrollbar-thumb {
  background: rgba(74, 158, 255, 0.3);
  border-radius: 4px;
}

.sitmon-card-body::-webkit-scrollbar-thumb:hover {
  background: rgba(74, 158, 255, 0.5);
}

/* Mobile Responsive */
@media (max-width: 900px) {
  .sitmon-page-wrapper {
    padding: 1.5rem 1rem;
  }

  .sitmon-dashboard-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .sitmon-map-card .sitmon-card-body {
    min-height: 320px;
  }

  .sitmon-map {
    min-height: 320px;
  }

  .sitmon-secondary-grid {
    grid-template-columns: 1fr;
  }

  .sitmon-page-header {
    flex-direction: column;
    gap: 0.75rem;
    align-items: stretch;
    padding: 0.75rem !important;
  }
  
  .sitmon-header-left {
    text-align: center !important;
  }

  .sitmon-header-right {
    width: 100%;
    flex-wrap: wrap !important;
    justify-content: center !important;
    gap: 0.5rem !important;
  }

  .sitmon-tooltip {
    display: none !important;
  }
}

@media (max-width: 480px) {
  .sitmon-page-wrapper {
    padding: 1rem 0.75rem;
  }

  .sitmon-page-title {
    font-size: 1.5rem;
  }

  .sitmon-map-card .sitmon-card-body {
    min-height: 280px;
  }

  .sitmon-map {
    min-height: 280px;
  }

  .sitmon-form-row {
    grid-template-columns: 1fr;
  }
}

/* Ensure no left nav bullets appear */
.sitmon-page-wrapper ul,
.sitmon-page-wrapper ol {
  list-style: none;
  padding-left: 0;
  margin: 0;
}

.sitmon-page-wrapper li {
  list-style: none;
}

/* CRITICAL: Remove ALL bullets from navigation - must be at top level to override everything */
body.situation-monitor-page ul,
body.situation-monitor-page ol,
.situation-monitor-page ul,
.situation-monitor-page ol,
.situation-monitor-page nav ul,
.situation-monitor-page nav ol,
.situation-monitor-page .main-nav ul,
.situation-monitor-page .main-nav ol,
.situation-monitor-page .main-nav li,
.situation-monitor-page header ul,
.situation-monitor-page header ol,
.situation-monitor-page header li,
.situation-monitor-page nav li {
  list-style: none !important;
  list-style-type: none !important;
  padding-left: 0 !important;
  margin-left: 0 !important;
  margin: 0 !important;
}

/* Remove any ::before pseudo-elements that might show bullets */
.situation-monitor-page ul li::before,
.situation-monitor-page ol li::before,
.situation-monitor-page nav ul li::before,
.situation-monitor-page nav ol li::before,
.situation-monitor-page .main-nav ul li::before,
.situation-monitor-page .main-nav ol li::before {
  content: none !important;
  display: none !important;
}

/* Hide mobile nav on desktop - ensure it's completely hidden */
@media (min-width: 769px) {
  .situation-monitor-page .mobile-nav,
  body.situation-monitor-page .mobile-nav {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
    transform: translateX(-100%) !important;
    position: absolute !important;
    left: -9999px !important;
  }
  
  .situation-monitor-page .mobile-menu-toggle,
  body.situation-monitor-page .mobile-menu-toggle {
    display: none !important;
  }
}

/* Ensure mobile nav content doesn't show bullets when visible on mobile */
.situation-monitor-page .mobile-nav-content ul,
.situation-monitor-page .mobile-nav-content ol,
.situation-monitor-page .mobile-nav-content li {
  list-style: none !important;
  list-style-type: none !important;
  padding-left: 0 !important;
  margin: 0 !important;
}

/* ============================================
   ENHANCEMENTS - Visual & UX Improvements
   ============================================ */

/* Page Load Animation */
.sitmon-page-wrapper {
  animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Card Entrance Animations */
.sitmon-panel-card {
  animation: slideInRight 0.5s ease-out backwards;
}

.sitmon-panel-card:nth-child(1) { animation-delay: 0.1s; }
.sitmon-panel-card:nth-child(2) { animation-delay: 0.2s; }
.sitmon-panel-card:nth-child(3) { animation-delay: 0.3s; }
.sitmon-panel-card:nth-child(4) { animation-delay: 0.4s; }

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.sitmon-map-card {
  animation: slideInLeft 0.6s ease-out;
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Enhanced Hover Effects */
.sitmon-panel-card {
  position: relative;
  overflow: hidden;
}

/* Panel card hover shimmer removed to prevent overflow glow */

.sitmon-panel-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(34, 211, 238, 0.15);
}

/* Refresh Button Loading State */
.sitmon-refresh-btn.loading {
  pointer-events: none;
  opacity: 0.7;
}

.sitmon-refresh-btn.loading .sitmon-icon {
  animation: spin 1s linear infinite;
}

/* Status Chip Pulse Animation */
.sitmon-status-chip.updating {
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
    box-shadow: 0 0 0 0 rgba(34, 211, 238, 0.7);
  }
  50% {
    opacity: 0.8;
    box-shadow: 0 0 0 8px rgba(34, 211, 238, 0);
  }
}

/* Toast Notification System */
.sitmon-toast-container {
  position: fixed;
  top: 100px;
  right: 20px;
  z-index: 10000 !important;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  pointer-events: none;
  max-width: calc(100vw - 40px);
}

.sitmon-toast {
  background: linear-gradient(135deg, rgba(5, 15, 35, 0.98) 0%, rgba(7, 21, 42, 0.98) 100%) !important;
  border: 1px solid rgba(34, 211, 238, 0.4);
  border-radius: 12px;
  padding: 1rem 1.25rem;
  min-width: 300px;
  max-width: 400px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(10px);
  pointer-events: auto;
  animation: toastSlideIn 0.3s ease-out;
  display: flex !important;
  flex-direction: row !important; /* Explicitly set horizontal layout */
  align-items: flex-start !important; /* Align to top instead of center for multi-line text */
  gap: 0.75rem;
  writing-mode: horizontal-tb !important; /* Ensure horizontal text */
  text-orientation: mixed !important; /* Normal text orientation */
  transform: none !important; /* Prevent any rotation */
  position: relative !important;
  z-index: 10001 !important;
  color: #fff !important;
  direction: ltr !important; /* Left-to-right text direction */
}

.sitmon-toast.success {
  border-color: rgba(78, 205, 196, 0.5);
}

.sitmon-toast.error {
  border-color: rgba(255, 107, 107, 0.5);
}

.sitmon-toast.info {
  border-color: rgba(74, 158, 255, 0.5);
}

.sitmon-toast-icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

.sitmon-toast-content {
  flex: 1;
  min-width: 0; /* Critical: allows flex child to shrink */
  display: flex;
  flex-direction: column;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.sitmon-toast-title {
  font-weight: 600;
  color: #fff;
  margin: 0 0 0.25rem 0;
  font-size: 0.9rem;
  white-space: normal;
  word-break: normal;
  line-height: 1.3;
}

.sitmon-toast-message {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.8);
  margin: 0;
  line-height: 1.4;
  white-space: normal;
  word-break: normal;
  overflow-wrap: break-word;
  word-wrap: break-word;
}

.sitmon-toast-close {
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.6);
  cursor: pointer;
  padding: 0.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease;
  flex-shrink: 0;
}

.sitmon-toast-close:hover {
  color: #fff;
}

@keyframes toastSlideIn {
  from {
    opacity: 0;
    transform: translateX(400px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.sitmon-toast.hiding {
  animation: toastSlideOut 0.3s ease-in forwards;
}

@keyframes toastSlideOut {
  to {
    opacity: 0;
    transform: translateX(400px);
  }
}

/* Enhanced Loading Spinner */
.sitmon-spinner {
  position: relative;
}

.sitmon-spinner::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid rgba(34, 211, 238, 0.3);
  border-top-color: #22d3ee;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* Smooth Transitions for All Interactive Elements */
.sitmon-news-item,
.sitmon-market-item,
.sitmon-earthquake-item,
.sitmon-alert-item,
.sitmon-character-item,
.sitmon-correlation-item,
.sitmon-narrative-item,
.sitmon-monitor-item {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  z-index: 1;
  isolation: isolate; /* Create new stacking context */
  contain: layout style paint; /* Improve performance and prevent overflow */
  overflow-wrap: break-word;
  word-wrap: break-word;
  width: 100%;
  box-sizing: border-box;
  overflow: hidden;
  flex-shrink: 0;
}

.sitmon-news-item:hover,
.sitmon-market-item:hover,
.sitmon-earthquake-item:hover,
.sitmon-alert-item:hover,
.sitmon-character-item:hover,
.sitmon-correlation-item:hover,
.sitmon-narrative-item:hover,
.sitmon-monitor-item:hover {
  transform: translateX(2px); /* Reduced to prevent overflow */
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Focus States for Accessibility */
.sitmon-refresh-btn:focus-visible,
.sitmon-retry-btn:focus-visible,
.sitmon-form-submit:focus-visible,
.sitmon-monitor-remove:focus-visible {
  outline: 2px solid #22d3ee;
  outline-offset: 2px;
}

/* Keyboard Shortcut Indicator */
.sitmon-keyboard-hint {
  position: fixed;
  bottom: 20px;
  left: 20px;
  background: rgba(5, 15, 35, 0.95);
  border: 1px solid rgba(34, 211, 238, 0.3);
  border-radius: 12px;
  padding: 1rem;
  padding-top: 2rem;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.8);
  z-index: 9999;
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  max-width: 280px;
  animation: fadeInUp 0.5s ease-out;
  position: relative;
}

.sitmon-keyboard-hint.hidden {
  display: none;
}

.sitmon-keyboard-hint-close {
  position: absolute;
  top: 8px;
  right: 8px;
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.6);
  cursor: pointer;
  padding: 4px;
  font-size: 18px;
  line-height: 1;
  transition: color 0.2s;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
}

.sitmon-keyboard-hint-close:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

.sitmon-keyboard-hint-title {
  font-weight: 600;
  color: #22d3ee;
  margin-bottom: 0.75rem;
  font-size: 0.9rem;
}

.sitmon-keyboard-hint-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.sitmon-keyboard-hint-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.sitmon-keyboard-hint-key {
  background: rgba(34, 211, 238, 0.2);
  border: 1px solid rgba(34, 211, 238, 0.4);
  border-radius: 4px;
  padding: 0.25rem 0.5rem;
  font-family: 'Courier New', monospace;
  font-size: 0.75rem;
  color: #22d3ee;
  font-weight: 600;
  min-width: 32px;
  text-align: center;
}

/* Smooth Scroll Behavior */
.sitmon-card-body {
  scroll-behavior: smooth;
}

/* Enhanced Empty State */
.sitmon-empty-state {
  animation: fadeIn 0.5s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Progress Indicator for Refresh */
.sitmon-refresh-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, #22d3ee, #4A90E2);
  border-radius: 0 0 16px 16px;
  width: 0%;
  transition: width 0.3s ease;
  z-index: 10;
}

.sitmon-page-header {
  position: relative;
  overflow: hidden;
}

/* Enhanced Map Loading State */
.sitmon-map.loading::after {
  content: 'Loading map...';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
  z-index: 10;
}

/* Ripple Effect on Button Clicks */
.sitmon-refresh-btn,
.sitmon-retry-btn,
.sitmon-form-submit {
  position: relative;
  overflow: hidden;
}

.sitmon-refresh-btn::after,
.sitmon-retry-btn::after,
.sitmon-form-submit::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.sitmon-refresh-btn:active::after,
.sitmon-retry-btn:active::after,
.sitmon-form-submit:active::after {
  width: 300px;
  height: 300px;
}

/* Enhanced Status Chip */
.sitmon-status-chip {
  position: relative;
}

/* Status chip hover effect removed to prevent overflow glow */

/* Smooth Panel Content Updates */
.sitmon-card-body > * {
  animation: fadeIn 0.3s ease-out;
}

/* Enhanced Mobile Experience */
@media (max-width: 900px) {
  .sitmon-toast-container {
    right: 10px;
    left: 10px;
    top: 80px;
  }
  
  .sitmon-toast {
    min-width: auto;
    max-width: 100%;
    writing-mode: horizontal-tb !important;
    text-orientation: mixed !important;
    transform: none !important;
    direction: ltr !important;
  }
  
  .sitmon-keyboard-hint {
    bottom: 10px;
    left: 10px;
    right: 10px;
    max-width: none;
  }
}

/* OSINT Signal Surfaces - Ticker, Status Strip, Telemetry */
.sitmon-osint-ticker {
  position: fixed;
  top: var(--sitmon-header-height);
  left: 0;
  right: 0;
  min-height: 32px;
  max-height: 120px;
  background: linear-gradient(180deg, rgba(3, 8, 18, 0.98) 0%, rgba(5, 12, 28, 0.95) 100%);
  border-bottom: 1px solid rgba(34, 211, 238, 0.25);
  padding: 4px 16px;
  z-index: 900;
  overflow-y: auto;
  overflow-x: hidden;
  font-family: 'SF Mono', 'Monaco', 'Consolas', monospace;
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.7);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(8px);
  scrollbar-width: thin;
  scrollbar-color: rgba(34, 211, 238, 0.3) rgba(5, 12, 28, 0.5);
}

/* OSINT Scanline Effect - Ticker */
.sitmon-osint-ticker::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(34, 211, 238, 0.03) 2px,
    rgba(34, 211, 238, 0.03) 4px
  );
  pointer-events: none;
  z-index: 0;
}

.sitmon-osint-ticker::-webkit-scrollbar {
  width: 4px;
}

.sitmon-osint-ticker::-webkit-scrollbar-track {
  background: rgba(5, 12, 28, 0.5);
}

.sitmon-osint-ticker::-webkit-scrollbar-thumb {
  background: rgba(34, 211, 238, 0.3);
  border-radius: 2px;
}

.sitmon-osint-ticker::-webkit-scrollbar-thumb:hover {
  background: rgba(34, 211, 238, 0.5);
}

.sitmon-osint-ticker::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(34, 211, 238, 0.4), transparent);
}

.sitmon-ticker-feed {
  display: flex;
  flex-direction: column;
  gap: 2px;
  width: 100%;
}

.sitmon-ticker-line {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 2px 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.4;
  border-bottom: 1px solid rgba(34, 211, 238, 0.08);
  transition: background-color 0.2s ease;
}

.sitmon-ticker-line:hover {
  background-color: rgba(34, 211, 238, 0.05);
}

.sitmon-ticker-line:last-child {
  border-bottom: none;
}

.sitmon-ticker-time {
  color: rgba(34, 211, 238, 0.8);
  font-weight: 600;
  min-width: 50px;
  flex-shrink: 0;
}

.sitmon-ticker-category {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.65rem;
  min-width: 60px;
  flex-shrink: 0;
}

.sitmon-ticker-severity {
  font-weight: 600;
  min-width: 40px;
  flex-shrink: 0;
}

.sitmon-ticker-title {
  flex: 1;
  color: rgba(255, 255, 255, 0.85);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sitmon-ticker-line[data-severity="5"] .sitmon-ticker-title {
  color: rgba(255, 107, 107, 0.95);
  font-weight: 600;
}

.sitmon-ticker-line[data-severity="4"] .sitmon-ticker-title {
  color: rgba(255, 170, 0, 0.9);
}

.sitmon-ticker-age {
  color: rgba(255, 255, 255, 0.4);
  font-size: 0.65rem;
  min-width: 50px;
  text-align: right;
  flex-shrink: 0;
}

.sitmon-osint-status-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sitmon-osint-status-label {
  color: rgba(255, 255, 255, 0.5);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.sitmon-osint-status-value {
  color: #22d3ee;
  font-weight: 600;
}

.sitmon-osint-status-value.online {
  color: #4ade80;
  text-shadow: 0 0 6px rgba(74, 222, 128, 0.5);
  position: relative;
}

.sitmon-osint-status-value.online::before {
  content: '●';
  display: inline-block;
  margin-right: 4px;
  animation: onlinePulse 2s ease-in-out infinite;
}

.sitmon-osint-status-value.offline {
  color: #ff6b6b;
  text-shadow: 0 0 6px rgba(255, 107, 107, 0.5);
}

@keyframes onlinePulse {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.6;
    transform: scale(0.9);
  }
}

/* Monospace for telemetry */
.sitmon-telemetry {
  font-family: 'SF Mono', 'Monaco', 'Consolas', monospace;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.7);
  letter-spacing: 0.02em;
}

.sitmon-timestamp {
  font-family: 'SF Mono', 'Monaco', 'Consolas', monospace;
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.5);
}

.sitmon-count {
  font-family: 'SF Mono', 'Monaco', 'Consolas', monospace;
  font-weight: 600;
}

/* Ticker scroll animation removed - now using static horizontal lines */

/* Respect prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
  .sitmon-spinner,
  .sitmon-pulse,
  .sitmon-panel-card,
  .sitmon-toast,
  .sitmon-event-marker-ring,
  .sitmon-ticker-feed,
  .sitmon-ticker-line {
    animation: none !important;
    transition: none !important;
  }
}

/* ============================================
   Consumer-Ready Polish (Simplified)
   ============================================ */
.sitmon-modern {
  background: transparent;
}

.sitmon-modern .sitmon-page-wrapper::before,
.sitmon-modern .sitmon-osint-grid::before,
.sitmon-modern .sitmon-hud::before,
.sitmon-modern .sitmon-hud-card::after,
.sitmon-modern .sitmon-panel-card::after,
.sitmon-modern .sitmon-osint-status-strip::before,
.sitmon-modern .sitmon-osint-ticker::after {
  background: none !important;
}

.sitmon-intro {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  gap: 2rem;
  margin: 0 0 2rem;
  padding: 2rem 2.5rem;
  border-radius: 16px;
  background: rgba(10, 20, 38, 0.9);
  border: 1px solid rgba(70, 180, 255, 0.25);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.35);
  position: relative;
  overflow: hidden;
  min-height: 200px;
}

.sitmon-intro-copy {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.sitmon-intro-eyebrow {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: rgba(255, 255, 255, 0.55);
}

.sitmon-intro-title {
  margin: 0;
  font-size: clamp(1.8rem, 2.6vw, 2.3rem);
  color: #e6f6ff;
}

.sitmon-intro-description {
  margin: 0;
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.75);
  line-height: 1.6;
}

.sitmon-intro-footnote {
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.6);
}

.sitmon-intro-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
  align-content: start;
}

.sitmon-intro-stat {
  padding: 0.85rem;
  border-radius: 12px;
  background: rgba(6, 14, 28, 0.7);
  border: 1px solid rgba(70, 180, 255, 0.18);
}

.sitmon-intro-stat-label {
  display: block;
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.6);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.35rem;
}

.sitmon-intro-stat-value {
  font-size: 1.3rem;
  font-weight: 700;
  color: #e6f6ff;
}

.sitmon-intro-stat-value.critical {
  color: #ff8b8b;
}

.sitmon-intro-stat-value.high {
  color: #ffc66b;
}

.sitmon-intro-stat-value.online {
  color: #4ade80;
}

.sitmon-intro-stat-value.offline {
  color: #ff6b6b;
}

.sitmon-page-header {
  margin-bottom: 1rem;
  padding: 1rem 1.25rem;
  border-radius: 14px;
  background: rgba(8, 18, 34, 0.75);
  border: 1px solid rgba(70, 180, 255, 0.2);
}

.sitmon-page-title {
  text-transform: none;
  letter-spacing: 0.02em;
  font-size: 1.1rem;
  margin-bottom: 0.25rem;
}

.sitmon-page-subtitle {
  text-transform: none;
  letter-spacing: 0.02em;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.55);
}

.sitmon-status-chip {
  border-radius: 999px;
  padding: 0.25rem 0.65rem;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(34, 211, 238, 0.18);
  position: relative;
}

.sitmon-card-title,
.sitmon-hud-title {
  text-transform: none;
  letter-spacing: 0.03em;
}

.sitmon-hud-card,
.sitmon-panel-card,
.sitmon-map-container {
  border-radius: 14px;
}

.sitmon-hud-card,
.sitmon-panel-card {
  background: rgba(8, 18, 34, 0.82);
  border-color: rgba(70, 180, 255, 0.18);
}

.sitmon-osint-ticker {
  min-height: 28px;
  padding: 6px 16px;
  background: rgba(6, 14, 28, 0.92);
  border-bottom: 1px solid rgba(70, 180, 255, 0.2);
}

.sitmon-osint-status-strip {
  height: 28px;
  background: rgba(6, 14, 28, 0.92);
  border-top: 1px solid rgba(70, 180, 255, 0.2);
}

.sitmon-filter-label {
  text-transform: none;
  letter-spacing: 0.02em;
}

.sitmon-auto-refresh-toggle {
  font-family: 'Inter', -apple-system, sans-serif;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.75);
}

.sitmon-refresh-btn {
  border-radius: 12px;
}

@media (max-width: 900px) {
  .sitmon-intro {
    grid-template-columns: 1fr;
    padding: 1.25rem;
  }
}

@media (max-width: 520px) {
  .sitmon-intro {
    padding: 1rem;
  }
}

/* ============================================
   PROFESSIONAL VISUAL POLISH - ENHANCED
   ============================================ */

/* ----- Custom Font Import ----- */
@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;600;700&family=Space+Grotesk:wght@400;500;600;700&display=swap');

/* ----- CSS Custom Properties for Theme ----- */
:root {
  --sitmon-cyan: #22d3ee;
  --sitmon-cyan-dim: rgba(34, 211, 238, 0.6);
  --sitmon-cyan-glow: rgba(34, 211, 238, 0.4);
  --sitmon-blue: #4A90E2;
  --sitmon-blue-dim: rgba(74, 144, 226, 0.6);
  --sitmon-critical: #ff6b6b;
  --sitmon-critical-glow: rgba(255, 107, 107, 0.4);
  --sitmon-high: #ffaa00;
  --sitmon-high-glow: rgba(255, 170, 0, 0.4);
  --sitmon-success: #4ade80;
  --sitmon-success-glow: rgba(74, 222, 128, 0.4);
  --sitmon-bg-dark: rgba(3, 8, 18, 0.98);
  --sitmon-bg-card: rgba(8, 18, 34, 0.85);
  --sitmon-border: rgba(70, 180, 255, 0.18);
  --sitmon-border-glow: rgba(70, 180, 255, 0.35);
  --sitmon-font-mono: 'JetBrains Mono', 'SF Mono', 'Monaco', 'Consolas', monospace;
  --sitmon-font-display: 'Space Grotesk', 'Inter', -apple-system, sans-serif;
  --sitmon-anim-fast: 0.15s;
  --sitmon-anim-medium: 0.3s;
  --sitmon-anim-slow: 0.6s;
}

/* ============================================
   1. HERO SECTION - ENHANCED
   ============================================ */

/* Animated gradient background */
.sitmon-intro {
  position: relative;
  overflow: hidden;
  background: 
    linear-gradient(135deg, rgba(10, 20, 38, 0.95) 0%, rgba(15, 30, 50, 0.9) 50%, rgba(10, 20, 38, 0.95) 100%);
  border: 1px solid var(--sitmon-border);
  box-shadow: 
    0 20px 40px rgba(0, 0, 0, 0.4),
    0 0 60px rgba(34, 211, 238, 0.05),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(20px);
  animation: heroFadeIn 0.8s ease-out;
}

/* Animated gradient pulse overlay */
.sitmon-intro::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: 
    radial-gradient(ellipse at 30% 20%, rgba(34, 211, 238, 0.08) 0%, transparent 50%),
    radial-gradient(ellipse at 70% 80%, rgba(74, 144, 226, 0.06) 0%, transparent 50%);
  animation: heroGradientPulse 8s ease-in-out infinite;
  pointer-events: none;
  z-index: 0;
}

/* Corner accent lines */
.sitmon-intro::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: 16px;
  background: 
    linear-gradient(90deg, var(--sitmon-cyan) 0%, transparent 30%) top left / 80px 1px no-repeat,
    linear-gradient(180deg, var(--sitmon-cyan) 0%, transparent 30%) top left / 1px 80px no-repeat,
    linear-gradient(270deg, var(--sitmon-cyan) 0%, transparent 30%) top right / 80px 1px no-repeat,
    linear-gradient(180deg, var(--sitmon-cyan) 0%, transparent 30%) top right / 1px 80px no-repeat,
    linear-gradient(90deg, var(--sitmon-cyan) 0%, transparent 30%) bottom left / 80px 1px no-repeat,
    linear-gradient(0deg, var(--sitmon-cyan) 0%, transparent 30%) bottom left / 1px 80px no-repeat,
    linear-gradient(270deg, var(--sitmon-cyan) 0%, transparent 30%) bottom right / 80px 1px no-repeat,
    linear-gradient(0deg, var(--sitmon-cyan) 0%, transparent 30%) bottom right / 1px 80px no-repeat;
  opacity: 0.5;
  pointer-events: none;
  z-index: 1;
}

@keyframes heroFadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes heroGradientPulse {
  0%, 100% {
    transform: translate(0, 0) rotate(0deg);
    opacity: 0.6;
  }
  25% {
    transform: translate(5%, 5%) rotate(2deg);
    opacity: 0.8;
  }
  50% {
    transform: translate(-3%, 3%) rotate(-1deg);
    opacity: 0.7;
  }
  75% {
    transform: translate(2%, -3%) rotate(1deg);
    opacity: 0.9;
  }
}

/* Hero content positioning */
.sitmon-intro-copy,
.sitmon-intro-stats {
  position: relative;
  z-index: 2;
}

/* Enhanced eyebrow */
.sitmon-intro-eyebrow {
  font-family: var(--sitmon-font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  color: var(--sitmon-cyan);
  text-shadow: 0 0 20px var(--sitmon-cyan-glow);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Live indicator dot */
.sitmon-intro-eyebrow::before {
  content: '';
  width: 8px;
  height: 8px;
  background: var(--sitmon-success);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--sitmon-success-glow), 0 0 20px var(--sitmon-success-glow);
  animation: livePulse 2s ease-in-out infinite;
}

@keyframes livePulse {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
    box-shadow: 0 0 10px var(--sitmon-success-glow), 0 0 20px var(--sitmon-success-glow);
  }
  50% {
    opacity: 0.6;
    transform: scale(0.85);
    box-shadow: 0 0 5px var(--sitmon-success-glow);
  }
}

/* Enhanced title */
.sitmon-intro-title {
  font-family: var(--sitmon-font-display);
  font-size: clamp(2rem, 3vw, 2.8rem);
  font-weight: 700;
  color: #fff;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.5);
  letter-spacing: -0.02em;
  line-height: 1.1;
  background: linear-gradient(135deg, #ffffff 0%, #e6f6ff 50%, #ffffff 100%);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: titleShimmer 4s ease-in-out infinite;
  background-size: 200% 100%;
}

@keyframes titleShimmer {
  0%, 100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

/* Enhanced description */
.sitmon-intro-description {
  font-family: var(--sitmon-font-display);
  font-size: 1.05rem;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.8);
  max-width: 500px;
}

/* Enhanced footnote/timestamp */
.sitmon-intro-footnote {
  font-family: var(--sitmon-font-mono);
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.5);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.sitmon-intro-footnote::before {
  content: '◉';
  color: var(--sitmon-cyan-dim);
  font-size: 0.6rem;
}

/* ============================================
   GLASSMORPHISM STAT CARDS
   ============================================ */

.sitmon-intro-stat {
  position: relative;
  padding: 1rem 1.1rem;
  border-radius: 14px;
  background: 
    linear-gradient(135deg, rgba(15, 30, 50, 0.6) 0%, rgba(10, 25, 45, 0.4) 100%);
  border: 1px solid var(--sitmon-border);
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    inset 0 -1px 0 rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(15px);
  overflow: hidden;
  transition: 
    transform var(--sitmon-anim-medium) cubic-bezier(0.4, 0, 0.2, 1),
    box-shadow var(--sitmon-anim-medium) ease,
    border-color var(--sitmon-anim-medium) ease;
  animation: statCardFadeIn 0.6s ease-out backwards;
}

.sitmon-intro-stat:nth-child(1) { animation-delay: 0.1s; }
.sitmon-intro-stat:nth-child(2) { animation-delay: 0.2s; }
.sitmon-intro-stat:nth-child(3) { animation-delay: 0.3s; }
.sitmon-intro-stat:nth-child(4) { animation-delay: 0.4s; }

@keyframes statCardFadeIn {
  from {
    opacity: 0;
    transform: translateY(15px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Stat card glow effect on hover */
.sitmon-intro-stat::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: 14px;
  background: radial-gradient(ellipse at 50% 0%, var(--sitmon-cyan-glow) 0%, transparent 70%);
  opacity: 0;
  transition: opacity var(--sitmon-anim-medium) ease;
  pointer-events: none;
}

.sitmon-intro-stat:hover {
  transform: translateY(-2px);
  border-color: var(--sitmon-border-glow);
  box-shadow: 
    0 12px 40px rgba(0, 0, 0, 0.3),
    0 0 30px rgba(34, 211, 238, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.sitmon-intro-stat:hover::before {
  opacity: 0.3;
}

/* Stat label */
.sitmon-intro-stat-label {
  font-family: var(--sitmon-font-mono);
  font-size: 0.68rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.55);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.5rem;
}

/* Stat value with counter animation */
.sitmon-intro-stat-value {
  font-family: var(--sitmon-font-mono);
  font-size: 1.6rem;
  font-weight: 700;
  color: #fff;
  line-height: 1;
  transition: color var(--sitmon-anim-fast) ease;
}

/* Animated value update effect */
.sitmon-intro-stat-value.updated {
  animation: statValuePulse 0.6s ease-out;
}

@keyframes statValuePulse {
  0% {
    transform: scale(1);
  }
  30% {
    transform: scale(1.15);
    text-shadow: 0 0 20px currentColor;
  }
  100% {
    transform: scale(1);
    text-shadow: none;
  }
}

/* Critical stat styling */
.sitmon-intro-stat-value.critical {
  color: var(--sitmon-critical);
  text-shadow: 0 0 15px var(--sitmon-critical-glow);
}

/* High priority stat styling */
.sitmon-intro-stat-value.high {
  color: var(--sitmon-high);
  text-shadow: 0 0 15px var(--sitmon-high-glow);
}

/* Online status styling */
.sitmon-intro-stat-value.online {
  color: var(--sitmon-success);
  text-shadow: 0 0 15px var(--sitmon-success-glow);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.sitmon-intro-stat-value.online::before {
  content: '';
  width: 8px;
  height: 8px;
  background: var(--sitmon-success);
  border-radius: 50%;
  animation: livePulse 2s ease-in-out infinite;
}

/* Offline status styling */
.sitmon-intro-stat-value.offline {
  color: var(--sitmon-critical);
  text-shadow: 0 0 15px var(--sitmon-critical-glow);
}

/* Stat card with critical events gets special border */
.sitmon-intro-stat:has(.critical) {
  border-color: rgba(255, 107, 107, 0.3);
  animation: criticalStatBorder 3s ease-in-out infinite;
}

@keyframes criticalStatBorder {
  0%, 100% {
    border-color: rgba(255, 107, 107, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2), 0 0 20px rgba(255, 107, 107, 0.1);
  }
  50% {
    border-color: rgba(255, 107, 107, 0.4);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2), 0 0 30px rgba(255, 107, 107, 0.2);
  }
}

/* ============================================
   2. PANEL CARDS - ENHANCED
   ============================================ */

/* Enhanced panel card base */
.sitmon-panel-card {
  position: relative;
  background: 
    linear-gradient(180deg, rgba(12, 25, 45, 0.9) 0%, rgba(8, 18, 34, 0.85) 100%);
  border: 1px solid var(--sitmon-border);
  border-radius: 16px !important;
  box-shadow: 
    0 10px 40px rgba(0, 0, 0, 0.25),
    0 0 1px rgba(70, 180, 255, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(12px);
  overflow: hidden;
  transition: 
    transform var(--sitmon-anim-medium) cubic-bezier(0.4, 0, 0.2, 1),
    box-shadow var(--sitmon-anim-medium) ease,
    border-color var(--sitmon-anim-medium) ease;
}

/* Gradient border effect using pseudo-element */
.sitmon-panel-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, 
    transparent 0%,
    var(--sitmon-cyan) 20%,
    var(--sitmon-blue) 50%,
    var(--sitmon-cyan) 80%,
    transparent 100%
  );
  opacity: 0.6;
  z-index: 3;
  pointer-events: none;
}

/* Shimmer loading effect */
.sitmon-panel-card.loading::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg,
    transparent,
    rgba(34, 211, 238, 0.05),
    transparent
  );
  animation: shimmerLoading 1.5s ease-in-out infinite;
  z-index: 2;
  pointer-events: none;
}

@keyframes shimmerLoading {
  0% {
    left: -100%;
  }
  100% {
    left: 100%;
  }
}

/* Panel hover effects */
.sitmon-panel-card:hover {
  transform: translateY(-3px);
  border-color: var(--sitmon-border-glow);
  box-shadow: 
    0 15px 50px rgba(0, 0, 0, 0.35),
    0 0 40px rgba(34, 211, 238, 0.08),
    0 0 1px rgba(70, 180, 255, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

/* Panel hover glow effect */
.sitmon-panel-card:hover::before {
  opacity: 1;
}

/* Staggered reveal animation */
.sitmon-secondary-grid > .sitmon-panel-card {
  animation: panelReveal 0.6s cubic-bezier(0.4, 0, 0.2, 1) backwards;
}

.sitmon-secondary-grid > .sitmon-panel-card:nth-child(1) { animation-delay: 0.1s; }
.sitmon-secondary-grid > .sitmon-panel-card:nth-child(2) { animation-delay: 0.15s; }
.sitmon-secondary-grid > .sitmon-panel-card:nth-child(3) { animation-delay: 0.2s; }
.sitmon-secondary-grid > .sitmon-panel-card:nth-child(4) { animation-delay: 0.25s; }
.sitmon-secondary-grid > .sitmon-panel-card:nth-child(5) { animation-delay: 0.3s; }
.sitmon-secondary-grid > .sitmon-panel-card:nth-child(6) { animation-delay: 0.35s; }

.sitmon-panels-stack > .sitmon-panel-card {
  animation: panelRevealRight 0.5s cubic-bezier(0.4, 0, 0.2, 1) backwards;
}

.sitmon-panels-stack > .sitmon-panel-card:nth-child(1) { animation-delay: 0.2s; }
.sitmon-panels-stack > .sitmon-panel-card:nth-child(2) { animation-delay: 0.3s; }
.sitmon-panels-stack > .sitmon-panel-card:nth-child(3) { animation-delay: 0.4s; }
.sitmon-panels-stack > .sitmon-panel-card:nth-child(4) { animation-delay: 0.5s; }

@keyframes panelReveal {
  from {
    opacity: 0;
    transform: translateY(25px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes panelRevealRight {
  from {
    opacity: 0;
    transform: translateX(30px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

/* Enhanced card header */
.sitmon-card-header {
  background: linear-gradient(180deg, rgba(15, 30, 55, 0.7) 0%, rgba(10, 22, 42, 0.5) 100%);
  border-bottom: 1px solid rgba(70, 180, 255, 0.12);
  padding: 0.9rem 1.1rem;
  position: relative;
  z-index: 2;
}

/* Card title with subtle glow */
.sitmon-card-title {
  font-family: var(--sitmon-font-display);
  font-size: 0.85rem;
  font-weight: 600;
  color: #fff;
  letter-spacing: 0.02em;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Panel with critical content gets alert border */
.sitmon-panel-card.has-critical {
  border-color: rgba(255, 107, 107, 0.35);
  animation: criticalPanelPulse 3s ease-in-out infinite;
}

.sitmon-panel-card.has-critical::before {
  background: linear-gradient(90deg,
    transparent 0%,
    var(--sitmon-critical) 20%,
    var(--sitmon-high) 50%,
    var(--sitmon-critical) 80%,
    transparent 100%
  );
  opacity: 0.8;
}

@keyframes criticalPanelPulse {
  0%, 100% {
    border-color: rgba(255, 107, 107, 0.25);
    box-shadow: 
      0 10px 40px rgba(0, 0, 0, 0.25),
      0 0 30px rgba(255, 107, 107, 0.08);
  }
  50% {
    border-color: rgba(255, 107, 107, 0.45);
    box-shadow: 
      0 10px 40px rgba(0, 0, 0, 0.25),
      0 0 50px rgba(255, 107, 107, 0.15);
  }
}

/* Loading skeleton shimmer for panel body */
.sitmon-card-body .sitmon-panel-loading {
  position: relative;
  min-height: 150px;
}

.sitmon-card-body .sitmon-panel-loading::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    linear-gradient(90deg,
      rgba(30, 50, 80, 0.3) 0%,
      rgba(50, 80, 120, 0.4) 50%,
      rgba(30, 50, 80, 0.3) 100%
    );
  background-size: 200% 100%;
  animation: skeletonShimmer 1.5s ease-in-out infinite;
  border-radius: 8px;
}

@keyframes skeletonShimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* Enhanced spinner */
.sitmon-spinner {
  width: 44px;
  height: 44px;
  border: 3px solid rgba(34, 211, 238, 0.15);
  border-top-color: var(--sitmon-cyan);
  border-radius: 50%;
  animation: spinnerRotate 0.8s linear infinite;
  position: relative;
}

.sitmon-spinner::before {
  content: '';
  position: absolute;
  top: -3px;
  left: -3px;
  right: -3px;
  bottom: -3px;
  border: 3px solid transparent;
  border-top-color: rgba(74, 144, 226, 0.5);
  border-radius: 50%;
  animation: spinnerRotate 1.2s linear infinite reverse;
}

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

/* ============================================
   3. MAP CONTAINER - ENHANCED
   ============================================ */

/* Map container with corner crosshairs */
.sitmon-map-container {
  position: relative;
  background: 
    linear-gradient(135deg, rgba(5, 12, 28, 0.98) 0%, rgba(8, 18, 38, 0.95) 100%);
  border: 1px solid var(--sitmon-border);
  border-radius: 16px;
  box-shadow: 
    0 20px 60px rgba(0, 0, 0, 0.4),
    inset 0 0 100px rgba(34, 211, 238, 0.02);
  overflow: hidden;
}

/* Corner crosshairs/brackets */
.sitmon-map-container::before,
.sitmon-map-container::after {
  content: '';
  position: absolute;
  width: 30px;
  height: 30px;
  z-index: 10;
  pointer-events: none;
}

.sitmon-map-container::before {
  top: 12px;
  left: 12px;
  border-left: 2px solid var(--sitmon-cyan);
  border-top: 2px solid var(--sitmon-cyan);
  opacity: 0.7;
  animation: cornerPulse 3s ease-in-out infinite;
}

.sitmon-map-container::after {
  bottom: 12px;
  right: 12px;
  border-right: 2px solid var(--sitmon-cyan);
  border-bottom: 2px solid var(--sitmon-cyan);
  opacity: 0.7;
  animation: cornerPulse 3s ease-in-out infinite 0.5s;
}

@keyframes cornerPulse {
  0%, 100% {
    opacity: 0.5;
  }
  50% {
    opacity: 1;
  }
}

/* Additional corner brackets */
.sitmon-intel-wall::before,
.sitmon-intel-wall::after {
  content: '';
  position: absolute;
  width: 30px;
  height: 30px;
  z-index: 10;
  pointer-events: none;
}

.sitmon-intel-wall::before {
  top: 12px;
  right: 12px;
  border-right: 2px solid var(--sitmon-cyan);
  border-top: 2px solid var(--sitmon-cyan);
  opacity: 0.5;
}

.sitmon-intel-wall::after {
  bottom: 12px;
  left: 12px;
  border-left: 2px solid var(--sitmon-cyan);
  border-bottom: 2px solid var(--sitmon-cyan);
  opacity: 0.5;
}

/* Enhanced tooltip */
.sitmon-tooltip {
  background: rgba(8, 18, 38, 0.95) !important;
  border: 1px solid var(--sitmon-border-glow) !important;
  border-radius: 10px !important;
  padding: 0.75rem 1rem !important;
  box-shadow: 
    0 10px 40px rgba(0, 0, 0, 0.5),
    0 0 30px rgba(34, 211, 238, 0.1) !important;
  backdrop-filter: blur(15px);
  font-family: var(--sitmon-font-display);
  animation: tooltipFadeIn 0.2s ease-out;
}

@keyframes tooltipFadeIn {
  from {
    opacity: 0;
    transform: translateY(5px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Enhanced event markers */
.event-marker circle {
  transition: 
    r 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    fill-opacity 0.3s ease;
}

.event-marker:hover circle {
  fill-opacity: 0.9;
}

/* Critical event marker pulse */
.event-marker[data-severity="5"] circle:first-child {
  animation: criticalMarkerPulse 2s ease-in-out infinite;
}

@keyframes criticalMarkerPulse {
  0%, 100% {
    r: 8;
    fill-opacity: 0.7;
  }
  50% {
    r: 12;
    fill-opacity: 0.5;
  }
}

/* HUD cards enhanced */
.sitmon-hud-card {
  background: rgba(8, 18, 38, 0.92);
  border: 1px solid var(--sitmon-border);
  border-radius: 14px;
  box-shadow: 
    0 12px 40px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(15px);
  animation: hudCardFadeIn 0.4s ease-out backwards;
}

.sitmon-hud-left .sitmon-hud-card:nth-child(1) { animation-delay: 0.2s; }
.sitmon-hud-left .sitmon-hud-card:nth-child(2) { animation-delay: 0.3s; }
.sitmon-hud-right .sitmon-hud-card:nth-child(1) { animation-delay: 0.25s; }
.sitmon-hud-right .sitmon-hud-card:nth-child(2) { animation-delay: 0.35s; }

@keyframes hudCardFadeIn {
  from {
    opacity: 0;
    transform: scale(0.92);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* HUD header enhanced */
.sitmon-hud-header {
  background: linear-gradient(180deg, rgba(15, 30, 55, 0.6) 0%, rgba(10, 22, 42, 0.4) 100%);
  border-bottom: 1px solid rgba(70, 180, 255, 0.1);
}

.sitmon-hud-title {
  font-family: var(--sitmon-font-display);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--sitmon-cyan);
  text-shadow: 0 0 15px var(--sitmon-cyan-glow);
}

/* Badge enhanced */
.sitmon-hud-badge {
  font-family: var(--sitmon-font-mono);
  font-size: 0.7rem;
  font-weight: 600;
  background: rgba(34, 211, 238, 0.15);
  border: 1px solid rgba(34, 211, 238, 0.3);
  color: var(--sitmon-cyan);
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
}

/* ============================================
   4. DATA FEED ANIMATIONS
   ============================================ */

/* Staggered list item animations */
.sitmon-news-list,
.sitmon-earthquakes-list,
.sitmon-alerts-list,
.sitmon-feed-list {
  position: relative;
}

/* News item enhanced */
.sitmon-news-item {
  position: relative;
  padding: 0.75rem 1rem;
  background: linear-gradient(135deg, rgba(12, 25, 45, 0.4) 0%, rgba(8, 18, 34, 0.3) 100%);
  border-radius: 10px;
  border-left: 3px solid var(--sitmon-cyan-dim);
  margin-bottom: 0.5rem;
  overflow: hidden;
  animation: listItemSlideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1) backwards;
  transition: 
    transform var(--sitmon-anim-fast) ease,
    background var(--sitmon-anim-fast) ease,
    border-color var(--sitmon-anim-fast) ease,
    box-shadow var(--sitmon-anim-fast) ease;
}

.sitmon-news-item:nth-child(1) { animation-delay: 0.05s; }
.sitmon-news-item:nth-child(2) { animation-delay: 0.1s; }
.sitmon-news-item:nth-child(3) { animation-delay: 0.15s; }
.sitmon-news-item:nth-child(4) { animation-delay: 0.2s; }
.sitmon-news-item:nth-child(5) { animation-delay: 0.25s; }
.sitmon-news-item:nth-child(n+6) { animation-delay: 0.3s; }

@keyframes listItemSlideIn {
  from {
    opacity: 0;
    transform: translateX(-15px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* News item hover effect */
.sitmon-news-item:hover {
  background: linear-gradient(135deg, rgba(18, 35, 60, 0.5) 0%, rgba(12, 25, 45, 0.4) 100%);
  border-color: var(--sitmon-cyan);
  transform: translateX(4px);
  box-shadow: 0 4px 20px rgba(34, 211, 238, 0.1);
}

/* New item flash-in highlight */
.sitmon-news-item.new-item {
  animation: newItemFlash 0.8s ease-out;
}

@keyframes newItemFlash {
  0% {
    background: rgba(34, 211, 238, 0.3);
    border-color: var(--sitmon-cyan);
    box-shadow: 0 0 30px var(--sitmon-cyan-glow);
  }
  100% {
    background: linear-gradient(135deg, rgba(12, 25, 45, 0.4) 0%, rgba(8, 18, 34, 0.3) 100%);
    border-color: var(--sitmon-cyan-dim);
    box-shadow: none;
  }
}

/* Severity-based styling with glow */
.sitmon-news-item[data-severity="5"] {
  border-color: var(--sitmon-critical);
  background: linear-gradient(135deg, rgba(40, 15, 20, 0.4) 0%, rgba(25, 10, 15, 0.3) 100%);
  box-shadow: 0 0 20px rgba(255, 107, 107, 0.1);
}

.sitmon-news-item[data-severity="5"]:hover {
  box-shadow: 0 4px 30px rgba(255, 107, 107, 0.2);
}

.sitmon-news-item[data-severity="4"] {
  border-color: var(--sitmon-high);
  background: linear-gradient(135deg, rgba(40, 30, 15, 0.4) 0%, rgba(25, 18, 10, 0.3) 100%);
}

/* Feed item enhanced */
.sitmon-feed-item {
  padding: 0.65rem 0.75rem;
  border-radius: 8px;
  background: rgba(10, 22, 42, 0.3);
  margin-bottom: 0.4rem;
  cursor: pointer;
  transition: 
    background var(--sitmon-anim-fast) ease,
    transform var(--sitmon-anim-fast) ease;
  animation: feedItemFadeIn 0.3s ease-out backwards;
}

.sitmon-feed-item:nth-child(1) { animation-delay: 0.05s; }
.sitmon-feed-item:nth-child(2) { animation-delay: 0.08s; }
.sitmon-feed-item:nth-child(3) { animation-delay: 0.11s; }
.sitmon-feed-item:nth-child(4) { animation-delay: 0.14s; }
.sitmon-feed-item:nth-child(n+5) { animation-delay: 0.17s; }

@keyframes feedItemFadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.sitmon-feed-item:hover {
  background: rgba(20, 40, 70, 0.4);
  transform: translateX(3px);
}

.sitmon-feed-item.critical {
  border-left: 3px solid var(--sitmon-critical);
  background: rgba(40, 15, 20, 0.3);
}

/* Earthquake item enhanced */
.sitmon-earthquake-item {
  position: relative;
  padding: 0.75rem 1rem;
  background: linear-gradient(135deg, rgba(40, 15, 25, 0.35) 0%, rgba(25, 10, 18, 0.25) 100%);
  border-radius: 10px;
  border-left: 3px solid var(--sitmon-critical);
  margin-bottom: 0.5rem;
  overflow: hidden;
  animation: listItemSlideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1) backwards;
  transition: 
    transform var(--sitmon-anim-fast) ease,
    box-shadow var(--sitmon-anim-fast) ease;
}

.sitmon-earthquake-item:hover {
  transform: translateX(4px);
  box-shadow: 0 4px 20px rgba(255, 107, 107, 0.15);
}

/* Earthquake magnitude styling */
.sitmon-earthquake-magnitude {
  font-family: var(--sitmon-font-mono);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--sitmon-critical);
  text-shadow: 0 0 15px var(--sitmon-critical-glow);
}

/* Weather alert item enhanced */
.sitmon-alert-item {
  position: relative;
  padding: 0.75rem 1rem;
  border-radius: 10px;
  margin-bottom: 0.5rem;
  overflow: hidden;
  animation: listItemSlideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1) backwards;
  transition: 
    transform var(--sitmon-anim-fast) ease,
    box-shadow var(--sitmon-anim-fast) ease;
}

.sitmon-alert-item:hover {
  transform: translateX(4px);
}

.sitmon-alert-extreme {
  background: linear-gradient(135deg, rgba(50, 15, 15, 0.4) 0%, rgba(30, 10, 10, 0.3) 100%);
  border-left: 3px solid #ff3333;
  box-shadow: 0 0 20px rgba(255, 51, 51, 0.1);
}

.sitmon-alert-severe {
  background: linear-gradient(135deg, rgba(45, 20, 20, 0.35) 0%, rgba(28, 12, 12, 0.25) 100%);
  border-left: 3px solid var(--sitmon-critical);
}

.sitmon-alert-moderate {
  background: linear-gradient(135deg, rgba(45, 35, 15, 0.35) 0%, rgba(28, 22, 10, 0.25) 100%);
  border-left: 3px solid var(--sitmon-high);
}

.sitmon-alert-minor {
  background: linear-gradient(135deg, rgba(15, 30, 50, 0.35) 0%, rgba(10, 20, 35, 0.25) 100%);
  border-left: 3px solid var(--sitmon-blue);
}

/* ============================================
   5. TICKER REDESIGN
   ============================================ */

/* Enhanced ticker container */
.sitmon-osint-ticker {
  position: fixed;
  top: var(--sitmon-header-height);
  left: 0;
  right: 0;
  background: linear-gradient(180deg, rgba(5, 12, 28, 0.98) 0%, rgba(8, 18, 38, 0.95) 100%);
  border-bottom: 1px solid var(--sitmon-border);
  padding: 0;
  z-index: 900;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

/* Top accent line */
.sitmon-osint-ticker::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, 
    transparent, 
    var(--sitmon-cyan) 20%, 
    var(--sitmon-cyan) 80%, 
    transparent
  );
  opacity: 0.5;
}

/* Ticker feed container */
.sitmon-ticker-feed {
  display: flex;
  flex-direction: column;
  gap: 0;
  width: 100%;
  max-height: 120px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(34, 211, 238, 0.3) transparent;
}

.sitmon-ticker-feed::-webkit-scrollbar {
  width: 4px;
}

.sitmon-ticker-feed::-webkit-scrollbar-thumb {
  background: rgba(34, 211, 238, 0.3);
  border-radius: 2px;
}

/* Ticker line item */
.sitmon-ticker-line {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.4rem 1rem;
  font-family: var(--sitmon-font-mono);
  font-size: 0.72rem;
  white-space: nowrap;
  border-bottom: 1px solid rgba(70, 180, 255, 0.06);
  transition: background var(--sitmon-anim-fast) ease;
  animation: tickerLineSlide 0.3s ease-out backwards;
}

.sitmon-ticker-line:nth-child(1) { animation-delay: 0.05s; }
.sitmon-ticker-line:nth-child(2) { animation-delay: 0.1s; }
.sitmon-ticker-line:nth-child(3) { animation-delay: 0.15s; }
.sitmon-ticker-line:nth-child(n+4) { animation-delay: 0.2s; }

@keyframes tickerLineSlide {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.sitmon-ticker-line:hover {
  background: rgba(34, 211, 238, 0.08);
}

.sitmon-ticker-line:last-child {
  border-bottom: none;
}

/* Ticker time */
.sitmon-ticker-time {
  color: var(--sitmon-cyan);
  font-weight: 600;
  min-width: 50px;
  text-shadow: 0 0 10px var(--sitmon-cyan-glow);
}

/* Ticker category */
.sitmon-ticker-category {
  color: rgba(255, 255, 255, 0.45);
  font-size: 0.65rem;
  min-width: 70px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Ticker severity indicator */
.sitmon-ticker-severity {
  font-weight: 700;
  min-width: 45px;
  text-align: center;
}

/* Ticker title */
.sitmon-ticker-title {
  flex: 1;
  color: rgba(255, 255, 255, 0.85);
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Severity-based styling */
.sitmon-ticker-line[data-severity="5"] {
  background: rgba(255, 107, 107, 0.08);
}

.sitmon-ticker-line[data-severity="5"] .sitmon-ticker-title {
  color: var(--sitmon-critical);
  font-weight: 600;
  text-shadow: 0 0 10px var(--sitmon-critical-glow);
}

.sitmon-ticker-line[data-severity="5"] .sitmon-ticker-severity {
  color: var(--sitmon-critical);
}

.sitmon-ticker-line[data-severity="4"] .sitmon-ticker-title {
  color: var(--sitmon-high);
}

.sitmon-ticker-line[data-severity="4"] .sitmon-ticker-severity {
  color: var(--sitmon-high);
}

/* Ticker age */
.sitmon-ticker-age {
  color: rgba(255, 255, 255, 0.35);
  font-size: 0.65rem;
  min-width: 55px;
  text-align: right;
}

/* ============================================
   6. MICRO-INTERACTIONS
   ============================================ */

/* Button base styles */
.sitmon-refresh-btn,
.sitmon-retry-btn,
.sitmon-tab-btn,
.sitmon-filter-btn,
.sitmon-pinned-btn {
  position: relative;
  overflow: hidden;
  font-family: var(--sitmon-font-display);
  font-weight: 600;
  cursor: pointer;
  transition: 
    transform var(--sitmon-anim-fast) ease,
    background var(--sitmon-anim-fast) ease,
    border-color var(--sitmon-anim-fast) ease,
    box-shadow var(--sitmon-anim-fast) ease;
}

/* Ripple effect container */
.sitmon-refresh-btn::after,
.sitmon-tab-btn::after,
.sitmon-filter-btn::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.25);
  transform: translate(-50%, -50%);
  transition: width 0.5s ease, height 0.5s ease, opacity 0.5s ease;
  pointer-events: none;
  opacity: 0;
}

.sitmon-refresh-btn:active::after,
.sitmon-tab-btn:active::after,
.sitmon-filter-btn:active::after {
  width: 200px;
  height: 200px;
  opacity: 0;
  transition: width 0s, height 0s, opacity 0.5s ease;
}

/* Refresh button enhanced */
.sitmon-refresh-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.1rem;
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.15) 0%, rgba(74, 144, 226, 0.1) 100%);
  border: 1px solid rgba(34, 211, 238, 0.3);
  border-radius: 10px;
  color: #fff;
  font-size: 0.82rem;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.sitmon-refresh-btn:hover {
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.25) 0%, rgba(74, 144, 226, 0.18) 100%);
  border-color: var(--sitmon-cyan);
  transform: translateY(-2px);
  box-shadow: 
    0 6px 20px rgba(0, 0, 0, 0.25),
    0 0 20px rgba(34, 211, 238, 0.15);
}

.sitmon-refresh-btn:active {
  transform: translateY(0);
}

/* Refresh button loading state */
.sitmon-refresh-btn.loading {
  pointer-events: none;
  opacity: 0.8;
}

.sitmon-refresh-btn.loading .sitmon-icon {
  animation: iconSpin 0.8s linear infinite;
}

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

/* Tab button enhanced */
.sitmon-tab-btn {
  padding: 0.5rem 0.9rem;
  background: rgba(20, 40, 70, 0.4);
  border: 1px solid rgba(70, 180, 255, 0.2);
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.78rem;
}

.sitmon-tab-btn:hover {
  background: rgba(30, 55, 90, 0.5);
  border-color: var(--sitmon-cyan-dim);
  transform: translateY(-1px);
}

.sitmon-tab-btn.active {
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.2) 0%, rgba(74, 144, 226, 0.15) 100%);
  border-color: var(--sitmon-cyan);
  color: var(--sitmon-cyan);
  box-shadow: 0 0 15px var(--sitmon-cyan-glow);
}

/* Filter button enhanced */
.sitmon-filter-btn {
  padding: 0.45rem 0.7rem;
  background: rgba(15, 30, 55, 0.5);
  border: 1px solid rgba(70, 180, 255, 0.15);
  border-radius: 6px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.75rem;
}

.sitmon-filter-btn:hover {
  background: rgba(25, 45, 75, 0.6);
  border-color: rgba(70, 180, 255, 0.3);
}

.sitmon-filter-btn.active {
  background: rgba(34, 211, 238, 0.15);
  border-color: var(--sitmon-cyan);
  color: var(--sitmon-cyan);
}

/* Focus states with animated outline */
.sitmon-refresh-btn:focus-visible,
.sitmon-tab-btn:focus-visible,
.sitmon-filter-btn:focus-visible,
.sitmon-music-btn:focus-visible {
  outline: none;
  box-shadow: 
    0 0 0 2px rgba(3, 8, 18, 0.9),
    0 0 0 4px var(--sitmon-cyan);
}

/* Status chip enhanced */
.sitmon-status-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.75rem;
  background: rgba(34, 211, 238, 0.12);
  border: 1px solid rgba(34, 211, 238, 0.25);
  border-radius: 999px;
  font-family: var(--sitmon-font-mono);
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--sitmon-cyan);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* Live indicator in status chip */
.sitmon-status-chip::before {
  content: '';
  width: 6px;
  height: 6px;
  min-width: 6px;
  min-height: 6px;
  flex-shrink: 0;
  background: var(--sitmon-success);
  border-radius: 50%;
  box-shadow: 0 0 6px var(--sitmon-success-glow);
  animation: livePulse 2s ease-in-out infinite;
}

/* Status chip updating state */
.sitmon-status-chip.updating {
  background: rgba(255, 170, 0, 0.12);
  border-color: rgba(255, 170, 0, 0.25);
  color: var(--sitmon-high);
}

.sitmon-status-chip.updating::before {
  background: var(--sitmon-high);
  animation: none;
}

/* Panel resize handle styles defined earlier - see main resize handle section */
/* This section intentionally left empty to avoid duplicate styles */

/* Music button enhanced */
.sitmon-music-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: rgba(20, 40, 70, 0.4);
  border: 1px solid rgba(70, 180, 255, 0.2);
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.8);
  cursor: pointer;
  transition: 
    background var(--sitmon-anim-fast) ease,
    border-color var(--sitmon-anim-fast) ease,
    transform var(--sitmon-anim-fast) ease;
}

.sitmon-music-btn:hover {
  background: rgba(30, 55, 90, 0.5);
  border-color: var(--sitmon-cyan-dim);
  transform: scale(1.05);
}

.sitmon-music-btn:active {
  transform: scale(0.95);
}

/* ============================================
   7. TYPOGRAPHY REFINEMENTS
   ============================================ */

/* Apply custom fonts globally */
body.situation-monitor-page {
  font-family: var(--sitmon-font-display);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Monospace elements */
.sitmon-telemetry,
.sitmon-timestamp,
.sitmon-count,
.sitmon-earthquake-time,
.sitmon-news-time,
.sitmon-alert-severity,
.sitmon-ticker-time,
.sitmon-ticker-category,
.sitmon-ticker-age {
  font-family: var(--sitmon-font-mono);
}

/* Headings */
.sitmon-page-title,
.sitmon-intro-title,
.sitmon-card-title,
.sitmon-hud-title {
  font-family: var(--sitmon-font-display);
  letter-spacing: -0.01em;
}

/* Data values */
.sitmon-stat-value,
.sitmon-intro-stat-value,
.sitmon-earthquake-magnitude {
  font-family: var(--sitmon-font-mono);
  font-feature-settings: 'tnum' 1; /* Tabular numbers for alignment */
}

/* Improved line heights */
.sitmon-news-title,
.sitmon-alert-headline,
.sitmon-pinned-summary {
  line-height: 1.45;
}

.sitmon-news-description,
.sitmon-earthquake-details,
.sitmon-alert-areas {
  line-height: 1.5;
}

/* Font sizing scale */
.sitmon-card-body {
  font-size: 0.88rem;
}

.sitmon-news-header,
.sitmon-earthquake-header,
.sitmon-alert-header {
  font-size: 0.72rem;
}

.sitmon-news-source,
.sitmon-earthquake-time,
.sitmon-alert-severity {
  font-size: 0.68rem;
  letter-spacing: 0.03em;
}

/* ============================================
   8. STATUS INDICATORS ENHANCED
   ============================================ */

/* OSINT status strip enhanced */
.sitmon-osint-status-strip {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 28px;
  background: linear-gradient(180deg, rgba(5, 12, 28, 0.95) 0%, rgba(3, 8, 18, 0.98) 100%);
  border-top: 1px solid rgba(70, 180, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1rem;
  z-index: 10;
  font-family: var(--sitmon-font-mono);
  font-size: 0.68rem;
}

/* Status items */
.sitmon-osint-status-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.sitmon-osint-status-label {
  color: rgba(255, 255, 255, 0.45);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.62rem;
}

.sitmon-osint-status-value {
  color: var(--sitmon-cyan);
  font-weight: 600;
}

.sitmon-osint-status-value.online {
  color: var(--sitmon-success);
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.sitmon-osint-status-value.online::before {
  content: '';
  width: 6px;
  height: 6px;
  background: var(--sitmon-success);
  border-radius: 50%;
  animation: statusPulse 2s ease-in-out infinite;
}

@keyframes statusPulse {
  0%, 100% {
    opacity: 1;
    box-shadow: 0 0 6px var(--sitmon-success-glow);
  }
  50% {
    opacity: 0.5;
    box-shadow: 0 0 2px var(--sitmon-success-glow);
  }
}

.sitmon-osint-status-value.offline {
  color: var(--sitmon-critical);
}

/* ============================================
   9. REDUCED MOTION SUPPORT
   ============================================ */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  .sitmon-intro::before,
  .sitmon-intro-title,
  .sitmon-status-chip::before,
  .sitmon-intro-eyebrow::before,
  .sitmon-osint-status-value.online::before,
  .sitmon-spinner,
  .sitmon-spinner::before {
    animation: none !important;
  }
}

/* ============================================
   10. RESPONSIVE POLISH
   ============================================ */

@media (max-width: 1200px) {
  .sitmon-intro {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }
  
  .sitmon-intro-stats {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 900px) {
  .sitmon-intro-stats {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .sitmon-intro-stat {
    padding: 0.85rem;
  }
  
  .sitmon-intro-stat-value {
    font-size: 1.4rem;
  }
  
  .sitmon-ticker-line {
    padding: 0.35rem 0.75rem;
    font-size: 0.68rem;
  }
  
  .sitmon-ticker-category {
    display: none;
  }
}

@media (max-width: 600px) {
  .sitmon-intro {
    padding: 1rem;
    border-radius: 12px;
  }
  
  .sitmon-intro-title {
    font-size: 1.6rem;
  }
  
  .sitmon-intro-stat-value {
    font-size: 1.2rem;
  }
  
  .sitmon-ticker-severity {
    display: none;
  }
  
  .sitmon-ticker-age {
    display: none;
  }
}

/* ============================================
   LIVE CAMS PANEL - CRITICAL VISIBILITY FIX
   Must be at END of file to override conflicts
   ============================================ */

/* Live Cams panel container - full width, proper height */
#sitmon-panel-livecams {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  grid-column: 1 / -1 !important;
  min-height: 85vh !important;
  height: auto !important;
  max-height: none !important;
  overflow: visible !important;
  position: relative !important;
  z-index: 5 !important;
}

/* When shown, ensure it's truly visible */
#sitmon-panel-livecams[style*="display: block"] {
  display: block !important;
}

/* Live Cams card body - override the min-height: 0 rule */
#sitmon-panel-livecams > .sitmon-card-body,
#sitmon-panel-livecams .sitmon-card-body {
  min-height: 80vh !important;
  height: auto !important;
  max-height: none !important;
  overflow: visible !important;
  padding: 0 !important;
}

/* The actual livecams-container must fill the space */
#sitmon-panel-livecams .livecams-container,
#sitmon-panel-livecams-body .livecams-container {
  min-height: 78vh !important;
  height: auto !important;
  max-height: none !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: visible !important;
}

/* Live Cams layout grid needs proper height */
#sitmon-panel-livecams .livecams-layout {
  min-height: 60vh !important;
  height: auto !important;
  flex: 1 1 auto !important;
  overflow: visible !important;
}

/* Ensure left panel and view panel have reasonable heights */
#sitmon-panel-livecams .livecams-left-panel {
  min-height: 55vh !important;
  max-height: none !important;
  overflow-y: auto !important;
}

#sitmon-panel-livecams .livecams-view-panel {
  min-height: 55vh !important;
  height: auto !important;
  max-height: none !important;
}

/* Grid cells in multi-camera view */
#sitmon-panel-livecams .livecams-grid-view {
  min-height: 50vh !important;
}

/* Player display needs to be visible */
#sitmon-panel-livecams .livecams-player-display {
  min-height: 300px !important;
}

/* When Live Cams is shown, hide other secondary panels for focus */
.sitmon-secondary-grid:has(#sitmon-panel-livecams[style*="display: block"]) > .sitmon-panel-card:not(#sitmon-panel-livecams) {
  display: none !important;
}

/* Mobile responsive for Live Cams */
@media (max-width: 1200px) {
  #sitmon-panel-livecams .livecams-layout {
    grid-template-columns: 1fr !important;
    gap: 1rem !important;
  }
  
  #sitmon-panel-livecams .livecams-left-panel {
    max-height: 40vh !important;
    min-height: 300px !important;
  }
  
  #sitmon-panel-livecams .livecams-view-panel {
    min-height: 50vh !important;
  }
}

@media (max-width: 768px) {
  #sitmon-panel-livecams {
    min-height: 100vh !important;
  }
  
  #sitmon-panel-livecams .livecams-container {
    min-height: 95vh !important;
  }
}

/* ============================================
   OSINT TICKER - LIMIT TO 3 LINES MAX
   ============================================ */

/* Desktop: max 3 lines */
.sitmon-osint-ticker {
  max-height: 72px !important; /* ~24px per line x 3 */
  overflow: hidden !important;
}

.sitmon-ticker-feed {
  max-height: 68px;
  overflow: hidden;
}

/* Only show first 3 ticker items via CSS */
.sitmon-ticker-line:nth-child(n+4) {
  display: none !important;
}

/* Only show first 3 earthquake items via CSS */
.sitmon-earthquakes-list .sitmon-earthquake-item:nth-child(n+4) {
  display: none !important;
}

/* ============================================
   MOBILE RESPONSIVE OVERHAUL
   ============================================ */

/* Tablet breakpoint */
@media (max-width: 1024px) {
  /* Grid adjustments */
  .sitmon-secondary-grid {
    grid-template-columns: repeat(6, 1fr) !important;
    gap: 12px !important;
  }
  
  .sitmon-secondary-grid > .sitmon-panel-card:nth-child(1),
  .sitmon-secondary-grid > .sitmon-panel-card:nth-child(2),
  .sitmon-secondary-grid > .sitmon-panel-card:nth-child(3),
  .sitmon-secondary-grid > .sitmon-panel-card:nth-child(4) {
    grid-column: span 3 !important;
  }
  
  .sitmon-secondary-grid > .sitmon-panel-card:nth-child(5),
  .sitmon-secondary-grid > .sitmon-panel-card:nth-child(6) {
    grid-column: span 6 !important;
  }
  
  /* HUD panels - make them smaller */
  .sitmon-hud-left,
  .sitmon-hud-right {
    width: 240px !important;
  }
}

/* Mobile breakpoint - complete overhaul */
@media (max-width: 768px) {
  /* Root level fixes */
  .sitmon-page-wrapper {
    padding: 0.5rem !important;
    padding-top: calc(var(--sitmon-header-height) + 70px) !important; /* Account for ticker */
    overflow-x: hidden !important;
  }
  
  /* Ticker - smaller on mobile */
  .sitmon-osint-ticker {
    max-height: 60px !important;
    padding: 4px 8px !important;
    font-size: 0.6rem !important;
  }
  
  .sitmon-ticker-line {
    gap: 6px !important;
    font-size: 0.6rem !important;
    padding: 1px 0 !important;
  }
  
  .sitmon-ticker-time {
    font-size: 0.55rem !important;
    min-width: 40px !important;
  }
  
  /* Hide HUD overlays on mobile - they obscure too much */
  .sitmon-hud-left,
  .sitmon-hud-right {
    display: none !important;
  }
  
  /* OSINT Grid - single column on mobile */
  .sitmon-osint-grid {
    display: flex !important;
    flex-direction: column !important;
    gap: 0.75rem !important;
  }
  
  .sitmon-intel-wall {
    width: 100% !important;
    grid-column: unset !important;
    margin-bottom: 0.75rem !important;
  }
  
  /* Map - full width, reasonable height */
  .sitmon-map-container {
    width: 100% !important;
    min-height: 280px !important;
    max-height: 350px !important;
    height: 280px !important;
    border-radius: 8px !important;
  }
  
  .sitmon-map {
    width: 100% !important;
    height: 100% !important;
    min-height: 280px !important;
  }
  
  .sitmon-map-card {
    margin-bottom: 1rem !important;
  }
  
  .sitmon-map-card .sitmon-card-body {
    min-height: 250px !important;
    max-height: 300px !important;
  }
  
  /* Intro section - stack everything */
  .sitmon-intro {
    padding: 0.75rem !important;
    gap: 0.75rem !important;
  }
  
  .sitmon-intro-title {
    font-size: 1.25rem !important;
    line-height: 1.3 !important;
  }
  
  .sitmon-intro-desc {
    font-size: 0.8rem !important;
    line-height: 1.4 !important;
  }
  
  /* Stats grid - 2x2 on mobile */
  .sitmon-intro-stats {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.5rem !important;
  }
  
  .sitmon-stat-card {
    padding: 0.75rem !important;
  }
  
  .sitmon-stat-value {
    font-size: 1.5rem !important;
  }
  
  .sitmon-stat-label {
    font-size: 0.65rem !important;
  }
  
  /* Secondary grid - single column stack */
  .sitmon-secondary-grid {
    display: flex !important;
    flex-direction: column !important;
    gap: 0.75rem !important;
  }
  
  .sitmon-secondary-grid > .sitmon-panel-card {
    grid-column: unset !important;
    width: 100% !important;
    min-height: 200px !important;
    max-height: 350px !important;
  }
  
  /* Panels stack - fix for mobile: full width, no grid positioning */
  .sitmon-panels-stack {
    grid-column: unset !important;
    width: 100% !important;
    height: auto !important;
    max-height: none !important;
    min-height: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 0.75rem !important;
  }
  
  .sitmon-panels-stack > .sitmon-panel-card {
    flex: none !important;
    min-height: 180px !important;
    max-height: 300px !important;
    height: auto !important;
    width: 100% !important;
  }
  
  /* Panel cards - mobile optimized */
  .sitmon-panel-card {
    border-radius: 10px !important;
  }
  
  .sitmon-card-header {
    padding: 0.6rem 0.75rem !important;
  }
  
  .sitmon-card-title {
    font-size: 0.8rem !important;
  }
  
  .sitmon-card-body {
    padding: 0.5rem !important;
    font-size: 0.75rem !important;
  }
  
  /* Toolbar - stack vertically on mobile */
  .sitmon-toolbar {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0.5rem !important;
    padding: 0.5rem !important;
  }
  
  .sitmon-toolbar-left {
    flex-wrap: wrap !important;
    justify-content: center !important;
    gap: 0.5rem !important;
  }
  
  .sitmon-toolbar-right {
    flex-wrap: wrap !important;
    justify-content: center !important;
    gap: 0.5rem !important;
  }
  
  /* Auto-refresh toggle - fix vertical text issue on mobile */
  .sitmon-auto-refresh-toggle {
    display: inline-flex !important;
    flex-direction: row !important;
    align-items: center !important;
    white-space: nowrap !important;
    font-size: 0.65rem !important;
    gap: 4px !important;
    writing-mode: horizontal-tb !important;
    text-orientation: mixed !important;
    min-width: 100px !important;
    width: auto !important;
    flex-shrink: 0 !important;
    flex-wrap: nowrap !important;
  }
  
  .sitmon-auto-refresh-toggle span {
    display: inline !important;
    writing-mode: horizontal-tb !important;
    text-orientation: mixed !important;
    white-space: nowrap !important;
    word-break: keep-all !important;
  }
  
  /* Force horizontal layout for header right controls on mobile */
  .sitmon-header-right {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
    align-items: center !important;
    justify-content: center !important;
  }
  
  .sitmon-header-right > * {
    flex-shrink: 0 !important;
    min-width: auto !important;
  }
  
  /* Fix the page header layout for mobile */
  .sitmon-page-header {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0.75rem !important;
    padding: 0.75rem !important;
  }
  
  .sitmon-page-header .sitmon-header-left {
    text-align: center !important;
    margin-bottom: 0.5rem !important;
  }
  
  .sitmon-page-header .sitmon-header-right {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    gap: 0.5rem !important;
    width: 100% !important;
    justify-content: center !important;
    align-items: center !important;
  }
  
  .sitmon-page-header .sitmon-music-controls {
    width: 100% !important;
    justify-content: center !important;
    order: 1 !important;
  }
  
  .sitmon-page-header .sitmon-refresh-btn,
  .sitmon-page-header .sitmon-tab-btn {
    justify-content: center !important;
    text-align: center !important;
    flex-shrink: 0 !important;
  }
  
  /* HIDE auto-refresh toggle on mobile - it's already checked by default */
  .sitmon-page-header .sitmon-auto-refresh-toggle,
  .sitmon-auto-refresh-toggle,
  label.sitmon-auto-refresh-toggle,
  .sitmon-header-right .sitmon-auto-refresh-toggle,
  [class*="auto-refresh"] {
    display: none !important;
    visibility: hidden !important;
    width: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
    position: absolute !important;
    left: -9999px !important;
  }
  
  /* Also hide the Map Pins button on mobile to simplify */
  #sitmon-toggle-cam-layer {
    display: none !important;
  }
  
  /* Buttons - touch friendly */
  .sitmon-tab-btn,
  .sitmon-filter-btn,
  .sitmon-icon-btn {
    min-height: 36px !important;
    min-width: 36px !important;
    padding: 0.4rem 0.6rem !important;
    font-size: 0.7rem !important;
  }
  
  /* Music controls - smaller */
  .sitmon-music-controls {
    gap: 0.25rem !important;
  }
  
  .sitmon-music-controls button {
    padding: 0.25rem !important;
  }
  
  .sitmon-music-controls input[type="range"] {
    width: 50px !important;
  }
  
  /* Form inputs */
  .sitmon-input,
  .sitmon-select {
    font-size: 16px !important; /* Prevents iOS zoom */
    padding: 0.6rem !important;
    min-height: 44px !important;
  }
  
  /* Event drawer - full screen on mobile */
  .sitmon-event-drawer {
    width: 100vw !important;
    max-width: 100vw !important;
    left: 0 !important;
    right: 0 !important;
    border-radius: 0 !important;
  }
  
  /* Toast notifications */
  .sitmon-toast-container {
    left: 10px !important;
    right: 10px !important;
    max-width: none !important;
  }
  
  .sitmon-toast {
    font-size: 0.75rem !important;
    padding: 0.6rem 0.75rem !important;
  }
  
  /* Earthquake items */
  .sitmon-earthquake-item {
    padding: 0.5rem !important;
    gap: 0.5rem !important;
  }
  
  .sitmon-earthquake-mag {
    font-size: 1rem !important;
    min-width: 40px !important;
    height: 40px !important;
  }
  
  .sitmon-earthquake-location {
    font-size: 0.75rem !important;
  }
  
  /* News items */
  .sitmon-news-item {
    padding: 0.5rem !important;
  }
  
  .sitmon-news-title {
    font-size: 0.75rem !important;
    line-height: 1.3 !important;
  }
  
  /* Weather items */
  .sitmon-weather-item {
    padding: 0.5rem !important;
  }
  
  /* Hide resize handles on mobile */
  .sitmon-panel-resize-handle {
    display: none !important;
  }
  
  /* Keyboard hints - hide on mobile */
  .sitmon-keyboard-hint {
    display: none !important;
  }
}

/* Small mobile breakpoint */
@media (max-width: 480px) {
  .sitmon-page-wrapper {
    padding: 0.25rem !important;
  }
  
  /* Ticker - even smaller */
  .sitmon-osint-ticker {
    max-height: 54px !important;
    font-size: 0.55rem !important;
  }
  
  .sitmon-ticker-line:nth-child(n+3) {
    display: none !important; /* Only show 2 lines on very small screens */
  }
  
  /* Stats - still 2x2 but smaller */
  .sitmon-stat-card {
    padding: 0.5rem !important;
  }
  
  .sitmon-stat-value {
    font-size: 1.25rem !important;
  }
  
  /* Intro */
  .sitmon-intro-title {
    font-size: 1.1rem !important;
  }
  
  /* Panels - shorter */
  .sitmon-secondary-grid > .sitmon-panel-card {
    min-height: 180px !important;
    max-height: 300px !important;
  }
  
  /* Map even smaller */
  .sitmon-map-card .sitmon-card-body {
    min-height: 200px !important;
    max-height: 250px !important;
  }
  
  /* Buttons */
  .sitmon-tab-btn {
    padding: 0.3rem 0.5rem !important;
    font-size: 0.65rem !important;
  }
  
  /* Auto-refresh label - hide text, show only checkbox */
  .sitmon-auto-refresh-label span {
    display: none !important;
  }
}

/* Landscape mobile - special handling */
@media (max-width: 900px) and (orientation: landscape) {
  .sitmon-page-wrapper {
    padding-top: calc(var(--sitmon-header-height) + 50px) !important;
  }
  
  .sitmon-osint-ticker {
    max-height: 48px !important;
  }
  
  .sitmon-ticker-line:nth-child(n+3) {
    display: none !important;
  }
  
  .sitmon-map-card .sitmon-card-body {
    min-height: 180px !important;
    max-height: 220px !important;
  }
  
  .sitmon-secondary-grid > .sitmon-panel-card {
    min-height: 150px !important;
    max-height: 250px !important;
  }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
  /* Larger touch targets */
  .sitmon-tab-btn,
  .sitmon-filter-btn,
  .sitmon-icon-btn,
  .sitmon-severity-btn {
    min-height: 44px !important;
    min-width: 44px !important;
  }
  
  /* Remove hover effects that cause sticky states on touch */
  .sitmon-ticker-line:hover,
  .sitmon-panel-card:hover,
  .sitmon-hud-card:hover {
    background-color: inherit;
    border-color: inherit;
    box-shadow: inherit;
  }
  
  /* Disable complex animations that can lag on mobile */
  .sitmon-spinner {
    animation-duration: 1.5s !important;
  }
}
