/* ═══════════════════════════════════════
   Silver Alert — Dark Theme, Red Accent
   RTL Hebrew, Mobile-First
   ═══════════════════════════════════════ */

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

:root {
  /* Backgrounds */
  --bg-base:     #0e0e11;
  --bg-surface:  #16161b;
  --bg-elevated: #1e1e26;
  --bg-overlay:  #26262f;

  /* Borders */
  --border-subtle:  #22222b;
  --border-default: #2e2e3a;
  --border-strong:  #3e3e4e;

  /* Red accent */
  --red:        #e52b2b;
  --red-bright: #ff4040;
  --red-dim:    rgba(229, 43, 43, 0.12);
  --red-glow:   rgba(229, 43, 43, 0.22);
  --red-border: rgba(229, 43, 43, 0.35);

  /* Text */
  --text-primary:   #f0f0f3;
  --text-secondary: #8e8e9e;
  --text-muted:     #55556a;

  /* Status */
  --green:     #22c55e;
  --green-dim: rgba(34, 197, 94, 0.12);
  --yellow:    #f59e0b;

  /* Misc */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.4);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.5);
  --transition: 0.18s ease;
}

/* ── Base ── */
html {
  direction: rtl;
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  background-color: var(--bg-base);
  color: var(--text-primary);
  font-family: 'Heebo', 'Segoe UI', 'Arial Hebrew', Arial, sans-serif;
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }


/* ════════════════════════════
   NAVBAR
   ════════════════════════════ */
.navbar {
  position: sticky;
  top: 0;
  z-index: 200;
  background: rgba(14, 14, 17, 0.85);
  border-bottom: 1px solid var(--border-subtle);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.navbar-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.25rem;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  flex-shrink: 0;
}

.brand-icon {
  font-size: 1.25rem;
  line-height: 1;
}

.brand-logo {
  width: 56px;
  height: 56px;
  object-fit: contain;
  border-radius: 6px;
  flex-shrink: 0;
}

.brand-text {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.3px;
}

.brand-text strong {
  color: var(--red-bright);
  font-weight: 900;
}

.discord-icon {
  width: 24px;
  height: 24px;
  object-fit: contain;
  flex-shrink: 0;
}

/* Hero title row — image beside heading */
.hero-title-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.9rem;
}

.hero-title-row h1 {
  margin-bottom: 0;
}

.hero-brand-image {
  width: 144px;
  height: 144px;
  object-fit: contain;
  flex-shrink: 0;
  border-radius: 12px;
}

@media (max-width: 560px) {
  .hero-brand-image { width: 88px; height: 88px; }
}

.navbar-end {
  display: flex;
  align-items: center;
  gap: 0.875rem;
}

/* Connection pill */
.conn-pill {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.3rem 0.75rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: 20px;
  font-size: 0.78rem;
  color: var(--text-secondary);
  white-space: nowrap;
}

.conn-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  flex-shrink: 0;
  animation: blink 2s infinite;
}

.conn-dot.disconnected {
  background: var(--text-muted);
  animation: none;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.25; }
}


/* ════════════════════════════
   BUTTONS
   ════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  font-family: inherit;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
  border-radius: var(--radius-md);
}

.btn-sm {
  font-size: 0.82rem;
  padding: 0.4rem 0.9rem;
  border-radius: var(--radius-sm);
}

.btn-red {
  font-size: 0.95rem;
  padding: 0.7rem 1.5rem;
  background: var(--red);
  color: #fff;
}

.btn-red:hover {
  background: var(--red-bright);
  transform: translateY(-1px);
  box-shadow: 0 4px 18px var(--red-glow);
}

.btn-ghost {
  font-size: 0.95rem;
  padding: 0.7rem 1.25rem;
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-default);
}

.btn-ghost:hover {
  color: var(--text-primary);
  border-color: var(--border-strong);
  background: var(--bg-elevated);
}

.btn-outline {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-default);
}

.btn-outline:hover {
  color: var(--text-primary);
  border-color: var(--border-strong);
  background: var(--bg-elevated);
}


/* ════════════════════════════
   HERO
   ════════════════════════════ */
.hero {
  border-bottom: 1px solid var(--border-subtle);
  background:
    radial-gradient(ellipse 70% 50% at 80% -10%, rgba(229,43,43,0.07) 0%, transparent 70%),
    var(--bg-base);
  padding: 3.5rem 1.25rem 3rem;
}

