/* State filter styles */
.state-filter-container {
  display: inline-block;
  margin-left: 8px;
  vertical-align: middle;
}
#state-filter-input {
  padding: 4px 8px;
  border-radius: 4px;
  border: 1px solid #ccc;
  font-size: 1em;
  text-transform: uppercase;
}
:root {
  --primary-bg: #0f0f1a;
  --card-bg: rgba(30, 30, 46, 0.8);
  --hover-bg: rgba(40, 40, 60, 0.9);
  --text-primary: #fff;
  --text-secondary: #bbb;
  --accent: #4e54c8;
  --danger: #ff5252;
  --warning: #ffa726;
  --success: #66bb6a;
  --border-radius: 12px;
}

/* It's good practice to also include other font weights if you have them */
@font-face {
  font-family: "Saira Condensed";
  src: url("TitilliumWeb-Bold.ttf") format("truetype"); /* Example for a bold version */
  font-weight: bold;
  font-style: normal;
}

/* --- Then apply it to your main elements --- */
body,
html {
  font-family: "Saira Condensed", sans-serif;
}

/* You can also be more specific */
.alert,
.notification-popup,
.stat-box,
#test-builder-modal {
  font-family: "Saira Condensed", sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

.search-and-map-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

/* Beginning of map CSS */
.map-container-glass {
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(10px);
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  overflow: hidden;
  transition: all 0.3s ease;
}

/* Base styles for all buttons within the alertDiv */
.map-button {
  border-radius: 8px;
  color: white;
  padding: 8px 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  z-index: 1;
}

/* Map Content Container (main flex layout) */
.map-content-container {
  display: flex;
  flex-direction: row;
  height: 100%;
  background: linear-gradient(
    135deg,
    rgba(15, 23, 42, 0.7) 0%,
    rgba(15, 23, 42, 0.9) 100%
  );
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Main map section (left side) */
.map-main-content {
  flex: 2;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

/* Map Header (top bar of the main map section) */
.map-header {
  padding: 16px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  z-index: 1;
  background: rgba(20, 22, 35, 0.7); /* Consistent dark background */
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.map-title-text h2 {
  margin: 0;
  font-size: 1.9rem;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 0.5px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

/* Overlay for the header glow effect */
.map-header-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: -1;
  /* Background is dynamic via JS */
}

.map-content-container {
  display: flex;
  height: 100%;
  background: linear-gradient(
    135deg,
    rgba(15, 23, 42, 0.7) 0%,
    rgba(15, 23, 42, 0.9) 100%
  );
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  position: relative; /* For logo positioning */
}

/* --- Map Header --- */
.map-header {
  padding: 12px 20px; /* Reduced padding */
  color: white;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  z-index: 1;
}

.map-title-container {
  display: flex;
  align-items: center;
  gap: 16px;
}

.map-icon {
  font-size: 2rem; /* Slightly smaller icon */
  border-radius: 50%;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid rgba(255, 255, 255, 0.2);
}

.map-icon i {
  color: white;
  text-shadow: 0 0 8px rgba(255, 255, 255, 0.6);
}

.map-title-text h2 {
  margin: 0;
  font-size: 1.8rem; /* Larger title */
  font-weight: 700; /* Bolder */
  color: #ffffff;
  letter-spacing: 0.5px;
  text-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
}

.alert-badges {
  display: flex;
  gap: 12px;
  margin-top: 8px;
}

.alert-badge {
  padding: 4px 12px;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.9);
}

/* Specific badge styles */
.alert-badge-status {
  background: linear-gradient(
    135deg,
    rgba(220, 38, 38, 0.9) 0%,
    rgba(180, 30, 30, 0.9) 100%
  );
}

.alert-badge-source {
  background: linear-gradient(
    135deg,
    rgba(59, 130, 246, 0.9) 0%,
    rgba(37, 99, 235, 0.9) 100%
  );
}

.alert-badge-action {
  background: linear-gradient(
    135deg,
    rgba(234, 179, 8, 0.9) 0%,
    rgba(202, 138, 4, 0.9) 100%
  );
}

/* Time information container */
.map-time-container {
  display: flex;
  gap: 20px;
  background: rgba(30, 41, 59, 0.6);
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

/* Individual time item (Issued/Expires) */
.time-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  position: relative;
}

.time-item:first-child {
  padding-right: 5px;
}

/* Labels for time items */
.time-label {
  font-size: 0.85rem;
  opacity: 0.8;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
  color: rgba(255, 255, 255, 0.9);
}

.time-label i {
  margin-right: 5px;
  /* Color is dynamic via JS */
}

/* Values for time items */
.time-value {
  font-weight: 700;
  font-size: 1.1rem;
  color: white;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* Mapbox specific container */
.mapbox-container {
  flex: 1;
  border-radius: 0 0 0 12px;
  overflow: hidden;
  position: relative;
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.3);
}

.state-filter-container {
  display: inline-flex;
  align-items: center;
  margin-left: 12px;
  position: relative;
}

#state-filter-input {
  padding: 8px 14px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--text-primary);
  font-size: 0.95rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: all 0.3s ease;
  backdrop-filter: blur(5px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  width: 70px;
}

#state-filter-input:hover {
  border-color: rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.15);
}

#state-filter-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(78, 84, 200, 0.25), 0 2px 8px rgba(0, 0, 0, 0.2);
  background: rgba(255, 255, 255, 0.2);
}

.state-filter-container::before {
  content: "State:";
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 500;
  margin-right: 8px;
  letter-spacing: 0.5px;
}

/* Threat Panel (right side) */
.threat-panel-glass {
  flex: 1;
  background: linear-gradient(
    135deg,
    rgba(10, 12, 22, 0.85),
    rgba(15, 18, 30, 0.9)
  );
  /* backdrop-filter: blur(15px); */
  border-left: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  max-width: 380px;
  overflow-y: auto;
  justify-content: space-between;
  box-shadow: -5px 0 25px rgba(0, 0, 0, 0.2);
  position: relative;
}

/* Subtle pattern overlay for depth without heavy animations */
.threat-panel-glass::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
  z-index: -1;
}

/* Threat Header with modern styling */
/* Threat Header with modern styling */
.threat-header {
  padding: 22px 16px;
  color: white;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  text-align: center;
  /* background: rgba(0, 0, 0, 0.2); */
  position: relative;
}

.threat-header::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 15%;
  width: 70%;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.3),
    transparent
  );
}

.threat-header h3 {
  margin: 0;
  font-size: 1.4rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: rgba(255, 255, 255, 0.95);
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Threat content area */
.threat-content {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  flex-grow: 1;
  color: rgba(255, 255, 255, 0.9);
}

/* Individual threat items with subtle hover effect */
.threat-item {
  background: rgba(255, 255, 255, 0.04);
  border-radius: 12px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: transform 0.2s ease, background 0.2s ease;
}

.threat-item:hover {
  background: rgba(255, 255, 255, 0.07);
  transform: translateY(-2px);
}

/* Enhanced threat icons */
.threat-icon {
  font-size: 1.4rem;
  width: 45px;
  height: 45px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.25);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
  margin-right: 14px;
}

/* Custom scrollbar for better usability */
.threat-panel-glass::-webkit-scrollbar {
  width: 6px;
}

.threat-panel-glass::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.1);
}

.threat-panel-glass::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 3px;
}

.threat-panel-glass::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.25);
}

/* Message for no specific threat info */
.no-threats {
  text-align: center;
  padding: 16px;
  color: rgba(255, 255, 255, 0.7);
}

