/* ===============================================
   ULTRA-MODERN COMMAND CENTER THEME
   CDRRMO Pagadian City - Disaster Management
   High-Tech Glassmorphism Design System
   =============================================== */

/* ===== DESIGN TOKENS ===== */
:root {
  /* Core Colors - Deep Space Dark */
  --cc-bg-primary: #0a0f1c;
  --cc-bg-secondary: #111827;
  --cc-bg-tertiary: #1a2332;
  --cc-bg-elevated: #1f2937;
  --cc-bg-surface: rgba(17, 24, 39, 0.8);

  /* Neon Accents */
  --cc-neon-cyan: #00f0ff;
  --cc-neon-blue: #00a8ff;
  --cc-neon-magenta: #ff00ff;
  --cc-neon-green: #00ff88;
  --cc-neon-orange: #ff8c00;
  --cc-neon-red: #ff3366;
  --cc-neon-yellow: #ffff00;

  /* Alert States */
  --cc-critical: #ff0040;
  --cc-danger: #ff3366;
  --cc-warning: #ffaa00;
  --cc-success: #00ff88;
  --cc-info: #00f0ff;

  /* Flood Risk Levels */
  --cc-flood-1: #22c55e;
  --cc-flood-2: #84cc16;
  --cc-flood-3: #eab308;
  --cc-flood-4: #f97316;
  --cc-flood-5: #dc2626;

  /* Text Colors */
  --cc-text-primary: #ffffff;
  --cc-text-secondary: #94a3b8;
  --cc-text-muted: #64748b;
  --cc-text-glow: #00f0ff;

  /* Glassmorphism */
  --cc-glass-bg: rgba(17, 24, 39, 0.7);
  --cc-glass-border: rgba(255, 255, 255, 0.1);
  --cc-glass-highlight: rgba(255, 255, 255, 0.05);
  --cc-glass-blur: blur(20px);
  --cc-glass-blur-heavy: blur(40px);

  /* Shadows & Glows */
  --cc-shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --cc-shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
  --cc-shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
  --cc-shadow-xl: 0 16px 64px rgba(0, 0, 0, 0.6);
  --cc-glow-cyan: 0 0 30px rgba(0, 240, 255, 0.4);
  --cc-glow-magenta: 0 0 30px rgba(255, 0, 255, 0.4);
  --cc-glow-red: 0 0 30px rgba(255, 51, 102, 0.5);
  --cc-glow-green: 0 0 30px rgba(0, 255, 136, 0.4);

  /* Borders */
  --cc-border-glass: 1px solid rgba(255, 255, 255, 0.1);
  --cc-border-glow: 1px solid rgba(0, 240, 255, 0.3);
  --cc-border-danger: 1px solid rgba(255, 51, 102, 0.5);

  /* Transitions */
  --cc-transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --cc-transition-normal: 300ms cubic-bezier(0.4, 0, 0.2, 1);
  --cc-transition-slow: 500ms cubic-bezier(0.4, 0, 0.2, 1);
  --cc-transition-bounce: 500ms cubic-bezier(0.34, 1.56, 0.64, 1);

  /* Typography Scale */
  --cc-font-xs: 0.75rem;
  --cc-font-sm: 0.875rem;
  --cc-font-base: 1rem;
  --cc-font-lg: 1.125rem;
  --cc-font-xl: 1.25rem;
  --cc-font-2xl: 1.5rem;
  --cc-font-3xl: 2rem;
  --cc-font-4xl: 2.5rem;
  --cc-font-5xl: 3rem;
  --cc-font-display: 4rem;

  /* Spacing */
  --cc-space-1: 0.25rem;
  --cc-space-2: 0.5rem;
  --cc-space-3: 0.75rem;
  --cc-space-4: 1rem;
  --cc-space-5: 1.25rem;
  --cc-space-6: 1.5rem;
  --cc-space-8: 2rem;
  --cc-space-10: 2.5rem;
  --cc-space-12: 3rem;

  /* Border Radius */
  --cc-radius-sm: 0.375rem;
  --cc-radius-md: 0.5rem;
  --cc-radius-lg: 0.75rem;
  --cc-radius-xl: 1rem;
  --cc-radius-2xl: 1.5rem;
  --cc-radius-full: 9999px;
}

