/* Dark Mode (Default) */
body {
  background: #222 !important;
  color: #eee !important;
}

/* Ensure navigation stays above all content */
.navbar {
  position: relative;
  z-index: 9999;
}

.navbar-nav {
  position: relative;
  z-index: 9999;
}

.nav-item {
  position: relative;
  z-index: 9999;
}

/* Override Bootstrap's default form element styles */
button, input, optgroup, select, textarea {
  margin: 0;
  font-family: inherit;
  font-size: inherit !important;
  line-height: inherit !important;
}

/* Dark mode improvements for weather data visibility */
body .station-observations-label {
  color: #ffffff !important;
  font-weight: 600 !important;
}

body .barometer,
body .dew-point,
body .humidity,
body .daily-rain,
body .rain-rate {
  color: #ffffff !important;
  font-weight: 500 !important;
}

/* Dark mode improvements for wind data */
body .wind-speed,
body .wind-gust,
body .wind-direction {
  color: #ffffff !important;
  font-weight: 600 !important;
}

/* Dark mode improvements for pressure and trend indicators */
body .pressure-trend,
body .dew-trend,
body .humidity-trend {
  color: #cccccc !important;
  font-weight: 500 !important;
}

/* Dark mode improvements for any other weather data text */
body .station-observations div,
body .station-observations span {
  color: #ffffff !important;
}

/* Dark mode improvements for weather data containers */
body .wind-block,
body .station-observations {
  background: #2a2a2a !important;
  border: 2px solid #444 !important;
}

/* Light Mode Styles */
body.light-mode {
  background: #f8f9fa !important;
  color: #212529 !important;
}

body.light-mode .navbar {
  background: linear-gradient(135deg, #007bff 0%, #0056b3 100%) !important;
  position: relative;
  z-index: 9999;
}

/* Enhanced light mode navigation styles for better visibility */
body.light-mode .navbar-nav .nav-link {
  color: #fff !important;
  font-weight: 500 !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3) !important;
}

body.light-mode .navbar-nav .nav-link:hover {
  color: #fff !important;
  background-color: rgba(255, 255, 255, 0.25) !important;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5) !important;
}

body.light-mode .navbar-nav .nav-link.active {
  color: #ffffff !important;
  background-color: rgba(255, 255, 255, 0.15) !important;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5) !important;
}

/* Remove the duplicate and conflicting navigation styles */
body.light-mode .navbar .navbar-nav .nav-link {
  color: #ffffff !important;
  background-color: transparent !important;
  border: none !important;
  padding: 0.75rem 1rem !important;
  margin: 0 0.25rem !important;
  font-size: inherit !important;
  font-weight: 500 !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3) !important;
  border-radius: 6px !important;
  transition: background-color 0.3s ease !important;
}

/* Ensure navigation items are compact */
body.light-mode .navbar-nav .nav-item {
  margin: 0 !important;
  padding: 0 !important;
  flex-shrink: 0 !important;
}

/* Force compact navigation layout */
body.light-mode .navbar-nav {
  align-items: center !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  gap: 0 !important;
}

/* Ensure toggle is visible by making navigation compact */
body.light-mode .navbar .container-fluid {
  justify-content: space-between !important;
  align-items: center !important;
  flex-wrap: nowrap !important;
}

/* Make navigation extremely compact to match dark mode */
body.light-mode .navbar-nav .nav-link {
  padding: 0.5rem 0.75rem !important;
  margin: 0 0.1rem !important;
  font-size: 0.9rem !important;
  font-weight: 500 !important;
  color: #ffffff !important;
  background-color: transparent !important;
  border: none !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3) !important;
  border-radius: 4px !important;
  transition: background-color 0.2s ease !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  max-width: 120px !important;
}

/* Fix navigation to exactly match dark mode sizing */
body.light-mode .navbar-nav .nav-link {
  padding: 0.75rem 1rem !important;
  margin: 0 0.25rem !important;
  font-size: inherit !important;
  font-weight: 500 !important;
  color: #ffffff !important;
  background-color: transparent !important;
  border: none !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3) !important;
  border-radius: 6px !important;
  transition: background-color 0.3s ease !important;
  white-space: nowrap !important;
  overflow: visible !important;
  text-overflow: clip !important;
  max-width: none !important;
  width: auto !important;
}

/* Ensure navigation items match dark mode exactly */
body.light-mode .navbar-nav .nav-item {
  margin: 0 0.25rem !important;
  padding: 0 !important;
  flex-shrink: 0 !important;
  width: auto !important;
  max-width: none !important;
}

/* Force navigation layout to match dark mode exactly */
body.light-mode .navbar-nav {
  gap: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  flex-shrink: 0 !important;
  width: auto !important;
  max-width: none !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
}

/* Make light mode navigation exactly match dark mode */
body.light-mode .navbar-nav .nav-link {
  padding: 0.75rem 1rem !important;
  margin: 0 0.25rem !important;
  font-size: inherit !important;
  font-weight: 500 !important;
  color: #ffffff !important;
  background-color: transparent !important;
  border: none !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3) !important;
  border-radius: 6px !important;
  transition: background-color 0.3s ease !important;
  white-space: nowrap !important;
  overflow: visible !important;
  text-overflow: clip !important;
  max-width: none !important;
  width: auto !important;
}

/* Reset navigation to match dark mode exactly */
body.light-mode .navbar-nav .nav-item {
  margin: 0 0.25rem !important;
  padding: 0 !important;
  flex-shrink: 0 !important;
  width: auto !important;
  max-width: none !important;
}

/* Use exact dark mode layout */
body.light-mode .navbar .container-fluid {
  justify-content: flex-start !important;
  align-items: center !important;
  flex-wrap: nowrap !important;
  width: 100% !important;
  max-width: none !important;
}

body.light-mode .navbar-brand {
  flex-shrink: 0 !important;
  max-width: none !important;
  width: auto !important;
  margin-right: auto !important;
}

body.light-mode .navbar-nav {
  margin-left: auto !important;
  margin-right: 0 !important;
}

/* COMPLETELY RESET - Use only essential light mode styles that match dark mode */
body.light-mode .navbar-nav .nav-link {
  color: rgba(255, 255, 255, 0.8) !important;
  background-color: transparent !important;
  border: none !important;
  padding: 0.75rem 1rem !important;
  margin: 0 0.25rem !important;
  font-size: inherit !important;
  font-weight: inherit !important;
  text-shadow: none !important;
  border-radius: 0 !important;
  transition: color 0.3s ease !important;
}

body.light-mode .navbar-nav .nav-link:hover {
  color: rgba(255, 255, 255, 1) !important;
  background-color: transparent !important;
}

body.light-mode .navbar-nav .nav-link.active {
  color: #fff !important;
  background-color: rgba(255, 255, 255, 0.1) !important;
}

/* Ensure brand section doesn't interfere with navigation */
body.light-mode .navbar-brand {
  flex-shrink: 0 !important;
  max-width: none !important;
  width: auto !important;
  margin-right: 1rem !important;
}

/* Remove any width constraints that might cause truncation */
body.light-mode .navbar .container-fluid {
  justify-content: space-between !important;
  align-items: center !important;
  flex-wrap: nowrap !important;
  width: 100% !important;
  max-width: none !important;
}

/* Remove any blue borders that might be appearing */
body.light-mode .navbar-nav .nav-link,
body.light-mode .navbar-nav .nav-link:hover,
body.light-mode .navbar-nav .nav-link:focus,
body.light-mode .navbar-nav .nav-link:active {
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
}

/* Force navigation to be as compact as possible */
body.light-mode .navbar-nav {
  gap: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  flex-shrink: 1 !important;
}

body.light-mode .navbar-nav .nav-item {
  margin: 0 !important;
  padding: 0 !important;
  flex-shrink: 0 !important;
  max-width: 120px !important;
}

/* Ensure brand section doesn't take too much space */
body.light-mode .navbar-brand {
  flex-shrink: 0 !important;
  max-width: 300px !important;
}

body.light-mode .brand-name {
  font-size: 1.3rem !important;
  line-height: 1.1 !important;
}

body.light-mode .brand-subtitle {
  font-size: 0.75rem !important;
  line-height: 1.1 !important;
}

/* Force toggle to be visible */
body.light-mode .navbar-nav .nav-item.toggle-item {
  margin-left: 0.25rem !important;
  flex-shrink: 0 !important;
  position: relative !important;
  right: 0 !important;
}

