/* 臺南市氣候變遷脆弱人口掌握平台 - 自定義樣式 (custom.css) */

:root {
  --primary-gradient: linear-gradient(135deg, #1e3a8a 0%, #0284c7 100%);
  --danger-glow: 0 0 15px rgba(239, 68, 68, 0.4);
  --warning-glow: 0 0 15px rgba(245, 158, 11, 0.4);
  --success-glow: 0 0 15px rgba(16, 185, 129, 0.4);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans TC", sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* Glassmorphism Card Style */
.glass-panel {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(226, 232, 240, 0.8);
}

.dark .glass-panel {
  background: rgba(15, 23, 42, 0.90);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(51, 65, 85, 0.6);
}

/* Map Container */
#map {
  width: 100%;
  height: 100%;
  min-height: 520px;
  border-radius: 0.75rem;
  z-index: 1;
}

/* Custom Leaflet Tooltip */
.leaflet-tooltip.district-tooltip {
  background: rgba(15, 23, 42, 0.95);
  color: #f8fafc;
  border: 1px solid #38bdf8;
  border-radius: 0.5rem;
  padding: 8px 12px;
  font-size: 0.875rem;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3);
}

.leaflet-tooltip-top:before {
  border-top-color: rgba(15, 23, 42, 0.95);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: rgba(241, 245, 249, 0.5);
}
::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.6);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(100, 116, 139, 0.8);
}

/* Risk Pulse Animation */
@keyframes riskPulse {
  0% { transform: scale(0.98); opacity: 0.8; }
  50% { transform: scale(1.02); opacity: 1; filter: drop-shadow(0 0 8px rgba(239, 68, 68, 0.6)); }
  100% { transform: scale(0.98); opacity: 0.8; }
}

.pulse-extreme {
  animation: riskPulse 2.5s infinite ease-in-out;
}

/* Range Slider Styling */
input[type=range] {
  -webkit-appearance: none;
  background: #cbd5e1;
  border-radius: 4px;
  height: 6px;
}
.dark input[type=range] {
  background: #475569;
}
input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none;
  height: 16px;
  width: 16px;
  border-radius: 50%;
  background: #0284c7;
  cursor: pointer;
  box-shadow: 0 0 5px rgba(2, 132, 199, 0.5);
  transition: transform 0.1s ease;
}
input[type=range]::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

/* Chart Canvas Responsive Container */
.chart-container {
  position: relative;
  width: 100%;
  height: 100%;
}