/* ===== GLOBAL RESET ===== */
.command-center-theme {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--cc-bg-primary);
  color: var(--cc-text-primary);
  min-height: 100vh;
}

/* ===== ANIMATED BACKGROUND ===== */
.cc-animated-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.cc-animated-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 20% -20%, rgba(0, 240, 255, 0.15), transparent),
    radial-gradient(ellipse 60% 40% at 80% 120%, rgba(255, 0, 255, 0.1), transparent);
  animation: bgPulse 8s ease-in-out infinite alternate;
}

.cc-animated-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(255,255,255,0.02) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,0.02) 1px, transparent 1px);
  background-size: 60px 60px;
}

@keyframes bgPulse {
  0% { opacity: 1; transform: scale(1); }
  100% { opacity: 0.7; transform: scale(1.05); }
}

/* ===== GLASSMORPHISM CARDS ===== */
.cc-glass-card {
  background: var(--cc-glass-bg);
  backdrop-filter: var(--cc-glass-blur);
  -webkit-backdrop-filter: var(--cc-glass-blur);
  border: var(--cc-border-glass);
  border-radius: var(--cc-radius-xl);
  box-shadow: var(--cc-shadow-lg);
  position: relative;
  overflow: hidden;
}

.cc-glass-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg,
    transparent,
    rgba(255,255,255,0.2) 20%,
    rgba(255,255,255,0.2) 80%,
    transparent);
}

.cc-glass-card:hover {
  border-color: rgba(0, 240, 255, 0.3);
  box-shadow: var(--cc-shadow-xl), var(--cc-glow-cyan);
}

/* Glow Variants */
.cc-glass-card.glow-cyan { border-color: rgba(0, 240, 255, 0.4); box-shadow: var(--cc-glow-cyan); }
.cc-glass-card.glow-red { border-color: rgba(255, 51, 102, 0.4); box-shadow: var(--cc-glow-red); }
.cc-glass-card.glow-green { border-color: rgba(0, 255, 136, 0.4); box-shadow: var(--cc-glow-green); }
.cc-glass-card.glow-magenta { border-color: rgba(255, 0, 255, 0.4); box-shadow: var(--cc-glow-magenta); }

/* ===== COMMAND CENTER LAYOUT ===== */
.cc-layout {
  display: grid;
  min-height: 100vh;
  grid-template-rows: auto auto 1fr auto;
  grid-template-areas:
    "header"
    "emergency"
    "main"
    "footer";
}

.cc-header { grid-area: header; }
.cc-emergency { grid-area: emergency; }
.cc-main { grid-area: main; }
.cc-footer { grid-area: footer; }

/* Command Center 3-Column Layout */
.cc-dashboard {
  display: grid;
  grid-template-columns: 280px 1fr 320px;
  grid-template-rows: auto 1fr;
  gap: var(--cc-space-4);
  padding: var(--cc-space-4);
  min-height: calc(100vh - 200px);
}

.cc-sidebar-left {
  grid-row: 1 / -1;
}

.cc-map-container {
  grid-column: 2;
  grid-row: 1 / -1;
  min-height: 600px;
}

.cc-sidebar-right {
  grid-row: 1 / -1;
}

.cc-stats-bar {
  grid-column: 1 / -1;
}

/* Responsive Layout */
@media (max-width: 1400px) {
  .cc-dashboard {
    grid-template-columns: 250px 1fr 280px;
  }
}

@media (max-width: 1200px) {
  .cc-dashboard {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto auto;
  }

  .cc-sidebar-left,
  .cc-sidebar-right,
  .cc-map-container {
    grid-column: 1;
    grid-row: auto;
  }

  .cc-map-container {
    min-height: 500px;
  }
}

