* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

:root {
  --map-overlay-scale: 1;
  --glow-primary: rgba(102, 126, 234, 0.8);
  --glow-secondary: rgba(118, 75, 162, 0.5);
  --glow-primary-light: rgba(102, 126, 234, 0.4);
  --glow-secondary-light: rgba(118, 75, 162, 0.2);
}

/* Dynamic Warning Colors */
body.warning-yellow {
  --glow-primary: rgba(255, 235, 59, 0.8);
  --glow-secondary: rgba(253, 216, 53, 0.5);
  --glow-primary-light: rgba(255, 235, 59, 0.4);
  --glow-secondary-light: rgba(253, 216, 53, 0.2);
}

body.warning-orange {
  --glow-primary: rgba(255, 152, 0, 0.8);
  --glow-secondary: rgba(245, 124, 0, 0.5);
  --glow-primary-light: rgba(255, 152, 0, 0.4);
  --glow-secondary-light: rgba(245, 124, 0, 0.2);
}

body.warning-red {
  --glow-primary: rgba(244, 67, 54, 0.8);
  --glow-secondary: rgba(211, 47, 47, 0.5);
  --glow-primary-light: rgba(244, 67, 54, 0.4);
  --glow-secondary-light: rgba(211, 47, 47, 0.2);
}

body {
  font-family: "Noto Sans Devanagari", sans-serif;
  /* Animated Blue Sky Gradient */
  background: linear-gradient(-45deg, #87ceeb, #00bfff, #1e90ff, #87cefa);
  background-size: 400% 400%;
  animation: gradientBG 15s ease infinite;
  background-attachment: fixed;
  min-height: 100vh;
  color: #333;
}

.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 20px;
}

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

header {
  position: sticky;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 5000;
  text-align: center;
  background: rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.4);
  padding: 10px 20px;
  border-radius: 0;
  box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.1);
  margin-bottom: 0;
  height: auto;
  min-height: 110px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  transition: all 0.35s ease;
}

header h1 {
  color: #2c3e50;
  font-size: 2em;
  margin-bottom: 5px;
  margin-top: 10px;
}

header h2 {
  color: #7f8c8d;
  font-size: 1.2em;
  font-weight: 400;
}

.gov-logo {
  position: absolute;
  top: 10px;
  left: 20px;
  height: 80px;
  width: auto;
  z-index: 1001;
}

.header-info {
  position: static;
  margin-top: 10px;
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  gap: 20px;
  background: transparent;
  padding: 0;
  border-radius: 0;
  width: fit-content;
  margin-left: 0;
  margin-right: 0;
  border: none;
  text-align: center;
}
.info-box {
  font-weight: 600;
  color: #2c3e50;
  padding: 0;
  background: transparent;
  border-radius: 0;
  font-size: 0.85em;
  line-height: 1.3;
}

main {
  display: flex;
  flex-direction: column;
  gap: 30px;
  margin-bottom: 30px;
  padding-top: 20px;
}

.hidden-header {
  display: none !important;
}

.header-collapsed {
  height: 15px !important; /* Small strip visible */
  min-height: 0 !important; /* Override default min-height */
  overflow: hidden !important;
  padding: 0 !important;
  background: rgba(255, 255, 255, 0.95); /* Opaque when collapsed */
}

#headerToggleBtn {
  position: absolute;
  top: 0;
  right: 10px;
  cursor: pointer;
  border: none;
  background: transparent;
  font-size: 14px;
  z-index: 5001;
  color: #555;
  line-height: 15px; /* Vertically center in collapsed state */
}

.control-panel {
  width: 100%;
  background: white;
  padding: 30px;
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.district-selection {
  margin-bottom: 25px;
}

.district-selection label {
  display: block;
  font-weight: 600;
  margin-bottom: 10px;
  color: #2c3e50;
  font-size: 1.1em;
}

.district-selection select {
  width: 100%;
  padding: 12px;
  border: 2px solid #ddd;
  border-radius: 8px;
  font-size: 16px;
  background: white;
  transition: border-color 0.3s;
}

.district-selection select:focus {
  outline: none;
  border-color: #667eea;
}

.weather-phenomena h3 {
  margin-bottom: 20px;
  color: #2c3e50;
  border-bottom: 2px solid #667eea;
  padding-bottom: 10px;
}

.phenomena-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
  margin-bottom: 25px;
}

.checkbox-container {
  display: block;
  position: relative;
  padding-left: 35px;
  margin-bottom: 12px;
  cursor: pointer;
  font-size: 16px;
  user-select: none;
}

.checkbox-container input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

.checkmark {
  position: absolute;
  top: 0;
  left: 0;
  height: 25px;
  width: 25px;
  background-color: #eee;
  border-radius: 4px;
  transition: background-color 0.3s;
}

.checkbox-container:hover input ~ .checkmark {
  background-color: #ccc;
}

.checkbox-container input:checked ~ .checkmark {
  background-color: #667eea;
}

/* Hover preview for Map Control Checkboxes */
.checkbox-container:hover input#toggleFoothill ~ .checkmark,
.checkbox-container:hover input[value="foothill"] ~ .checkmark {
  background-color: rgba(76, 175, 80, 0.6);
}
.checkbox-container:hover input[value="northern"] ~ .checkmark {
  background-color: rgba(33, 150, 243, 0.6);
}
.checkbox-container:hover input[value="southern"] ~ .checkmark {
  background-color: rgba(255, 152, 0, 0.6);
}

/* Custom colors for Map Control Checkboxes */
.checkbox-container input#toggleFoothill:checked ~ .checkmark,
.checkbox-container input[value="foothill"]:checked ~ .checkmark {
  background-color: #4caf50;
}
.checkbox-container input[value="northern"]:checked ~ .checkmark {
  background-color: #2196f3;
}
.checkbox-container input[value="southern"]:checked ~ .checkmark {
  background-color: #ff9800;
}

.checkmark:after {
  content: "";
  position: absolute;
  display: none;
}

.checkbox-container input:checked ~ .checkmark:after {
  display: block;
}

.checkbox-container .checkmark:after {
  left: 9px;
  top: 5px;
  width: 5px;
  height: 10px;
  border: solid white;
  border-width: 0 3px 3px 0;
  transform: rotate(45deg);
}

.checkbox-container small {
  color: #7f8c8d;
  font-size: 12px;
}

.action-buttons {
  display: flex;
  gap: 15px;
  margin-bottom: 20px;
}

.btn-primary,
.btn-secondary,
.btn-export {
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.3s;
  font-weight: 600;
}

.btn-primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-info {
  background: linear-gradient(135deg, #36d1dc 0%, #5b86e5 100%);
  color: white;
}

.btn-secondary {
  background: #95a5a6;
  color: white;
}

.btn-secondary:hover {
  background: #7f8c8d;
}

.map-container {
  background: white;
  padding: 20px;
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.map-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.map-controls-left {
  display: flex;
  gap: 15px;
  align-items: center;
  overflow-x: auto;
  white-space: nowrap;
  max-width: 100%;
  padding-bottom: 5px;
  scrollbar-width: thin;
}
.map-controls-left::-webkit-scrollbar {
  height: 4px;
}
.map-controls-left::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 2px;
}

/* Icon Toggle Buttons (Replaces Checkboxes) */
.icon-toggle-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  height: auto;
  padding: 6px 12px;
  border-radius: 20px;
  gap: 6px;
  background: #fff;
  border: 1px solid #ccc;
  cursor: pointer;
  color: #555;
  transition: all 0.2s;
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}
.icon-toggle-label:hover {
  background: #f0f0f0;
  color: #333;
  transform: translateY(-2px);
}
.icon-toggle-label input {
  display: none;
}
/* Style when checkbox is checked */
.icon-toggle-label:has(input:checked) {
  background: #667eea;
  color: white;
  border-color: #667eea;
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.4);
}

.map-sub-regions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.small-checkbox {
  margin-bottom: 0 !important;
  font-size: 13px !important;
}

.small-btn {
  padding: 5px 10px !important;
  font-size: 13px !important;
}

.day-tabs-container {
  display: flex;
  gap: 10px;
  margin-bottom: 15px;
  overflow-x: auto;
  padding-bottom: 5px;
}

.day-tab {
  padding: 8px 16px;
  background: #f1f2f6;
  border: 1px solid #ddd;
  border-radius: 20px;
  cursor: pointer;
  font-weight: 600;
  color: #555;
  transition: all 0.3s;
  white-space: nowrap;
}
.day-tab.active,
.day-tab:hover {
  background: #667eea;
  color: white;
  border-color: #667eea;
}

.map-frame {
  position: relative;
  border: 4px solid #2c3e50;
  border-radius: 4px;
  overflow: hidden;
}

#map {
  height: 75vh;
  min-height: 650px;
  background-color: #f8f9fa; /* Background for map when tiles are off */
  z-index: 1;
}

/* Map Overlays */
.map-overlays-container {
  pointer-events: none; /* Allow clicking through to map */
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
}
.map-logo-text {
  font-size: 12px;
  font-weight: bold;
  color: #000;
  background: rgba(255, 255, 255, 0.8);
  padding: 2px 5px;
  border-radius: 4px;
  margin-top: 2px;
  text-align: nowrap;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  z-index: 1002;
}

.map-header-text {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  padding: 10px 15px;
  border: 2px solid #2c3e50;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  min-width: 250px;
  text-align: center;
}

/* Responsive Scaling for Map Overlays */
#overlayLeft {
  transform-origin: top left;
  transform: scale(var(--map-overlay-scale));
  transition: transform 0.2s ease;
}

#overlayRight,
#overlayTopRight,
#statsOverlay {
  transform-origin: top right;
  transform: scale(var(--map-overlay-scale));
  transition: transform 0.2s ease;
}