/* Ensure dropdown toggles are visible */
body.light-mode .navbar .navbar-nav .dropdown-toggle {
  color: #fff !important;
  font-weight: 500 !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3) !important;
}

/* Ensure all header text elements are visible in light mode */
body.light-mode .navbar .navbar-brand,
body.light-mode .navbar .brand-text,
body.light-mode .navbar .brand-name,
body.light-mode .navbar .brand-subtitle {
  color: #fff !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3) !important;
  opacity: 1 !important;
  visibility: visible !important;
}

/* Force navigation text to be visible with maximum specificity */
body.light-mode .navbar.navbar-expand-lg.navbar-dark.bg-dark .navbar-nav .nav-link {
  color: #fff !important;
  font-weight: 500 !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3) !important;
  opacity: 1 !important;
  visibility: visible !important;
}

/* Ultra-specific navigation text visibility - override everything */
body.light-mode .navbar .navbar-nav .nav-item .nav-link,
body.light-mode .navbar .navbar-nav .nav-item .dropdown-toggle {
  color: #ffffff !important;
  font-weight: 600 !important;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5) !important;
  opacity: 1 !important;
  visibility: visible !important;
  display: inline-block !important;
}

/* Force all navigation elements to be visible */
body.light-mode .navbar .navbar-nav .nav-item .nav-link::before,
body.light-mode .navbar .navbar-nav .nav-item .nav-link::after {
  display: none !important;
}

/* Override any potential Bootstrap or other CSS that might be hiding text */
body.light-mode .navbar .navbar-nav .nav-link {
  color: #ffffff !important;
  background-color: transparent !important;
  border: none !important;
  text-decoration: none !important;
  font-size: inherit !important;
  line-height: inherit !important;
  text-align: center !important;
  white-space: nowrap !important;
  vertical-align: middle !important;
  cursor: pointer !important;
  user-select: none !important;
  -webkit-user-select: none !important;
  -moz-user-select: none !important;
  -ms-user-select: none !important;
}

/* Clean, proper light mode navigation styles */
body.light-mode .navbar .navbar-nav .nav-link {
  color: #ffffff !important;
  background-color: rgba(255, 255, 255, 0.1) !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  font-size: 16px !important;
  font-weight: 500 !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3) !important;
  border-radius: 6px !important;
  padding: 8px 16px !important;
  margin: 0 4px !important;
  transition: all 0.3s ease !important;
}

/* Fix navigation bar height to match dark mode exactly */
body.light-mode .navbar {
  min-height: auto !important;
  height: auto !important;
  padding: 0.5rem 1rem !important;
}

/* Make navigation links exactly match dark mode size */
body.light-mode .navbar-nav .nav-link {
  padding: 0.75rem 1rem !important;
  margin: 0 0.25rem !important;
  line-height: 1.2 !important;
  height: auto !important;
  min-height: auto !important;
  font-size: inherit !important;
  border: none !important;
  background-color: transparent !important;
  border-radius: 6px !important;
  transition: background-color 0.3s ease !important;
}

/* Remove extra styling that's causing size issues */
body.light-mode .navbar-nav .nav-link:hover {
  color: #ffffff !important;
  background-color: rgba(255, 255, 255, 0.1) !important;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5) !important;
  transform: none !important;
}

body.light-mode .navbar-nav .nav-link.active {
  color: #ffffff !important;
  background-color: rgba(255, 255, 255, 0.15) !important;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5) !important;
}

/* Ensure navigation doesn't expand vertically */
body.light-mode .navbar-nav {
  align-items: center !important;
  flex-direction: row !important;
}

body.light-mode .navbar-nav .nav-item {
  margin: 0 !important;
  padding: 0 !important;
}

/* Fix any potential overflow issues */
body.light-mode .navbar .container-fluid {
  max-height: none !important;
  overflow: visible !important;
}

/* Ensure toggle switch is visible */
body.light-mode .navbar-nav .nav-item.toggle-item {
  margin-left: 0.5rem !important;
  flex-shrink: 0 !important;
}

/* Additional height fixes for navigation consistency */
body.light-mode .navbar-brand {
  padding: 0 !important;
  margin: 0 !important;
  height: auto !important;
  line-height: 1.2 !important;
}

body.light-mode .brand-text {
  line-height: 1.2 !important;
  margin: 0 !important;
  padding: 0 !important;
}

body.light-mode .brand-name {
  font-size: 1.5rem !important;
  line-height: 1.2 !important;
  margin: 0 !important;
}

body.light-mode .brand-subtitle {
  font-size: 0.85rem !important;
  line-height: 1.2 !important;
  margin: 0 !important;
}

/* Force consistent navbar height */
body.light-mode .navbar > .container-fluid {
  height: auto !important;
  min-height: auto !important;
  max-height: none !important;
}

/* Ensure logo doesn't cause height issues */
body.light-mode .logo-img {
  height: 100px !important;
  max-height: 100px !important;
  width: auto !important;
  object-fit: contain !important;
}

body.light-mode .navbar-nav .nav-link:hover {
  color: #ffffff !important;
  background-color: rgba(255, 255, 255, 0.2) !important;
  border-color: rgba(255, 255, 255, 0.4) !important;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5) !important;
  transform: translateY(-1px) !important;
}

body.light-mode .navbar .navbar-nav .nav-link.active {
  color: #ffffff !important;
  background-color: rgba(255, 255, 255, 0.25) !important;
  border-color: rgba(255, 255, 255, 0.5) !important;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5) !important;
}

/* TEST 3 - make navigation links extremely obvious */
/* Removed debug styles that were adding blue borders */

/* Light mode dropdown improvements */
body.light-mode .dropdown-menu {
  background: linear-gradient(135deg, #007bff 0%, #0056b3 100%) !important;
  border: 1px solid #0056b3 !important;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2) !important;
}

body.light-mode .dropdown-item {
  color: #fff !important;
  font-weight: 500 !important;
}

body.light-mode .dropdown-item:hover {
  background-color: rgba(255, 255, 255, 0.2) !important;
  color: #fff !important;
}

body.light-mode .dropdown-item:focus {
  background-color: rgba(255, 255, 255, 0.25) !important;
  color: #fff !important;
}

/* Light mode navbar brand improvements */
body.light-mode .navbar-brand {
  color: #fff !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3) !important;
}

body.light-mode .brand-name {
  color: #fff !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3) !important;
}

body.light-mode .brand-subtitle {
  color: rgba(255, 255, 255, 0.9) !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3) !important;
}

/* Light mode mobile navigation improvements */
body.light-mode .navbar-toggler {
  border-color: rgba(255, 255, 255, 0.6) !important;
}

body.light-mode .navbar-toggler:focus {
  box-shadow: 0 0 0 0.2rem rgba(255, 255, 255, 0.25) !important;
}

body.light-mode .navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.9%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
}

/* Light mode dropdown toggle arrow */
body.light-mode .dropdown-toggle::after {
  border-top-color: rgba(255, 255, 255, 0.9) !important;
}

body.light-mode .dropdown-toggle:hover::after {
  border-top-color: #fff !important;
}

/* Light mode active dropdown styling */
body.light-mode .dropdown-toggle.show {
  background-color: rgba(255, 255, 255, 0.3) !important;
  color: #fff !important;
}

/* Light mode NEW indicator visibility */
body.light-mode .new-indicator {
  filter: brightness(1.2) contrast(1.2) !important;
}

/* Light mode navigation item spacing and visibility */
body.light-mode .navbar-nav .nav-item {
  margin: 0 0.25rem !important;
}

/* Light mode navigation collapse improvements */
body.light-mode .navbar-collapse {
  background: transparent !important;
}

/* Ensure dropdown menus are properly positioned in light mode */
body.light-mode .dropdown-menu.show {
  display: block !important;
  opacity: 1 !important;
  visibility: visible !important;
}

body.light-mode .card {
  background: #fff !important;
  border: 1px solid #dee2e6 !important;
  color: #333 !important;
  position: relative;
  z-index: 1;
}

body.light-mode .card-header {
  background: linear-gradient(135deg, #e9ecef 0%, #dee2e6 100%) !important;
  border-bottom: 1px solid #dee2e6 !important;
  color: #495057 !important;
}

body.light-mode .card-body {
  color: #333 !important;
}

body.light-mode .form-control {
  background: #fff !important;
  border: 1px solid #ced4da !important;
  color: #495057 !important;
}

body.light-mode .form-control:focus {
  background: #fff !important;
  border-color: #007bff !important;
  color: #495057 !important;
  box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25) !important;
}