/* 4K Command Center Mode */
@media (min-width: 2560px) {
  .cc-dashboard {
    grid-template-columns: 350px 1fr 400px;
    gap: var(--cc-space-6);
    padding: var(--cc-space-8);
  }

  :root {
    --cc-font-base: 1.125rem;
    --cc-font-lg: 1.25rem;
    --cc-font-xl: 1.5rem;
    --cc-font-2xl: 1.875rem;
    --cc-font-3xl: 2.5rem;
    --cc-font-4xl: 3rem;
  }
}

/* ===== ENHANCED HEADER ===== */
.cc-header {
  background: linear-gradient(135deg, rgba(30, 58, 95, 0.95), rgba(17, 24, 39, 0.98));
  backdrop-filter: var(--cc-glass-blur);
  border-bottom: 2px solid var(--cc-neon-cyan);
  padding: var(--cc-space-4) var(--cc-space-6);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.cc-header::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg,
    transparent,
    var(--cc-neon-cyan),
    var(--cc-neon-magenta),
    var(--cc-neon-cyan),
    transparent);
  animation: borderGlow 3s linear infinite;
}

@keyframes borderGlow {
  0% { opacity: 0.5; }
  50% { opacity: 1; }
  100% { opacity: 0.5; }
}

.cc-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 2400px;
  margin: 0 auto;
  gap: var(--cc-space-4);
}

.cc-logo-section {
  display: flex;
  align-items: center;
  gap: var(--cc-space-4);
}

.cc-logo {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--cc-neon-cyan), var(--cc-neon-blue));
  padding: 3px;
  box-shadow: var(--cc-glow-cyan);
}

.cc-logo-inner {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: var(--cc-bg-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
}

.cc-title-section h1 {
  font-size: var(--cc-font-2xl);
  font-weight: 800;
  background: linear-gradient(135deg, #fff, var(--cc-neon-cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: 0 0 30px rgba(0, 240, 255, 0.3);
}

.cc-title-section p {
  font-size: var(--cc-font-sm);
  color: var(--cc-text-secondary);
  margin-top: var(--cc-space-1);
}

.cc-status-section {
  display: flex;
  align-items: center;
  gap: var(--cc-space-4);
}

/* Live Status Indicator */
.cc-live-badge {
  display: flex;
  align-items: center;
  gap: var(--cc-space-2);
  background: rgba(0, 255, 136, 0.15);
  border: 1px solid var(--cc-neon-green);
  padding: var(--cc-space-2) var(--cc-space-4);
  border-radius: var(--cc-radius-full);
  font-size: var(--cc-font-sm);
  font-weight: 600;
  color: var(--cc-neon-green);
  box-shadow: var(--cc-glow-green);
}

.cc-live-dot {
  width: 10px;
  height: 10px;
  background: var(--cc-neon-green);
  border-radius: 50%;
  animation: pulseDot 2s ease-in-out infinite;
}

@keyframes pulseDot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.2); opacity: 0.7; }
}

/* Clock Display */
.cc-clock {
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-size: var(--cc-font-xl);
  font-weight: 700;
  color: var(--cc-neon-cyan);
  text-shadow: 0 0 20px rgba(0, 240, 255, 0.5);
  padding: var(--cc-space-2) var(--cc-space-4);
  background: rgba(0, 240, 255, 0.1);
  border: 1px solid rgba(0, 240, 255, 0.3);
  border-radius: var(--cc-radius-lg);
}

/* Emergency Button */
.cc-emergency-btn {
  display: flex;
  align-items: center;
  gap: var(--cc-space-2);
  background: var(--cc-danger);
  color: white;
  padding: var(--cc-space-3) var(--cc-space-5);
  border-radius: var(--cc-radius-xl);
  font-weight: 700;
  font-size: var(--cc-font-sm);
  text-decoration: none;
  box-shadow: var(--cc-glow-red);
  transition: var(--cc-transition-normal);
  animation: emergencyPulse 2s ease-in-out infinite;
}

