:root {
  --bg: #0a1628;
  --card: #0f1d32;
  --text: #ffffff;
  --muted: #a0b3cc;
  --border: rgba(255,255,255,0.15);
  --error: #e74c3c;
  --error-bg: rgba(231, 76, 60, 0.15);
  --red: #bf0a30;
  --white: #ffffff;
  --blue: #002868;
  --gold: #ffd700;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  background-image: 
    radial-gradient(ellipse at top left, rgba(0, 40, 104, 0.3) 0%, transparent 50%),
    radial-gradient(ellipse at bottom right, rgba(191, 10, 48, 0.2) 0%, transparent 50%);
  background-attachment: fixed;
}

/* Eagle Icons */
.eagle-icon {
  font-size: 48px;
  animation: eagle-soar 3s ease-in-out infinite;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.3));
}

.eagle-icon.left {
  animation-delay: 0s;
}

.eagle-icon.right {
  animation-delay: 1.5s;
  transform: scaleX(-1);
}

@keyframes eagle-soar {
  0%, 100% { 
    transform: translateY(0) rotate(-5deg); 
  }
  50% { 
    transform: translateY(-8px) rotate(5deg); 
  }
}

.eagle-icon.right {
  animation-name: eagle-soar-right;
}

@keyframes eagle-soar-right {
  0%, 100% { 
    transform: scaleX(-1) translateY(0) rotate(5deg); 
  }
  50% { 
    transform: scaleX(-1) translateY(-8px) rotate(-5deg); 
  }
}

/* Eagle Loading Animation */
.eagle-loading {
  font-size: 64px;
  animation: eagle-fly 2s ease-in-out infinite;
  filter: drop-shadow(0 8px 16px rgba(255, 215, 0, 0.4));
}

@keyframes eagle-fly {
  0%, 100% { 
    transform: translateY(0) scale(1);
  }
  25% {
    transform: translateY(-15px) scale(1.1) rotate(-10deg);
  }
  50% { 
    transform: translateY(-5px) scale(1);
  }
  75% {
    transform: translateY(-15px) scale(1.1) rotate(10deg);
  }
}

/* Loading Overlay */
.loadingOverlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--bg);
  background-image: 
    radial-gradient(ellipse at center, rgba(0, 40, 104, 0.4) 0%, transparent 60%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  gap: 16px;
}

.loadingOverlay p {
  color: var(--gold);
  margin: 0;
  font-weight: 600;
  font-size: 16px;
  letter-spacing: 1px;
}

/* Spinner */
.spinner {
  width: 48px;
  height: 48px;
  border: 4px solid var(--blue);
  border-top-color: var(--red);
  border-right-color: var(--white);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Map Loading */
.mapLoading {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--card);
  z-index: 10;
  gap: 12px;
  border-radius: 16px;
}

.mapLoading p {
  color: var(--muted);
  margin: 0;
  font-size: 14px;
}

/* Error Banner */
.errorBanner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 12px 20px;
  background: var(--error-bg);
  border-bottom: 1px solid var(--error);
  color: var(--text);
  font-size: 14px;
}

.errorBanner button {
  padding: 6px 16px;
  background: var(--error);
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
}

.errorBanner button:hover {
  background: #c0392b;
}

.header {
  padding: 24px 16px;
  border-bottom: 3px solid;
  border-image: linear-gradient(90deg, var(--red), var(--white), var(--blue)) 1;
  background: linear-gradient(180deg, rgba(0, 40, 104, 0.4) 0%, transparent 100%);
}

.brand-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
}

.flag {
  width: 90px;
  height: 48px;
  border-radius: 4px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.4);
  flex-shrink: 0;
  border: 2px solid var(--gold);
}

.brand-text {
  text-align: center;
}

.brand-text h1 { 
  margin: 0 0 6px; 
  font-size: 28px; 
  background: linear-gradient(90deg, var(--white) 0%, var(--gold) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: none;
  font-weight: 700;
  letter-spacing: 2px;
}
.brand-text p { 
  margin: 0; 
  color: var(--muted);
  font-size: 15px;
}

.layout {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 16px;
  padding: 16px;
}

.mapWrap {
  position: relative;
  background: var(--card);
  border: 2px solid var(--blue);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 0 30px rgba(0, 40, 104, 0.3), inset 0 0 60px rgba(0, 40, 104, 0.1);
}

#mapContainer {
  width: 100%;
  padding: 15px;
}

#mapContainer svg {
  width: 100%;
  height: auto;
  display: block;
}

.hint {
  position: absolute;
  left: 12px;
  bottom: 12px;
  padding: 8px 10px;
  font-size: 13px;
  color: var(--muted);
  background: rgba(0,0,0,0.35);
  border: 1px solid var(--border);
  border-radius: 12px;
}

.panel {
  background: var(--card);
  border: 2px solid var(--red);
  border-radius: 16px;
  padding: 16px;
  min-height: 520px;
  box-shadow: 0 0 25px rgba(191, 10, 48, 0.2);
}

