/* ========================================
   CSS Variables & Theme System
   ======================================== */
:root {
  /* Shared values (don't change between themes) */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-full: 9999px;

  --font-family: 'Heebo', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-size-xs: 0.75rem;
  --font-size-sm: 0.875rem;
  --font-size-base: 1rem;
  --font-size-lg: 1.125rem;
  --font-size-xl: 1.25rem;
  --font-size-2xl: 1.5rem;
  --font-size-3xl: 2rem;
  --font-size-4xl: 2.5rem;

  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
  --transition-slow: 400ms ease;

  /* Status colors (same across all themes) */
  --color-danger: #ff4757;
  --color-warning: #ffa502;
  --color-safe: #2ed573;
  --color-info: #1e90ff;
  --color-risk-minimal: #2ed573;
  --color-risk-low: #4facfe;
  --color-risk-medium: #ffa502;
  --color-risk-high: #ff6348;
  --color-risk-critical: #ff4757;
}

/* ---- Default: Blue-Dark (current theme) ---- */
:root,
[data-theme="blue"] {
  --color-bg: #0a0e1a;
  --color-bg-2: #0f1424;
  --color-surface: #161b2e;
  --color-surface-2: #1e2540;
  --color-surface-3: #252d4a;
  --color-border: #2a3355;
  --color-border-light: #353f65;
  --color-text: #e8eaf0;
  --color-text-secondary: #8b93b0;
  --color-text-muted: #5a6380;
  --color-primary: #4f8cff;
  --color-primary-glow: rgba(79, 140, 255, 0.15);
  --color-primary-hover: #6ba0ff;
  --color-danger-glow: rgba(255, 71, 87, 0.15);
  --color-danger-bg: rgba(255, 71, 87, 0.08);
  --color-warning-glow: rgba(255, 165, 2, 0.15);
  --color-safe-glow: rgba(46, 213, 115, 0.15);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.25);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.3);
  --shadow-glow-primary: 0 0 20px var(--color-primary-glow);
  --shadow-glow-danger: 0 0 20px var(--color-danger-glow);
  --shadow-glow-safe: 0 0 20px var(--color-safe-glow);
}

/* ---- True Dark ---- */
[data-theme="dark"] {
  --color-bg: #000000;
  --color-bg-2: #0a0a0a;
  --color-surface: #141414;
  --color-surface-2: #1c1c1c;
  --color-surface-3: #262626;
  --color-border: #333333;
  --color-border-light: #444444;
  --color-text: #f0f0f0;
  --color-text-secondary: #a0a0a0;
  --color-text-muted: #666666;
  --color-primary: #5b9aff;
  --color-primary-glow: rgba(91, 154, 255, 0.12);
  --color-primary-hover: #7db0ff;
  --color-danger-glow: rgba(255, 71, 87, 0.12);
  --color-danger-bg: rgba(255, 71, 87, 0.06);
  --color-warning-glow: rgba(255, 165, 2, 0.12);
  --color-safe-glow: rgba(46, 213, 115, 0.12);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.6);
  --shadow-glow-primary: 0 0 15px var(--color-primary-glow);
  --shadow-glow-danger: 0 0 15px var(--color-danger-glow);
  --shadow-glow-safe: 0 0 15px var(--color-safe-glow);
}

/* ---- Light ---- */
[data-theme="light"] {
  --color-bg: #f5f5f7;
  --color-bg-2: #eeeef0;
  --color-surface: #ffffff;
  --color-surface-2: #f0f0f2;
  --color-surface-3: #e5e5ea;
  --color-border: #d1d1d6;
  --color-border-light: #c7c7cc;
  --color-text: #1c1c1e;
  --color-text-secondary: #636366;
  --color-text-muted: #8e8e93;
  --color-primary: #3478f6;
  --color-primary-glow: rgba(52, 120, 246, 0.1);
  --color-primary-hover: #2563eb;
  --color-danger-glow: rgba(255, 59, 48, 0.1);
  --color-danger-bg: rgba(255, 59, 48, 0.06);
  --color-warning-glow: rgba(255, 149, 0, 0.1);
  --color-safe-glow: rgba(52, 199, 89, 0.1);
  --shadow-sm: 0 1px 4px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 2px 10px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 4px 20px rgba(0, 0, 0, 0.12);
  --shadow-glow-primary: 0 0 12px var(--color-primary-glow);
  --shadow-glow-danger: 0 0 12px var(--color-danger-glow);
  --shadow-glow-safe: 0 0 12px var(--color-safe-glow);
}