#mapLegend,
#overlayLegend,
#tempLegend {
  transform-origin: bottom right;
  transform: scale(var(--map-overlay-scale));
  transition: transform 0.2s ease;
}

.map-header-text,
#slideHeader {
  transform-origin: top center;
  transform: translateX(-50%) scale(var(--map-overlay-scale));
  transition: transform 0.2s ease;
  width: max-content;
  max-width: 90%;
}

/* North Arrow Container (Rectangle Grid) */
.north-arrow-container {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 1000;
  display: flex;
  gap: 10px;
  align-items: center;
  background: rgba(255, 255, 255, 0.9);
  border: 2px solid #2c3e50;
  padding: 5px 10px;
  border-radius: 4px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

/* Static Icons for Download (Freeze Animations) */
.static-icons .phenom-anim-thunderstorm,
.static-icons .phenom-anim-gustywind,
.static-icons .phenom-anim-heatwave,
.static-icons .phenom-anim-hailstorm,
.static-icons .phenom-anim-heavyrain,
.static-icons .phenom-anim-densefog,
.static-icons .phenom-anim-coldday,
.static-icons .phenom-anim-warmnight {
  animation: none !important;
  opacity: 1 !important;
  filter: none !important;
}

.forecast-output {
  width: 100%;
  grid-column: 1 / -1;
  background: white;
  padding: 30px;
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.forecast-output h3 {
  margin-bottom: 20px;
  color: #2c3e50;
  border-bottom: 2px solid #667eea;
  padding-bottom: 10px;
}

#forecastContent {
  background: #f8f9fa;
  padding: 20px;
  border-radius: 8px;
  min-height: 150px;
}

.placeholder-text {
  color: #7f8c8d;
  text-align: center;
  font-style: italic;
}

.forecast-item {
  background: white;
  padding: 15px;
  margin: 10px 0;
  border-radius: 8px;
  border-left: 4px solid #667eea;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.export-options {
  grid-column: 1 / -1;
  display: flex;
  gap: 15px;
  justify-content: center;
}

.btn-export {
  background: #27ae60;
  color: white;
}

.btn-export:hover {
  background: #229954;
  transform: translateY(-2px);
}

footer {
  text-align: center;
  background: white;
  padding: 20px;
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

footer p {
  margin: 5px 0;
}

footer h3 {
  margin: 20px 0 15px;
  font-size: 1.2em;
  color: #2c3e50;
}

.footer-copy {
  margin-top: 15px;
  font-size: 0.9em;
  color: #666;
}

.social-links {
  display: flex;
  justify-content: center;
  gap: 20px;
}

.social-links a {
  color: #667eea;
  font-size: 32px;
  transition:
    transform 0.3s,
    color 0.3s;
}

.social-links a:hover {
  transform: translateY(-5px);
  color: #ff4757;
}

/* Footer Wave Design */
.footer-wrapper {
  width: 100%;
  margin-top: 50px;
}

.footer-wave {
  display: block;
  width: 100%;
  height: 120px;
  margin-bottom: -1px;
}

@keyframes wave-flow {
  0%,
  100% {
    transform: scaleY(1) skewX(0deg);
  }
  50% {
    transform: scaleY(1.1) skewX(-2deg);
  }
}

.footer-wave path {
  transform-origin: bottom;
}

.footer-wave path:nth-of-type(1) {
  animation: wave-flow 6s infinite ease-in-out;
  animation-delay: -3s;
}

.footer-wave path:nth-of-type(2) {
  animation: wave-flow 4s infinite ease-in-out;
}

.main-footer {
  background-color: #0a2540;
  color: white;
  padding: 20px 0 40px;
  min-height: 200px;
}

.footer-content {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  flex-wrap: wrap;
  flex-direction: column;
  justify-content: center;
  text-align: center;
  align-items: center;
  gap: 30px;
}

.author-name {
  font-size: 1.5em;
  font-weight: 800;
  background: linear-gradient(to right, #ff9966, #ff5e62);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-left: 5px;
}

.visitor-count {
  margin-top: 10px;
  font-size: 1.1em;
  font-weight: bold;
  color: #b0c4de;
  display: flex;
  align-items: center;
  gap: 5px;
  cursor: help;
}

/* Visitor Counter Animation */
@keyframes blink-glow {
  0%,
  100% {
    opacity: 1;
    text-shadow: 0 0 5px #667eea;
  }
  50% {
    opacity: 0.7;
    text-shadow: none;
  }
}

.counter-anim {
  display: inline-block;
  color: #fff;
  animation: blink-glow 2s infinite ease-in-out;
  padding: 0 5px;
}

.blink-active {
  animation: blink-glow 2s infinite ease-in-out;
  color: #fff;
  font-weight: bold;
}

.footer-section {
  flex: 1;
  min-width: 250px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.main-footer h3 {
  color: #fff;
  margin-bottom: 15px;
  font-size: 1.2em;
  border-bottom: 2px solid #667eea;
  display: inline-block;
  padding-bottom: 5px;
}

.main-footer p {
  color: #b0c4de;
  margin: 8px 0;
  line-height: 1.6;
}

.main-footer .social-links {
  justify-content: center;
}

.main-footer .social-links a {
  color: #fff;
}

/* Social Media Brand Colors on Hover */
.main-footer .social-links a.social-fb:hover {
  color: #1877f2; /* Facebook Blue */
  transform: translateY(-5px);
}
.main-footer .social-links a.social-insta:hover {
  color: #e4405f; /* Instagram Red/Pink */
  transform: translateY(-5px);
}
.main-footer .social-links a.social-x:hover {
  color: #000000; /* X Black */
  text-shadow: 0 0 2px #ffffff; /* White glow for visibility on dark bg */
  transform: translateY(-5px);
}
.main-footer .social-links a.social-share:hover {
  color: #2ecc71; /* Green */
  transform: translateY(-5px);
}

.main-footer .btn-secondary {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  margin-bottom: 15px;
}

.glass-modal {
  background: rgba(255, 255, 255, 0.2) !important;
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border: 1px solid rgba(255, 255, 255, 0.3) !important;
  box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37) !important;
  color: #000000;
  font-weight: 600;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.4);
  position: relative;
  overflow: hidden;
}

.glass-modal::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, transparent, #007bff, transparent);
  box-shadow: 0 0 15px #007bff;
  animation: modal-glow-blink 2s infinite ease-in-out;
}

.glass-modal::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, transparent, #28a745, transparent);
  box-shadow: 0 0 15px #28a745;
  animation: modal-glow-blink 2s infinite ease-in-out;
}

@keyframes modal-glow-blink {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.4;
  }
}

.main-footer .btn-secondary:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* Responsive Design */
@media (max-width: 768px) {
  main {
    grid-template-columns: 1fr;
    padding-top: 220px;
  }

  header h1 {
    font-size: 2em;
  }

  header h2 {
    font-size: 1.4em;
  }

  .header-info {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 5px;
    border-radius: 15px;
    width: 100%;
  }

  .phenomena-grid {
    grid-template-columns: 1fr;
  }

  .action-buttons,
  .export-options {
    flex-direction: column;
  }

  .footer-content {
    flex-direction: column;
    text-align: center;
  }

  .footer-content > div {
    justify-content: center !important;
  }

  .footer-section {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .main-footer .social-links {
    justify-content: center;
  }
}

/* Loading Animation */
.loading {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid #f3f3f3;
  border-top: 3px solid #667eea;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Loading Overlay */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.9);
  z-index: 10000;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  font-weight: bold;
  color: #2c3e50;
}

.loading-overlay .spinner {
  width: 50px;
  height: 50px;
  border: 5px solid #f3f3f3;
  border-top: 5px solid #667eea;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 15px;
}

body.dark-mode .loading-overlay {
  background: rgba(45, 52, 54, 0.9);
  color: #dfe6e9;
}

/* Weather Background Animations */
.weather-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.sun {
  position: absolute;
  top: -60px;
  right: -60px;
  width: 250px;
  height: 250px;
  background: radial-gradient(
    circle,
    rgba(255, 255, 220, 0.6) 0%,
    rgba(255, 255, 255, 0) 70%
  );
  border-radius: 50%;
  filter: blur(30px);
  animation: sun-pulse 8s infinite alternate;
  transition:
    opacity 1s ease,
    transform 1s ease;
}

.cloud {
  position: absolute;
  background: rgba(255, 255, 255, 0.5);
  border-radius: 50px;
  filter: blur(8px);
  transition: opacity 1s ease;
}

.cloud::after,
.cloud::before {
  content: "";
  position: absolute;
  background: inherit;
  border-radius: 50%;
}

.cloud1 {
  width: 140px;
  height: 50px;
  top: 10%;
  left: -160px;
  animation: float-cloud 35s infinite linear;
}
.cloud1::after {
  width: 60px;
  height: 60px;
  top: -30px;
  left: 25px;
}
.cloud1::before {
  width: 50px;
  height: 50px;
  top: -20px;
  left: 70px;
}

.cloud2 {
  width: 100px;
  height: 40px;
  top: 25%;
  left: -120px;
  animation: float-cloud 45s infinite linear 12s;
}
.cloud2::after {
  width: 45px;
  height: 45px;
  top: -25px;
  left: 15px;
}
.cloud2::before {
  width: 40px;
  height: 40px;
  top: -15px;
  left: 50px;
}

.cloud3 {
  width: 180px;
  height: 60px;
  top: 15%;
  left: -200px;
  animation: float-cloud 50s infinite linear 5s;
}
.cloud3::after {
  width: 80px;
  height: 80px;
  top: -40px;
  left: 30px;
}
.cloud3::before {
  width: 60px;
  height: 60px;
  top: -25px;
  left: 90px;
}

@keyframes float-cloud {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(120vw);
  }
}