@keyframes emergencyPulse {
  0%, 100% { box-shadow: 0 0 20px rgba(255, 51, 102, 0.4); }
  50% { box-shadow: 0 0 40px rgba(255, 51, 102, 0.8); }
}

.cc-emergency-btn:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 0 50px rgba(255, 51, 102, 1);
}

/* ===== EMERGENCY BANNER ===== */
.cc-emergency-banner {
  background: linear-gradient(135deg, #7f1d1d 0%, #dc2626 50%, #7f1d1d 100%);
  padding: var(--cc-space-6);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cc-emergency-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg,
    transparent,
    rgba(255,255,255,0.1),
    transparent);
  animation: shimmer 2s linear infinite;
}

@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

.cc-emergency-title {
  font-size: var(--cc-font-xl);
  font-weight: 800;
  color: white;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: var(--cc-space-4);
  text-shadow: 0 0 20px rgba(255,255,255,0.5);
}

.cc-emergency-grid {
  display: flex;
  justify-content: center;
  gap: var(--cc-space-4);
  flex-wrap: wrap;
  max-width: 800px;
  margin: 0 auto;
}

.cc-hotline-card {
  display: flex;
  align-items: center;
  gap: var(--cc-space-3);
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(10px);
  border: 2px solid rgba(255,255,255,0.3);
  padding: var(--cc-space-4) var(--cc-space-6);
  border-radius: var(--cc-radius-xl);
  color: white;
  text-decoration: none;
  transition: var(--cc-transition-normal);
  min-width: 250px;
}

.cc-hotline-card:hover {
  background: rgba(255,255,255,0.25);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0,0,0,0.3);
}

.cc-hotline-card.primary {
  background: white;
  color: var(--cc-danger);
  border-color: white;
}

.cc-hotline-icon {
  font-size: 1.5rem;
}

.cc-hotline-info {
  text-align: left;
}

.cc-hotline-label {
  font-size: var(--cc-font-xs);
  opacity: 0.8;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.cc-hotline-number {
  font-size: var(--cc-font-xl);
  font-weight: 800;
}

/* ===== STATS DASHBOARD ===== */
.cc-stats-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: var(--cc-space-4);
  margin-bottom: var(--cc-space-6);
}

@media (max-width: 1400px) {
  .cc-stats-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
  .cc-stats-grid { grid-template-columns: repeat(2, 1fr); }
}

.cc-stat-card {
  background: var(--cc-glass-bg);
  backdrop-filter: var(--cc-glass-blur);
  border: var(--cc-border-glass);
  border-radius: var(--cc-radius-xl);
  padding: var(--cc-space-5);
  text-align: center;
  position: relative;
  overflow: hidden;
  transition: var(--cc-transition-normal);
}

.cc-stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--cc-neon-cyan);
}

.cc-stat-card:hover {
  transform: translateY(-4px);
  border-color: var(--cc-neon-cyan);
  box-shadow: var(--cc-glow-cyan);
}

.cc-stat-card.critical::before { background: var(--cc-critical); }
.cc-stat-card.danger::before { background: var(--cc-danger); }
.cc-stat-card.warning::before { background: var(--cc-warning); }
.cc-stat-card.success::before { background: var(--cc-success); }

.cc-stat-icon {
  font-size: 1.75rem;
  margin-bottom: var(--cc-space-2);
}