.panelHeader h2 { 
  margin: 0 0 6px; 
  font-size: 20px;
  color: var(--gold);
}
.panelHeader p { margin: 0 0 14px; color: var(--muted); }

.linksList { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.linksList a {
  display: block;
  padding: 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  color: var(--text);
  text-decoration: none;
  background: linear-gradient(135deg, rgba(0, 40, 104, 0.2) 0%, rgba(191, 10, 48, 0.1) 100%);
  transition: all 0.2s ease;
}
.linksList a:hover { 
  background: linear-gradient(135deg, rgba(0, 40, 104, 0.3) 0%, rgba(191, 10, 48, 0.2) 100%);
  border-color: var(--gold);
  transform: translateX(5px);
}

.emptyState { color: var(--muted); padding: 10px 0; }

.footer {
  padding: 30px 16px;
  color: var(--muted);
  border-top: 3px solid;
  border-image: linear-gradient(90deg, var(--red), var(--white), var(--blue)) 1;
  background: linear-gradient(0deg, rgba(0, 40, 104, 0.3) 0%, transparent 100%);
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
}

.footer-content small {
  font-size: 14px;
  color: var(--gold);
  font-weight: 600;
}

.footer-nav {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin: 16px 0;
}

.footer-nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  padding: 6px 12px;
  border-radius: 6px;
  transition: all 0.2s;
}

.footer-nav a:hover {
  color: var(--white);
  background: rgba(191, 10, 48, 0.3);
}

.footer-seo {
  font-size: 12px;
  line-height: 1.6;
  margin-top: 12px;
  opacity: 0.7;
}

/* Scroll Indicator - Fixed at bottom */
.scroll-indicator {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 14px 20px;
  background: linear-gradient(135deg, #1a237e 0%, #b71c1c 100%);
  backdrop-filter: blur(10px);
  border-top: 2px solid #ffde00;
  cursor: pointer;
  z-index: 9999;
  transition: transform 0.3s ease, opacity 0.3s ease;
  animation: pulse-indicator 2s ease-in-out infinite;
}

@keyframes pulse-indicator {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

.scroll-indicator:hover {
  background: linear-gradient(135deg, #283593 0%, #c62828 100%);
}

.scroll-indicator span {
  color: #ffffff;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

.scroll-indicator .scroll-icon {
  font-size: 18px;
}

.scroll-arrow {
  width: 12px;
  height: 12px;
  border-right: 2px solid #4a90d9;
  border-bottom: 2px solid #4a90d9;
  transform: rotate(45deg);
  animation: bounce 1.5s infinite;
}

@keyframes bounce {
  0%, 100% {
    transform: rotate(45deg) translateY(0);
  }
  50% {
    transform: rotate(45deg) translateY(5px);
  }
}

.scroll-indicator.hidden {
  transform: translateY(100%);
  opacity: 0;
  pointer-events: none;
}

/* National Hotlines Section */
.national-section {
  padding: 60px 16px;
  background: 
    linear-gradient(180deg, var(--bg) 0%, rgba(0, 40, 104, 0.2) 50%, var(--bg) 100%);
  border-top: 3px solid var(--red);
  position: relative;
}

.national-section::before {
  content: '🦅';
  position: absolute;
  top: -28px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 48px;
  filter: drop-shadow(0 4px 12px rgba(255, 215, 0, 0.5));
  animation: eagle-hover 2s ease-in-out infinite;
}

@keyframes eagle-hover {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(-8px); }
}

.national-section h2 {
  text-align: center;
  margin: 0 0 8px;
  font-size: 24px;
  color: var(--white);
  text-transform: uppercase;
  letter-spacing: 2px;
}

.national-subtitle {
  text-align: center;
  color: var(--muted);
  margin: 0 0 32px;
  font-size: 15px;
}

.hotlines-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  max-width: 1200px;
  margin: 0 auto;
}

.hotline-card {
  display: flex;
  flex-direction: column;
  padding: 18px;
  background: var(--card);
  border: 2px solid var(--border);
  border-radius: 12px;
  text-decoration: none;
  color: var(--text);
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
}

.hotline-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--blue);
  transition: width 0.3s ease;
}

.hotline-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 25px rgba(0, 40, 104, 0.3);
  border-color: var(--gold);
}

.hotline-card:hover::before {
  width: 100%;
  opacity: 0.1;
}

.hotline-card.emergency {
  border-color: var(--red);
  background: linear-gradient(135deg, rgba(191, 10, 48, 0.15) 0%, var(--card) 100%);
}

.hotline-card.emergency::before {
  background: var(--red);
}

.hotline-card.crisis {
  border-color: #9b59b6;
  background: linear-gradient(135deg, rgba(155,89,182,0.15) 0%, var(--card) 100%);
}

.hotline-card.crisis::before {
  background: #9b59b6;
}