.no-threats-fallback {
  text-align: center;
  padding: 16px;
  color: rgba(255, 255, 255, 0.7);
  background: rgba(30, 41, 59, 0.4);
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Affected Areas Section */
.affected-areas {
  padding: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(30, 41, 59, 0.5);
  text-align: center; /* Center all content */
}

.affected-areas h4 {
  margin: 0 0 12px 0;
  font-size: 1.2rem; /* Increased from 1rem */
  color: white;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.affected-areas p {
  margin: 0;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.6; /* Slightly increased for better readability */
  font-size: 1.25rem; /* Added to make text larger */
  max-height: none; /* Remove the max height constraint */
  overflow-y: visible; /* Remove the scrollbar */
  padding: 0 10px; /* Replace right padding with padding on both sides */
}

/* Warning Area Map Section */
.warning-area-map {
  padding: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.warning-area-map h4 {
  text-align: center;
  margin: 0 0 12px 0;
  font-size: 1rem;
  color: white;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* Overview map container */
.overview-map {
  height: 160px;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Threat Item */
.threat-item {
  display: flex;
  align-items: flex-start;
  padding: 14px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  transition: background 0.3s ease;
}

.threat-icon {
  font-size: 1rem;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  margin-right: 14px;
  flex-shrink: 0;
}

.threat-info {
  flex: 1;
}

.threat-label {
  display: block;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 700;
}

.threat-value {
  display: block;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.95);
  font-size: 1rem;
  line-height: 1.5;
}

.expanded-threat-item {
  flex-direction: column;
  align-items: flex-start;
  padding: 12px;
}

.expanded-threat-item .threat-icon {
  margin-bottom: 8px;
}

.expanded-threat-item .threat-info {
  width: 100%;
}

.threat-value-expanded {
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.3) transparent;
}

.threat-value-expanded::-webkit-scrollbar {
  width: 6px;
}

.threat-value-expanded::-webkit-scrollbar-thumb {
  background-color: rgba(255, 255, 255, 0.3);
  border-radius: 3px;
}

/* Threat Value (e.g., "2.00 IN") */
.threat-value {
  display: block;
  font-weight: 600;
  color: white;
  /* Font-size and text-shadow are dynamic for severe threats via JS */
}

/* Footer details for the map */
.map-details-footer {
  padding: 16px;
  background: rgba(15, 23, 42, 0.9);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: white;
}
/* End of Map CSS */

/* Add to your CSS file */
.alert-status-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 10px 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 18px;
  letter-spacing: 0.5px;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
  animation: pulse 2s infinite;
  z-index: 100;
}

.tornado-emergency {
  background-color: rgba(133, 0, 133, 0.9); /* Dark Purple */
  color: white;
  box-shadow: 0 0 15px #ff00ff; /* Magenta glow */
}

.pds-tornado {
  background-color: rgba(255, 0, 255, 0.9); /* Magenta */
  color: white;
  box-shadow: 0 0 15px #ff00ff; /* Magenta glow */
}

.destructive-tstorm {
  background-color: rgba(255, 69, 0, 0.9); /* OrangeRed */
  color: white;
  box-shadow: 0 0 15px #ff8000; /* Orange glow */
}

.warning-icon-left,
.warning-icon-right {
  font-size: 22px;
  animation: flash 1s infinite;
  margin: 0 15px;
}

.warning-icon-left {
  animation-delay: 0s;
}

.warning-icon-right {
  animation-delay: 0.5s;
}

@keyframes pulse {
  0% {
    opacity: 0.9;
  }
  50% {
    opacity: 1;
  }
  100% {
    opacity: 0.9;
  }
}

@keyframes flash {
  0% {
    opacity: 0.4;
  }
  50% {
    opacity: 1;
  }
  100% {
    opacity: 0.4;
  }
}

/* Twitter Posting Panel Styles */
.twitter-posting-panel {
  background-color: #15202b;
  border-radius: 12px;
  padding: 20px;
  margin: 20px 0;
  color: #fff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  border-bottom: 1px solid #38444d;
  padding-bottom: 10px;
}

.panel-header h3 {
  margin: 0;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
}

.panel-header h3 i {
  margin-right: 8px;
  color: #1da1f2;
}

.toggle-container {
  display: flex;
  align-items: center;
}

.toggle-container span {
  margin-left: 8px;
  font-size: 0.9rem;
}

/* Switch/Toggle Styles */
.switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 24px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #38444d;
  transition: 0.4s;
}

.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.4s;
}

input:checked + .slider {
  background-color: #1da1f2;
}

input:checked + .slider:before {
  transform: translateX(26px);
}

.slider.round {
  border-radius: 24px;
}

.slider.round:before {
  border-radius: 50%;
}

/* Tag Input Styles */
.tag-input-container {
  display: flex;
  margin-bottom: 10px;
}

.tag-input-container input {
  flex-grow: 1;
  padding: 8px 12px;
  border: 1px solid #38444d;
  background-color: #192734;
  color: #fff;
  border-radius: 4px 0 0 4px;
}

.tag-input-container button {
  padding: 8px 12px;
  background-color: #1da1f2;
  color: #fff;
  border: none;
  border-radius: 0 4px 4px 0;
  cursor: pointer;
}

.tag-container {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 15px;
}

.tag {
  display: flex;
  align-items: center;
  background-color: #1da1f2;
  color: #fff;
  padding: 4px 10px;
  border-radius: 16px;
  font-size: 0.85rem;
}

.remove-tag {
  background: none;
  border: none;
  color: #fff;
  margin-left: 5px;
  cursor: pointer;
  font-size: 0.85rem;
}

/* Tweet Format */
.twitter-message {
  margin-bottom: 15px;
}

.twitter-message textarea {
  width: 100%;
  padding: 10px;
  background-color: #192734;
  color: #fff;
  border: 1px solid #38444d;
  border-radius: 4px;
  resize: vertical;
}

.placeholders-info {
  margin-top: 5px;
  font-size: 0.8rem;
  color: #8899a6;
}

/* Alert Level Filter */
.alert-level-filter {
  margin-bottom: 15px;
}

.filter-options {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
}

.filter-options label {
  display: flex;
  align-items: center;
  cursor: pointer;
}

.filter-options input {
  margin-right: 5px;
}

/* Manual Post Button */
.manual-post-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 15px;
}

.primary-button {
  padding: 10px 20px;
  background-color: #1da1f2;
  color: #fff;
  border: none;
  border-radius: 50px;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
}

#posting-status {
  margin-top: 8px;
  color: #8899a6;
  font-size: 0.9rem;
  text-align: center;
}

/* Recent Posts */
.posts-list {
  max-height: 300px;
  overflow-y: auto;
  background-color: #192734;
  border-radius: 8px;
  padding: 5px;
}

.post-item {
  padding: 10px;
  border-bottom: 1px solid #38444d;
}

.post-item:last-child {
  border-bottom: none;
}

.post-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 5px;
  font-size: 0.85rem;
}

.post-time {
  color: #8899a6;
}

.post-event {
  font-weight: bold;
}

.post-content {
  margin-bottom: 8px;
}

.post-footer {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
}

.view-link {
  color: #1da1f2;
  text-decoration: none;
}

.post-location {
  color: #8899a6;
}

.premium-button {
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.1),
    rgba(255, 255, 255, 0.05)
  );
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: white;
  padding: 10px 15px;
  border-radius: 8px;
  backdrop-filter: blur(10px);
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  gap: 8px;
}

.premium-button:hover {
  transform: translateY(-2px);
}

.premium-button i {
  font-size: 1.2em;
}
.nationwide-map-container {
  position: fixed;
  bottom: 2rem;
  left: 2rem;
  width: 55%;
  height: 60%;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  opacity: 0;
  pointer-events: none;
  transition: all 0.5s cubic-bezier(0.215, 0.61, 0.355, 1);
  transform: translateY(20px);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35);
  border-radius: 24px;
  overflow: hidden;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.nationwide-map-container.active {
  opacity: 1;
  pointer-events: all;
  transform: translateY(0);
}