.cc-stat-value {
  font-size: var(--cc-font-4xl);
  font-weight: 900;
  line-height: 1;
  margin-bottom: var(--cc-space-2);
  background: linear-gradient(135deg, #fff, var(--cc-neon-cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.cc-stat-card.critical .cc-stat-value {
  background: linear-gradient(135deg, #fff, var(--cc-critical));
  -webkit-background-clip: text;
  background-clip: text;
}

.cc-stat-card.warning .cc-stat-value {
  background: linear-gradient(135deg, #fff, var(--cc-warning));
  -webkit-background-clip: text;
  background-clip: text;
}

.cc-stat-label {
  font-size: var(--cc-font-xs);
  color: var(--cc-text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 600;
}

/* Animated Counter */
.cc-stat-value[data-animate] {
  animation: countUp 1s ease-out forwards;
}

@keyframes countUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ===== MAP CONTAINER ===== */
.cc-map-wrapper {
  background: var(--cc-glass-bg);
  backdrop-filter: var(--cc-glass-blur);
  border: var(--cc-border-glass);
  border-radius: var(--cc-radius-2xl);
  overflow: hidden;
  position: relative;
  height: 100%;
  min-height: 500px;
}

.cc-map-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--cc-space-4);
  background: rgba(0, 0, 0, 0.3);
  border-bottom: 1px solid var(--cc-glass-border);
}

.cc-map-title {
  font-size: var(--cc-font-lg);
  font-weight: 700;
  color: var(--cc-neon-cyan);
  display: flex;
  align-items: center;
  gap: var(--cc-space-2);
}

.cc-map-controls {
  display: flex;
  gap: var(--cc-space-2);
}

.cc-map-btn {
  padding: var(--cc-space-2) var(--cc-space-3);
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: var(--cc-radius-md);
  color: var(--cc-text-primary);
  font-size: var(--cc-font-sm);
  cursor: pointer;
  transition: var(--cc-transition-fast);
}

.cc-map-btn:hover {
  background: var(--cc-neon-cyan);
  color: var(--cc-bg-primary);
}

.cc-map-btn.active {
  background: var(--cc-neon-cyan);
  color: var(--cc-bg-primary);
}

#hazardMap, #mainMap {
  width: 100%;
  height: calc(100% - 60px);
  min-height: 440px;
  background: var(--cc-bg-primary);
}

/* ===== SIDEBAR PANELS ===== */
.cc-panel {
  background: var(--cc-glass-bg);
  backdrop-filter: var(--cc-glass-blur);
  border: var(--cc-border-glass);
  border-radius: var(--cc-radius-xl);
  overflow: hidden;
  height: fit-content;
}

.cc-panel-header {
  padding: var(--cc-space-4);
  background: rgba(0, 0, 0, 0.3);
  border-bottom: 1px solid var(--cc-glass-border);
  display: flex;
  align-items: center;
  gap: var(--cc-space-3);
}

.cc-panel-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--cc-radius-md);
  background: linear-gradient(135deg, var(--cc-neon-cyan), var(--cc-neon-blue));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}

.cc-panel-title {
  font-size: var(--cc-font-lg);
  font-weight: 700;
  color: white;
}

.cc-panel-body {
  padding: var(--cc-space-4);
}

/* ===== LAYER TOGGLES ===== */
.cc-layer-list {
  display: flex;
  flex-direction: column;
  gap: var(--cc-space-3);
}

.cc-layer-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--cc-space-3);
  background: rgba(255,255,255,0.05);
  border-radius: var(--cc-radius-lg);
  transition: var(--cc-transition-fast);
}

.cc-layer-item:hover {
  background: rgba(255,255,255,0.1);
}

.cc-layer-info {
  display: flex;
  align-items: center;
  gap: var(--cc-space-3);
}

.cc-layer-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--cc-radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}

.cc-layer-icon.flood { background: rgba(0, 168, 232, 0.2); color: var(--cc-neon-cyan); }
.cc-layer-icon.landslide { background: rgba(255, 140, 0, 0.2); color: var(--cc-neon-orange); }
.cc-layer-icon.fault { background: rgba(255, 0, 255, 0.2); color: var(--cc-neon-magenta); }
.cc-layer-icon.surge { background: rgba(0, 255, 136, 0.2); color: var(--cc-neon-green); }
.cc-layer-icon.wind { background: rgba(255, 255, 0, 0.2); color: var(--cc-neon-yellow); }
.cc-layer-icon.evac { background: rgba(255, 51, 102, 0.2); color: var(--cc-neon-red); }