body.light-mode .btn-outline-secondary {
  border-color: #6c757d !important;
  color: #6c757d !important;
}

body.light-mode .btn-outline-secondary:hover {
  background: #6c757d !important;
  border-color: #6c757d !important;
  color: #fff !important;
}

body.light-mode .alert-light {
  background: #f8f9fa !important;
  border-color: #dee2e6 !important;
  color: #495057 !important;
}

body.light-mode .text-muted {
  color: #6c757d !important;
}

body.light-mode .text-primary {
  color: #007bff !important;
}

body.light-mode .border-start {
  border-left-color: #dee2e6 !important;
}

body.light-mode .border-danger {
  border-left-color: #dc3545 !important;
}

body.light-mode .border-warning {
  border-left-color: #ffc107 !important;
}

body.light-mode .border-info {
  border-left-color: #17a2b8 !important;
}

body.light-mode .border-secondary {
  border-left-color: #6c757d !important;
}



/* Improved light mode visibility for station info */
body.light-mode .wx-stn-info {
  color: #495057 !important;
  font-weight: 500 !important;
  text-shadow: none !important;
}



/* Light mode improvements for other text elements */
body.light-mode .wx-stn-name h1 {
  color: #2c3e50 !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1) !important;
}

body.light-mode .live-ripple {
  color: #e67e22 !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2) !important;
}

body.light-mode .data-status {
  color: #495057 !important;
}

body.light-mode .status-dot {
  color: #28a745 !important;
}

body.light-mode .last-updated {
  color: #495057 !important;
}

body.light-mode .countdown-timer {
  color: #e67e22 !important;
  font-weight: 600 !important;
}

/* Light mode mobile version link */
body.light-mode a[href*="mobile.php"] {
  color: #e67e22 !important;
  font-weight: 600 !important;
}

body.light-mode a[href*="mobile.php"]:hover {
  color: #d35400 !important;
  text-decoration: underline !important;
}

/* Light mode styles for record alerts */
body.light-mode .alert-warning {
  background-color: #fff3cd !important;
  border-color: #ffeaa7 !important;
  color: #856404 !important;
}

body.light-mode .alert-info {
  background-color: #d1ecf1 !important;
  border-color: #bee5eb !important;
  color: #0c5460 !important;
}

/* Light mode styles for record alert links */
body.light-mode .alert-warning a,
body.light-mode .alert-info a {
  color: #0056b3 !important;
  font-weight: 600 !important;
  text-decoration: underline !important;
}

body.light-mode .alert-warning a:hover,
body.light-mode .alert-info a:hover {
  color: #003d82 !important;
  text-decoration: none !important;
}

/* Light mode styles for station observation labels */
body.light-mode .station-observations-label {
  color: #495057 !important;
  font-weight: 600 !important;
}

/* Light mode styles for observation values */
body.light-mode .barometer,
body.light-mode .dew-point,
body.light-mode .humidity,
body.light-mode .daily-rain,
body.light-mode .rain-rate {
  color: #2c3e50 !important;
  font-weight: 500 !important;
}

/* Light mode styles for any other text elements that might need better contrast */
body.light-mode .text-secondary {
  color: #6c757d !important;
}

body.light-mode .text-success {
  color: #28a745 !important;
}

body.light-mode .text-danger {
  color: #dc3545 !important;
}

body.light-mode .text-warning {
  color: #ffc107 !important;
}

body.light-mode .text-info {
  color: #17a2b8 !important;
}

/* Additional light mode improvements for better visibility */
body.light-mode .card {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
  position: relative;
  z-index: 1;
}

body.light-mode .navbar {
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2) !important;
}

/* Light mode improvements for any inline styled elements */
body.light-mode [style*="color: #ccc"] {
  color: #6c757d !important;
}

body.light-mode [style*="color: #888"] {
  color: #495057 !important;
}

body.light-mode [style*="color: #999"] {
  color: #6c757d !important;
}

/* Light mode improvements for any other potentially low-contrast text */
body.light-mode .text-muted,
body.light-mode .text-secondary {
  color: #6c757d !important;
  font-weight: 500 !important;
}

/* Bootstrap Dark Theme Enhancements */
.navbar-dark {
  background-color: #343a40 !important;
  position: relative;
  z-index: 9999;
}

.navbar-dark .navbar-nav .nav-link {
  color: rgba(255, 255, 255, 0.8) !important;
}

.navbar-dark .navbar-nav .nav-link:hover {
  color: rgba(255, 255, 255, 1) !important;
}

.navbar-dark .navbar-nav .nav-link.active {
  color: #fff !important;
  background-color: rgba(255, 255, 255, 0.1) !important;
}

.dropdown-menu {
  background-color: #343a40 !important;
  border: 1px solid #495057 !important;
  z-index: 99999 !important;
  position: relative;
}

/* Ensure main content stays below navigation */
.container, .container-fluid {
  position: relative;
  z-index: 1;
}

/* Mobile Responsive Enhancements */
@media (max-width: 768px) {
  .logo-img {
    height: 60px !important;
    margin-right: 10px !important;
  }
  
  .navbar-brand {
    font-size: 1rem !important;
  }
  
  .navbar-nav .nav-item.toggle-item {
    margin-left: 0.5em !important;
  }
  
  .form-switch .form-check-input {
    width: 2em !important;
    height: 1.1em !important;
  }
  
  .dashboard-container {
    margin: 16px auto !important;
    padding: 0 8px !important;
  }
  
  .card-body {
    padding: 0.8rem 0.6rem !important;
  }
  
  /* Enhanced mobile temperature display */
  .current-obs-temp {
    font-size: 2.8em !important;
    line-height: 1.1 !important;
    margin-bottom: 8px !important;
  }
  
  /* Fix temperature degree symbol spacing */
  .current-obs-temp sup {
    font-size: 0.6em !important;
    top: -0.5em !important;
    margin-left: 2px !important;
  }
  
  /* Better spacing for current conditions icon */
  .current-obs-icon {
    margin-bottom: 12px !important;
    margin-top: 8px !important;
  }
  
  .current-obs-icon i {
    font-size: 48px !important;
  }
  
  /* Improved current conditions text spacing */
  .current-conditions {
    margin-top: 8px !important;
    margin-bottom: 12px !important;
    font-size: 1em !important;
  }
  
  /* Better spacing for feels like section */
  .current-obs-details {
    margin-top: 8px !important;
    margin-bottom: 12px !important;
    gap: 4px !important;
  }
  
  /* Enhanced summary box spacing */
  .summary-box {
    margin-top: 20px !important;
    padding: 12px !important;
    padding-bottom: 20px !important;
    overflow: visible !important;
  }
  
  .summary-box > div:first-child {
    margin-bottom: 12px !important;
  }
  
  /* Better grid spacing in summary */
  .summary-box div[style*="display:flex"] {
    gap: 10px !important;
  }
  
  .summary-box div[style*="flex:1 1 45%"] {
    padding: 6px 4px !important;
    margin-bottom: 8px !important;
  }
  
  /* Improved wind compass sizing */
  .wind-compass {
    width: 100px !important;
    height: 100px !important;
  }
  
  /* Better wind info spacing */
  .wind-info {
    margin-top: 12px !important;
  }
  
  .wind-info > div:first-child {
    gap: 16px !important;
    margin-bottom: 8px !important;
  }
  
  /* Enhanced forecast cards */
  .forecast-icon {
    font-size: 1.6rem !important;
  }
  
  .forecast-card {
    min-width: auto !important;
    padding: 12px !important;
    margin-bottom: 8px !important;
  }
  
  /* Better sun/moon container spacing */
  .sun-moon-container {
    flex-direction: column !important;
    gap: 1.5rem !important;
    padding: 16px !important;
  }
  
  .sun-moon-block {
    flex-direction: column !important;
    gap: 1.2em !important;
  }
  
  .sun-block, .moon-block {
    width: 100% !important;
  }
  
  .sun-moon-main-icon {
    font-size: 1.8rem !important;
    margin-bottom: 8px !important;
  }
  
  /* Enhanced alerts spacing */
  .nws-alerts-box {
    margin: 16px auto !important;
    padding: 16px !important;
  }
  
  .nws-alerts-none {
    margin: 16px auto !important;
    padding: 16px !important;
    font-size: 1em !important;
  }
  
  /* Better data status spacing */
  .data-status {
    margin-top: 12px !important;
    margin-bottom: 8px !important;
    gap: 8px !important;
  }
  
  .countdown-timer {
    margin-left: 8px !important;
  }
  
  /* Touch-friendly improvements */
  .nav-link, .dropdown-item {
    padding: 0.75rem 1rem !important;
    min-height: 44px !important;
  }
  
  .form-check-input {
    min-width: 44px !important;
    min-height: 44px !important;
  }
  
  /* Better spacing for mobile */
  .card {
    margin-bottom: 1rem !important;
  }
  
  /* Remove the problematic navbar-nav rule that was breaking horizontal layout */
  /* .navbar-nav {
    padding: 1rem 0 !important;
  } */
  
  /* Enhanced station info spacing */
  .wx-stn-info-container {
    padding: 20px 0 !important;
    margin-bottom: 24px !important;
  }
  
  .wx-stn-name h1 {
    font-size: 22px !important;
    margin-bottom: 8px !important;
  }
  
  .wx-stn-info {
    font-size: 13px !important;
    margin-bottom: 12px !important;
  }
  
  /* Better temperature row spacing */
  .temperature-row {
    margin-bottom: 24px !important;
  }
  
  /* Enhanced current obs block spacing */
  .current-obs-block {
    gap: 16px !important;
    padding: 20px 12px !important;
  }
  
  /* Better wind block spacing */
  .wind-block {
    gap: 16px !important;
    padding: 20px 12px !important;
  }
  
  /* Improved station observations spacing */
  .station-observations {
    padding: 16px 12px !important;
    margin-bottom: 16px !important;
  }
  
  /* Better UV and solar blocks */
  .uv-index-block, .solar-radiation-block {
    padding: 16px 12px !important;
    margin-bottom: 16px !important;
  }
  
  /* Enhanced weather obs bottom */
  .weather-obs-bottom {
    padding: 16px 12px !important;
  }
}