.hero-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
}

.hero-text {
  max-width: 540px;
}

.hero-eyebrow {
  margin-bottom: 1rem;
}

.live-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.3rem 0.85rem;
  background: var(--red-dim);
  border: 1px solid var(--red-border);
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--red-bright);
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--red-bright);
  animation: blink 1.5s infinite;
  flex-shrink: 0;
}

.hero h1 {
  font-size: clamp(1.85rem, 4.5vw, 3rem);
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: -0.5px;
  color: var(--text-primary);
}

.text-red {
  color: var(--red-bright);
}

.hero-sub {
  font-size: 1.05rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 1.75rem;
}

.hero-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

/* Hero stats */
.hero-stats {
  display: flex;
  gap: 1rem;
  flex-shrink: 0;
}

.stat-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.75rem;
  text-align: center;
  min-width: 120px;
}

.stat-value {
  font-size: 2.25rem;
  font-weight: 900;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
  line-height: 1;
  margin-bottom: 0.4rem;
}

.stat-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 500;
}


/* ════════════════════════════
   CONTENT GRID
   ════════════════════════════ */
.content {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem 1.25rem 4rem;
}

.content-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  align-items: start;
}


/* ════════════════════════════
   PANEL
   ════════════════════════════ */
.panel {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border-subtle);
  gap: 0.75rem;
}

.panel-title {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.panel-icon {
  font-size: 1.05rem;
  line-height: 1;
}

.panel-title h2 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
}

.count-badge {
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  color: var(--text-secondary);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.15rem 0.6rem;
  border-radius: 12px;
  min-width: 28px;
  text-align: center;
  font-variant-numeric: tabular-nums;
  transition: background var(--transition), color var(--transition);
}

.count-badge.active {
  background: var(--red-dim);
  border-color: var(--red-border);
  color: var(--red-bright);
}

.panel-body {
  padding: 0.875rem;
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  max-height: 520px;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: var(--border-strong) var(--bg-elevated);
}

.panel-body::-webkit-scrollbar { width: 6px; }
.panel-body::-webkit-scrollbar-track { background: var(--bg-elevated); }
.panel-body::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 4px; }
.panel-body::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }


/* ════════════════════════════
   ALERT CARDS
   ════════════════════════════ */
.alert-card {
  display: flex;
  align-items: stretch;
  gap: 0;
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  overflow: hidden;
  animation: slideDown 0.25s ease-out;
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.alert-stripe {
  width: 4px;
  background: var(--red);
  flex-shrink: 0;
}

.alert-body {
  padding: 0.75rem 0.9rem;
  flex: 1;
  min-width: 0;
}

.alert-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.25rem;
}

.alert-city {
  font-size: 0.975rem;
  font-weight: 700;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.alert-time {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  flex-shrink: 0;
}

.alert-type {
  font-size: 0.78rem;
  color: var(--text-secondary);
  font-weight: 500;
}


/* ════════════════════════════
   SHELTER CARDS
   ════════════════════════════ */
.shelter-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: 0.875rem 1rem 0.75rem;
}

.shelter-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
  gap: 0.5rem;
}

.shelter-city {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shelter-threat-icon {
  font-size: 0.9rem;
  line-height: 1;
  flex-shrink: 0;
}

.shelter-countdown {
  font-size: 1.75rem;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  color: var(--text-primary);
  letter-spacing: 1px;
  line-height: 1;
  margin-bottom: 0.5rem;
}

.shelter-countdown.urgent {
  color: var(--red-bright);
  animation: pulse 1s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.55; }
}

/* Progress bar */
.shelter-progress {
  height: 3px;
  background: var(--bg-overlay);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 0.45rem;
}

.shelter-progress-fill {
  height: 100%;
  border-radius: 2px;
  background: var(--red);
  transition: width 1s linear;
}

.shelter-countdown.urgent ~ .shelter-progress .shelter-progress-fill {
  background: var(--red-bright);
}

.shelter-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 500;
}


/* ════════════════════════════
   EMPTY STATE
   ════════════════════════════ */
.empty-state {
  padding: 2.25rem 1rem;
  text-align: center;
  border: 1px dashed var(--border-default);
  border-radius: var(--radius-md);
  color: var(--text-muted);
  width: 100%;
}