.cc-layer-name {
  font-size: var(--cc-font-sm);
  font-weight: 600;
  color: var(--cc-text-primary);
}

.cc-layer-count {
  font-size: var(--cc-font-xs);
  color: var(--cc-text-muted);
}

/* Toggle Switch */
.cc-toggle {
  position: relative;
  width: 48px;
  height: 26px;
}

.cc-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.cc-toggle-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: rgba(255,255,255,0.1);
  border-radius: var(--cc-radius-full);
  transition: var(--cc-transition-normal);
  border: 1px solid rgba(255,255,255,0.2);
}

.cc-toggle-slider::before {
  content: '';
  position: absolute;
  height: 20px;
  width: 20px;
  left: 2px;
  bottom: 2px;
  background: white;
  border-radius: 50%;
  transition: var(--cc-transition-normal);
}

.cc-toggle input:checked + .cc-toggle-slider {
  background: var(--cc-neon-cyan);
  border-color: var(--cc-neon-cyan);
  box-shadow: var(--cc-glow-cyan);
}

.cc-toggle input:checked + .cc-toggle-slider::before {
  transform: translateX(22px);
}

/* ===== LEGEND ===== */
.cc-legend {
  padding: var(--cc-space-4);
  border-top: 1px solid var(--cc-glass-border);
}

.cc-legend-title {
  font-size: var(--cc-font-sm);
  font-weight: 700;
  color: var(--cc-text-secondary);
  margin-bottom: var(--cc-space-3);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.cc-legend-items {
  display: flex;
  flex-direction: column;
  gap: var(--cc-space-2);
}

.cc-legend-item {
  display: flex;
  align-items: center;
  gap: var(--cc-space-2);
  font-size: var(--cc-font-xs);
  color: var(--cc-text-secondary);
}

.cc-legend-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.cc-legend-dot.extreme { background: var(--cc-flood-5); box-shadow: 0 0 10px var(--cc-flood-5); }
.cc-legend-dot.high { background: var(--cc-flood-4); box-shadow: 0 0 10px var(--cc-flood-4); }
.cc-legend-dot.moderate { background: var(--cc-flood-3); box-shadow: 0 0 10px var(--cc-flood-3); }
.cc-legend-dot.low { background: var(--cc-flood-2); box-shadow: 0 0 10px var(--cc-flood-2); }
.cc-legend-dot.minimal { background: var(--cc-flood-1); box-shadow: 0 0 10px var(--cc-flood-1); }

/* ===== ALERTS PANEL ===== */
.cc-alerts-list {
  display: flex;
  flex-direction: column;
  gap: var(--cc-space-3);
  max-height: 400px;
  overflow-y: auto;
}

.cc-alert-item {
  padding: var(--cc-space-3);
  background: rgba(255,255,255,0.05);
  border-radius: var(--cc-radius-lg);
  border-left: 4px solid var(--cc-warning);
  position: relative;
  animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: translateX(0); }
}

.cc-alert-item.critical {
  border-left-color: var(--cc-critical);
  background: rgba(255, 0, 64, 0.1);
  animation: criticalPulse 2s ease-in-out infinite;
}

@keyframes criticalPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 0, 64, 0); }
  50% { box-shadow: 0 0 20px 0 rgba(255, 0, 64, 0.3); }
}

.cc-alert-item.danger { border-left-color: var(--cc-danger); background: rgba(255, 51, 102, 0.1); }
.cc-alert-item.warning { border-left-color: var(--cc-warning); background: rgba(255, 170, 0, 0.1); }
.cc-alert-item.success { border-left-color: var(--cc-success); background: rgba(0, 255, 136, 0.1); }

.cc-alert-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: var(--cc-space-2);
}