@keyframes sun-pulse {
  0% {
    transform: scale(1);
    opacity: 0.5;
  }
  100% {
    transform: scale(1.1);
    opacity: 0.7;
  }
}

/* Night Theme Elements */
.moon {
  position: absolute;
  top: 60px;
  right: 80px;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  box-shadow: -20px 10px 0 0 #f6e58d;
  opacity: 0;
  transform: translateY(-50px) rotate(-20deg);
  transition: all 1s ease;
}

.star {
  position: absolute;
  background: white;
  border-radius: 50%;
  opacity: 0;
  transition: opacity 1s ease;
  box-shadow: 0 0 5px rgba(255, 255, 255, 0.8);
}

/* Star Positions */
.star1 {
  width: 3px;
  height: 3px;
  top: 15%;
  left: 10%;
  animation-delay: 0s;
}
.star2 {
  width: 4px;
  height: 4px;
  top: 25%;
  left: 30%;
  animation-delay: 1s;
}
.star3 {
  width: 2px;
  height: 2px;
  top: 10%;
  left: 50%;
  animation-delay: 2s;
}
.star4 {
  width: 3px;
  height: 3px;
  top: 35%;
  left: 70%;
  animation-delay: 0.5s;
}
.star5 {
  width: 4px;
  height: 4px;
  top: 20%;
  left: 85%;
  animation-delay: 1.5s;
}
.star6 {
  width: 2px;
  height: 2px;
  top: 45%;
  left: 20%;
  animation-delay: 2.5s;
}
.star7 {
  width: 3px;
  height: 3px;
  top: 5%;
  left: 60%;
  animation-delay: 0.8s;
}

/* Dark Mode Overrides for Background */
body.dark-mode .sun {
  opacity: 0;
  transform: translateY(50px);
}
body.dark-mode .cloud {
  opacity: 0;
}
body.dark-mode .moon {
  opacity: 1;
  transform: translateY(0) rotate(-20deg);
}
body.dark-mode .star {
  animation: twinkle 3s infinite ease-in-out;
}

@keyframes twinkle {
  0%,
  100% {
    opacity: 0.2;
    transform: scale(0.8);
  }
  50% {
    opacity: 1;
    transform: scale(1.2);
  }
}

/* Phenomenon Icons & Animations */
.phenom-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  font-size: 28px;
  margin-right: 5px;
}

@keyframes thunder-flash {
  0%,
  100% {
    color: #ffc107;
    transform: scale(1);
    filter: drop-shadow(0 0 2px rgba(255, 193, 7, 0.5));
  }
  50% {
    color: #e67e22;
    transform: scale(1.2);
    filter: drop-shadow(0 0 8px rgba(230, 126, 34, 0.8));
  }
}
.phenom-anim-thunderstorm {
  animation: thunder-flash 1.5s infinite;
  color: #ffc107;
}

@keyframes wind-blow {
  0% {
    transform: translateX(0);
  }
  50% {
    transform: translateX(5px);
  }
  100% {
    transform: translateX(0);
  }
}
.phenom-anim-gustywind {
  animation: wind-blow 2s infinite ease-in-out;
  color: #17a2b8;
}

@keyframes heat-pulse {
  0% {
    transform: scale(1);
    opacity: 0.8;
  }
  50% {
    transform: scale(1.1);
    opacity: 1;
  }
  100% {
    transform: scale(1);
    opacity: 0.8;
  }
}
.phenom-anim-heatwave {
  animation: heat-pulse 2s infinite;
  color: #fd7e14;
}

@keyframes hail-bounce {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-3px);
  }
}
.phenom-anim-hailstorm {
  animation: hail-bounce 1s infinite;
  color: #6f42c1;
}

@keyframes rain-drop {
  0% {
    transform: translateY(-2px);
    opacity: 0.7;
  }
  50% {
    transform: translateY(2px);
    opacity: 1;
  }
  100% {
    transform: translateY(-2px);
    opacity: 0.7;
  }
}
.phenom-anim-heavyrain {
  animation: rain-drop 1.5s infinite;
  color: #007bff;
}

@keyframes fog-float {
  0% {
    opacity: 0.6;
    transform: translateX(-2px);
  }
  50% {
    opacity: 1;
    transform: translateX(2px);
  }
  100% {
    opacity: 0.6;
    transform: translateX(-2px);
  }
}
.phenom-anim-densefog {
  animation: fog-float 3s infinite;
  color: #6c757d;
}

@keyframes cold-shiver {
  0% {
    transform: rotate(0deg);
  }
  25% {
    transform: rotate(10deg);
  }
  75% {
    transform: rotate(-10deg);
  }
  100% {
    transform: rotate(0deg);
  }
}
.phenom-anim-coldday {
  animation: cold-shiver 2s infinite;
  color: #20c997;
}

@keyframes warm-glow {
  0% {
    text-shadow: 0 0 2px #e83e8c;
    transform: scale(1);
  }
  50% {
    text-shadow: 0 0 8px #e83e8c;
    transform: scale(1.05);
  }
  100% {
    text-shadow: 0 0 2px #e83e8c;
    transform: scale(1);
  }
}
.phenom-anim-warmnight {
  animation: warm-glow 3s infinite;
  color: #e83e8c;
}

/* Map Phenomenon Marker */
.map-phenom-marker {
  background: transparent !important;
  border: none !important;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 2px;
}
/* Ensure SVGs in markers inherit color and size */
.map-phenom-marker svg {
  width: 1em;
  height: 1em;
}

/* --- Realistic Weather Effects (Canvas & Overlays) --- */
#weatherCanvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 900;
  display: none;
}
#weatherCanvas.active {
  display: block;
}

#weatherLightning {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 901;
  background: white;
  opacity: 0;
}
#weatherLightning.active {
  animation: flash 10s infinite;
}

#weatherFog {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 902;
  background: url("https://i.imgur.com/QZ7X9Vf.png");
  opacity: 0;
}
#weatherFog.active {
  opacity: 0.4;
  animation: fogMove 60s linear infinite;
}

@keyframes fogMove {
  from {
    background-position: 0 0;
  }
  to {
    background-position: 1000px 0;
  }
}

@keyframes flash {
  0%,
  94%,
  100% {
    opacity: 0;
  }
  95% {
    opacity: 0.8;
  }
  96% {
    opacity: 0;
  }
  97% {
    opacity: 0.5;
  }
  98% {
    opacity: 0;
  }
}

/* Special Features Visibility */
.special-feature {
  display: none !important;
}

body.logged-in .special-feature {
  display: inline-block !important;
}

/* User Profile & Login Styles */
.user-profile-container {
  position: relative;
  display: inline-block;
}

.user-logo {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.3s ease;
  border: 2px solid transparent;
}

.user-logo:hover {
  transform: scale(1.1);
}

/* Copy Days Checkbox Grid */
.copy-days-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 10px;
  margin: 15px 0;
}

/* Button Blink Animation */
.btn-blink-anim {
  animation: blink-pulse 2s infinite;
  background-color: #ff9800 !important;
  color: white !important;
}

@keyframes blink-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(255, 152, 0, 0.7);
    transform: scale(1);
  }
  50% {
    box-shadow: 0 0 0 10px rgba(255, 152, 0, 0);
    transform: scale(1.05);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(255, 152, 0, 0);
    transform: scale(1);
  }
}

/* Green Ring for Active Session */
.user-logo.active-session {
  border: 3px solid #2ecc71;
  box-shadow:
    0 0 10px #2ecc71,
    0 0 5px #27ae60 inset;
}

.user-dropdown {
  display: none;
  position: absolute;
  right: 0;
  top: 55px;
  background-color: white;
  min-width: 160px;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
  z-index: 2000;
  border-radius: 8px;
  overflow: hidden;
}

.user-dropdown a {
  color: #333;
  padding: 12px 16px;
  text-decoration: none;
  display: block;
  font-weight: 500;
  border-bottom: 1px solid #eee;
}

.user-dropdown a:hover {
  background-color: #f1f1f1;
  color: #667eea;
}

/* Custom Modal Styles */
.custom-modal {
  position: fixed;
  z-index: 10001;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(8px);
  display: flex;
  justify-content: center;
  align-items: center;
}

.modal-content {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border: 1px solid rgba(255, 255, 255, 0.5);
  padding: 30px;
  border-radius: 10px;
  width: 350px;
  position: relative;
  box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
}

.close-modal {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 24px;
  cursor: pointer;
  color: #aaa;
}

.form-group {
  margin-bottom: 15px;
  text-align: left;
}

.form-group label {
  display: block;
  margin-bottom: 5px;
  font-weight: bold;
}

.form-group input {
  width: 100%;
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: 4px;
}

/* --- Glassmorphism Popup Styles --- */
.glass-popup-content {
  background: rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
  border-radius: 20px;
  padding: 30px;
  width: 700px;
  max-width: 90%;
  position: relative;
  animation: popupSlideIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  color: #2c3e50;
}

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

.glass-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  padding-bottom: 15px;
  margin-bottom: 20px;
}

.glass-modal-header h3 {
  margin: 0;
  font-size: 1.5rem;
  color: #2c3e50;
  text-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);
}

.glass-textarea {
  background: rgba(255, 255, 255, 0.5);
  border: 2px solid rgba(255, 255, 255, 0.5);
  border-radius: 12px;
  color: #000;
  font-weight: 500;
  transition: all 0.3s ease;
}

.glass-textarea:focus {
  background: rgba(255, 255, 255, 0.9);
  border-color: #667eea;
  outline: none;
  box-shadow: 0 0 15px rgba(102, 126, 234, 0.3);
}