@media (max-width: 576px) {
  .logo-img {
    height: 50px !important;
    margin-right: 8px !important;
  }
  
  .navbar-brand {
    font-size: 0.9rem !important;
  }
  
  /* Even smaller temperature for very small screens */
  .current-obs-temp {
    font-size: 2.4em !important;
  }
  
  /* Smaller wind compass for very small screens */
  .wind-compass {
    width: 90px !important;
    height: 90px !important;
  }
  
  /* Smaller forecast icons */
  .forecast-icon {
    font-size: 1.4rem !important;
  }
  
  /* Smaller station name */
  .wx-stn-name h1 {
    font-size: 20px !important;
  }
  
  .wx-stn-info {
    font-size: 12px !important;
  }
  
  /* Smaller forecast title */
  .forecast-title {
    font-size: 18px !important;
  }
  
  /* Tighter card body padding */
  .card-body {
    padding: 0.5rem 0.3rem !important;
  }
  
  /* Smaller sun/moon icons */
  .sun-moon-main-icon {
    font-size: 1.6rem !important;
  }
  
  .sun-times, .moon-times {
    font-size: 0.8rem !important;
  }
  
  .sunrise-set-image i, .moonrise-set-image i {
    font-size: 1.1rem !important;
  }
  
  /* Extra small screen improvements */
  .navbar-nav .nav-item {
    border-bottom: 1px solid rgba(255,255,255,0.1) !important;
  }
  
  .navbar-nav .nav-item:last-child {
    border-bottom: none !important;
  }
  
  .dropdown-menu {
    /* Keep Bootstrap's default border and shadow for proper dropdown appearance */
    /* border: none !important; */
    /* box-shadow: none !important; */
  }
  
  .dropdown-item {
    border-bottom: 1px solid rgba(255,255,255,0.1) !important;
  }
  
  .dropdown-item:last-child {
    border-bottom: none !important;
  }
  
  /* Enhanced spacing for very small screens */
  .current-obs-block {
    padding: 16px 8px !important;
    gap: 12px !important;
  }
  
  .wind-block {
    padding: 16px 8px !important;
    gap: 12px !important;
  }
  
  .station-observations, .uv-index-block, .solar-radiation-block, .weather-obs-bottom {
    padding: 12px 8px !important;
    margin-bottom: 12px !important;
  }
  
  /* Better summary box for very small screens */
  .summary-box {
    padding: 10px !important;
    padding-bottom: 18px !important;
  }
  
  .summary-box div[style*="flex:1 1 45%"] {
    padding: 4px 2px !important;
    margin-bottom: 6px !important;
  }
  
  /* Improved data status for very small screens */
  .data-status {
    font-size: 0.95em !important;
    gap: 6px !important;
  }
  
  .countdown-timer {
    margin-left: 6px !important;
  }
}

.sun-moon-container {
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    margin: 1rem 0;
}

.sun-info, .moon-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.sun-info i, .moon-info i {
    font-size: 2rem;
    color: #FFD700; /* Gold color for sun */
}

.moon-info i {
    color: #E6E6FA; /* Light lavender for moon */
}

.sun-times, .moon-times {
    font-size: 0.9rem;
    line-height: 1.4;
}

.sun-times div, .moon-times div {
    margin: 0.2rem 0;
}

.sunrise-set-image i {
    font-size: 1.5rem;
    color: #FFD700; /* Gold color for sun */
    margin-right: 0.5rem;
}

.sunrise-set-image i.fa-moon {
    color: #E6E6FA; /* Light lavender for moon */
}

.sunrise-set {
    display: flex;
    align-items: center;
    margin: 0.5rem 0;
}

.moonrise-set {
    display: flex;
    align-items: center;
    margin: 0.5rem 0;
}

.moonrise-set-image i {
    font-size: 1.5rem;
    color: #E6E6FA; /* Light lavender for moon */
    margin-right: 0.5rem;
}

.moonrise-value, .moonset-value {
    font-size: 0.9rem;
}

.sun-moon-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.sunrise-set-image, .moonrise-set-image {
    display: flex;
    align-items: center;
}

.sunrise-label, .moonrise-label {
    font-size: 0.9rem;
    margin-right: 0.5rem;
}

.sunrise-value, .sunset-value, .moonrise-value, .moonset-value {
    font-size: 0.9rem;
}

.sunset-label, .moonset-label {
    font-size: 0.9rem;
    margin-left: 0.5rem;
}

.sun-moon-row {
    display: flex;
    align-items: center;
    margin-bottom: 0.3em;
    gap: 0.5em;
    flex-wrap: wrap;
}

.sunrise-set-image, .moonrise-set-image {
    margin-right: 0.2em;
}

.sunrise-label, .sunset-label, .moonrise-label, .moonset-label {
    margin-right: 0.2em;
} 
.sun-moon-block {
    display: flex;
    gap: 2em;
    justify-content: flex-start;
    align-items: flex-start;
    margin-bottom: 1em;
  }
  .sun-block, .moon-block {
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  .sun-moon-main-icon {
    font-size: 2.5rem;
    margin-bottom: 0.3em;
    color: #FFD700;
  }
  .moon-block .sun-moon-main-icon {
    color: #E6E6FA;
  }
  .sun-moon-labels {
    text-align: center;
  }
  .sun-moon-labels div {
    margin-bottom: 0.2em;
  }

body.light-mode .wind-speed {
  color: #222 !important;
}
body.light-mode .wind-gust {
  color: #1976d2 !important;
}

body.light-mode .wind-info div[style*='font-size: 1em'] {
  color: #888 !important;
}

/* Ensure advisory box text is readable on all backgrounds */
.nws-alerts-box {
  color: #222 !important;
}
body.light-mode .nws-alerts-box {
  color: #222 !important;
}

.nws-alerts-box.nws-alerts-none {
  background: #228B22 !important; /* forest green */
  color: #f0fff0 !important;      /* honeydew (very light greenish white) */
  border: 2px solid #2ecc40 !important;
}

/* Collapsible county alert details */
.alert-summary-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  display: block;
}

.alert-summary.expanded .alert-summary-content {
  max-height: 2000px; /* Large enough for most content */
}

.alert-banner-center {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  margin: 24px auto 0 auto;
  max-width: 1400px;
}