.cc-alert-type {
  font-size: var(--cc-font-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.cc-alert-item.critical .cc-alert-type { color: var(--cc-critical); }
.cc-alert-item.danger .cc-alert-type { color: var(--cc-danger); }
.cc-alert-item.warning .cc-alert-type { color: var(--cc-warning); }

.cc-alert-time {
  font-size: var(--cc-font-xs);
  color: var(--cc-text-muted);
}

.cc-alert-message {
  font-size: var(--cc-font-sm);
  color: var(--cc-text-primary);
  line-height: 1.5;
}

/* ===== WEATHER STATS BAR ===== */
.cc-weather-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: var(--cc-space-4);
  padding: var(--cc-space-4);
  background: var(--cc-glass-bg);
  backdrop-filter: var(--cc-glass-blur);
  border: var(--cc-border-glass);
  border-radius: var(--cc-radius-xl);
  margin-top: var(--cc-space-4);
}

.cc-weather-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: var(--cc-space-3);
  border-radius: var(--cc-radius-lg);
  background: rgba(255,255,255,0.05);
}

.cc-weather-icon {
  font-size: 1.5rem;
  margin-bottom: var(--cc-space-2);
}

.cc-weather-value {
  font-size: var(--cc-font-2xl);
  font-weight: 800;
  color: var(--cc-neon-cyan);
  line-height: 1;
}

.cc-weather-label {
  font-size: var(--cc-font-xs);
  color: var(--cc-text-muted);
  text-transform: uppercase;
  margin-top: var(--cc-space-1);
}

/* ===== TABS NAVIGATION ===== */
.cc-tabs {
  display: flex;
  gap: var(--cc-space-2);
  padding: var(--cc-space-4);
  overflow-x: auto;
  scrollbar-width: none;
}

.cc-tabs::-webkit-scrollbar { display: none; }

.cc-tab {
  display: flex;
  align-items: center;
  gap: var(--cc-space-2);
  padding: var(--cc-space-3) var(--cc-space-4);
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--cc-radius-lg);
  color: var(--cc-text-secondary);
  font-size: var(--cc-font-sm);
  font-weight: 600;
  cursor: pointer;
  transition: var(--cc-transition-fast);
  white-space: nowrap;
}

.cc-tab:hover {
  background: rgba(255,255,255,0.1);
  color: var(--cc-text-primary);
}

.cc-tab.active {
  background: var(--cc-neon-cyan);
  color: var(--cc-bg-primary);
  border-color: var(--cc-neon-cyan);
  box-shadow: var(--cc-glow-cyan);
}

/* ===== EXTERNAL DATA SOURCES ===== */
.cc-data-sources {
  display: flex;
  flex-direction: column;
  gap: var(--cc-space-3);
}

.cc-source-link {
  display: flex;
  align-items: center;
  gap: var(--cc-space-3);
  padding: var(--cc-space-3);
  background: rgba(255,255,255,0.05);
  border-radius: var(--cc-radius-lg);
  color: var(--cc-text-primary);
  text-decoration: none;
  transition: var(--cc-transition-fast);
  font-size: var(--cc-font-sm);
}

.cc-source-link:hover {
  background: rgba(0, 240, 255, 0.1);
  border-color: var(--cc-neon-cyan);
}

.cc-source-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--cc-radius-md);
  background: rgba(255,255,255,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
}

.cc-source-info {
  flex: 1;
}

.cc-source-name {
  font-weight: 600;
  color: var(--cc-neon-cyan);
}

.cc-source-desc {
  font-size: var(--cc-font-xs);
  color: var(--cc-text-muted);
}

/* ===== MODALS ===== */
.cc-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  opacity: 0;
  visibility: hidden;
  transition: var(--cc-transition-normal);
}

.cc-modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.cc-modal {
  background: var(--cc-bg-secondary);
  border: var(--cc-border-glass);
  border-radius: var(--cc-radius-2xl);
  width: 90%;
  max-width: 1200px;
  max-height: 90vh;
  overflow: hidden;
  transform: scale(0.95);
  transition: var(--cc-transition-normal);
}