.nationwide-map-content {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  background: linear-gradient(
    135deg,
    rgba(35, 41, 70, 0.95),
    rgba(20, 24, 40, 0.98)
  );
  overflow: hidden;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.1),
    0 20px 40px rgba(0, 0, 0, 0.4);
}

.nationwide-map-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.2rem 1.5rem;
  background: rgba(20, 22, 35, 0.7);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.nationwide-map-header h2 {
  margin: 0;
  color: #ffffff;
  font-size: 1.4rem;
  font-weight: 500;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  font-family: "Montserrat", sans-serif;
  position: relative;
  padding-left: 1.8rem;
}

.nationwide-map-header h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 12px;
  height: 12px;
  background: #64b5f6;
  border-radius: 50%;
  box-shadow: 0 0 10px rgba(100, 181, 246, 0.8);
}

.nationwide-map-close {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: #ffffff;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 1.1rem;
  backdrop-filter: blur(5px);
}

/* ... add to the end of your stylesheet ... */

#intensity-graph-container {
  background: rgba(30, 30, 45, 0.85); /* Dark, semi-transparent background */
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 20px;
  margin: 20px auto;
  max-width: 95%;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

#intensity-graph-container h3 {
  color: #fff;
  text-align: center;
  margin-top: 0;
  margin-bottom: 20px;
  font-weight: 500;
  letter-spacing: 0.5px;
  text-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

#intensity-chart {
  width: 100% !important;
  height: 300px !important; /* Adjust height as needed */
}

.nationwide-map-close:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: rotate(90deg);
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.2);
}

#nationwide-map {
  flex-grow: 1;
  border-radius: 0 0 20px 20px;
  position: relative;
}

#nationwide-map::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  box-shadow: inset 0 0 50px rgba(0, 0, 0, 0.3);
  border-radius: 0 0 20px 20px;
}

@media (max-width: 992px) {
  .nationwide-map-container {
    width: 75%;
    height: 50%;
  }
}

@media (max-width: 768px) {
  .nationwide-map-container {
    width: 90%;
    height: 45%;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
  }

  .nationwide-map-container.active {
    transform: translateX(-50%) translateY(0);
  }
}

.alert-popup {
  position: absolute;
  background: linear-gradient(
    135deg,
    rgba(25, 25, 25, 0.95),
    rgba(15, 15, 15, 0.98)
  );
  border-radius: 10px;
  padding: 15px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.5);
  width: 300px;
  display: none;
  z-index: 10;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.alert-popup h3 {
  margin-top: 0;
  color: white;
  font-size: 1.2em;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 8px;
  margin-bottom: 10px;
}

.popup-alert-item {
  padding: 10px;
  margin-bottom: 8px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 5px;
  cursor: pointer;
  transition: transform 0.2s, background 0.2s;
}

.popup-alert-item:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.1);
}

.alert-counties-small {
  font-size: 0.85em;
  color: rgba(255, 255, 255, 0.7);
  margin-top: 5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.severity-extreme {
  color: #ff3547;
  font-weight: bold;
}

.severity-warning {
  color: #ff6b22;
  font-weight: bold;
}

.severity-watch {
  color: #ffbb33;
}

.severity-advisory {
  color: #33b5e5;
}

.severity-notice {
  color: #00c851;
}

.highlight-card {
  animation: pulse-highlight 2s;
}

@keyframes pulse-highlight {
  0%,
  100% {
    box-shadow: 0 0 0 rgba(var(--alert-color-rgb), 0);
  }
  50% {
    box-shadow: 0 0 30px rgba(var(--alert-color-rgb), 0.8);
  }
}

#spc-outlook-container {
  margin-bottom: 20px;
  border-radius: var(--border-radius);
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  position: relative; /* Useful for positioning map elements */
}

body {
  margin: 0;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background: var(--primary-bg);
  color: var(--text-primary);
  line-height: 1.6;
}

.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 20px;
}

header {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

@media (min-width: 768px) {
  header {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
}

h1 {
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--text-primary);
}

.controls {
  display: flex;
  flex-direction: column;
  gap: 15px;
  width: 100%;
}

@media (min-width: 768px) {
  .controls {
    flex-direction: row;
    width: auto;
  }
}

.search-container {
  display: flex;
  max-width: 400px;
}

.search-container input {
  flex: 1;
  padding: 10px 15px;
  border: none;
  background: rgba(255, 255, 255, 0.1);
  color: white;
  border-radius: var(--border-radius) 0 0 var(--border-radius);
  font-size: 16px;
}

.search-container button {
  background: var(--accent);
  color: white;
  border: none;
  padding: 0 15px;
  border-radius: 0 var(--border-radius) var(--border-radius) 0;
  cursor: pointer;
}

.filter-container select {
  padding: 10px 15px;
  background: rgba(255, 255, 255, 0.1);
  color: white;
  border: none;
  border-radius: var(--border-radius);
  font-size: 16px;
  width: 100%;
  cursor: pointer;
}

.alert-stats {
  display: flex;
  gap: 20px;
  margin-bottom: 30px;
  flex-wrap: wrap;
}

.premium-alert {
  /* Dynamic properties set by JS */
  background: var(--alert-bg-gradient);
  box-shadow: var(--alert-glow-effect, 0 8px 32px 0 rgba(0, 0, 0, 0.37));

  /* Static properties */
  position: relative;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-radius: var(--border-radius);
  border: 1px solid rgba(255, 255, 255, 0.1);
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  padding: 0;
  color: white;
  display: flex;
  flex-direction: column;
}

.premium-alert:hover {
  transform: translateY(-4px);
  box-shadow: var(--alert-glow-effect, 0 8px 32px 0 rgba(0, 0, 0, 0.37)),
    0 12px 40px 0 rgba(0, 0, 0, 0.5);
  border-color: rgba(255, 255, 255, 0.2);
}

/* --- Keyframe Animations --- */
@keyframes glow-pulse {
  0% {
    opacity: 0.4;
  }
  50% {
    opacity: 1;
  }
  100% {
    opacity: 0.4;
  }
}

@keyframes pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.08);
  }
  100% {
    transform: scale(1);
  }
}

/* --- Alert Header Section --- */
.alert-glow-top {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(
    90deg,
    transparent,
    var(--alert-color, #fff),
    transparent
  );
  animation: glow-pulse 2s infinite;
}

.alert-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 25px;
  background: rgba(0, 0, 0, 0.25);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  position: relative;
}

.alert-title-section {
  display: flex;
  align-items: center;
  gap: 15px;
}

.alert-icon {
  font-size: 26px;
  color: var(--alert-color, #fff);
  animation: pulse 2.5s infinite ease-in-out;
}

.alert-header h2 {
  color: white;
  margin: 0;
  font-size: 1.5rem;
  font-weight: 600;
  text-shadow: 0 0 10px var(--alert-text-shadow-color, rgba(255, 255, 255, 0.7));
}

.alert-meta {
  display: flex;
  gap: 8px;
  margin-top: 5px;
}

.alert-badge {
  padding: 4px 10px;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.15);
  color: white;
  letter-spacing: 0.5px;
}

.alert-badge.severity-warning {
  background: #ff8c00;
}
.alert-badge.severity-extreme {
  background: #b80f0a;
}
.alert-badge.severity-watch {
  background: #ffd700;
  color: #333;
}
.alert-badge.severity-advisory {
  background: #4682b4;
}
.alert-badge.severity-notice {
  background: #6c757d;
}

.alert-time {
  text-align: right;
  color: rgba(255, 255, 255, 0.9);
}

.time-display {
  font-size: 1.1rem;
  font-weight: 500;
}

.time-remaining {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.7);
}

/* Test Builder Modal */
.test-builder-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.85);
  z-index: 9999;
  overflow-y: auto;
}