/* Make alert box larger and more prominent */
.nws-alerts-box {
  margin: 18px auto !important;
  max-width: 1200px !important;
  background: rgba(0,0,0,0.3) !important;
  border-radius: 12px !important;
  padding: 20px !important;
  border: 2px solid rgba(255,255,255,0.1) !important;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3) !important;
  backdrop-filter: blur(5px) !important;
  font-size: 1.2em !important;
}

.nws-alerts-box.nws-alerts-none {
  background: #28a745 !important;
  color: #fff !important;
  border-radius: 12px !important;
  padding: 24px !important;
  text-align: center !important;
  font-size: 1.4em !important;
  font-weight: bold !important;
  margin: 18px auto !important;
  max-width: 1200px !important;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3) !important;
}

/* Fix weather icon spacing */
.current-obs-icon {
  margin-bottom: 8px !important;
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.conditions-icon {
  font-size: 64px !important;
  color: #ffb300 !important;
}

/* NWS Weather Icons */
.conditions-icon img {
  width: 100px !important;
  height: 100px !important;
  max-width: 100% !important;
  height: auto !important;
  display: block !important;
  margin: 0 auto !important;
}

/* Override inline styles for desktop */
.conditions-icon[style*="font-size: 48px"] img {
  width: 100px !important;
  height: 100px !important;
}

@media (max-width: 768px) {
  .conditions-icon img {
    width: 64px !important;
    height: 64px !important;
  }
}

@media (max-width: 576px) {
  .conditions-icon img {
    width: 56px !important;
    height: 56px !important;
  }
}

/* Fix temperature box styling consistency */
#high-today-box, #low-today-box {
  border: 1px solid #f00 !important;
  padding: 4px 0 !important;
  background: linear-gradient(135deg, #222 0%, #333 100%) !important;
  box-shadow: none !important;
}

#high-today-box {
  border-color: #f00 !important;
}

#low-today-box {
  border-color: #00f !important;
}