.empty-icon {
  font-size: 2rem;
  margin-bottom: 0.6rem;
  line-height: 1;
}

.empty-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 0.25rem;
}

.empty-sub {
  font-size: 0.78rem;
  color: var(--text-muted);
}


/* ════════════════════════════
   FOOTER
   ════════════════════════════ */
.footer {
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  padding: 2rem 1.25rem;
}

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

.footer-brand {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.footer-brand strong {
  color: var(--red-bright);
}

.footer-copy {
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-bottom: 0.25rem;
}

.footer-copy a,
.footer-disclaimer a {
  color: var(--text-secondary);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.footer-copy a:hover,
.footer-disclaimer a:hover {
  color: var(--text-primary);
}

.footer-disclaimer {
  font-size: 0.75rem;
  color: var(--text-muted);
}


/* ════════════════════════════
   RESPONSIVE — Tablet
   ════════════════════════════ */
@media (max-width: 860px) {
  .content-grid {
    grid-template-columns: 1fr;
  }

  .hero-stats {
    width: 100%;
    justify-content: flex-start;
  }

  .hero-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}


/* ════════════════════════════
   RESPONSIVE — Mobile
   ════════════════════════════ */
@media (max-width: 560px) {
  .hero {
    padding: 2.25rem 1rem 2rem;
  }

  .hero h1 {
    font-size: 1.65rem;
  }

  .hero-sub {
    font-size: 0.95rem;
  }

  .navbar-inner {
    padding: 0 1rem;
  }

  .conn-pill {
    display: none; /* shown inside panel on mobile */
  }

  .content {
    padding: 1.25rem 1rem 3rem;
  }

  .stat-card {
    padding: 1rem 1.25rem;
    min-width: 100px;
  }

  .stat-value {
    font-size: 1.85rem;
  }

  .panel-body {
    max-height: 420px;
  }

  .shelter-countdown {
    font-size: 1.5rem;
  }

  .btn-red,
  .btn-ghost {
    font-size: 0.88rem;
    padding: 0.6rem 1.15rem;
  }
}


/* ════════════════════════════
   RESPONSIVE — Small phones
   ════════════════════════════ */
@media (max-width: 380px) {
  .hero-actions {
    flex-direction: column;
    align-items: flex-start;
  }

  .hero-stats {
    gap: 0.625rem;
  }
}


/* ════════════════════════════
   CHOOSE CITY BANNER
   ════════════════════════════ */
.city-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
  padding: 1rem 1.25rem;
  background: var(--bg-surface);
  border: 1px solid var(--red-border);
  border-radius: var(--radius-lg);
  box-shadow: 0 0 0 1px var(--red-glow) inset;
}

.city-banner-text {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  min-width: 0;
  flex: 1;
}

.city-banner-icon {
  font-size: 1.25rem;
  line-height: 1;
  flex-shrink: 0;
}

.city-banner-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  flex-shrink: 0;
}

.city-banner-sub {
  font-size: 0.78rem;
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.city-banner-sub.has-selection {
  color: var(--red-bright);
  font-weight: 600;
}

.city-banner-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 1rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: color var(--transition), background var(--transition), border-color var(--transition), box-shadow var(--transition), transform var(--transition);
  white-space: nowrap;
  flex-shrink: 0;
}

.city-banner-btn:hover {
  color: var(--text-primary);
  background: var(--bg-overlay);
  border-color: var(--border-strong);
  box-shadow: 0 2px 8px rgba(0,0,0,0.35);
  transform: translateY(-1px);
}

.city-banner-btn.has-selection {
  background: var(--red-dim);
  border-color: var(--red-border);
  color: var(--red-bright);
}

.city-banner-btn.has-selection:hover {
  background: rgba(229, 43, 43, 0.2);
  box-shadow: 0 2px 10px var(--red-glow);
}

@media (max-width: 560px) {
  .city-banner {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
  }

  .city-banner-sub {
    display: none;
  }

  .city-banner-btn {
    width: 100%;
    justify-content: center;
  }
}


/* ════════════════════════════
   PANEL HEADER END
   ════════════════════════════ */
.panel-header-end {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Small choose city button (panel headers) */
.choose-city-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.3rem 0.7rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}