.hotline-card.info {
  border-color: var(--blue);
  background: linear-gradient(135deg, rgba(0, 40, 104, 0.2) 0%, var(--card) 100%);
}

.hotline-card.info::before {
  background: var(--blue);
}

.hotline-number {
  font-size: 18px;
  font-weight: 700;
  color: #4a90d9;
  margin-bottom: 4px;
}

.hotline-card.emergency .hotline-number { color: #e74c3c; }
.hotline-card.crisis .hotline-number { color: #9b59b6; }
.hotline-card.info .hotline-number { color: #3498db; }

.hotline-name {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 4px;
}

.hotline-desc {
  font-size: 12px;
  color: var(--muted);
}

/* Disclaimer */
.disclaimer {
  margin-top: 20px;
  padding: 16px;
  background: rgba(255, 193, 7, 0.1);
  border: 1px solid rgba(255, 193, 7, 0.3);
  border-radius: 8px;
  font-size: 11px;
  line-height: 1.6;
  color: #999;
  text-align: left;
}

.disclaimer strong {
  color: #ffc107;
}

.disclaimer a {
  color: #4a90d9;
  text-decoration: none;
}

.disclaimer a:hover {
  text-decoration: underline;
}

/* Made with love message */
.made-with-love {
  margin-top: 16px;
  padding: 12px 16px;
  background: linear-gradient(135deg, rgba(0, 40, 104, 0.2) 0%, rgba(191, 10, 48, 0.15) 100%);
  border: 1px solid var(--gold);
  border-radius: 8px;
  font-size: 13px;
  color: var(--gold);
  text-align: center;
  font-weight: 500;
  letter-spacing: 0.5px;
}

/* ========== RESPONSIVE / MOBILE STYLES ========== */

/* Tablet */
@media (max-width: 900px) {
  .layout { 
    grid-template-columns: 1fr; 
    padding: 12px;
    gap: 12px;
  }
  .mapWrap, .panel { min-height: 350px; }
  
  .brand-row {
    gap: 12px;
  }
  
  .eagle-icon {
    font-size: 36px;
  }
  
  .flag {
    width: 70px;
    height: 38px;
  }
  
  .brand-text h1 {
    font-size: 22px;
  }
  
  .hotlines-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Mobile */
@media (max-width: 600px) {
  .header {
    padding: 16px 12px;
  }
  
  .brand-row {
    flex-direction: column;
    gap: 10px;
  }
  
  .eagle-icon {
    display: none;
  }
  
  .flag {
    width: 80px;
    height: 42px;
  }
  
  .brand-text {
    text-align: center;
  }
  
  .brand-text h1 {
    font-size: 20px;
    letter-spacing: 1px;
  }
  
  .brand-text p {
    font-size: 13px;
  }
  
  .layout {
    padding: 10px;
    gap: 10px;
  }
  
  .mapWrap {
    border-radius: 12px;
  }
  
  #mapContainer {
    padding: 8px;
  }
  
  .panel {
    min-height: auto;
    padding: 12px;
    border-radius: 12px;
  }
  
  /* Hide scroll indicator on mobile - content stacks vertically */
  .scroll-indicator {
    display: none;
  }
  
  .panelHeader h2 {
    font-size: 18px;
  }
  
  .linksList a {
    padding: 12px;
    font-size: 14px;
  }
  
  .hint {
    font-size: 11px;
    padding: 6px 8px;
  }
  
  /* Scroll indicator */
  .scroll-indicator {
    padding: 12px 16px;
  }
  
  .scroll-indicator span {
    font-size: 14px;
  }
  
  /* National section */
  .national-section {
    padding: 40px 12px;
  }
  
  .national-section::before {
    font-size: 36px;
    top: -22px;
  }
  
  .national-section h2 {
    font-size: 18px;
    letter-spacing: 1px;
  }
  
  .national-subtitle {
    font-size: 13px;
  }
  
  .hotlines-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  
  .hotline-card {
    padding: 14px;
  }
  
  .hotline-number {
    font-size: 16px;
  }
  
  .hotline-name {
    font-size: 13px;
  }
  
  .hotline-desc {
    font-size: 11px;
  }
  
  /* Footer */
  .footer {
    padding: 24px 12px;
  }
  
  .footer-content small {
    font-size: 12px;
  }
  
  .footer-nav {
    flex-direction: column;
    gap: 12px;
    align-items: center;
  }
  
  .footer-nav a {
    font-size: 14px;
  }
  
  .footer-seo {
    font-size: 11px;
  }
  
  .disclaimer {
    font-size: 10px;
    padding: 12px;
  }
  
  .made-with-love {
    font-size: 12px;
    padding: 10px 12px;
  }
}

/* Small phones */
@media (max-width: 380px) {
  .brand-text h1 {
    font-size: 18px;
  }
  
  .mapWrap {
    min-height: 240px;
  }
  
  .national-section h2 {
    font-size: 16px;
  }
}