/* Light theme specific overrides */
[data-theme="light"] body::before {
  background: radial-gradient(ellipse at 50% 0%, rgba(52, 120, 246, 0.04) 0%, transparent 70%);
}

[data-theme="light"] .alert-banner {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

/* ========================================
   Reset & Base
   ======================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family);
  background-color: var(--color-bg);
  color: var(--color-text);
  direction: rtl;
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Subtle gradient background */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 50vh;
  background: radial-gradient(ellipse at 50% 0%, rgba(79, 140, 255, 0.05) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

a {
  color: var(--color-primary);
  text-decoration: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

input {
  font-family: inherit;
}

ul {
  list-style: none;
}

/* ========================================
   App Container
   ======================================== */
.app {
  position: relative;
  z-index: 1;
  max-width: 480px;
  margin: 0 auto;
  padding: var(--space-md);
  padding-bottom: var(--space-2xl);
}

/* ========================================
   Header
   ======================================== */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-lg) 0;
  margin-bottom: var(--space-md);
}

.header__logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.header__icon {
  width: 32px;
  height: 32px;
  color: var(--color-primary);
}

.header__icon svg {
  width: 100%;
  height: 100%;
}

.header__title {
  font-size: var(--font-size-xl);
  font-weight: 700;
  color: var(--color-text);
  letter-spacing: -0.01em;
}

.header__status {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.header__status-text {
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
}

/* Status dot */
.status-dot {
  width: 8px;
  height: 8px;
  border-radius: var(--radius-full);
  background-color: var(--color-text-muted);
  transition: background-color var(--transition-base);
}

.status-dot--connected {
  background-color: var(--color-safe);
  box-shadow: 0 0 8px var(--color-safe-glow);
  animation: pulse-dot 2s infinite;
}

.status-dot--error {
  background-color: var(--color-danger);
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* ========================================
   Alert Banner
   ======================================== */
.alert-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: linear-gradient(135deg, #ff4757, #c0392b);
  color: white;
  padding: var(--space-md) var(--space-lg);
  box-shadow: var(--shadow-lg);
  animation: alert-slide-in 0.3s ease-out;
  max-height: 110px;
  overflow: hidden;
  transition: max-height 0.3s ease;
  cursor: pointer;
  padding-bottom: var(--space-sm);
}

.alert-banner.expanded {
  max-height: 80vh;
  overflow-y: auto;
}

.alert-banner.hidden {
  display: none;
}

@keyframes alert-slide-in {
  from {
    transform: translateY(-100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes alert-pulse {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.alert-banner__content {
  max-width: 480px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.alert-banner__icon {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  animation: alert-icon-shake 0.5s ease-in-out infinite alternate;
}

.alert-banner__icon svg {
  width: 100%;
  height: 100%;
}

@keyframes alert-icon-shake {
  0% { transform: rotate(-5deg); }
  100% { transform: rotate(5deg); }
}

.alert-banner__text {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.alert-banner__title {
  font-weight: 700;
  font-size: var(--font-size-lg);
}

.alert-banner__details {
  font-size: var(--font-size-sm);
  opacity: 0.9;
}

.alert-banner__all-cities {
  font-size: var(--font-size-sm);
  opacity: 0.85;
  margin-top: var(--space-sm);
  line-height: 1.7;
}

.alert-banner__countdown {
  font-size: var(--font-size-2xl);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  min-width: 48px;
  text-align: center;
  flex-shrink: 0;
}

.alert-banner__tap-hint {
  text-align: center;
  font-size: var(--font-size-xs);
  opacity: 0.5;
  padding-top: 2px;
}

.alert-banner.expanded .alert-banner__tap-hint {
  opacity: 0.4;
}

.alert-banner.expanded .alert-banner__tap-hint::after {
  content: ' (לחץ לסגור)';
}

/* ========================================
   Cards
   ======================================== */
.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  margin-bottom: var(--space-md);
  transition: border-color var(--transition-base), box-shadow var(--transition-base);
}

.card:hover {
  border-color: var(--color-border-light);
}

.card__header {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-lg);
}

.card__icon {
  width: 20px;
  height: 20px;
  color: var(--color-primary);
  flex-shrink: 0;
}

.card__title {
  font-size: var(--font-size-base);
  font-weight: 600;
  color: var(--color-text);
}

.card__body {
  /* Container for card content */
}

/* Compact location card when location is found */
.location-card .card__header {
  margin-bottom: var(--space-sm);
}

/* ========================================
   Buttons
   ======================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-lg);
  border-radius: var(--radius-md);
  font-size: var(--font-size-base);
  font-weight: 500;
  transition: all var(--transition-fast);
  min-height: 44px;
}

.btn--primary {
  background: var(--color-primary);
  color: white;
  box-shadow: var(--shadow-glow-primary);
}

.btn--primary:hover {
  background: var(--color-primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 20px var(--color-primary-glow);
}

.btn--primary:active {
  transform: translateY(0);
}

.btn--ghost {
  color: var(--color-text-secondary);
  padding: var(--space-sm);
  font-size: var(--font-size-sm);
}

.btn--ghost:hover {
  color: var(--color-text);
}

/* ========================================
   Spinner
   ======================================== */
.spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--color-surface-3);
  border-top-color: var(--color-primary);
  border-radius: var(--radius-full);
  animation: spin 0.8s linear infinite;
}

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

/* ========================================
   Location
   ======================================== */
.location-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-lg) 0;
  color: var(--color-text-secondary);
}

.location-permission {
  text-align: center;
  padding: var(--space-md) 0;
}

.location-permission p {
  color: var(--color-text-secondary);
  margin-bottom: var(--space-lg);
  font-size: var(--font-size-sm);
  line-height: 1.7;
}

.location-found {
  /* Shown when location is detected */
}

.btn--change-city {
  margin-top: var(--space-sm);
  width: 100%;
  text-align: center;
  color: var(--color-primary);
  font-size: var(--font-size-sm);
}

/* Location hero - compact centered display */
.location-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-xs);
  text-align: center;
}

.location-hero__name {
  font-size: var(--font-size-2xl);
  font-weight: 700;
  color: var(--color-text);
  line-height: 1.2;
}

.location-hero__meta {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  color: var(--color-text-secondary);
  font-size: var(--font-size-sm);
}

.location-meta-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.location-meta-tag svg {
  opacity: 0.7;
}

.location-meta-separator {
  color: var(--color-border-light);
  font-size: var(--font-size-xs);
}

/* ========================================
   City Selector
   ======================================== */
.search-input-wrapper {
  position: relative;
  margin-bottom: var(--space-md);
}

.search-icon {
  position: absolute;
  right: var(--space-md);
  top: 50%;
  transform: translateY(-50%);
  color: var(--color-text-muted);
  pointer-events: none;
}

.search-input {
  width: 100%;
  padding: var(--space-sm) var(--space-lg);
  padding-right: 2.5rem;
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  color: var(--color-text);
  font-size: var(--font-size-base);
  transition: border-color var(--transition-fast);
  direction: rtl;
}

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

.search-input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-primary-glow);
}