.choose-city-btn:hover {
  color: var(--text-primary);
  border-color: var(--border-strong);
  background: var(--bg-overlay);
}

.choose-city-btn.has-selection {
  background: var(--red-dim);
  border-color: var(--red-border);
  color: var(--red-bright);
}


/* ════════════════════════════
   NEWS FLASH TOAST
   ════════════════════════════ */
.newsflash-toast {
  position: fixed;
  top: 1rem;
  left: 50%;
  transform: translateX(-50%) translateY(calc(-100% - 1.5rem));
  z-index: 600;
  width: min(520px, calc(100vw - 2rem));
  background: #1c1400;
  border: 1px solid rgba(255, 150, 0, 0.45);
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 40px rgba(0,0,0,0.75), 0 0 0 1px rgba(255,150,0,0.08) inset;
  overflow: hidden;
  transition: transform 0.38s cubic-bezier(0.34, 1.36, 0.64, 1);
  will-change: transform;
}

.newsflash-toast.visible {
  transform: translateX(-50%) translateY(0);
}

/* Drain bar */
.nf-progress {
  height: 3px;
  background: #ff9500;
  width: 100%;
}

@keyframes nf-drain {
  from { width: 100%; }
  to   { width: 0%;   }
}

.nf-inner {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem 0.875rem 0.875rem 1rem;
}

.nf-icon {
  font-size: 1.4rem;
  line-height: 1;
  flex-shrink: 0;
}

.nf-text {
  flex: 1;
  min-width: 0;
}

.nf-title {
  font-size: 0.9rem;
  font-weight: 800;
  color: #ffb020;
  margin-bottom: 0.15rem;
  letter-spacing: -0.2px;
}

.nf-cities {
  font-size: 0.82rem;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  opacity: 0.85;
}

.nf-close {
  background: none;
  border: none;
  color: rgba(255,255,255,0.4);
  cursor: pointer;
  font-size: 1rem;
  width: 36px;
  height: 36px;
  min-width: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  flex-shrink: 0;
  transition: color var(--transition), background var(--transition);
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.nf-close:hover {
  color: #fff;
  background: rgba(255,255,255,0.1);
}

@media (max-width: 560px) {
  .newsflash-toast {
    top: 0.625rem;
  }

  .nf-title { font-size: 0.85rem; }
  .nf-cities { font-size: 0.78rem; }
}


/* ════════════════════════════
   WAVE CARDS (Alert Feed)
   ════════════════════════════ */
.wave-card {
  display: flex;
  align-items: stretch;
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  overflow: hidden;
  animation: slideDown 0.25s ease-out;
}

.wave-highlighted {
  border-color: var(--red-border);
}

.wave-stripe {
  width: 4px;
  background: var(--red);
  flex-shrink: 0;
}

.wave-highlighted .wave-stripe {
  background: var(--red-bright);
}

.wave-body {
  padding: 0.75rem 0.9rem;
  flex: 1;
  min-width: 0;
}

.wave-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.wave-label {
  font-size: 0.78rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.wave-time {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  flex-shrink: 0;
}

.wave-cities {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.wave-city {
  display: inline-block;
  background: var(--bg-overlay);
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  padding: 0.2rem 0.5rem;
  font-size: 0.82rem;
  color: var(--text-primary);
  font-weight: 500;
}

.wave-city-selected {
  background: var(--red-dim);
  border-color: var(--red-border);
  color: var(--red-bright);
  font-weight: 700;
}

/* Threat-type sections inside a wave */
.wave-section {
  margin-bottom: 0.6rem;
}

.wave-section:last-child {
  margin-bottom: 0;
}

.wave-type-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.18rem 0.6rem;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.2px;
  margin-bottom: 0.45rem;
}

/* Red — missiles */
.wave-type-missiles {
  background: rgba(229, 43, 43, 0.14);
  border: 1px solid rgba(229, 43, 43, 0.38);
  color: #ff4040;
}

/* Orange — hostile aircraft */
.wave-type-aircraft {
  background: rgba(255, 140, 0, 0.14);
  border: 1px solid rgba(255, 140, 0, 0.38);
  color: #ff9500;
}

/* Yellow — other (terrorist infiltration etc.) */
.wave-type-other {
  background: rgba(245, 158, 11, 0.14);
  border: 1px solid rgba(245, 158, 11, 0.38);
  color: #f59e0b;
}


/* Active siren state in shelter board */
.shelter-card-siren {
  border-color: var(--red-border);
  background: rgba(229, 43, 43, 0.06);
}

.shelter-siren-active {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--red-bright);
  animation: pulse 0.9s infinite;
  line-height: 1;
  margin-bottom: 0.5rem;
  letter-spacing: -0.2px;
}

.shelter-progress-siren {
  width: 100% !important;
  background: var(--red-bright);
  animation: siren-bar 0.9s ease-in-out infinite alternate;
}

@keyframes siren-bar {
  from { opacity: 1; }
  to   { opacity: 0.45; }
}


/* ════════════════════════════
   SHELTER — SELECTED CITY
   ════════════════════════════ */
.shelter-card.shelter-selected {
  border-color: var(--red-border);
}

.shelter-city.shelter-city-selected {
  color: var(--red-bright);
  font-weight: 700;
}


/* ════════════════════════════
   SOUND WIDGET
   ════════════════════════════ */
.sound-widget {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 300;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.5rem;
}

/* ── FAB ── */
.sound-fab {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  color: var(--text-primary);
  font-size: 1.3rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(0,0,0,0.5);
  transition: all var(--transition);
  flex-shrink: 0;
  line-height: 1;
}

.sound-fab:hover {
  background: var(--bg-overlay);
  border-color: var(--border-strong);
  transform: scale(1.08);
  box-shadow: 0 6px 20px rgba(0,0,0,0.6);
}

.sound-fab.muted {
  opacity: 0.55;
  border-color: var(--red-border);
}

/* ── Panel ── */
.sound-panel {
  width: 300px;
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 40px rgba(0,0,0,0.7);
  overflow: hidden;
  transform-origin: bottom right;
  transform: scale(0.92) translateY(6px);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.2s cubic-bezier(0.34,1.56,0.64,1), opacity 0.18s ease;
}

.sound-panel.open {
  transform: scale(1) translateY(0);
  opacity: 1;
  pointer-events: all;
}

/* Header */
.sp-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border-subtle);
}