.test-builder-content {
  background-color: #1e1e2f;
  margin: 2% auto;
  width: 90%;
  max-width: 1400px;
  border-radius: 8px;
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.8);
  display: flex;
  flex-direction: column;
  max-height: 96vh;
  border: 1px solid #2d2d44;
}

.test-builder-header {
  padding: 15px 20px;
  background: linear-gradient(135deg, #4a235a, #1a1a2e);
  border-radius: 8px 8px 0 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #3a3a5a;
}

.test-builder-header h2 {
  color: #e4e4e4;
  margin: 0;
  font-size: 1.5rem;
  display: flex;
  align-items: center;
}

.test-builder-header h2 i {
  margin-right: 10px;
  color: #f39c12;
}

.close-modal {
  background: none;
  border: none;
  color: #e4e4e4;
  font-size: 1.8rem;
  cursor: pointer;
  padding: 0;
  line-height: 1;
}

.test-builder-body {
  padding: 20px;
  overflow-y: auto;
}

.builder-container {
  display: flex;
  gap: 20px;
}

.builder-form {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.builder-form h3,
.builder-map-container h3 {
  color: #e4e4e4;
  margin-top: 0;
  margin-bottom: 15px;
  border-bottom: 1px solid #3a3a5a;
  padding-bottom: 8px;
}

.form-group {
  margin-bottom: 15px;
}

.form-group label {
  display: block;
  margin-bottom: 5px;
  color: #bbb;
  font-weight: 500;
}

.premium-input,
.premium-select,
.premium-textarea {
  width: 100%;
  padding: 10px 12px;
  background-color: #252538;
  border: 1px solid #3a3a5a;
  border-radius: 5px;
  color: #e4e4e4;
  font-size: 0.95rem;
  transition: all 0.3s ease;
}

.premium-input:focus,
.premium-select:focus,
.premium-textarea:focus {
  border-color: #9b59b6;
  box-shadow: 0 0 0 2px rgba(155, 89, 182, 0.25);
  outline: none;
}

.premium-textarea {
  resize: vertical;
  min-height: 100px;
}

.builder-map-container {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.builder-map {
  height: 400px;
  background-color: #252538;
  border-radius: 5px;
  border: 1px solid #3a3a5a;
}

.map-controls {
  display: flex;
  align-items: center;
  margin-top: 10px;
  gap: 10px;
}

.control-button {
  padding: 8px 12px;
  background-color: #2c2c40;
  color: #e4e4e4;
  border: 1px solid #3a3a5a;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.2s ease;
}

.control-button:hover {
  background-color: #3a3a5a;
}

.map-instructions {
  color: #aaa;
  font-size: 0.9rem;
  margin-left: auto;
}

.test-builder-footer {
  padding: 15px 20px;
  background-color: #1a1a2e;
  border-top: 1px solid #3a3a5a;
  border-radius: 0 0 8px 8px;
  display: flex;
  justify-content: flex-end;
  gap: 15px;
}

.premium-button {
  padding: 10px 20px;
  background: linear-gradient(135deg, #4a235a, #5e2d79);
  color: white;
  border: none;
  border-radius: 5px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s ease;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.premium-button:hover {
  background: linear-gradient(135deg, #5e2d79, #7d3cad);
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.premium-button.action-button {
  background: linear-gradient(135deg, #c0392b, #e74c3c);
}

.premium-button.action-button:hover {
  background: linear-gradient(135deg, #d35400, #e67e22);
}

.full-width {
  width: 100%;
}

/* Optional: Animation for modal opening */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.test-builder-modal.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

.alert-action {
  background-color: rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.9);
  padding: 3px 8px;
  border-radius: 5px;
  font-size: 0.75em;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-left: 8px;
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  transition: all 0.2s ease;
}

.alert-action:hover {
  background-color: rgba(255, 255, 255, 0.25);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  transform: translateY(-1px);
}

/* --- Alert Body Section --- */
.alert-body {
  padding: 20px 25px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.alert-body h3,
.alert-body h4 {
  margin: 0;
  color: rgba(255, 255, 255, 0.85);
  display: flex;
  align-items: center;
  gap: 8px;
}

.alert-body h3 {
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 12px;
}

.alert-body h4 {
  font-size: 0.9rem;
  margin-bottom: 5px;
  color: rgba(255, 255, 255, 0.7);
}

.alert-body p {
  margin: 0;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.95);
}

/* --- NEW: Storm Details Section --- */
.alert-details-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  padding: 15px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 12px;
}

/* --- Premium Threat Cards --- */
.alert-threats {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 22px;
  perspective: 1000px;
}

.threat-card {
  border-radius: 24px;
  padding: 28px 24px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.18);
  text-align: center;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(10px);
  position: relative;
  overflow: hidden;
}

/* Reduced floating animation - now simpler and less CPU intensive */
@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-5px);
  }
}

/* Simplified border glow */
.threat-card::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  z-index: -1;
  opacity: 0.5;
}

/* Simplified hover effects */
.threat-card:hover {
  transform: translateY(-7px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
  border-color: rgba(255, 255, 255, 0.25);
}

.threat-card:hover::before {
  opacity: 0.7;
}

/* Simplified status bar */
.threat-card .status-bar {
  position: absolute;
  bottom: 15px;
  left: 20px;
  right: 20px;
  height: 4px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  overflow: hidden;
}

.threat-card .status-bar::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: var(--progress, 75%);
  background: var(--alert-color, rgba(110, 180, 255, 0.8));
  border-radius: inherit;
}

/* Simplified icon styling */
.threat-card .threat-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-bottom: 20px;
  position: relative;
  z-index: 5;
}

.threat-card .threat-header i {
  font-size: 2rem;
  color: var(--alert-color, #fff);
  text-shadow: 0 0 10px var(--alert-color, rgba(255, 255, 255, 0.6));
  transition: transform 0.3s ease;
}

.threat-card:hover .threat-header i {
  transform: scale(1.15);
}

/* Simplified typography */
.threat-card h4 {
  margin: 0;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: rgba(255, 255, 255, 0.9);
  font-weight: 600;
  transition: all 0.3s ease;
}

.threat-card:hover h4 {
  letter-spacing: 2.5px;
}

/* Simplified value display */
.threat-card .threat-value {
  font-size: 2.5rem;
  font-weight: 700;
  color: #ffffff;
  margin-top: 16px;
  transition: transform 0.3s ease;
}

.threat-card:hover .threat-value {
  transform: scale(1.08);
}

/* Threat level custom properties */
.threat-card.critical {
  --alert-color: rgba(255, 100, 100, 0.8);
  --progress: 90%;
}

.threat-card.high {
  --alert-color: rgba(255, 170, 60, 0.8);
  --progress: 75%;
}

.threat-card.medium {
  --alert-color: rgba(255, 210, 70, 0.8);
  --progress: 55%;
}

.threat-card.low {
  --alert-color: rgba(100, 200, 255, 0.8);
  --progress: 30%;
}

/* --- NEW: Impact Section --- */
.alert-impact p {
  font-size: 1rem;
  font-style: italic;
  background: rgba(var(--alert-color-rgb, 255, 128, 0), 0.1);
  padding: 15px;
  border-radius: 12px;
  border-left: 3px solid var(--alert-color);
}

/* --- NEW: Affected Areas (Enhanced) --- */
.alert-counties p {
  font-size: 1rem;
}
.alert-counties .counties-list {
  font-weight: 500;
  margin-bottom: 8px;
}
.alert-counties .locations-list {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.8);
}
.alert-counties strong {
  color: rgba(255, 255, 255, 0.7);
  font-weight: 600;
}

/* --- Actions/Buttons Section --- */
.alert-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 15px 25px;
  background: rgba(0, 0, 0, 0.35);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: auto; /* Pushes to the bottom */
}