/* Add these styles to your existing style.css */

.selection-container {
  margin: 15px 0;
  padding: 15px;
  background: #f8f9fa;
  border-radius: 8px;
  border: 1px solid #e9ecef;
}

.district-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px;
  max-height: 300px;
  overflow-y: auto;
  padding: 10px;
  background: white;
  border: 1px solid #ddd;
  border-radius: 5px;
  margin: 10px 0;
}

.district-checkbox {
  display: flex;
  align-items: center;
  padding: 8px;
  background: white;
  border: 1px solid #ddd;
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.3s;
}

.district-checkbox:hover {
  background: #f0f0f0;
  border-color: #667eea;
}

.district-checkbox input[type="checkbox"] {
  margin-right: 8px;
  transform: scale(1.2);
}

.regional-group-info {
  background: #e3f2fd;
  padding: 15px;
  border-radius: 8px;
  border-left: 4px solid #2196f3;
  margin: 10px 0;
}

.selected-districts {
  background: #f1f8e9;
  padding: 15px;
  border-radius: 8px;
  border: 1px solid #c5e1a5;
  margin-top: 15px;
}

.selected-districts h4 {
  color: #2e7d32;
  margin-bottom: 10px;
}

.selected-districts ul {
  list-style: none;
  padding-left: 0;
}

.selected-districts li {
  padding: 5px 0;
  border-bottom: 1px solid #e0e0e0;
}

.selected-districts li:last-child {
  border-bottom: none;
}

.district-count {
  background: #667eea;
  color: white;
  padding: 5px 10px;
  border-radius: 15px;
  font-size: 12px;
  font-weight: bold;
}

.selection-mode-toggle {
  background: #fff3e0;
  padding: 10px;
  border-radius: 5px;
  margin-bottom: 15px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .district-grid {
    grid-template-columns: 1fr;
    max-height: 250px;
  }
}

/* ---------- sub-option row ---------- */
.phenomenon-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  margin-bottom: 10px;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 6px;
}
.phenomenon-row .main-check {
  transform: scale(1.3);
  margin-right: 8px;
}
.phenomenon-row label {
  font-weight: 600;
}
.sub-select {
  padding: 5px 8px;
  font-size: 14px;
  border: 1px solid #ccc;
  border-radius: 4px;
}
.wind-speed-select {
  display: none;
  margin-left: auto;
}

/* ---------- regional multi-select ---------- */
.regional-checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  background: #fafafa;
  border: 1px solid #ddd;
  border-radius: 4px;
  cursor: pointer;
}
.regional-checkbox input {
  transform: scale(1.2);
}

/* ---------- uniform size for all controls ---------- */
.same-size,
select,
button {
  font-size: 16px;
  padding: 8px 12px;
  border-radius: 6px;
  border: 1px solid #ccc;
  font-family: "Noto Sans Devanagari", sans-serif;
}
input[type="checkbox"].same-size {
  transform: scale(1.3);
  margin-right: 8px;
}

/* ---------- sub-option row ---------- */
.phenomenon-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  margin-bottom: 10px;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 6px;
}
.phenomenon-row label {
  font-weight: 600;
}

/* ---------- regional/multi district grid ---------- */
.district-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px;
  max-height: none;
  overflow-y: visible;
  padding: 10px;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 6px;
}
.regional-checkbox,
.district-checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  background: #fafafa;
  border: 1px solid #ddd;
  border-radius: 4px;
  cursor: pointer;
}
.regional-checkbox.region-foothill {
  background-color: #e8f5e9;
  border-color: #4caf50;
}
.regional-checkbox.region-northern {
  background-color: #e3f2fd;
  border-color: #2196f3;
}
.regional-checkbox.region-southern {
  background-color: #fff3e0;
  border-color: #ff9800;
}
.regional-checkbox.region-north-west {
  background-color: #e0f2f1;
  border-color: #00897b;
}
.regional-checkbox.region-north-central {
  background-color: #e3f2fd;
  border-color: #1976d2;
}
.regional-checkbox.region-north-east {
  background-color: #ede7f6;
  border-color: #673ab7;
}
.regional-checkbox.region-south-west {
  background-color: #ffebee;
  border-color: #f44336;
}
.regional-checkbox.region-south-central {
  background-color: #fffde7;
  border-color: #fbc02d;
}
.regional-checkbox.region-south-east {
  background-color: #efebe9;
  border-color: #795548;
}

.district-checkbox.highlighted {
  background-color: #fff3cd;
  border-color: #ffc107;
}

/* ---------- place count panel ---------- */
.place-count-panel {
  margin: 15px 0;
  padding: 12px;
  background: #fff3cd;
  border-left: 4px solid #ffc107;
  border-radius: 4px;
}
.place-count-panel label {
  font-weight: 600;
  margin-right: 10px;
}

/* ---------- warning panel ---------- */
.warning-panel {
  margin: 15px 0;
  padding: 12px;
  background: #ffebee;
  border-left: 4px solid #f44336;
  border-radius: 4px;
}
.warning-panel label {
  font-weight: 600;
  margin-right: 10px;
}

/* ---------- color selection panel ---------- */
.color-selection-panel {
  margin: 15px 0;
  padding: 12px;
  background: #e0f7fa;
  border-left: 4px solid #00bcd4;
  border-radius: 4px;
}
.color-selection-panel label {
  font-weight: 600;
  margin-right: 10px;
}

/* ---------- action / export buttons ---------- */
.action-buttons,
.export-options {
  display: flex;
  gap: 15px;
  margin-top: 15px;
}
.btn-primary,
.btn-secondary,
.btn-export,
.btn-copy {
  padding: 10px 20px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  border-radius: 6px;
}
.btn-primary {
  background: #007bff;
  color: #fff;
}
.btn-secondary {
  background: #6c757d;
  color: #fff;
}
.btn-export {
  background: #28a745;
  color: #fff;
}
.btn-copy {
  background: #17a2b8;
  color: #fff;
}

/* Dark Mode */
body.dark-mode {
  background: linear-gradient(-45deg, #0f2027, #203a43, #2c5364, #000000);
  background-size: 400% 400%;
  animation: gradientBG 15s ease infinite;
  color: #ecf0f1;
}
body.dark-mode header,
body.dark-mode .control-panel,
body.dark-mode .map-container,
body.dark-mode .forecast-output,
body.dark-mode .selection-container,
body.dark-mode .district-grid,
body.dark-mode .phenomenon-row,
body.dark-mode .district-checkbox,
body.dark-mode .regional-checkbox,
body.dark-mode select,
body.dark-mode input[type="text"],
body.dark-mode .sub-select,
body.dark-mode #forecastContent {
  background-color: #2d3436;
  color: #dfe6e9;
  border-color: #636e72;
}
body.dark-mode h1,
body.dark-mode h2,
body.dark-mode h3,
body.dark-mode label {
  color: #dfe6e9;
}
body.dark-mode .header-info {
  background: rgba(0, 0, 0, 0.3);
  border-color: rgba(255, 255, 255, 0.1);
}
body.dark-mode .info-box {
  color: #dfe6e9;
  background: transparent;
}
body.dark-mode .district-checkbox:hover,
body.dark-mode .regional-checkbox:hover {
  background-color: #353b48;
}
body.dark-mode .regional-checkbox.region-foothill {
  background-color: #1b5e20;
  border-color: #2e7d32;
}
body.dark-mode .regional-checkbox.region-northern {
  background-color: #0d47a1;
  border-color: #1565c0;
}
body.dark-mode .regional-checkbox.region-southern {
  background-color: #e65100;
  border-color: #ef6c00;
}
body.dark-mode .regional-checkbox.region-north-west {
  background-color: #004d40;
  border-color: #00695c;
}
body.dark-mode .regional-checkbox.region-north-central {
  background-color: #0d47a1;
  border-color: #1565c0;
}
body.dark-mode .regional-checkbox.region-north-east {
  background-color: #311b92;
  border-color: #4527a0;
}
body.dark-mode .regional-checkbox.region-south-west {
  background-color: #b71c1c;
  border-color: #c62828;
}
body.dark-mode .regional-checkbox.region-south-central {
  background-color: #f57f17;
  border-color: #f9a825;
}
body.dark-mode .regional-checkbox.region-south-east {
  background-color: #3e2723;
  border-color: #4e342e;
}

body.dark-mode .district-checkbox.highlighted {
  background-color: #f57f17;
  border-color: #ffca28;
  color: #fff;
}
body.dark-mode .place-count-panel {
  background-color: #4a3b00;
  border-left-color: #ffc107;
  color: #dfe6e9;
}
body.dark-mode .warning-panel {
  background-color: #5c0000;
  border-left-color: #f44336;
  color: #dfe6e9;
}
body.dark-mode .color-selection-panel {
  background-color: #006064;
  border-left-color: #00bcd4;
  color: #dfe6e9;
}

body.dark-mode .custom-input-box {
  background-color: #2d3436;
  color: #dfe6e9;
  border-color: #636e72;
}
body.dark-mode .custom-input-box:focus {
  background-color: #1e272e;
  border-color: #74b9ff;
  box-shadow: 0 0 0 3px rgba(116, 185, 255, 0.25);
}

/* Leaflet Legend */
.legend {
  line-height: 18px;
  color: #555;
  background: white;
  padding: 10px;
  border-radius: 5px;
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.2);
  max-height: 400px;
  overflow-y: auto;
}
.legend i {
  width: 18px;
  height: 18px;
  float: left;
  margin-right: 8px;
  opacity: 0.7;
}