.city-list {
  max-height: 200px;
  overflow-y: auto;
  border-radius: var(--radius-sm);
}

.city-list__item {
  padding: var(--space-sm) var(--space-md);
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: background var(--transition-fast);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.city-list__item:hover {
  background: var(--color-surface-2);
}

.city-list__item-name {
  font-weight: 500;
}

.city-list__item-zone {
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
}

/* ========================================
   Quiet State
   ======================================== */
.quiet-card {
  border-color: rgba(46, 213, 115, 0.2);
}

.quiet-state {
  text-align: center;
  padding: var(--space-lg) 0;
}

/* ========================================
   Nationwide Alert Info Bar
   ======================================== */
.nationwide-alert {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  margin-bottom: var(--space-md);
  background: var(--color-surface);
  border: 1px solid rgba(255, 165, 2, 0.25);
  border-radius: var(--radius-md);
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
  animation: fadeIn var(--transition-base) ease-out;
}

.nationwide-alert.hidden {
  display: none !important;
}

.nationwide-alert__dot {
  width: 8px;
  height: 8px;
  border-radius: var(--radius-full);
  background: var(--color-warning);
  flex-shrink: 0;
  animation: pulse-dot 2s infinite;
}

.nationwide-alert__dot--danger {
  background: var(--color-danger);
}

.nationwide-alert__dot--safe {
  background: var(--color-safe);
  animation: none;
}

.nationwide-alert__text {
  flex: 1;
}

.nationwide-alert__time {
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
  font-variant-numeric: tabular-nums;
  direction: ltr;
}

.quiet-state__icon {
  color: var(--color-safe);
  margin-bottom: var(--space-md);
  opacity: 0.8;
}

.quiet-state__icon svg {
  margin: 0 auto;
  display: block;
}

.quiet-state__title {
  font-size: var(--font-size-2xl);
  font-weight: 700;
  color: var(--color-safe);
  margin-bottom: var(--space-xs);
}

.quiet-state__subtitle {
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
  margin-bottom: var(--space-lg);
}

.quiet-state__last-alert {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
  padding-top: var(--space-md);
  border-top: 1px solid var(--color-border);
}

/* ========================================
   Active Alert State (no pre-alert)
   ======================================== */
.active-alert-card {
  border-color: rgba(255, 165, 2, 0.3);
  box-shadow: 0 0 20px var(--color-warning-glow);
}

.active-alert-state {
  text-align: center;
  padding: var(--space-lg) 0;
}

.active-alert-state__icon {
  color: var(--color-warning);
  margin-bottom: var(--space-md);
  animation: alert-icon-shake 0.5s ease-in-out infinite alternate;
}

.active-alert-state__icon svg {
  margin: 0 auto;
  display: block;
}

.active-alert-state__title {
  font-size: var(--font-size-2xl);
  font-weight: 700;
  color: var(--color-warning);
  margin-bottom: var(--space-xs);
}

.active-alert-state__subtitle {
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
  margin-bottom: var(--space-md);
}

.active-alert-state__note {
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
  padding-top: var(--space-md);
  border-top: 1px solid var(--color-border);
}

/* ========================================
   Probability Info
   ======================================== */
.probability-info {
  text-align: center;
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
  margin-top: var(--space-md);
}

/* ========================================
   Probability Display - Clean design
   ======================================== */
.prob-display {
  text-align: center;
  padding: var(--space-md) 0 var(--space-lg);
}

.prob-display__value {
  font-size: 3.5rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  letter-spacing: -0.02em;
}

.prob-display__label {
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
  margin-top: var(--space-xs);
}

/* ========================================
   Risk Bar - Horizontal progress
   ======================================== */
.risk-bar {
  margin-bottom: var(--space-md);
}

.risk-bar__track {
  height: 8px;
  background: var(--color-surface-2);
  border-radius: var(--radius-full);
  overflow: hidden;
  position: relative;
  direction: ltr; /* Force LTR so fill goes left→right = safe→danger */
}

.risk-bar__fill {
  height: 100%;
  border-radius: var(--radius-full);
  background: linear-gradient(to right, var(--color-safe), var(--color-warning), var(--color-danger));
  transition: width 1s ease-out;
  width: 0%;
}

.risk-bar__labels {
  display: flex;
  justify-content: space-between;
  margin-top: var(--space-xs);
  font-size: var(--font-size-xs);
}

.risk-bar__label--safe {
  color: var(--color-safe);
}

.risk-bar__label--danger {
  color: var(--color-danger);
}

/* ========================================
   Stats Grid
   ======================================== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-sm);
}

.stat-item {
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-sm) var(--space-md);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  text-align: center;
  transition: border-color var(--transition-fast), transform var(--transition-fast);
}

.stat-item:hover {
  border-color: var(--color-border-light);
  transform: translateY(-1px);
}

.stat-item__value {
  font-size: var(--font-size-xl);
  font-weight: 700;
  color: var(--color-text);
  font-variant-numeric: tabular-nums;
}

.stat-item__label {
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
  line-height: 1.3;
}

.stat-item__subtext {
  font-size: 0.72rem;
  color: var(--color-text-muted);
  line-height: 1.35;
  min-height: 2.1em;
}

/* Last alert - inline row below stats grid */
.stat-last-alert {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  margin-top: var(--space-md);
  padding-top: var(--space-md);
  border-top: 1px solid var(--color-border);
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
}

.stat-last-alert svg {
  flex-shrink: 0;
  opacity: 0.6;
}

.stat-last-alert__label {
  color: var(--color-text-muted);
}

.stat-last-alert__value {
  color: var(--color-text-secondary);
  font-weight: 500;
}

/* ========================================
   Timeline
   ======================================== */
.timeline {
  position: relative;
}

.timeline__empty {
  text-align: center;
  padding: var(--space-lg) 0;
  color: var(--color-text-muted);
  font-size: var(--font-size-sm);
}

.timeline__item {
  position: relative;
  padding: var(--space-md);
  padding-right: calc(var(--space-xl) + 4px);
  border-bottom: 1px solid var(--color-border);
  transition: background var(--transition-fast);
}

.timeline__item:last-child {
  border-bottom: none;
}

.timeline__item:hover {
  background: var(--color-surface-2);
}

.timeline__item::before {
  content: '';
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 10px;
  height: 10px;
  border-radius: var(--radius-full);
  background: var(--color-surface);
  border: 2px solid var(--color-primary);
  z-index: 1;
}

.timeline__item:first-child::before {
  background: var(--color-primary);
  box-shadow: 0 0 8px var(--color-primary-glow);
}

.timeline__item::after {
  content: '';
  position: absolute;
  right: 4px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--color-border);
}