.alert-actions button {
  color: white;
  background: rgba(255, 255, 255, 0.1);
  padding: 10px 15px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
  font-size: 0.9rem;
  transition: all 0.2s;
  backdrop-filter: blur(5px);
}

.alert-actions button:hover {
  transform: translateY(-2px);
}

.alert-actions .send-twitter {
  background-color: rgba(29, 161, 242, 0.3);
}
.alert-actions .send-discord {
  background-color: rgba(114, 137, 218, 0.3);
}

/* Alert Body Section */
.alert-body {
  padding: 20px;
}

.alert-body h3 {
  margin: 0 0 10px 0;
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.8);
}

.alert-body p {
  margin: 0;
}

.alert-counties {
  margin-bottom: 15px;
  padding-bottom: 15px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.alert-counties p {
  font-size: 1.1rem;
  font-weight: 500;
}

/* Threats Section */
.alert-threats {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 15px;
}

.threat-card {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 15px;
  transition: transform 0.2s, box-shadow 0.2s;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.threat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 7px 14px rgba(0, 0, 0, 0.2);
}

.threat-card .threat-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.threat-card .threat-header i {
  font-size: 1.5rem;
  color: var(--alert-color, #fff);
}

.threat-card h4 {
  margin: 0;
  font-size: 1rem;
}

.threat-card .threat-value {
  font-size: 1.2rem;
  font-weight: 600;
}

/* Description Section */
.alert-description {
  margin-top: 15px;
  padding-top: 15px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.alert-description p {
  line-height: 1.5;
  font-size: 0.95rem;
}

/* Actions/Buttons Section */
.alert-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 15px 20px;
  background: rgba(0, 0, 0, 0.3);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.alert-actions button {
  color: white;
  border: none;
  padding: 10px 15px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
  transition: all 0.2s;
  backdrop-filter: blur(5px);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.alert-actions button:hover {
  transform: translateY(-2px);
  filter: brightness(1.2);
}

.alert-actions .toggle-map,
.alert-actions .save-map {
  background: rgba(255, 255, 255, 0.1);
}

.alert-actions .send-telegram {
  background: rgba(0, 136, 204, 0.4);
}
.alert-actions .send-rss {
  background: rgba(255, 136, 0, 0.4);
}
.alert-actions .send-twitter {
  background: rgba(29, 161, 242, 0.4);
}
.alert-actions .send-discord {
  background: rgba(114, 137, 218, 0.4);
}
.alert-actions .copy-clipboard {
  background: rgba(170, 0, 204, 0.4);
}

.stat-box {
  background: var(--card-bg);
  padding: 15px 20px;
  border-radius: var(--border-radius);
  min-width: 120px;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transition: transform 0.3s ease;
}

.stat-box:hover {
  transform: translateY(-5px);
}

.stat-box .count {
  font-size: 28px;
  font-weight: bold;
  margin-bottom: 5px;
  position: relative;
  z-index: 2;
}

.stat-box .label {
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.85);
  position: relative;
  z-index: 2;
}

.stat-box .icon {
  margin-bottom: 8px;
  font-size: 22px;
  position: relative;
  z-index: 2;
}

/* Pulsing effect for critical alerts */
.stat-box.critical .count {
  animation: pulse-critical 2s infinite;
}

.stat-box.warning .count {
  animation: pulse-warning 2.5s infinite;
}

.stat-box.advisory .count {
  animation: pulse-advisory 3s infinite;
}

/* Pulsing animations */
@keyframes pulse-critical {
  0% {
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 0 0 5px rgba(255, 0, 0, 0.5);
  }
  50% {
    color: rgb(255, 60, 60);
    text-shadow: 0 0 15px rgba(255, 0, 0, 0.8);
  }
  100% {
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 0 0 5px rgba(255, 0, 0, 0.5);
  }
}

@keyframes pulse-warning {
  0% {
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 0 0 5px rgba(255, 165, 0, 0.5);
  }
  50% {
    color: rgb(255, 180, 60);
    text-shadow: 0 0 15px rgba(255, 165, 0, 0.8);
  }
  100% {
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 0 0 5px rgba(255, 165, 0, 0.5);
  }
}

@keyframes pulse-advisory {
  0% {
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 0 0 5px rgba(255, 255, 0, 0.5);
  }
  50% {
    color: rgb(220, 220, 60);
    text-shadow: 0 0 15px rgba(255, 255, 0, 0.8);
  }
  100% {
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 0 0 5px rgba(255, 255, 0, 0.5);
  }
}

/* Background glow effect */
.stat-box::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(
    circle at center,
    rgba(255, 255, 255, 0.15) 0%,
    rgba(255, 255, 255, 0) 70%
  );
  opacity: 0;
  transition: opacity 0.3s ease;
}

.stat-box:hover::after {
  opacity: 1;
}

/* Category-specific styling */
.stat-box.tornado {
  border-left: 4px solid #ff0000;
}
.stat-box.severe {
  border-left: 4px solid #ff8000;
}
.stat-box.flood {
  border-left: 4px solid #228b22;
}
.stat-box.winter {
  border-left: 4px solid #7b68ee;
}
.stat-box.wind {
  border-left: 4px solid #daa520;
}
.stat-box.heat {
  border-left: 4px solid #ffd700;
}
.stat-box.fire {
  border-left: 4px solid #b22222;
}
.stat-box.marine {
  border-left: 4px solid #4682b4;
}
.stat-box.tropical {
  border-left: 4px solid #8b0000;
}
.stat-box.air {
  border-left: 4px solid #708090;
}
.stat-box.geo {
  border-left: 4px solid #8b4513;
}
.stat-box.general {
  border-left: 4px solid #ffe4b5;
}

/* Stat grid layout */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 15px;
  margin-bottom: 25px;
}

.fa-arrow-up {
  color: #000 !important;
  font-size: 20px !important;
  display: inline-block !important;
  transform-origin: center center !important;
}

.alerts-grid {
  display: grid;
  gap: 20px;
}

.alert {
  background: var(--card-bg);
  backdrop-filter: blur(10px);
  border-radius: var(--border-radius);
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
  display: flex;
  flex-direction: column;
  position: relative;
  min-height: 320px; /* bigger box */
  padding-bottom: 15px; /* extra breathing room */
}

.alert:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.alert-header {
  padding: 15px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.alert-header h2 {
  margin: 0;
  font-size: 1.3rem;
}

.alert-body {
  padding: 20px 25px; /* more padding */
  flex: 1;
  font-size: 1rem; /* bigger text */
}

.alert-info {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 15px;
}

.info-item {
  display: flex;
  flex-direction: column;
}

.info-label {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.info-value {
  font-weight: 500;
}

.alert-actions {
  padding: 10px 20px;
  display: flex;
  gap: 10px;
  background: rgba(0, 0, 0, 0.2);
}

button {
  background: var(--accent);
  color: white;
  border: none;
  padding: 8px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s;
  display: flex;
  align-items: center;
  gap: 5px;
}

button:hover {
  background: #3942a8;
}

button.toggle-map {
  background: #2c3e50;
}

button.toggle-map:hover {
  background: #34495e;
}

button.save-map {
  background: #27ae60;
}

button.save-map:hover {
  background: #2ecc71;
}

/* Enhanced Map Styles */
.map-container {
  height: auto; /* Auto height based on content */
  width: 90%;
  max-width: 1000px;
  margin: 15px auto;
  border-radius: 12px;
  overflow: hidden;
  display: none;
  background: #1a1a2e;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.mapbox-container {
  height: 600px;
  width: 100%;
}

.post-twitter {
  background-color: #1da1f2;
  color: white;
}

.post-twitter:hover {
  background-color: #1a91da;
}

.spc-outlook-button {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 1;
  background: rgba(30, 30, 30, 0.8);
  color: white;
  border: none;
  border-radius: 4px;
  padding: 8px 12px;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.2s;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(5px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.spc-outlook-button:hover {
  background: rgba(50, 50, 50, 0.9);
}

.spc-outlook-button:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}
.radar-timestamp {
  position: absolute;
  bottom: 10px;
  right: 10px;
  background-color: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 5px 10px;
  border-radius: 4px;
  font-size: 12px;
  z-index: 1000;
}

/*BEGINNING OF NOTIFICAITON SECTION*/
/* ==========================================================================
   Notification Popup Component
   ========================================================================== */

/* General container and layout */
.notification-popup {
  /* CSS variables will be set here by JavaScript */
  --notification-color: #3498db; /* Default color */
  --notification-rgb: 52, 152, 219; /* Default RGB */
  --glow-strength: 10px; /* Default glow */

  position: fixed;
  top: 20px;
  right: 20px;
  max-width: 450px;
  min-width: 350px;
  background: linear-gradient(
    135deg,
    rgba(30, 30, 45, 0.85) 0%,
    rgba(20, 20, 35, 0.95) 100%
  );
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 16px;
  color: #fff;
  z-index: 9999;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transform-origin: right center;
  box-shadow: 0 0 var(--glow-strength) rgba(var(--notification-rgb), 0.4),
    0 8px 32px rgba(0, 0, 0, 0.4);
  transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* --- Dynamic Elements using CSS Variables --- */

.notification-popup::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--notification-color);
  z-index: 1;
  animation: pulse 2s infinite;
}

.notification-popup::after {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(
    circle at center,
    rgba(var(--notification-rgb), 0.03) 0%,
    transparent 60%
  );
  z-index: -1;
  animation: glow-rotate 15s linear infinite;
}

.notification-header::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(var(--notification-rgb), 0.3) 30%,
    rgba(var(--notification-rgb), 0.5) 50%,
    rgba(var(--notification-rgb), 0.3) 70%,
    transparent 100%
  );
}

.notification-icon-wrapper {
  background: rgba(var(--notification-rgb), 0.2);
  border: 1px solid rgba(var(--notification-rgb), 0.3);
  box-shadow: 0 0 15px rgba(var(--notification-rgb), 0.2);
}

.notification-icon-wrapper::after {
  content: "";
  position: absolute;
  width: 100%;
  height: 100%;
  background: radial-gradient(
    circle at center,
    rgba(var(--notification-rgb), 0.3) 0%,
    transparent 70%
  );
  animation: pulse 3s infinite;
}

.notification-icon,
.notification-priority,
.notification-action,
.notification-info-icon,
.notification-threat-icon {
  color: var(--notification-color);
}

.notification-icon {
  text-shadow: 0 0 10px rgba(var(--notification-rgb), 0.7);
}

.notification-badge {
  background: var(--notification-color);
}

.notification-action {
  background: rgba(var(--notification-rgb), 0.2);
}

.view-alert-button {
  background: rgba(var(--notification-rgb), 0.15);
  border: 1px solid rgba(var(--notification-rgb), 0.3);
}

.view-alert-button:hover {
  background: rgba(var(--notification-rgb), 0.3);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* --- END OF NOTIFICATION LOGIC FOR CSS --- */
/* --- Keyframes --- */

@keyframes glow-rotate {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

@keyframes pulse {
  0% {
    opacity: 0.6;
  }
  50% {
    opacity: 1;
  }
  100% {
    opacity: 0.6;
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: scale(0.8);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes notification-entrance {
  0% {
    transform: translateX(120%) scale(0.9);
    opacity: 0;
  }
  60% {
    transform: translateX(-5%) scale(1.02);
  }
  80% {
    transform: translateX(2%) scale(0.99);
  }
  100% {
    transform: translateX(0) scale(1);
    opacity: 1;
  }
}

.notification-popup.severe {
  /* This animation uses the variables from its element */
  animation: severe-pulse 1.5s infinite;
}

@keyframes severe-pulse {
  0% {
    box-shadow: 0 0 15px rgba(var(--notification-rgb), 0.3),
      0 8px 32px rgba(0, 0, 0, 0.4);
  }
  50% {
    box-shadow: 0 0 25px rgba(var(--notification-rgb), 0.7),
      0 8px 32px rgba(0, 0, 0, 0.4);
  }
  100% {
    box-shadow: 0 0 15px rgba(var(--notification-rgb), 0.3),
      0 8px 32px rgba(0, 0, 0, 0.4);
  }
}

/* --- Static Component Styles (Extracted from inline styles) --- */

.test-message {
  background: rgba(255, 59, 48, 0.8);
  color: white;
  font-size: 11px;
  font-weight: bold;
  padding: 4px 8px;
  border-radius: 4px;
  text-align: center;
  letter-spacing: 0.5px;
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.notification-close {
  position: absolute;
  top: 14px;
  right: 14px;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: rgba(255, 255, 255, 0.8);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  z-index: 2;
  backdrop-filter: blur(5px);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.notification-close:hover {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  transform: scale(1.1);
}

.notification-header {
  padding: 18px 20px 12px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  position: relative;
  overflow: hidden;
}

.notification-header-top {
  display: flex;
  align-items: center;
}

.notification-icon-wrapper {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 16px;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}

.notification-icon {
  font-size: 24px;
  animation: fadeIn 0.5s, pulse 3s infinite;
  z-index: 1;
}

.notification-title-wrapper {
  margin-top: 2px;
}

.notification-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 4px;
  letter-spacing: 0.3px;
  text-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

.notification-badges {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 2px;
}

.notification-badge {
  color: white;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 50px;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.notification-priority {
  font-size: 11px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
}

.notification-action {
  padding: 4px 8px;
  border-radius: 4px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 12px;
}

.notification-body {
  padding: 16px 20px;
}

.notification-description {
  margin-bottom: 16px;
  line-height: 1.6;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.9);
  background: rgba(255, 255, 255, 0.05);
  padding: 15px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.notification-section {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.notification-section-header {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.notification-affected-areas-content {
  font-weight: 500;
  color: white;
  line-height: 1.4;
}

.threat-assessment {
  margin-bottom: 16px;
}

.threat-assessment-header {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.threat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 10px;
}

.threat-icon-container {
  font-size: 20px;
  margin-bottom: 5px;
}

.threat-label {
  font-size: 11px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 3px;
}

.threat-value {
  font-weight: 600;
  font-size: 15px;
}

.notification-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 12px;
}

.notification-footer-info {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.notification-footer-item {
  display: flex;
  align-items: center;
  gap: 6px;
  color: rgba(255, 255, 255, 0.8);
  background: rgba(255, 255, 255, 0.05);
  padding: 6px 10px;
  border-radius: 6px;
}

.view-alert-button {
  color: white;
  padding: 8px 14px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
  border: none;
}
/* End of Notification Styles */

/* Twitter Popup Styles - Modern Glassmorphism Edition */
.twitter-popup-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 420px;
  max-width: 90vw;
  background: linear-gradient(
    135deg,
    rgba(18, 20, 30, 0.92),
    rgba(12, 15, 25, 0.95)
  );
  backdrop-filter: blur(20px);
  border-radius: 18px;
  box-shadow: 0 15px 50px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(78, 84, 200, 0.2),
    inset 0 1px 1px rgba(255, 255, 255, 0.05);
  z-index: 1000;
  transform: translateY(100%);
  opacity: 0;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
  overflow: hidden;
  border: 1px solid rgba(78, 84, 200, 0.15);
}

.twitter-popup-closing {
  transform: translateY(100%) !important;
  opacity: 0 !important;
  transition: transform 0.3s cubic-bezier(0.4, 0, 1, 1), opacity 0.2s ease;
}

.twitter-popup-visible {
  transform: translateY(0);
  opacity: 1;
}

.twitter-popup-content {
  padding: 0;
  max-height: 80vh;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(78, 84, 200, 0.5) rgba(0, 0, 0, 0.2);
}

.twitter-popup-content::-webkit-scrollbar {
  width: 6px;
}

.twitter-popup-content::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 3px;
}

.twitter-popup-content::-webkit-scrollbar-thumb {
  background: rgba(78, 84, 200, 0.5);
  border-radius: 3px;
}

.twitter-popup-header {
  background: linear-gradient(135deg, #2b3853 0%, #1a2131 100%);
  color: white;
  padding: 20px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  border-bottom: 1px solid rgba(78, 84, 200, 0.2);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
}

.twitter-popup-header h3 {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
  background: linear-gradient(to bottom, #ffffff, #b8c6db);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  display: flex;
  align-items: center;
  gap: 10px;
}

.twitter-popup-header h3:before {
  content: "\f099"; /* Twitter icon */
  font-family: "Font Awesome 6 Brands";
  font-size: 22px;
  background: linear-gradient(135deg, #1da1f2, #0d8fd8);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.close-popup {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: white;
  cursor: pointer;
  font-size: 15px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3),
    inset 0 1px 1px rgba(255, 255, 255, 0.1);
}

.close-popup:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.05) rotate(90deg);
}

.twitter-summary-section,
.twitter-image-section {
  padding: 24px;
  border-bottom: 1px solid rgba(78, 84, 200, 0.15);
  background: linear-gradient(
    180deg,
    rgba(30, 35, 45, 0.5) 0%,
    rgba(20, 25, 35, 0.5) 100%
  );
}

.twitter-summary-section h4,
.twitter-image-section h4 {
  margin: 0 0 16px;
  font-size: 15px;
  color: rgba(255, 255, 255, 0.85);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  gap: 8px;
}

.twitter-summary-section h4:before {
  content: "\f075"; /* Message icon */
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  color: var(--accent);
}

.twitter-image-section h4:before {
  content: "\f03e"; /* Image icon */
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  color: var(--accent);
}

.twitter-summary-container,
.twitter-image-container {
  position: relative;
}

.twitter-summary {
  width: 100%;
  height: 130px;
  padding: 14px 18px;
  background: rgba(10, 12, 20, 0.7);
  color: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(78, 84, 200, 0.3);
  border-radius: 12px;
  resize: none;
  font-size: 15px;
  line-height: 1.6;
  margin-bottom: 18px;
  box-shadow: inset 0 3px 6px rgba(0, 0, 0, 0.3),
    0 1px 0 rgba(255, 255, 255, 0.05);
  transition: all 0.2s;
}

.twitter-summary:focus {
  outline: none;
  border-color: rgba(78, 84, 200, 0.8);
  box-shadow: 0 0 0 3px rgba(78, 84, 200, 0.2),
    inset 0 3px 6px rgba(0, 0, 0, 0.3);
}

.twitter-preview-image {
  width: 100%;
  border-radius: 12px;
  margin-bottom: 18px;
  border: 1px solid rgba(78, 84, 200, 0.2);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
  transition: transform 0.3s ease;
}

.twitter-preview-image:hover {
  transform: scale(1.02);
  box-shadow: 0 12px 25px rgba(0, 0, 0, 0.5);
}

.copy-summary,
.tweet-it-button,
.copy-image {
  background: linear-gradient(135deg, #4e54c8 0%, #3a40a0 100%);
  color: white;
  border: none;
  padding: 13px 20px;
  border-radius: 50px;
  cursor: pointer;
  font-size: 15px;
  font-weight: 600;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.1),
    inset 0 1px 1px rgba(255, 255, 255, 0.1);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  position: relative;
  overflow: hidden;
}

.copy-summary:before,
.tweet-it-button:before,
.copy-image:before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 40%;
  background: linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.15),
    rgba(255, 255, 255, 0)
  );
  border-radius: 50px 50px 0 0;
}

.copy-summary:hover,
.tweet-it-button:hover,
.copy-image:hover {
  background: linear-gradient(135deg, #5c63d8 0%, #474bbf 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.2),
    inset 0 1px 1px rgba(255, 255, 255, 0.2);
}

.copy-summary:active,
.tweet-it-button:active,
.copy-image:active {
  transform: translateY(1px);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.4), inset 0 1px 2px rgba(0, 0, 0, 0.2);
  background: linear-gradient(135deg, #3f45a9 0%, #2f3590 100%);
}

.twitter-toast {
  position: fixed;
  bottom: -60px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(15, 18, 25, 0.95);
  backdrop-filter: blur(12px);
  color: white;
  padding: 14px 28px;
  border-radius: 50px;
  font-size: 15px;
  font-weight: 500;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  z-index: 1001;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(78, 84, 200, 0.3);
  display: flex;
  align-items: center;
  gap: 10px;
}

.twitter-toast:before {
  content: "\f00c";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  background: linear-gradient(135deg, #4e54c8, #8f94fb);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.twitter-toast-visible {
  bottom: 30px;
  transform: translateX(-50%) scale(1);
}

/* Severity-based styling */

.send-rss {
  background-color: #ff9800;
  color: white;
}
.send-rss:hover {
  background-color: #e65100;
}

/* Optional: Add entrance animation */
@keyframes bounceIn {
  0% {
    transform: translateX(-50%) translateY(60px);
    opacity: 0;
  }
  100% {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
  }
}

/* Map Container Flex Layout */
.map-content-container {
  display: flex;
  width: 100%;
  min-height: 800px;
  background-color: transparent;
}

.copy-clipboard {
  background-color: #aa00cc;
  color: white;
}

/* Telegram button styling */
.send-telegram {
  background-color: #0088cc;
  color: white;
}

.send-telegram:hover {
  background-color: #0099dd;
}

/* Loading and message indicators */
.telegram-loading,
.telegram-success,
.telegram-error {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  padding: 10px 20px;
  border-radius: 5px;
  z-index: 1000;
  text-align: center;
  font-weight: bold;
}

.telegram-loading {
  background-color: rgba(0, 0, 0, 0.7);
  color: white;
}

.telegram-success {
  background-color: rgba(40, 167, 69, 0.9);
  color: white;
}

.telegram-error {
  background-color: rgba(220, 53, 69, 0.9);
  color: white;
}

.map-main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* Mapbox Container Adjustments */
.mapbox-container {
  flex: 1;
  width: 100%;
}

/* Threat Panel Styles */
.threat-panel {
  width: 300px;
  display: flex;
  flex-direction: column;
  border-left: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.85);
}

.threat-panel-header {
  padding: 15px;
  text-align: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.threat-panel-header h3 {
  margin: 0;
  font-size: 1.3rem;
  color: white;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
}

.threat-panel-content {
  flex: 1;
  overflow-y: auto;
  padding: 10px;
}

.threat-icon {
  font-size: 1.5rem;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 50%;
  margin-right: 16px;
  padding: 4px;
  box-sizing: border-box;
}

.threat-info {
  display: flex;
  flex-direction: column;
}

/* Enhanced Dropdown Styling */
.filter-container {
  position: relative;
}

.filter-container select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  padding: 12px 40px 12px 15px;
  background: var(--card-bg);
  color: var(--text-primary);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--border-radius);
  font-size: 16px;
  width: 100%;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

/* Add custom dropdown arrow */
.filter-container::after {
  content: "\f0d7"; /* Font Awesome dropdown icon */
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--accent);
  pointer-events: none;
}

.filter-container select:hover {
  background: var(--hover-bg);
  border-color: var(--accent);
}

.filter-container select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(78, 84, 200, 0.25);
}

/* Style the dropdown options with custom colors */
.filter-container select option {
  background-color: var(--primary-bg);
  color: var(--text-primary);
  padding: 10px;
}

.threat-label {
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 3px;
}

.threat-value {
  font-size: 1.3rem;
  font-weight: bold;
  color: white;
}

.no-threats {
  text-align: center;
  padding: 20px;
  color: rgba(255, 255, 255, 0.5);
  font-style: italic;
}

.affected-areas,
.warning-area-map {
  padding: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.2);
}

.affected-areas h4,
.warning-area-map h4 {
  bottom: 5px;

  margin: 0 0 10px 0;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.8);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Media Query for Responsive Layout */
@media (max-width: 900px) {
  .map-content-container {
    flex-direction: column;
    height: auto;
  }

  .threat-panel {
    width: 100%;
    border-left: none;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
  }

  .mapbox-container {
    height: 400px;
  }
}

.map-title-container {
  display: flex;
  align-items: center;
  gap: 15px;
}

.map-icon {
  font-size: 2.2rem;
  width: 55px;
  height: 55px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.map-title-text h2 {
  font-size: 2.1rem;
  margin: 0 0 5px 0;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
  font-weight: 700;
  letter-spacing: 0.5px;
}

.alert-badges {
  display: flex;
  gap: 8px;
}

.alert-status,
.alert-source {
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.alert-status {
  background: rgba(255, 0, 0, 0.7);
}

.alert-source {
  background: rgba(255, 255, 255, 0.15);
}

.map-time-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.time-item {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.time-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  opacity: 0.8;
  letter-spacing: 0.5px;
}

.time-value {
  font-size: 1rem;
  font-weight: 600;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .map-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
  }

  .map-time-container {
    width: 100%;
    flex-direction: row;
    justify-content: space-between;
  }

  .time-item {
    align-items: flex-start;
  }
}

.map-title {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.map-title h2 {
  font-size: 1.8rem;
  margin: 0;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.7);
}

.alert-status {
  background: rgba(255, 0, 0, 0.7);
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 0.9rem;
  font-weight: bold;
  width: fit-content;
}

.map-time {
  text-align: right;
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 0.9rem;
}

.overview-map {
  width: 100%;
  height: 150px;
  border-radius: 6px;
  overflow: hidden;
  margin-top: 8px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.map-details {
  background: rgba(0, 0, 0, 0.3);
  border-radius: 0 0 12px 12px;
}

.map-info-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.map-location h3,
.map-threats h3 {
  margin-bottom: 10px;
  font-size: 1.2rem;
  color: rgba(255, 255, 255, 0.9);
}

.threats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px;
}

.threat {
  padding: 8px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 6px;
}

.threat-label {
  font-weight: bold;
  margin-right: 5px;
  color: rgba(255, 255, 255, 0.7);
}

@media (max-width: 768px) {
  .map-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .map-time {
    text-align: left;
  }

  .map-info-container {
    grid-template-columns: 1fr;
  }
}

.no-results {
  text-align: center;
  padding: 30px;
  color: var(--text-secondary);
  font-size: 1.2rem;
}

/* Alert type indicators */
.alert-type-indicator {
  position: absolute;
  top: 15px;
  right: 15px;
  height: 10px;
  width: 10px;
  border-radius: 50%;
}

/* ============================================= */
/* NEW: Settings Panel Styles                    */
/* ============================================= */
.settings-toggle-button {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1001;
  width: 50px;
  height: 50px;
  background-color: #1f2937;
  color: #e5e7eb;
  border: 1px solid #4b5563;
  border-radius: 50%;
  font-size: 24px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
}

.settings-toggle-button:hover {
  background-color: #374151;
  transform: scale(1.1) rotate(45deg);
}

.settings-panel {
  position: fixed;
  top: 0;
  right: -550px; /* Start off-screen */
  width: 500px;
  height: 100%;
  background-color: #111827;
  color: #d1d5db;
  z-index: 2000;
  box-shadow: -10px 0 25px rgba(0, 0, 0, 0.5);
  transition: right 0.4s ease-in-out;
  display: flex;
  flex-direction: column;
  border-left: 2px solid #4f46e5;
  font-family: "Saira Condensed", sans-serif;
}

.settings-panel.active {
  right: 0;
}

.settings-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 25px;
  background-color: #1f2937;
  border-bottom: 1px solid #374151;
}

.settings-header h2 {
  margin: 0;
  font-size: 1.5rem;
  color: #f9fafb;
}

.settings-close {
  background: none;
  border: none;
  color: #9ca3af;
  font-size: 2rem;
  cursor: pointer;
  transition: color 0.2s;
}

.settings-close:hover {
  color: #f9fafb;
}

.settings-content {
  flex-grow: 1;
  overflow-y: auto;
  padding: 25px;
}

.settings-section {
  margin-bottom: 30px;
}

.settings-section h3 {
  font-size: 1.2rem;
  color: #e5e7eb;
  border-bottom: 1px solid #4b5563;
  padding-bottom: 10px;
  margin-bottom: 15px;
}

.setting-item {
  margin-bottom: 20px;
}

.setting-item label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
}

.setting-item input[type="range"] {
  width: 100%;
}

.checkbox-group {
  display: flex;
  gap: 15px;
}

.color-settings-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 15px;
}

.color-setting-item {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #1f2937;
  padding: 8px;
  border-radius: 6px;
}

.color-setting-item label {
  flex-grow: 1;
  margin-bottom: 0;
  font-size: 0.9rem;
}

.color-setting-item input[type="color"] {
  -webkit-appearance: none;
  width: 40px;
  height: 30px;
  border: none;
  cursor: pointer;
  background: none;
}
.color-setting-item input[type="color"]::-webkit-color-swatch-wrapper {
  padding: 0;
}
.color-setting-item input[type="color"]::-webkit-color-swatch {
  border: 1px solid #4b5563;
  border-radius: 4px;
}

#settings-live-preview {
  border: 1px dashed #4b5563;
  padding: 15px;
  border-radius: 8px;
  min-height: 200px;
  transform: scale(0.9);
  transform-origin: top left;
  width: 111%; /* Scale compensation */
  pointer-events: none; /* Prevent interaction with preview card */
}