.sp-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-primary);
}

.sp-close {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.85rem;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  transition: color var(--transition), background var(--transition);
}

.sp-close:hover {
  color: var(--text-primary);
  background: var(--bg-overlay);
}

/* Controls */
.sp-controls {
  padding: 0.875rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  border-bottom: 1px solid var(--border-subtle);
}

.sp-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.sp-label {
  font-size: 0.82rem;
  color: var(--text-secondary);
  font-weight: 500;
  flex-shrink: 0;
}

/* Mute button */
.sp-mute-btn {
  background: var(--bg-overlay);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  padding: 0.3rem 0.8rem;
  color: var(--text-primary);
  cursor: pointer;
  font-size: 1rem;
  font-family: inherit;
  min-width: 52px;
  text-align: center;
  transition: all var(--transition);
  line-height: 1.6;
}

.sp-mute-btn:hover {
  border-color: var(--border-strong);
  background: var(--bg-surface);
}

.sp-mute-btn.muted {
  background: var(--red-dim);
  border-color: var(--red-border);
}

/* Volume row */
.sp-volume {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: 1;
  min-width: 0;
}

.sp-vol-step {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--bg-overlay);
  border: 1px solid var(--border-default);
  color: var(--text-primary);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
  flex-shrink: 0;
  line-height: 1;
}

.sp-vol-step:hover {
  background: var(--bg-surface);
  border-color: var(--border-strong);
}

.sp-vol-slider {
  flex: 1;
  min-width: 0;
  -webkit-appearance: none;
  appearance: none;
  height: 4px;
  border-radius: 2px;
  background: var(--bg-overlay);
  outline: none;
  cursor: pointer;
  accent-color: var(--red);
}

.sp-vol-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--red);
  cursor: pointer;
  box-shadow: 0 0 0 3px rgba(229,43,43,0.25);
}

.sp-vol-slider::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--red);
  cursor: pointer;
  border: none;
}

/* Sound list section */
.sp-sounds {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border-subtle);
}

.sp-sounds-title {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-bottom: 0.5rem;
}

.sp-sound-list {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  max-height: 150px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--border-strong) transparent;
}

.sp-sound-list::-webkit-scrollbar { width: 3px; }
.sp-sound-list::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 2px; }