.timeline__item:first-child::after {
  top: 50%;
}

.timeline__item:last-child::after {
  bottom: 50%;
}

.timeline__date {
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
  margin-bottom: var(--space-xs);
  font-variant-numeric: tabular-nums;
}

.timeline__title-row {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.timeline__type-icon {
  font-size: var(--font-size-sm);
  line-height: 1;
  flex-shrink: 0;
}

.timeline__title {
  font-size: var(--font-size-sm);
  font-weight: 500;
  color: var(--color-danger);
}

.timeline__title.timeline__title--safe {
  color: var(--color-safe) !important;
}

.timeline__title.timeline__title--warning {
  color: var(--color-warning) !important;
}

.timeline__cities {
  font-size: var(--font-size-xs);
  color: var(--color-text-secondary);
  margin-top: var(--space-xs);
  line-height: 1.5;
}

.timeline__cities--collapsible {
  cursor: pointer;
}

.timeline__cities-more {
  color: var(--color-primary);
  font-weight: 500;
}

.timeline__city-highlight {
  color: var(--color-primary);
  font-weight: 700;
}

/* ========================================
   Info Bar
   ======================================== */
.info-card {
  background: var(--color-bg-2);
  border-color: transparent;
}

.info-bar {
  display: flex;
  justify-content: space-around;
  gap: var(--space-md);
}

.info-bar__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.info-bar__label {
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
}

.info-bar__value {
  font-size: var(--font-size-sm);
  font-weight: 600;
  color: var(--color-text-secondary);
  font-variant-numeric: tabular-nums;
}

/* ========================================
   Footer
   ======================================== */
.footer {
  text-align: center;
  padding: var(--space-xl) 0 var(--space-md);
  color: var(--color-text-muted);
  font-size: var(--font-size-xs);
}

.footer__update {
  margin-top: var(--space-xs);
}

/* Theme Switcher (in header) */
.header__end {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.header__theme {
  display: flex;
  gap: 2px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  padding: 2px;
}

.theme-btn--header {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: var(--radius-full);
  background: transparent;
  border: none;
  color: var(--color-text-muted);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.theme-btn--header:hover {
  color: var(--color-text);
}

.theme-btn--header.active {
  color: var(--color-primary);
  background: var(--color-primary-glow);
}

/* Hidden dev trigger - invisible, below footer */
.footer__dev-trigger {
  width: 44px;
  height: 44px;
  margin: var(--space-md) auto 0;
  cursor: default;
  opacity: 0;
  -webkit-tap-highlight-color: transparent;
}

/* ========================================
   Card Entry Animations
   ======================================== */
.card {
  animation: cardEntry 0.4s ease-out both;
}

.location-card { animation-delay: 0.05s; }
.probability-card { animation-delay: 0.1s; }
.stats-card { animation-delay: 0.15s; }
.history-card { animation-delay: 0.2s; }
.info-card { animation-delay: 0.25s; }

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

/* ========================================
   Live Indicator
   ======================================== */
.header__status {
  background: var(--color-surface);
  padding: 4px 10px;
  border-radius: var(--radius-full);
  border: 1px solid var(--color-border);
}

.btn--icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  color: var(--color-text-muted);
  transition: all var(--transition-fast);
}

.btn--icon:hover {
  color: var(--color-text);
  background: var(--color-surface-2);
}

/* GPS detect button in city selector */
.btn--gps-detect {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  width: 100%;
  padding: var(--space-sm) var(--space-md);
  margin-bottom: var(--space-md);
  background: var(--color-surface-2);
  border: 1px dashed var(--color-border-light);
  border-radius: var(--radius-md);
  color: var(--color-primary);
  font-size: var(--font-size-sm);
  font-weight: 500;
  min-height: 44px;
  transition: all var(--transition-fast);
}

.btn--gps-detect:hover {
  background: var(--color-primary-glow);
  border-color: var(--color-primary);
}

.btn--gps-detect.detecting {
  color: var(--color-text-muted);
  cursor: wait;
  pointer-events: none;
}

/* ========================================
   Utility Classes
   ======================================== */
.hidden {
  display: none !important;
}

.fade-in {
  animation: fadeIn var(--transition-base) ease-out;
}

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

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--color-surface-3);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-border-light);
}

/* Selection */
::selection {
  background: var(--color-primary-glow);
  color: var(--color-text);
}