/* Map Labels */
.map-label {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  font-size: 11px;
  font-weight: 700;
  color: #2c3e50;
  text-shadow:
    1px 1px 0 #fff,
    -1px -1px 0 #fff,
    1px -1px 0 #fff,
    -1px 1px 0 #fff;
}
.leaflet-tooltip-pane.labels-hidden .map-label {
  display: none;
}

/* Display Page Glass Image Box */
.glass-image-box {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
  border-radius: 20px;
  padding: 20px;
  display: flex;
  justify-content: center;
  align-items: center;
  max-width: 90%;
  max-height: 90%;
}

.glass-image-box img {
  max-width: 100%;
  max-height: 80vh;
  border-radius: 10px;
  transition: transform 0.5s ease;
}

.glass-image-box:hover img {
  transform: scale(1.05);
}

/* --- New Clean Display Page Styles --- */

.glass-main-panel {
  width: 90%;
  height: 90%;
  background: rgba(255, 255, 255, 0.25);
  box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px;
  position: relative;
  overflow: hidden;
}

/* Top Blue Glow */
.glass-main-panel::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: linear-gradient(90deg, transparent, #007bff, transparent);
  box-shadow: 0 0 20px #007bff;
}

/* Bottom Green Glow */
.glass-main-panel::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: linear-gradient(90deg, transparent, #28a745, transparent);
  box-shadow: 0 0 20px #28a745;
}

.glass-header-glow {
  text-align: center;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  width: 100%;
  color: #2c3e50;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
}
.glass-header-glow h1 {
  font-size: 2.5rem;
  margin-bottom: 5px;
}
.glass-header-glow h2 {
  font-size: 1.5rem;
  font-weight: 400;
  color: #444;
}

.display-content-area {
  flex: 1;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

.no-data-state {
  text-align: center;
  color: #555;
  animation: fadeIn 1s ease-in-out;
}
.pulse-icon {
  font-size: 4rem;
  color: #667eea;
  margin-bottom: 20px;
  animation: pulse 2s infinite;
}

.image-display-container {
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative; /* Essential for absolute positioning of images */
  overflow: hidden;
}
.slide-image {
  position: absolute; /* Stack images on top of each other */
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  max-width: 95%;
  max-height: 95%;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  /* No default animation here, controlled by classes */
}

.slide-image.enter {
  animation: slideFadeIn 0.5s ease-in-out forwards;
}

.slide-image.exit {
  animation: slideFadeOut 0.5s ease-in-out forwards;
}

.slide-image {
  transition: transform 0.2s ease-out; /* Smooth zoom */
}

.glass-footer-controls {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 30px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.3);
}

.glass-btn {
  background: rgba(255, 255, 255, 0.4);
  padding: 10px 20px;
  border-radius: 30px;
  cursor: pointer;
  font-weight: bold;
  color: #2c3e50;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  gap: 10px;
}
.glass-btn:hover {
  background: rgba(255, 255, 255, 0.6);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.glass-btn.small-btn {
  padding: 8px 15px;
  font-size: 0.9rem;
}

.speed-control-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 200px;
}
.speed-label {
  display: flex;
  justify-content: space-between;
  width: 100%;
  font-size: 0.9rem;
  font-weight: bold;
  color: #2c3e50;
  margin-bottom: 5px;
}
.glass-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  background: rgba(0, 0, 0, 0.1);
  border-radius: 5px;
  outline: none;
}
.glass-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: #667eea;
  cursor: pointer;
  box-shadow: 0 0 10px rgba(102, 126, 234, 0.5);
}

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

/* --- Toolbar & Grid Styles --- */

.glass-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.3);
  padding: 8px 15px;
  border-radius: 50px;
  margin-bottom: 15px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  flex-wrap: wrap;
  justify-content: center;
}

.divider {
  width: 1px;
  height: 20px;
  background: rgba(0, 0, 0, 0.1);
  margin: 0 5px;
}

.icon-only {
  padding: 8px 12px;
  border-radius: 50%;
}

.speed-control-compact {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #2c3e50;
}

.glass-slider-compact {
  -webkit-appearance: none;
  appearance: none;
  width: 80px;
  height: 4px;
  background: rgba(0, 0, 0, 0.1);
  border-radius: 5px;
}
.glass-slider-compact::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #667eea;
  cursor: pointer;
}

.grid-view-container {
  width: 100%;
  height: 100%;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 15px;
  overflow-y: auto;
  padding: 10px;
}