/* Make all temperature boxes consistent */
.summary-box div[style*="border:1px solid #f00"],
.summary-box div[style*="border:1px solid #00f"] {
  padding: 4px 0 !important;
  background: linear-gradient(135deg, #222 0%, #333 100%) !important;
  box-shadow: none !important;
  border-radius: 4px !important;
}

.summary-temp-box {
  flex: 1 1 45%;
  padding: 4px 0;
  background: linear-gradient(135deg, #222 0%, #333 100%);
  box-shadow: none;
  border: none;
}

/* Additional mobile-specific fixes for overlap issues */
@media (max-width: 768px) {
  /* Fix temperature and degree symbol overlap */
  .current-obs-temp {
    display: flex !important;
    align-items: baseline !important;
    justify-content: center !important;
    gap: 2px !important;
  }
  
  .current-obs-temp sup {
    position: relative !important;
    top: 0 !important;
    margin-left: 0 !important;
    font-size: 0.5em !important;
  }
  
  /* Better sun icon positioning to avoid overlap with text */
  .current-obs-icon {
    position: relative !important;
    z-index: 1 !important;
  }
  
  /* Ensure proper spacing between sun icon and temperature */
  .current-obs-block > div:first-child {
    margin-bottom: 16px !important;
  }
  
  /* Better spacing for countdown timer to avoid overlap */
  .countdown-timer {
    display: block !important;
    margin-top: 4px !important;
    margin-left: 0 !important;
    text-align: center !important;
  }
  
  /* Improved data status layout */
  .data-status {
    flex-wrap: wrap !important;
    justify-content: center !important;
  }
  
  /* Better spacing for last updated text */
  .last-updated {
    margin-right: 8px !important;
  }
  
  /* Enhanced summary box layout to prevent crowding */
  .summary-box div[style*="display:flex"] {
    flex-wrap: wrap !important;
    justify-content: space-between !important;
  }
  
  /* Better spacing for summary items */
  .summary-box div[style*="flex:1 1 45%"] {
    min-width: 120px !important;
    margin-bottom: 10px !important;
  }
  
  /* Ensure rainfall data section has proper spacing on mobile */
  .summary-box div[style*="margin-bottom:24px"] {
    margin-bottom: 24px !important;
  }
  
  /* Ensure rainfall data boxes have proper styling on mobile */
  .summary-box div[style*="border:1px solid #17a2b8"] {
    border: 1px solid #17a2b8 !important;
    border-radius: 4px !important;
    background: rgba(23, 162, 184, 0.1) !important;
    height: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
    min-height: 70px !important;
  }
  
  /* Use CSS Grid for rainfall data layout on mobile */
  .summary-box div[style*="display:flex"] {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    grid-template-rows: auto auto !important;
    gap: 6px !important;
  }
  
  /* Handle the simple boxes sizing on mobile - Last 7 Days and August Avg */
  .summary-box div[style*="flex:0 1 auto"] {
    flex: none !important;
    width: auto !important;
    height: fit-content !important;
    align-self: start !important;
  }
  
  /* Force August Avg box to match Last 7 Days height on mobile */
  .summary-box div[style*="August Avg"] {
    height: auto !important;
    min-height: unset !important;
    max-height: fit-content !important;
    align-self: start !important;
    grid-row: span 1 !important;
    padding-bottom: 6px !important;
    line-height: 1.2 !important;
  }
  
  /* Force Last 7 Days box to be compact on mobile */
  .summary-box div[style*="Last 7 Days"] {
    height: auto !important;
    min-height: unset !important;
    max-height: fit-content !important;
    align-self: start !important;
    grid-row: span 1 !important;
    padding-bottom: 6px !important;
    line-height: 1.2 !important;
  }
  
  /* Ensure the Rain Season box maintains proper width on mobile */
  .summary-box div[style*="margin-bottom:24px"] {
    flex: 1 1 45% !important;
    min-width: 45% !important;
  }
  
  /* Improved wind compass positioning */
  .wind-compass {
    position: relative !important;
    margin: 0 auto !important;
  }
  
  /* Better wind arrow positioning */
  .wind-arrow {
    position: absolute !important;
    left: 50% !important;
    top: 50% !important;
    transform: translate(-50%, -50%) !important;
  }
  
  /* Enhanced wind info layout */
  .wind-info > div:first-child {
    flex-direction: column !important;
    gap: 12px !important;
  }
  
  .wind-info > div:first-child > div {
    width: 100% !important;
    text-align: center !important;
  }
}

@media (max-width: 576px) {
  /* Even better temperature display for very small screens */
  .current-obs-temp {
    font-size: 2.2em !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 0 !important;
  }
  
  .current-obs-temp sup {
    font-size: 0.6em !important;
    margin-top: -8px !important;
  }
  
  /* Smaller sun icon for very small screens */
  .current-obs-icon i {
    font-size: 40px !important;
  }
  
  /* Better data status for very small screens */
  .data-status {
    flex-direction: column !important;
    align-items: center !important;
    gap: 4px !important;
  }
  
  .countdown-timer {
    margin-top: 2px !important;
  }
  
  /* Improved summary layout for very small screens */
  .summary-box div[style*="display:flex"] {
    flex-direction: column !important;
    gap: 8px !important;
  }
  
  .summary-box div[style*="flex:1 1 45%"] {
    width: 100% !important;
    min-width: auto !important;
    margin-bottom: 6px !important;
  }
  
  /* Ensure rainfall data section has proper spacing on very small screens */
  .summary-box div[style*="margin-bottom:24px"] {
    margin-bottom: 20px !important;
  }
  
  /* Ensure rainfall data boxes have proper styling on very small screens */
  .summary-box div[style*="border:1px solid #17a2b8"] {
    border: 1px solid #17a2b8 !important;
    border-radius: 4px !important;
    background: rgba(23, 162, 184, 0.1) !important;
    height: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
    min-height: 60px !important;
  }
  
  /* Use CSS Grid for rainfall data layout on very small screens */
  .summary-box div[style*="display:flex"] {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    grid-template-rows: auto auto !important;
    gap: 4px !important;
  }
  
  /* Handle the simple boxes sizing on very small screens - Last 7 Days and August Avg */
  .summary-box div[style*="flex:0 1 auto"] {
    flex: none !important;
    width: auto !important;
    height: fit-content !important;
    align-self: start !important;
  }
  
  /* Force August Avg box to match Last 7 Days height on very small screens */
  .summary-box div[style*="August Avg"] {
    height: auto !important;
    min-height: unset !important;
    max-height: fit-content !important;
    align-self: start !important;
    grid-row: span 1 !important;
    padding-bottom: 6px !important;
    line-height: 1.2 !important;
  }
  
  /* Force Last 7 Days box to be compact on very small screens */
  .summary-box div[style*="Last 7 Days"] {
    height: auto !important;
    min-height: unset !important;
    max-height: fit-content !important;
    align-self: start !important;
    grid-row: span 1 !important;
    padding-bottom: 6px !important;
    line-height: 1.2 !important;
  }
  
  /* Ensure the Rain Season box maintains proper width on very small screens */
  .summary-box div[style*="margin-bottom:24px"] {
    flex: 1 1 45% !important;
    min-width: 45% !important;
  }
  
  /* Better wind info for very small screens */
  .wind-info > div:first-child {
    gap: 8px !important;
  }
  
  .wind-info > div:first-child > div {
    width: 60px !important;
  }
}

/* Override inline styles for mobile layout improvements */
@media (max-width: 768px) {
  /* Override temperature display inline styles */
  .current-obs-temp[style*="margin-bottom: 4px"] {
    margin-bottom: 8px !important;
    display: flex !important;
    align-items: baseline !important;
    justify-content: center !important;
    gap: 2px !important;
  }
  
  /* Override temperature degree symbol inline styles */
  .current-obs-temp sup[style*="font-size:0.7em"] {
    font-size: 0.5em !important;
    top: 0 !important;
    margin-left: 0 !important;
    position: relative !important;
  }
  
  /* Override sun icon inline styles */
  .current-obs-icon[style*="margin-bottom: 0"] {
    margin-bottom: 12px !important;
    margin-top: 8px !important;
  }
  
  .current-obs-icon i[style*="font-size: 64px"] {
    font-size: 48px !important;
  }
  
  /* Override current conditions text inline styles */
  .current-conditions[style*="margin-top: 0.5em"] {
    margin-top: 8px !important;
    margin-bottom: 12px !important;
    font-size: 1em !important;
  }
  
  /* Override countdown timer inline styles */
  .countdown-timer[style*="margin-left: 10px"] {
    margin-left: 0 !important;
    margin-top: 4px !important;
    display: block !important;
    text-align: center !important;
  }
  
  /* Override current obs details inline styles */
  .current-obs-details[style*="gap: 2px"] {
    gap: 4px !important;
    margin-top: 8px !important;
    margin-bottom: 12px !important;
  }
  
  /* Override summary box inline styles */
  .summary-box[style*="margin-top:16px"] {
    margin-top: 20px !important;
    padding: 12px !important;
  }
  
  /* Override summary flex container inline styles */
  .summary-box div[style*="gap:8px"] {
    gap: 10px !important;
    flex-wrap: wrap !important;
    justify-content: space-between !important;
  }
  
  /* Override summary items inline styles */
  .summary-box div[style*="flex:1 1 45%"] {
    padding: 6px 4px !important;
    margin-bottom: 8px !important;
    min-width: 120px !important;
  }
  
  /* Override wind block inline styles */
  .wind-block[style*="gap: 12px"] {
    gap: 16px !important;
    padding: 20px 12px !important;
  }
  
  /* Override wind compass inline styles */
  .wind-compass[style*="width: 100px"] {
    width: 100px !important;
    height: 100px !important;
  }
  
  /* Override wind info inline styles */
  .wind-info[style*="width: 100%"] {
    margin-top: 12px !important;
  }
  
  .wind-info div[style*="gap: 24px"] {
    gap: 16px !important;
    margin-bottom: 8px !important;
  }
  
  /* Override station observations inline styles */
  .station-observations[style*="padding:12px 8px"] {
    padding: 16px 12px !important;
    margin-bottom: 16px !important;
  }
  
  /* Override UV and solar blocks inline styles */
  .uv-index-block[style*="padding:12px 8px"],
  .solar-radiation-block[style*="padding:12px 8px"] {
    padding: 16px 12px !important;
    margin-bottom: 16px !important;
  }
  
  /* Override weather obs bottom inline styles */
  .weather-obs-bottom[style*="padding:12px 8px"] {
    padding: 16px 12px !important;
  }
  
  /* Override sun moon block inline styles */
  .sun-moon-block[style*="gap: 24px"] {
    gap: 1.2em !important;
  }
  
  /* Override sun moon main icon inline styles */
  .sun-moon-main-icon[style*="margin-bottom: 6px"] {
    margin-bottom: 8px !important;
  }
}

@media (max-width: 576px) {
  /* Override temperature display for very small screens */
  .current-obs-temp[style*="margin-bottom: 4px"] {
    font-size: 2.2em !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 0 !important;
  }
  
  /* Override temperature degree symbol for very small screens */
  .current-obs-temp sup[style*="font-size:0.7em"] {
    font-size: 0.6em !important;
    margin-top: -8px !important;
  }
  
  /* Override sun icon for very small screens */
  .current-obs-icon i[style*="font-size: 64px"] {
    font-size: 40px !important;
  }
  
  /* Override countdown timer for very small screens */
  .countdown-timer[style*="margin-left: 10px"] {
    margin-top: 2px !important;
  }
  
  /* Override summary items for very small screens */
  .summary-box div[style*="flex:1 1 45%"] {
    width: 100% !important;
    min-width: auto !important;
    margin-bottom: 6px !important;
    padding: 4px 2px !important;
  }
  
  /* Override summary flex container for very small screens */
  .summary-box div[style*="gap:8px"] {
    flex-direction: column !important;
    gap: 8px !important;
  }
  
  /* Override wind info for very small screens */
  .wind-info div[style*="gap: 24px"] {
    gap: 8px !important;
  }
  
  .wind-info div[style*="width: 80px"] {
    width: 60px !important;
  }
  
  /* Override current obs block for very small screens */
  .current-obs-block[style*="padding:16px 8px"] {
    padding: 16px 8px !important;
    gap: 12px !important;
  }
  
  /* Override wind block for very small screens */
  .wind-block[style*="padding:16px 8px"] {
    padding: 16px 8px !important;
    gap: 12px !important;
  }
  
  /* Override station observations for very small screens */
  .station-observations[style*="padding:12px 8px"],
  .uv-index-block[style*="padding:12px 8px"],
  .solar-radiation-block[style*="padding:12px 8px"],
  .weather-obs-bottom[style*="padding:12px 8px"] {
    padding: 12px 8px !important;
    margin-bottom: 12px !important;
  }
  
  /* Override summary box for very small screens */
  .summary-box[style*="padding:10px"] {
    padding: 10px !important;
  }
}

/* Clean light mode page background */
body.light-mode {
  background: #f8f9fa !important;
  color: #333 !important;
}

/* Light mode styles for current conditions data */
body.light-mode .current-obs-temp {
  color: #2c3e50 !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1) !important;
}

body.light-mode .current-conditions {
  color: #e67e22 !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2) !important;
}

body.light-mode .temp-trend {
  color: #495057 !important;
}

body.light-mode .feels-like-label {
  color: #495057 !important;
}

body.light-mode .feels-like {
  color: #2c3e50 !important;
  font-weight: 600 !important;
}

body.light-mode .feels-like-phrase {
  color: #6c757d !important;
}

/* Light mode styles for summary box */
body.light-mode .summary-box {
  background: #ffffff !important;
  border: 1px solid #dee2e6 !important;
  color: #212529 !important;
}

body.light-mode .summary-box div {
  color: #495057 !important;
}

body.light-mode .summary-box b {
  color: #2c3e50 !important;
  font-weight: 600 !important;
}

/* Light mode styles for wind data */
body.light-mode .wind-block {
  background: #fff !important;
  border: 2px solid #dee2e6 !important;
}

body.light-mode .wind-compass {
  background: #f8f9fa !important;
  border: 4px solid #6c757d !important;
}

body.light-mode .wind-compass div {
  color: #2c3e50 !important;
}

body.light-mode .wind-arrow {
  border-bottom-color: #dc3545 !important;
}

/* Light mode styles for station observations */
body.light-mode .station-observations {
  background: #fff !important;
  border: 2px solid #dee2e6 !important;
  color: #495057 !important;
}

body.light-mode .station-observations-label {
  color: #495057 !important;
  font-weight: 600 !important;
}

body.light-mode .barometer,
body.light-mode .dew-point,
body.light-mode .humidity,
body.light-mode .daily-rain,
body.light-mode .rain-rate {
  color: #2c3e50 !important;
  font-weight: 500 !important;
}

/* Light mode styles for air quality and UV data */
body.light-mode .uv-index-block,
body.light-mode .solar-radiation-block {
  background: #fff !important;
  border: 2px solid #dee2e6 !important;
  color: #495057 !important;
}

body.light-mode .uv-index,
body.light-mode .solar-radiation {
  color: #2c3e50 !important;
  font-weight: 600 !important;
}

/* Light mode styles for sun/moon data */
body.light-mode .sun-moon-block {
  background: #fff !important;
  border: 2px solid #dee2e6 !important;
  color: #495057 !important;
}

body.light-mode .sun-moon-main-icon {
  color: #ffc107 !important;
}

body.light-mode .sun-moon-info {
  color: #495057 !important;
}

/* Light mode styles for radar and camera sections */
body.light-mode .radar-block {
  background: #fff !important;
  border: 2px solid #dee2e6 !important;
  color: #495057 !important;
}

body.light-mode .radar-tabs button {
  background: #e9ecef !important;
  color: #495057 !important;
  border: 1px solid #dee2e6 !important;
}

body.light-mode .radar-tabs button.active {
  background: #007bff !important;
  color: #fff !important;
}

body.light-mode .camera-buttons button {
  background: #e9ecef !important;
  color: #495057 !important;
  border: 1px solid #dee2e6 !important;
}

body.light-mode .camera-buttons button.active {
  background: #007bff !important;
  color: #fff !important;
}

/* Light mode styles for additional weather data elements */
body.light-mode .current-obs-block {
  background: #fff !important;
  border: 2px solid #dee2e6 !important;
  color: #495057 !important;
}

body.light-mode .current-obs-icon i {
  color: #ffc107 !important;
}

body.light-mode .current-obs-details {
  color: #495057 !important;
}

body.light-mode .current-obs-details span {
  color: #495057 !important;
}

/* Light mode styles for record badges */
body.light-mode #new-high-badge {
  background: #dc3545 !important;
  color: #fff !important;
}

body.light-mode #new-low-badge {
  background: #007bff !important;
  color: #fff !important;
}