.cc-modal-overlay.active .cc-modal {
  transform: scale(1);
}

.cc-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--cc-space-4) var(--cc-space-6);
  background: rgba(0, 0, 0, 0.3);
  border-bottom: 1px solid var(--cc-glass-border);
}

.cc-modal-title {
  font-size: var(--cc-font-xl);
  font-weight: 700;
  color: white;
}

.cc-modal-close {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.1);
  border: none;
  border-radius: var(--cc-radius-md);
  color: white;
  cursor: pointer;
  font-size: 1.25rem;
  transition: var(--cc-transition-fast);
}

.cc-modal-close:hover {
  background: var(--cc-danger);
}

.cc-modal-body {
  padding: var(--cc-space-6);
  max-height: calc(90vh - 80px);
  overflow-y: auto;
}

.cc-modal-iframe {
  width: 100%;
  height: 70vh;
  border: none;
  border-radius: var(--cc-radius-lg);
}

/* ===== LOADING SKELETONS ===== */
.cc-skeleton {
  background: linear-gradient(90deg,
    rgba(255,255,255,0.05) 25%,
    rgba(255,255,255,0.1) 50%,
    rgba(255,255,255,0.05) 75%);
  background-size: 200% 100%;
  animation: skeletonShimmer 1.5s ease-in-out infinite;
  border-radius: var(--cc-radius-md);
}

@keyframes skeletonShimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.cc-skeleton-text {
  height: 1em;
  margin-bottom: var(--cc-space-2);
}

.cc-skeleton-text.short { width: 60%; }
.cc-skeleton-text.medium { width: 80%; }
.cc-skeleton-text.long { width: 100%; }

.cc-skeleton-circle {
  width: 48px;
  height: 48px;
  border-radius: 50%;
}

.cc-skeleton-card {
  height: 120px;
}

/* ===== ANIMATIONS ===== */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes bounce {
  0%, 80%, 100% { transform: translateY(0); }
  40% { transform: translateY(-6px); }
}

@keyframes radar-sweep {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 20px rgba(0, 240, 255, 0.4); }
  50% { box-shadow: 0 0 40px rgba(0, 240, 255, 0.8); }
}

/* ===== UTILITY CLASSES ===== */
.cc-text-glow { text-shadow: 0 0 20px currentColor; }
.cc-box-glow-cyan { box-shadow: var(--cc-glow-cyan); }
.cc-box-glow-red { box-shadow: var(--cc-glow-red); }
.cc-box-glow-green { box-shadow: var(--cc-glow-green); }

.cc-fade-in { animation: fadeIn 0.3s ease-out; }
.cc-fade-in-up { animation: fadeInUp 0.3s ease-out; }
.cc-fade-in-down { animation: fadeInDown 0.3s ease-out; }

.cc-hidden { display: none !important; }
.cc-visible { display: block !important; }

/* Scrollbar Styling */
.cc-scrollbar::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.cc-scrollbar::-webkit-scrollbar-track {
  background: rgba(255,255,255,0.05);
  border-radius: var(--cc-radius-full);
}

.cc-scrollbar::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.2);
  border-radius: var(--cc-radius-full);
}

.cc-scrollbar::-webkit-scrollbar-thumb:hover {
  background: var(--cc-neon-cyan);
}

/* ===== FULLSCREEN MODE ===== */
.cc-fullscreen {
  position: fixed !important;
  inset: 0 !important;
  z-index: 3000 !important;
  border-radius: 0 !important;
}

.cc-fullscreen .cc-map-wrapper {
  border-radius: 0;
  height: 100vh;
}

/* ===== PRINT STYLES ===== */
@media print {
  .cc-animated-bg,
  .cc-emergency-btn,
  .cc-tabs,
  .cc-modal-overlay {
    display: none !important;
  }

  .cc-glass-card {
    background: white !important;
    color: black !important;
    border: 1px solid #ccc !important;
  }
}