.settings-note {
  font-size: 0.85rem;
  color: #9ca3af;
  margin-bottom: 15px;
  background-color: rgba(79, 70, 229, 0.1);
  border-left: 3px solid #4f46e5;
  padding: 10px;
  border-radius: 4px;
}


/* For tablets and smaller screens */
@media (max-width: 992px) {
  .map-content-container {
    flex-direction: column;
  }

  .threat-panel-glass {
    max-width: 100%;
    border-left: none;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
  }

  .mapbox-container {
    height: 400px;
  }

  .alert-stats {
    justify-content: center;
  }

  .stat-box {
    flex: 1 1 45%;
    min-width: 140px;
  }
}

/* For mobile phones */
@media (max-width: 600px) {
  .map-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    padding: 12px;
  }

  .map-title-text h2 {
    font-size: 1.3rem;
  }

  .alert-badges {
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  .map-time-container {
    flex-direction: column;
    gap: 10px;
    padding: 10px;
  }

  .threat-card {
    padding: 16px;
  }

  .alert-details-grid {
    grid-template-columns: 1fr;
  }

  .stats-grid {
    grid-template-columns: 1fr 1fr;
  }

  .alert {
    min-height: unset;
  }

  .search-container {
    flex-direction: column;
  }

  .search-container input,
  .search-container button {
    border-radius: 8px;
  }

  .filter-container select {
    width: 100%;
  }

  .container {
    padding: 10px;
  }

  .nationwide-map-container {
    width: 95%;
    height: 50%;
    left: 50%;
    transform: translateX(-50%);
  }

  #intensity-chart {
    height: 200px !important;
  }
}

/* For very small screens (under 400px) */
@media (max-width: 400px) {
  .map-title-text h2 {
    font-size: 1.1rem;
  }

  .stat-box .count {
    font-size: 22px;
  }

  .alert-actions button {
    flex: 1 1 100%;
    justify-content: center;
  }
}