/* Light mode styles for weather data values */
body.light-mode .wind-speed,
body.light-mode .wind-gust,
body.light-mode .wind-direction {
  color: #2c3e50 !important;
  font-weight: 600 !important;
}

body.light-mode .pressure-trend,
body.light-mode .dew-trend,
body.light-mode .humidity-trend {
  color: #495057 !important;
}

body.light-mode .pressure-trend-arrow,
body.light-mode .dew-trend-arrow,
body.light-mode .humidity-trend-arrow {
  filter: brightness(0.8) !important;
}

/* Light mode styles for any remaining dark elements */
body.light-mode [style*="background:#222"],
body.light-mode [style*="background: #222"] {
  background: #fff !important;
  color: #495057 !important;
}

/* Only apply color changes in light mode */
body.light-mode [style*="color:#ccc"],
body.light-mode [style*="color: #ccc"] {
  color: #6c757d !important;
}

body.light-mode [style*="color:#888"],
body.light-mode [style*="color: #888"] {
  color: #495057 !important;
}

/* Light mode styles for the remaining dark summary boxes */
body.light-mode [style*="border:1px solid #f00"],
body.light-mode [style*="border: 1px solid #f00"] {
  border: 1px solid #dc3545 !important;
  background: #fff5f5 !important;
  color: #721c24 !important;
}

body.light-mode [style*="border:1px solid #00f"],
body.light-mode [style*="border: 1px solid #00f"] {
  border: 1px solid #007bff !important;
  background: #f0f8ff !important;
  color: #004085 !important;
}

body.light-mode [style*="border:1px solid #17a2b8"],
body.light-mode [style*="border: 1px solid #17a2b8"] {
  border: 1px solid #17a2b8 !important;
  background: #f0f9ff !important;
  color: #0c5460 !important;
}

/* Light mode styles for summary box content */
body.light-mode .summary-box [style*="background:linear-gradient(135deg, #222 0%, #333 100%)"],
body.light-mode .summary-box [style*="background: linear-gradient(135deg, #222 0%, #333 100%)"] {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%) !important;
  color: #495057 !important;
  border: 1px solid #dee2e6 !important;
}

/* Light mode styles for specific summary items */
body.light-mode [style*="border:1px solid #f00"] b,
body.light-mode [style*="border: 1px solid #f00"] b {
  color: #721c24 !important;
}

body.light-mode [style*="border:1px solid #00f"] b,
body.light-mode [style*="border: 1px solid #00f"] b {
  color: #004085 !important;
}

body.light-mode [style*="border:1px solid #17a2b8"] b,
body.light-mode [style*="border: 1px solid #17a2b8"] b {
  color: #0c5460 !important;
}

/* Light mode styles for summary section headers */
body.light-mode .summary-box [style*="color:#ffb300"],
body.light-mode .summary-box [style*="color: #ffb300"] {
  color: #e67e22 !important;
  font-weight: bold !important;
}

body.light-mode .summary-box [style*="color:#17a2b8"],
body.light-mode .summary-box [style*="color: #17a2b8"] {
  color: #17a2b8 !important;
  font-weight: bold !important;
}

/* Light mode styles for any remaining dark backgrounds */
body.light-mode [style*="background:#222"],
body.light-mode [style*="background: #222"] {
  background: #fff !important;
}

body.light-mode [style*="background:#333"],
body.light-mode [style*="background: #333"] {
  background: #f8f9fa !important;
}

/* More specific targeting for remaining dark summary boxes */
body.light-mode [style*="background:linear-gradient(135deg, #222 0%, #333 100%)"],
body.light-mode [style*="background: linear-gradient(135deg, #222 0%, #333 100%)"] {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%) !important;
  color: #495057 !important;
  border: 1px solid #dee2e6 !important;
}

/* Target the specific dark boxes that still have dark backgrounds */
body.light-mode [style*="background:#222"],
body.light-mode [style*="background: #222"],
body.light-mode [style*="background:#333"],
body.light-mode [style*="background: #333"] {
  background: #f8f9fa !important;
  color: #495057 !important;
}

/* Fix logo text visibility in light mode */
body.light-mode .navbar .navbar-brand {
  flex-shrink: 0 !important;
  max-width: 300px !important;
  background: transparent !important;
}

body.light-mode .brand-text {
  line-height: 1.1 !important;
  background: transparent !important;
}

body.light-mode .brand-name {
  font-size: 1.3rem !important;
  line-height: 1.1 !important;
  color: #2c3e50 !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1) !important;
  background: transparent !important;
}

body.light-mode .brand-subtitle {
  font-size: 0.75rem !important;
  line-height: 1.1 !important;
  color: #495057 !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1) !important;
  background: transparent !important;
}

/* Fix timestamp visibility in white background boxes */
body.light-mode [style*="font-size:0.9em;color:#fff"],
body.light-mode [style*="font-size: 0.9em;color: #fff"],
body.light-mode [style*="font-size:0.9em;color:#ccc"],
body.light-mode [style*="font-size: 0.9em;color: #ccc"] {
  color: #6c757d !important;
  font-weight: 500 !important;
}

/* Target any remaining light gray text that's too light */
body.light-mode [style*="color:#ccc"],
body.light-mode [style*="color: #ccc"],
body.light-mode [style*="color:#999"],
body.light-mode [style*="color: #999"] {
  color: #495057 !important;
  font-weight: 500 !important;
}

/* Force all summary box text to be visible */
body.light-mode .summary-box div[style*="flex:1 1 45%"] {
  color: #495057 !important;
}

body.light-mode .summary-box div[style*="flex:1 1 45%"] b {
  color: #2c3e50 !important;
  font-weight: 600 !important;
}

/* Target the specific timestamp styling */
body.light-mode .summary-box [style*="font-size:0.9em"],
body.light-mode .summary-box [style*="font-size: 0.9em"] {
  color: #6c757d !important;
  font-weight: 500 !important;
}

/* Light mode high/low today boxes */
body.light-mode .summary-box .high-today,
body.light-mode .summary-box .low-today {
  background: #f8f9fa !important;
  color: #495057 !important;
  font-weight: 600 !important;
}

/* Light mode high/low today labels */
body.light-mode .summary-box .high-today .label,
body.light-mode .summary-box .low-today .label {
  color: #495057 !important;
  font-weight: 600 !important;
}