.grid-item {
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.2s;
  background: rgba(255, 255, 255, 0.2);
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.grid-item:hover {
  transform: scale(1.05);
  border-color: #667eea;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.grid-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Next Image Preview */
.next-image-preview {
  position: absolute;
  bottom: 80px;
  right: 20px;
  background: rgba(255, 255, 255, 0.6);
  padding: 5px;
  border-radius: 8px;
  backdrop-filter: blur(5px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  z-index: 100;
  transition: all 0.3s;
  border: 1px solid rgba(255, 255, 255, 0.5);
}
.next-image-preview img {
  height: 60px;
  width: auto;
  border-radius: 4px;
  display: block;
}
.next-image-preview:hover {
  transform: scale(1.1);
  background: rgba(255, 255, 255, 0.9);
}
@keyframes slideFadeIn {
  from {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

@keyframes slideFadeOut {
  from {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
  to {
    opacity: 0;
    transform: translate(-50%, -50%) scale(1.05);
  }
}

@keyframes zoomIn {
  from {
    transform: scale(0.9);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* System Live Button Animation */
.system-live-btn i {
  color: #e74c3c;
  animation: system-pulse 1.5s infinite;
}

@keyframes system-pulse {
  0% {
    opacity: 1;
    text-shadow: 0 0 5px rgba(231, 76, 60, 0.8);
  }
  50% {
    opacity: 0.4;
    text-shadow: none;
  }
  100% {
    opacity: 1;
    text-shadow: 0 0 5px rgba(231, 76, 60, 0.8);
  }
}

/* Button Blink Animation */
.btn-blink-anim {
  animation: blink-pulse 2s infinite;
  background-color: #ff9800 !important;
  color: white !important;
}

@keyframes blink-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(255, 152, 0, 0.7);
    transform: scale(1);
  }
  50% {
    box-shadow: 0 0 0 10px rgba(255, 152, 0, 0);
    transform: scale(1.05);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(255, 152, 0, 0);
    transform: scale(1);
  }
}

/* Audio Playing Animation */
@keyframes sound-wave-pulse {
  0% {
    transform: scale(1);
    opacity: 0.8;
  }
  50% {
    transform: scale(1.2);
    opacity: 1;
    text-shadow: 0 0 8px rgba(231, 76, 60, 0.6);
  }
  100% {
    transform: scale(1);
    opacity: 0.8;
  }
}

/* --- Custom Toggle Switch (Uiverse.io by Praashoo7) --- */
.switch {
  font-size: 10px; /* Scaled down to fit toolbar */
  position: relative;
  display: inline-block;
  width: 1.2em;
  height: 3.3em;
  margin-right: 10px;
}

/* Hide default HTML checkbox */
.switch .chk {
  opacity: 0;
  width: 0;
  height: 0;
}

/* The slider */
.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: 0.4s;
  border-radius: 5px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 0.5em;
  width: 2.4em;
  border-radius: 5px;
  left: -0.6em;
  top: 0.2em;
  background-color: white;
  box-shadow: 0 6px 7px rgba(0, 0, 0, 0.3);
  transition: 0.4s;
}

.slider:before,
.slider:after {
  content: "";
  display: block;
}

.slider:after {
  background:
    linear-gradient(transparent 50%, rgba(255, 255, 255, 0.15) 0) 0 50% / 50%
      100%,
    repeating-linear-gradient(
        90deg,
        rgb(255, 255, 255) 0,
        rgb(255, 255, 255),
        rgb(255, 255, 255) 20%,
        rgb(255, 255, 255) 20%,
        rgb(255, 255, 255) 40%
      )
      0 50% / 50% 100%,
    radial-gradient(circle at 50% 50%, rgb(255, 255, 255) 25%, transparent 26%);
  background-repeat: no-repeat;
  border: 0.25em solid transparent;
  border-left: 0.4em solid #ffffff;
  border-right: 0 solid transparent;
  transition:
    border-left-color 0.1s 0.3s ease-out,
    transform 0.3s ease-out;
  transform: translateX(-22.5%) rotate(90deg);
  transform-origin: 25% 50%;
  position: relative;
  top: 0.5em;
  left: 0.55em;
  width: 2em;
  height: 1em;
  box-sizing: border-box;
}

.chk:checked + .slider {
  background-color: limegreen;
}

.chk:focus + .slider {
  box-shadow: 0 0 1px limegreen;
}

.chk:checked + .slider:before {
  transform: translateY(2.3em);
}

.chk:checked + .slider:after {
  transform: rotateZ(90deg) rotateY(180deg) translateY(0.45em)
    translateX(-1.4em);
}

.audio-playing-icon {
  animation: sound-wave-pulse 1s infinite ease-in-out;
}

/* Dark Mode for Glass Elements (Display & Live Pages) */
body.dark-mode .glass-main-panel {
  background: rgba(30, 30, 30, 0.6);
  border-color: rgba(255, 255, 255, 0.1);
}
body.dark-mode .glass-header-glow {
  color: #ecf0f1;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
  border-bottom-color: rgba(255, 255, 255, 0.1);
}
body.dark-mode .glass-header-glow h2 {
  color: #bdc3c7;
}
body.dark-mode .glass-toolbar,
body.dark-mode .live-controls-top,
body.dark-mode .live-controls-bottom {
  background: rgba(45, 52, 54, 0.8);
  border-color: rgba(255, 255, 255, 0.1);
}
body.dark-mode .glass-btn,
body.dark-mode .layer-btn,
body.dark-mode .control-btn {
  background: rgba(255, 255, 255, 0.1);
  color: #ecf0f1;
  border-color: rgba(255, 255, 255, 0.2);
}
body.dark-mode .glass-btn:hover,
body.dark-mode .layer-btn:hover,
body.dark-mode .control-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}
body.dark-mode .layer-btn.active {
  background: #667eea;
  border-color: #667eea;
}
body.dark-mode .speed-control {
  color: #ecf0f1;
  border-left-color: rgba(255, 255, 255, 0.2);
}
body.dark-mode #slideHeader {
  background: rgba(45, 52, 54, 0.8);
  color: #ecf0f1;
}

.live-controls-top {
  display: flex;
  justify-content: center;
  gap: 5px;
  margin-bottom: 10px;
}

/* Region Selector Bar */
#regionSelector {
  display: flex;
  gap: 8px;
  padding: 8px;
  background: #e8f5e9;
  border: 2px solid #2e7d32;
  border-radius: 6px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.region-box {
  padding: 6px 10px;
  border-radius: 4px;
  border: 1px solid #ccc;
  cursor: pointer;
  font-weight: 600;
  background: white;
  font-size: 13px;
  display: flex;
  align-items: center;
}

.region-box input {
  margin-right: 4px;
}

/* ========================================================================== */
/* ======================= NOWCAST INDEX.HTML STYLES ======================== */
/* ========================================================================== */

body.nowcast-page {
  font-family: "Noto Sans Devanagari", Arial, sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  padding: 20px;
  animation: none; /* override style.css background animation */
  color: initial;
  background-size: auto;
}

body.nowcast-page .container {
  max-width: 1400px;
  margin: 0 auto;
  background: white;
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  overflow: visible; /* लेआउट कटने से रोकने के लिए */
  padding: 0; /* Prevents global style.css container padding conflict */
}

/* Header Styles */
.header {
  background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
  color: white;
  padding: 20px;
  text-align: center;
  position: relative;
}

.header-top {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  margin-bottom: 15px;
  gap: 15px;
}

.header-left {
  justify-self: start;
}

.header-right {
  justify-self: end;
}

.govt-logo {
  width: 80px;
  height: 80px;
  object-fit: contain;
  background: white;
  border-radius: 50%;
  padding: 5px;
}

.header-center {
  justify-self: center;
  text-align: center;
}

.header-center h1 {
  font-size: 28px;
  margin-bottom: 5px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.header-center h2 {
  font-size: 18px;
  font-weight: 400;
  opacity: 0.9;
}

.imd-logo {
  width: 100px;
  height: auto;
}

/* Mobile Responsive Layout for Header Grid */
@media (max-width: 768px) {
  .header-top {
    grid-template-columns: 1fr;
    justify-items: center;
  }
  .header-left,
  .header-right {
    justify-self: center;
  }
}

.header-contact {
  display: flex;
  justify-content: center;
  gap: 30px;
  margin-top: 10px;
  font-size: 14px;
  flex-wrap: wrap;
}

.header-contact a {
  color: #ffd700;
  text-decoration: none;
}

/* Main Content */
.main-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 400px; /* मैप को बाहर निकलने से रोकेगा */
  gap: 20px;
  padding: 20px;
  align-items: stretch; /* यह दोनों कॉलम (मैप और कंट्रोल पैनल) की ऊंचाई को हमेशा बराबर रखेगा */
  overflow: visible; /* स्क्रॉल जंपिंग इशू को रोकेगा */
}

@media (max-width: 1024px) {
  .main-content {
    grid-template-columns: 1fr;
  }
}

/* Map Section */
.map-section {
  background: #f8f9fa;
  border-radius: 15px;
  padding: 15px;
  min-width: 0;
  overflow: visible; /* मैप क्लिक करने पर हेडर छिपने की समस्या को ठीक करेगा */
  display: flex;
  flex-direction: column;
  position: relative; /* Essential to trap the advanced panel overlay */
}

body.nowcast-page .map-container {
  flex: 1;
  min-height: 500px;
  border-radius: 10px;
  overflow: hidden;
  border: 2px solid var(--glow-primary);
  position: relative;
  width: 100%;
  z-index: 1;
  padding: 0;
  animation: mapPulseGlow 2.5s infinite alternate ease-in-out;
}

@keyframes mapPulseGlow {
  0% {
    box-shadow:
      0 0 10px var(--glow-primary-light),
      0 0 20px var(--glow-secondary-light);
  }
  100% {
    box-shadow:
      0 0 25px var(--glow-primary),
      0 0 45px var(--glow-secondary);
  }
}

/* Region Selector Bar */
.region-selector-bar {
  display: flex;
  gap: 8px;
  padding: 8px;
  background: #e8f5e9;
  border: 2px solid #2e7d32;
  border-radius: 6px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

body.nowcast-page #map {
  width: 100%;
  height: 100%;
  min-height: 500px;
}

/* Control Panel */
body.nowcast-page .control-panel {
  background: #f8f9fa;
  border-radius: 15px;
  padding: 20px;
  min-width: 0;
  width: auto;
  box-shadow: none;
}

.panel-section {
  background: white;
  border-radius: 10px;
  padding: 15px;
  margin-bottom: 15px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.panel-title {
  font-size: 16px;
  font-weight: 700;
  color: #2c3e50;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 2px solid #e9ecef;
  padding-bottom: 8px;
}

/* District Selection */
body.nowcast-page .district-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  max-height: 200px;
  overflow-y: auto;
  padding: 5px;
}

body.nowcast-page .district-checkbox {
  display: flex;
  align-items: center;
  padding: 8px;
  background: #f1f3f4;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.3s;
  font-size: 13px;
}

body.nowcast-page .district-checkbox:hover {
  background: #e8f0fe;
  transform: translateX(3px);
}

body.nowcast-page .district-checkbox input {
  margin-right: 8px;
  cursor: pointer;
}

body.nowcast-page .district-checkbox.selected {
  background: #cce5ff;
  border: 1px solid #007bff;
}

/* Warning Level Selection */
.warning-levels {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.warning-option {
  display: flex;
  align-items: center;
  padding: 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s;
  border: 2px solid transparent;
}

.warning-option input {
  margin-right: 10px;
  transform: scale(1.2);
}

.warning-option.yellow {
  background: rgb(255, 255, 0);
  border-color: #000;
}

.warning-option.orange {
  background: rgb(255, 192, 0);
  border-color: #000;
}

.warning-option.red {
  background: rgb(255, 0, 0);
  border-color: #000;
}

.warning-option.green {
  background: #d4edda;
  border-color: #28a745;
}

.warning-option:hover {
  transform: translateX(5px);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.warning-option.selected {
  box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.3);
}

.warning-label {
  font-weight: 600;
  font-size: 14px;
}

.warning-desc {
  font-size: 12px;
  opacity: 0.8;
  margin-top: 2px;
}

/* Wind Speed Selection */
.wind-speed-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.wind-option {
  display: flex;
  align-items: center;
  padding: 10px;
  background: #f8f9fa;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.3s;
  border: 2px solid #dee2e6;
}

.wind-option:hover {
  background: #e9ecef;
  border-color: #adb5bd;
}

.wind-option.selected {
  background: #cce5ff;
  border-color: #007bff;
}

.wind-option input {
  margin-right: 10px;
}

.wind-speed-value {
  font-weight: 700;
  color: #495057;
}

.wind-speed-desc {
  font-size: 12px;
  color: #6c757d;
  margin-left: auto;
}

/* Weather Phenomena */
body.nowcast-page .phenomena-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.phenomena-item {
  display: flex;
  align-items: center;
  padding: 10px;
  background: #f8f9fa;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.3s;
  font-size: 13px;
  border: 2px solid transparent;
}

.phenomena-item:hover {
  background: #e9ecef;
  transform: translateY(-2px);
}

.phenomena-item.selected {
  background: #d4edda;
  border-color: #28a745;
}

.phenomena-item input {
  margin-right: 8px;
}

.phenomena-icon {
  width: 24px;
  height: 24px;
  margin-right: 8px;
  font-size: 18px;
  text-align: center;
}

/* Action Buttons */
body.nowcast-page .action-buttons {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 0;
}

.btn {
  padding: 12px 20px;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 20px var(--glow-primary);
}

.btn-success {
  background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
  color: white;
}

.btn-success:hover {
  background: linear-gradient(135deg, #0e7a71 0%, #2bbd61 100%);
  box-shadow: 0 5px 20px var(--glow-primary);
}

.btn-warning {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  color: white;
}

.btn-secondary {
  background: #6c757d;
  color: white;
}

.btn-secondary:hover {
  background: linear-gradient(135deg, #5a6268 0%, #343a40 100%);
  box-shadow: 0 5px 20px var(--glow-primary);
}

.btn:hover {
  opacity: 0.9;
  transform: translateY(-2px);
  animation: mapPulseGlow 1.5s infinite alternate ease-in-out;
}

/* Nowcast Output Section */
.nowcast-output {
  grid-column: 1 / -1;
  margin-top: 20px;
  display: none;
  min-width: 0;
  overflow-x: auto;
}

.nowcast-output.active {
  display: block;
}

/* IMD Style Warning Table */
.warning-card-wrapper {
  background: #ffffff;
  border: 4px solid #000;
  padding: 10px;
  overflow: visible; /* Prevents border clipping in html2canvas */
  margin-bottom: 20px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
  transition: aspect-ratio 0.3s ease;
  display: flex;
  flex-direction: column;
  justify-content: center; /* Centers content when height increases */
  aspect-ratio: 256 / 181;
}

.imd-warning-container {
  background: white;
  border: none;
  border-radius: 0;
  overflow: visible; /* Crucial: removes clipping */
  margin-bottom: 0;
  box-shadow: none;
  width: 100%;
}

.imd-header {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 15px;
  align-items: center;
  padding: 15px;
  border-bottom: 2px solid #000;
  background: white;
}

.imd-logo-section {
  display: flex;
  align-items: center;
  justify-self: start;
  gap: 15px;
}

.imd-emblem {
  width: auto;
  height: 180px;
  object-fit: contain;
}

.imd-title-section {
  text-align: center;
  justify-self: center;
}

.imd-title-section h3 {
  font-size: 14px;
  margin-bottom: 5px;
  color: #000;
}

.imd-title-section h2 {
  font-size: 24px;
  color: #d32f2f;
  font-weight: 700;
  text-transform: uppercase;
}

.nowcast-main-heading {
  font-size: 24px;
  color: #d32f2f;
  font-weight: 700;
  text-transform: uppercase;
  text-align: center;
  margin: 0 0 20px 0;
}

.imd-anniversary {
  width: auto;
  height: 180px;
  object-fit: contain;
  justify-self: end;
}

/* Mobile responsiveness for IMD header */
@media (max-width: 768px) {
  .imd-header {
    grid-template-columns: 1fr;
    justify-items: center;
  }
  .imd-logo-section,
  .imd-anniversary {
    justify-self: center;
  }
}

.imd-warning-content {
  padding: 20px;
}

.warning-code-section {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.warning-code-label {
  font-weight: 700;
  font-size: 16px;
}

.warning-code-box {
  padding: 10px 30px;
  font-weight: 700;
  font-size: 16px;
  border: 2px solid #000;
  text-transform: uppercase;
}

.warning-code-box.yellow {
  background: rgb(255, 255, 0);
  color: #000;
}

.warning-code-box.orange {
  background: rgb(255, 192, 0);
  color: #000;
}

.warning-code-box.red {
  background: rgb(255, 0, 0);
  color: #fff;
}

.warning-validity {
  margin-left: auto;
  text-align: right;
  font-size: 14px;
}

.warning-validity strong {
  display: block;
  margin-bottom: 5px;
}

.warning-text-hindi {
  font-weight: bold;
  font-size: 1.15em;
  line-height: 1.5;
  margin-bottom: 15px;
  text-align: justify;
}

.warning-text-english {
  font-weight: bold;
  font-size: 1.15em;
  line-height: 1.5;
  margin-bottom: 20px;
  text-align: justify;
}

.guidelines-section {
  border-top: 2px solid #000;
  padding-top: 15px;
}

.guidelines-title {
  font-weight: 700;
  font-size: 16px;
  margin-bottom: 10px;
}

.guidelines-text {
  background: #fff3cd;
  padding: 15px;
  border-radius: 5px;
  font-size: 13.5px;
  line-height: 1.4;
  border-left: 5px solid #ffc107;
}

.guidelines-text.orange {
  background: #ffe0b2;
  border-left-color: #ff9800;
}

.guidelines-text.red {
  background: #ffcdd2;
  border-left-color: #f44336;
}

.imd-footer {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding: 15px;
  border-top: 2px solid #000;
  background: #f5f5f5;
  gap: 15px;
}

.warning-legend {
  display: flex;
  gap: 10px;
  align-items: center;
  width: 100%;
}

.warning-legend b,
.warning-legend strong,
.warning-legend span {
  white-space: nowrap;
  flex-shrink: 0;
}

.legend-item {
  padding: 8px 10px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid #000;
  flex: 1; /* चारों कोनों को 1/4 हिस्से में बांटने के लिए */
  text-align: center;
  display: flex;
  justify-content: center;
  align-items: center;
}

.legend-item.green {
  background: #4caf50;
  color: white;
}

.legend-item.yellow {
  background: #ffeb3b;
  color: #000;
}

.legend-item.orange {
  background: #ff9800;
  color: #fff;
}

.legend-item.red {
  background: #f44336;
  color: #fff;
}

.forecasting-officer {
  text-align: right;
  font-size: 14px;
  order: -1; /* इसे सबसे ऊपर लाने के लिए */
  width: 100%;
}

.forecasting-officer strong {
  display: block;
}

/* Export Buttons */
.export-section {
  display: flex;
  gap: 10px;
  justify-content: center;
  align-items: center;
  margin-top: 20px;
  flex-wrap: wrap;
}

/* Search Box */
.search-box {
  width: 100%;
  padding: 10px;
  border: 2px solid #dee2e6;
  border-radius: 6px;
  margin-bottom: 10px;
  font-size: 14px;
}

.search-box:focus {
  outline: none;
  border-color: #667eea;
}

/* Custom Input Box Styling */
.custom-input-box {
  width: 100%;
  padding: 10px 15px 10px 38px;
  border: 2px solid #dee2e6;
  border-radius: 8px;
  font-size: 14px;
  color: #2c3e50;
  background-color: #ffffff;
  transition: all 0.3s ease;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05);
}

.custom-input-box:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.25);
  background-color: #f8faff;
}

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

/* Select All / Clear Buttons */
.selection-actions {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
}

.btn-small {
  padding: 6px 12px;
  font-size: 12px;
  flex: 1;
}

/* Loading Overlay */
body.nowcast-page .loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  flex-direction: column;
}

body.nowcast-page .loading-overlay.active {
  display: flex;
}

/* Intensity Selector */
.intensity-selector {
  margin-top: 10px;
  padding: 8px;
  width: 100%;
  border: 2px solid #dee2e6;
  border-radius: 6px;
  font-size: 13px;
}

.intensity-selector:focus {
  outline: none;
  border-color: #667eea;
}

/* Map Label Style */
.district-label {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  color: white !important;
  font-weight: 700 !important;
  text-shadow:
    1px 1px 3px black,
    -1px -1px 3px black,
    1px -1px 3px black,
    -1px 1px 3px black !important;
  font-size: var(--label-font-size, 11px) !important;
  text-align: center;
  pointer-events: none !important; /* Ensure click passes through label to map */
  transition: font-size 0.2s ease-in-out !important; /* Smooth font size scaling */
}

/* Remove default Leaflet tooltip arrow */
.district-label::before,
.district-label::after {
  display: none !important;
}

/* Time Module Styles */
.manual-time-controls {
  margin-top: 8px;
  text-align: right;
  border-top: 1px dashed #ccc;
  padding-top: 5px;
}
.btn-time-edit {
  background: #007bff;
  color: white;
  border: none;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 11px;
  cursor: pointer;
}
.btn-time-edit.active {
  background: #dc3545; /* Red when manual mode is active */
}
.time-input {
  padding: 4px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 12px;
  margin-right: 5px;
}
.btn-time-apply {
  background: #28a745;
  color: white;
  border: none;
  padding: 5px 10px;
  border-radius: 4px;
  font-size: 12px;
  cursor: pointer;
}

/* ========================================================================== */
/* ======================= ANIMATED DOWNLOAD BUTTONS ======================== */
/* ========================================================================== */
.anim-dl-label {
  background-color: #ffffff;
  border: 2px solid rgb(91, 91, 240);
  display: flex;
  align-items: center;
  border-radius: 50px;
  width: 150px;
  cursor: pointer;
  transition: all 0.4s ease;
  padding: 5px;
  position: relative;
  margin: 0;
  box-sizing: border-box;
  height: 54px;
}

body.dark-mode .anim-dl-label {
  background-color: #2d3436;
}

.anim-dl-label:hover {
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
  transform: translateY(-2px);
}

.anim-dl-label::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: #fff;
  width: 8px;
  height: 8px;
  transition: all 0.4s ease;
  border-radius: 100%;
  margin: auto;
  opacity: 0;
  visibility: hidden;
}

.anim-dl-label .anim-dl-input {
  display: none;
}

.anim-dl-label .anim-dl-title {
  font-size: 16px;
  font-weight: 700;
  transition: all 0.4s ease;
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  text-align: center;
  margin: 0;
  width: calc(100% - 60px);
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
}

.anim-dl-label .anim-dl-title:last-child {
  opacity: 0;
  visibility: hidden;
  color: #28a745 !important;
}

.anim-dl-label .anim-dl-circle {
  height: 40px;
  width: 40px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: all 0.4s ease;
  position: relative;
  box-shadow: 0 0 0 0 rgb(255, 255, 255);
  overflow: hidden;
  flex-shrink: 0;
}

.anim-dl-label .anim-dl-circle .anim-dl-icon {
  color: #fff;
  width: 22px;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  transition: all 0.4s ease;
}

.anim-dl-label .anim-dl-circle .anim-dl-square {
  aspect-ratio: 1;
  width: 12px;
  border-radius: 2px;
  background-color: #fff;
  opacity: 0;
  visibility: hidden;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  transition: all 0.4s ease;
}

.anim-dl-label .anim-dl-circle::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  background-color: rgba(0, 0, 0, 0.2);
  width: 100%;
  height: 0;
  transition: all 0.4s ease;
}

.anim-dl-label:has(.anim-dl-input:checked) {
  width: 54px;
  animation: animDlInstalled 0.4s ease 3.5s forwards;
}
.anim-dl-label:has(.anim-dl-input:checked)::before {
  animation: animDlRotate 3s ease-in-out 0.4s forwards;
}
.anim-dl-label .anim-dl-input:checked + .anim-dl-circle {
  animation:
    animDlPulse 1s forwards,
    animDlCircleDelete 0.2s ease 3.5s forwards;
  rotate: 180deg;
}
.anim-dl-label .anim-dl-input:checked + .anim-dl-circle::before {
  animation: animDlInstalling 3s ease-in-out forwards;
}
.anim-dl-label .anim-dl-input:checked + .anim-dl-circle .anim-dl-icon {
  opacity: 0;
  visibility: hidden;
}
.anim-dl-label .anim-dl-input:checked ~ .anim-dl-circle .anim-dl-square {
  opacity: 1;
  visibility: visible;
}
.anim-dl-label .anim-dl-input:checked ~ .anim-dl-title {
  opacity: 0;
  visibility: hidden;
}
.anim-dl-label .anim-dl-input:checked ~ .anim-dl-title:last-child {
  animation: animDlShowMessage 0.4s ease 3.5s forwards;
}

/* --- Theme Variants --- */
.anim-dl-label.dl-pdf {
  border-color: #d32f2f;
}
.anim-dl-label.dl-pdf .anim-dl-title {
  color: #d32f2f;
}
.anim-dl-label.dl-pdf .anim-dl-circle {
  background-color: #d32f2f;
}

.anim-dl-label.dl-img {
  border-color: #00897b;
}
.anim-dl-label.dl-img .anim-dl-title {
  color: #00897b;
}
.anim-dl-label.dl-img .anim-dl-circle {
  background-color: #00897b;
}

@keyframes animDlPulse {
  0% {
    scale: 0.95;
    box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.7);
  }
  70% {
    scale: 1;
    box-shadow: 0 0 0 12px rgba(255, 255, 255, 0);
  }
  100% {
    scale: 0.95;
    box-shadow: 0 0 0 0 rgba(255, 255, 255, 0);
  }
}
@keyframes animDlInstalling {
  from {
    height: 0;
  }
  to {
    height: 100%;
  }
}
@keyframes animDlRotate {
  0% {
    transform: rotate(-90deg) translate(25px) rotate(0);
    opacity: 1;
    visibility: visible;
  }
  99% {
    transform: rotate(270deg) translate(25px) rotate(270deg);
    opacity: 1;
    visibility: visible;
  }
  100% {
    opacity: 0;
    visibility: hidden;
  }
}
@keyframes animDlInstalled {
  100% {
    width: 150px;
    border-color: #28a745;
  }
}
@keyframes animDlCircleDelete {
  100% {
    opacity: 0;
    visibility: hidden;
  }
}
@keyframes animDlShowMessage {
  100% {
    opacity: 1;
    visibility: visible;
    right: 15px;
  }
}