.sp-sound-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.45rem 0.625rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  border: 1px solid transparent;
  transition: background var(--transition), border-color var(--transition);
}

.sp-sound-item:hover {
  background: var(--bg-elevated);
}

.sp-sound-item.selected {
  background: var(--red-dim);
  border-color: var(--red-border);
}

.sp-sound-item input[type="radio"] {
  accent-color: var(--red);
  cursor: pointer;
  flex-shrink: 0;
  width: 14px;
  height: 14px;
}

.sp-sound-name {
  flex: 1;
  font-size: 0.84rem;
  color: var(--text-primary);
  cursor: pointer;
}

.sp-sound-play {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.75rem;
  padding: 0.2rem 0.45rem;
  border-radius: 4px;
  transition: color var(--transition), background var(--transition);
  flex-shrink: 0;
}

.sp-sound-play:hover {
  color: var(--text-primary);
  background: var(--bg-overlay);
}

.sp-no-sounds {
  font-size: 0.78rem;
  color: var(--text-muted);
  text-align: center;
  padding: 0.75rem 0.5rem;
  line-height: 1.6;
}

.sp-no-sounds small {
  font-size: 0.7rem;
  opacity: 0.7;
}

/* Footer — test button */
.sp-footer {
  padding: 0.75rem 1rem;
}

.sp-test-btn {
  width: 100%;
  padding: 0.55rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
}

.sp-test-btn:hover {
  background: var(--red-dim);
  border-color: var(--red-border);
  color: var(--red-bright);
}

/* Desktop: sound panel always visible, FAB hidden */
@media (min-width: 769px) {
  .sound-fab { display: none; }

  .sound-panel {
    transform: scale(1) translateY(0) !important;
    opacity: 1 !important;
    pointer-events: all !important;
  }

  .sp-close { display: none; }
}

/* Mobile: make panel full-width */
@media (max-width: 380px) {
  .sound-widget {
    right: 1rem;
    bottom: 1rem;
  }

  .sound-panel {
    width: calc(100vw - 2rem);
    transform-origin: bottom right;
  }
}


/* ════════════════════════════
   CITY CHOOSER MODAL
   ════════════════════════════ */
.city-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.75);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.city-modal-overlay[hidden] { display: none; }

.city-modal {
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 420px;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 16px 64px rgba(0,0,0,0.8);
  overflow: hidden;
}

.city-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border-subtle);
  flex-shrink: 0;
}

.city-modal-header h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
}

.city-modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.9rem;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  transition: color var(--transition), background var(--transition);
}

.city-modal-close:hover {
  color: var(--text-primary);
  background: var(--bg-overlay);
}

.city-modal-search {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border-subtle);
  flex-shrink: 0;
}

.city-modal-search input {
  width: 100%;
  padding: 0.55rem 0.875rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.9rem;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.city-modal-search input:focus {
  border-color: var(--red);
  box-shadow: 0 0 0 3px var(--red-dim);
}

.city-modal-search input::placeholder { color: var(--text-muted); }

.city-modal-list {
  flex: 1;
  overflow-y: auto;
  padding: 0.5rem;
  scrollbar-width: thin;
  scrollbar-color: var(--border-strong) transparent;
}

.city-modal-list::-webkit-scrollbar { width: 4px; }
.city-modal-list::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 4px; }

.city-modal-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  border: 1px solid transparent;
  transition: background var(--transition), border-color var(--transition);
}

.city-modal-item:hover {
  background: var(--bg-elevated);
}

.city-modal-item.selected {
  background: var(--red-dim);
  border-color: var(--red-border);
}

.city-modal-item input[type="checkbox"] {
  accent-color: var(--red);
  cursor: pointer;
  flex-shrink: 0;
  width: 15px;
  height: 15px;
}

.city-modal-name {
  flex: 1;
  font-size: 0.88rem;
  color: var(--text-primary);
}

.city-modal-item.selected .city-modal-name {
  color: var(--red-bright);
  font-weight: 700;
}

.city-modal-check {
  color: var(--red-bright);
  font-size: 0.85rem;
  font-weight: 700;
  flex-shrink: 0;
}

.city-modal-empty {
  text-align: center;
  padding: 2rem 1rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.city-modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.875rem 1rem;
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-elevated);
  flex-shrink: 0;
  gap: 0.75rem;
}