/* Light mode high/low today temperatures */
body.light-mode .summary-box .high-today .temp,
body.light-mode .summary-box .low-today .temp {
  color: #212529 !important;
  font-weight: 700 !important;
}

/* Light mode high/low today timestamps */
body.light-mode .summary-box .high-today .time,
body.light-mode .summary-box .low-today .time {
  color: #6c757d !important;
  font-weight: 500 !important;
}

/* Light mode summary box borders */
body.light-mode .summary-box .high-today {
  border: 1px solid #dc3545 !important;
}

body.light-mode .summary-box .low-today {
  border: 1px solid #007bff !important;
}

/* Override inline styles for high-today-box and low-today-box */
body.light-mode #high-today-box,
body.light-mode #low-today-box {
  background: #f8f9fa !important;
  color: #495057 !important;
  border: 1px solid #dee2e6 !important;
}

body.light-mode #high-today-box {
  border-color: #dc3545 !important;
}

body.light-mode #low-today-box {
  border-color: #007bff !important;
}

/* Override inline styles for text inside these boxes */
body.light-mode #high-today-box,
body.light-mode #high-today-box b,
body.light-mode #high-today-box span {
  color: #495057 !important;
}

body.light-mode #low-today-box,
body.light-mode #low-today-box b,
body.light-mode #low-today-box span {
  color: #495057 !important;
}

/* Override the specific inline style for timestamps */
body.light-mode #high-temp-time[style*="color:#fff"],
body.light-mode #low-temp-time[style*="color:#fff"] {
  color: #6c757d !important;
}

/* Override the linear gradient background */
body.light-mode #high-today-box[style*="background:linear-gradient"],
body.light-mode #low-today-box[style*="background:linear-gradient"] {
  background: #f8f9fa !important;
}

/* Record Alert Box Styling */
.record-alert-box {
  text-align: center !important;
}

.record-alert-box h3 {
  text-align: center !important;
}

.record-alert-box .record-content {
  text-align: center !important;
  line-height: 1.8 !important;
}

.record-alert-box .record-content br {
  display: block !important;
  content: "" !important;
  margin: 8px 0 !important;
}

/* Ensure record text is centered and properly spaced */
.record-alert-box .record-content div {
  text-align: center !important;
  margin: 8px 0 !important;
}

/* Style the record links */
.record-alert-box .record-content a {
  color: #ffffff !important;
  text-decoration: none !important;
  display: block !important;
  padding: 8px 12px !important;
  margin: 4px 0 !important;
  border-radius: 6px !important;
  transition: background-color 0.3s ease !important;
}

.record-alert-box .record-content a:hover {
  background-color: rgba(255, 255, 255, 0.2) !important;
  text-decoration: none !important;
}

/* Ensure proper spacing between record items */
.record-alert-box .record-content div:not(:last-child) {
  margin-bottom: 12px !important;
}

/* Ensure rainfall data section has proper spacing */
.summary-box div[style*="margin-bottom:24px"] {
  margin-bottom: 24px !important;
}

/* Ensure the summary box container accommodates all content */
.summary-box > div:last-child {
  margin-bottom: 0 !important;
}

/* Specific styling for rainfall data section */
.summary-box div[style*="color:#17a2b8"] {
  color: #17a2b8 !important;
  font-weight: bold !important;
  font-size: 0.9em !important;
}

/* Ensure rainfall data boxes have proper borders and spacing */
.summary-box div[style*="border:1px solid #17a2b8"] {
  border: 1px solid #17a2b8 !important;
  border-radius: 4px !important;
  background: rgba(23, 162, 184, 0.1) !important;
}

  /* Handle the simple boxes sizing (flex: 0 1 auto) - Last 7 Days and August Avg */
  .summary-box div[style*="flex:0 1 auto"] {
    flex: none !important;
    width: auto !important;
    height: fit-content !important;
    align-self: start !important;
  }

/* Ensure the Rain Season box maintains proper width */
.summary-box div[style*="margin-bottom:24px"] {
  flex: 1 1 45% !important;
  min-width: 45% !important;
}

/* Ensure rainfall data boxes have proper borders and spacing */
.summary-box div[style*="border:1px solid #17a2b8"] {
  border: 1px solid #17a2b8 !important;
  border-radius: 4px !important;
  background: rgba(23, 162, 184, 0.1) !important;
}

/* Use CSS Grid for rainfall data layout to prevent height stretching */
.summary-box div[style*="display:flex"] {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  grid-template-rows: auto auto !important;
  gap: 8px !important;
}

/* Handle the simple boxes sizing (flex: 0 1 auto) - Last 7 Days and August Avg */
.summary-box div[style*="flex:0 1 auto"] {
  flex: none !important;
  width: auto !important;
  height: fit-content !important;
  align-self: start !important;
}

/* Force August Avg box to match Last 7 Days height */
.summary-box div[style*="August Avg"] {
  height: auto !important;
  min-height: unset !important;
  max-height: fit-content !important;
  align-self: start !important;
  grid-row: span 1 !important;
  padding-bottom: 6px !important;
  line-height: 1.2 !important;
}

/* Force Last 7 Days box to be compact */
.summary-box div[style*="Last 7 Days"] {
  height: auto !important;
  min-height: unset !important;
  max-height: fit-content !important;
  align-self: start !important;
  grid-row: span 1 !important;
  padding-bottom: 6px !important;
  line-height: 1.2 !important;
}

/* Ensure all rainfall data boxes have uniform height */
.summary-box div[style*="border:1px solid #17a2b8"] {
  height: 100% !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  align-items: center !important;
  min-height: 80px !important;
}

/* Remove unwanted spacing from rainfall data content */
.summary-box div[style*="border:1px solid #17a2b8"] br {
  margin: 0 !important;
  padding: 0 !important;
  line-height: 1 !important;
}

.summary-box div[style*="border:1px solid #17a2b8"] b {
  margin: 0 !important;
  padding: 0 !important;
  line-height: 1.2 !important;
}

.summary-box div[style*="border:1px solid #17a2b8"] span {
  margin: 0 !important;
  padding: 0 !important;
  line-height: 1.2 !important;
}

/* Fire Weather Page Styling */
.weather-param {
  text-align: center;
  padding: 20px 15px;
  background: rgba(255,255,255,0.05);
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.1);
  transition: all 0.3s ease;
  margin: 10px 0;
}

.weather-param:hover {
  background: rgba(255,255,255,0.08);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.weather-param .param-value {
  font-size: 1.5rem;
  font-weight: bold;
  margin: 10px 0 5px 0;
  color: #fff;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

.weather-param .param-label {
  font-size: 0.9rem;
  color: #ccc;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 500;
}

.forecast-desc {
  font-size: 0.8rem;
  line-height: 1.3;
  max-height: 60px;
  overflow: hidden;
}

.alert-item {
  padding: 10px;
  background-color: #f8f9fa;
  border-radius: 5px;
  border-left: 4px solid #dc3545;
}

/* Enhanced page styling for fire weather */
.page-title {
  color: #fff;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.7);
  font-weight: 700;
}

.lead {
  color: #ccc;
  font-size: 1.1em;
}

/* Enhanced card styling - Dark mode only */
body:not(.light-mode) .card {
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(140, 150, 160, 0.95);
  backdrop-filter: blur(10px);
  margin-bottom: 20px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  position: relative;
  z-index: 1;
  color: #fff;
}

body:not(.light-mode) .card-header {
  border-bottom: 1px solid rgba(255,255,255,0.1);
  font-weight: 600;
  color: #fff;
}

body:not(.light-mode) .card-body {
  color: #fff;
}

/* Ensure all text within dark mode cards is white */
body:not(.light-mode) .card * {
  color: #fff !important;
}

/* Specific Monthly Summary text elements */
body:not(.light-mode) .card h1,
body:not(.light-mode) .card h2,
body:not(.light-mode) .card h3,
body:not(.light-mode) .card h4,
body:not(.light-mode) .card h5,
body:not(.light-mode) .card h6,
body:not(.light-mode) .card p,
body:not(.light-mode) .card span,
body:not(.light-mode) .card div {
  color: #fff !important;
}

/* Enhanced button styling */
.btn-outline-primary {
  border-width: 2px;
  font-weight: 600;
  transition: all 0.3s ease;
}

.btn-outline-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

@media (max-width: 768px) {
  .weather-param .param-value {
    font-size: 1.2rem;
  }
  
  .col-md-3 {
    margin-bottom: 15px;
  }
}