/* ========================================================================== */
/* ======================= COPY BUTTON SLIDE ANIMATION ====================== */
/* ========================================================================== */
.copy-anim-btn {
  position: relative;
  overflow: hidden;
  background: #ff9800;
  color: white;
  border: none;
  height: 54px;
  padding: 0;
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.3s ease;
  width: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.copy-anim-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(255, 152, 0, 0.4);
}

.copy-anim-bg {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 0%;
  background: #28a745;
  z-index: 1;
  transition: width 0.5s ease-in-out;
}

.copy-anim-btn.is-copied .copy-anim-bg {
  width: 100%;
}

.copy-anim-content {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
}

.copy-anim-text {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 600;
  font-size: 16px;
  transition:
    transform 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55),
    opacity 0.4s ease;
}

.base-text {
  transform: translateY(0);
  opacity: 1;
}

.success-text {
  transform: translateY(100%);
  opacity: 0;
}

.copy-anim-btn.is-copied .base-text {
  transform: translateY(-100%);
  opacity: 0;
}

.copy-anim-btn.is-copied .success-text {
  transform: translateY(0);
  opacity: 1;
}

/* ========================================================================== */
/* ===================== EXPORT SOCIAL BUTTONS ANIMATION ==================== */
/* ========================================================================== */
.export-action-btn {
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
  height: 54px;
}

.export-action-btn:hover {
  transform: translateY(-5px) scale(1.05) !important;
  z-index: 10;
}

/* Platform specific glowing shadows on hover */
.btn-whatsapp:hover {
  box-shadow: 0 8px 15px rgba(37, 211, 102, 0.4) !important;
}
.btn-facebook:hover {
  box-shadow: 0 8px 15px rgba(24, 119, 242, 0.4) !important;
}
.btn-twitter:hover {
  box-shadow: 0 8px 15px rgba(0, 0, 0, 0.4) !important;
  background: #333333 !important; /* Slightly lighter black on hover */
}
.btn-print:hover {
  box-shadow: 0 8px 15px rgba(108, 117, 125, 0.4) !important;
}
.btn-email-share:hover {
  box-shadow: 0 8px 15px rgba(23, 162, 184, 0.4) !important;
}

/* ========================================================================== */
/* ======================== ADVANCED WEATHER PANEL ========================== */
/* ========================================================================== */
.advanced-layer-panel {
  position: absolute;
  top: 60px;
  right: 20px;
  width: 320px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(0, 0, 0, 0.1);
  z-index: 5000;
  transform: translateX(120%);
  opacity: 0;
  pointer-events: none;
  transition:
    transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275),
    opacity 0.3s;
  display: flex;
  flex-direction: column;
  max-height: calc(100% - 80px);
}

.advanced-layer-panel.open {
  transform: translateX(0);
  opacity: 1;
  pointer-events: auto;
}

.advanced-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px;
  background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
  color: white;
  border-top-left-radius: 12px;
  border-top-right-radius: 12px;
}

.advanced-panel-header h4 {
  margin: 0;
  font-size: 15px;
}

.close-panel-btn {
  background: transparent;
  border: none;
  color: white;
  font-size: 18px;
  cursor: pointer;
  transition: transform 0.2s;
}
.close-panel-btn:hover {
  transform: scale(1.2);
}

.advanced-panel-content {
  padding: 15px;
  overflow-y: auto;
  flex: 1;
}
.adv-layer-section {
  margin-bottom: 20px;
}
.adv-layer-section h5 {
  margin: 0 0 10px 0;
  color: #2c3e50;
  border-bottom: 2px solid #e9ecef;
  padding-bottom: 5px;
  font-size: 14px;
}
.adv-layer-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  padding: 8px;
  background: #f8f9fa;
  border-radius: 6px;
  transition: background 0.2s;
}
.adv-layer-item:hover {
  background: #e9ecef;
}
.adv-layer-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: #495057;
  margin: 0;
  flex: 1;
}
.adv-layer-label input[type="checkbox"] {
  transform: scale(1.2);
  cursor: pointer;
}
.adv-opacity-slider {
  width: 60px;
  cursor: pointer;
  accent-color: #667eea;
}

@media (max-width: 768px) {
  .advanced-layer-panel {
    top: auto;
    bottom: 0;
    right: 0;
    width: 100%;
    border-radius: 20px 20px 0 0;
    transform: translateY(100%);
  }
  .advanced-layer-panel.open {
    transform: translateY(0);
  }
  .advanced-panel-header {
    border-radius: 20px 20px 0 0;
  }
}

/* --- Lightning Mock Animation --- */
.lightning-icon {
  animation: flashStrike 0.6s ease-out forwards;
}
@keyframes flashStrike {
  0% {
    opacity: 1;
    transform: scale(1.5) translateY(-50%);
    filter: drop-shadow(0 0 10px #f1c40f);
  }
  100% {
    opacity: 0;
    transform: scale(1) translateY(0);
    filter: none;
  }
}

/* ========================================================================== */
/* ====================== UI CLICK & GLOW ANIMATIONS ======================== */
/* ========================================================================== */

/* Screen Edge Glow Overlay */
#screenEdgeGlow {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  z-index: 99999;
  opacity: 0;
  transition:
    opacity 0.6s ease-out,
    box-shadow 0.6s ease-out;
  box-shadow: inset 0 0 0 0 transparent;
}

#screenEdgeGlow.glow-yellow {
  opacity: 1;
  box-shadow: inset 0 0 80px 15px rgba(255, 235, 59, 0.7);
}
#screenEdgeGlow.glow-orange {
  opacity: 1;
  box-shadow: inset 0 0 80px 15px rgba(255, 152, 0, 0.7);
}
#screenEdgeGlow.glow-red {
  opacity: 1;
  box-shadow: inset 0 0 80px 15px rgba(244, 67, 54, 0.7);
}

/* Smooth Checkbox & Radio Button Click Animations */
body.nowcast-page .district-checkbox:active,
body.nowcast-page .phenomena-item:active,
body.nowcast-page .warning-option:active,
body.nowcast-page .wind-option:active,
body.nowcast-page .region-box:active {
  transform: scale(0.95);
  transition: transform 0.1s ease;
}

/* Radio/Checkbox Input Pulse */
input[type="checkbox"],
input[type="radio"] {
  transition: transform 0.2s ease-in-out;
}
input[type="checkbox"]:active,
input[type="radio"]:active {
  transform: scale(0.7);
}
input[type="checkbox"]:checked,
input[type="radio"]:checked {
  animation: checkPulse 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes checkPulse {
  0% {
    transform: scale(0.7);
  }
  50% {
    transform: scale(1.3);
  }
  100% {
    transform: scale(1.15);
  }
}

/* Crosshair Icon Styling */
.crosshair-icon {
  pointer-events: none;
}

/* Lightning Flash Animation */
.lightning-flash {
  animation: flash 0.8s ease-out;
}

@keyframes flash {
  0% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.8;
    transform: scale(1.2);
  }
  100% {
    opacity: 0;
    transform: scale(1.5);
  }
}

/* Wind Error Message */
.wind-error {
  pointer-events: none;
}

/* Overlay dropdown styling enhancement */
#overlaysDropdown label:hover {
  background-color: #f0f0f0;
}

#overlaysDropdown input[type="checkbox"] {
  margin-right: 8px;
  transform: scale(1.2);
}

/* Risk Matrix Cells Transition */
.rm-cell {
  border-radius: 2px;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  opacity: 0.2;
}
