/* pocasi.sumava.eu — MVP stylesheet */
:root {
  --green:  #34c759;
  --orange: #ff9500;
  --red:    #ff3b30;
  --blue:   #007aff;
  --bg:     #f5f5f7;
  --surface:#ffffff;
  --border: #e5e5ea;
  --text:   #1c1c1e;
  --muted:  #6c6c70;
  --radius: 16px;
  --shadow: 0 2px 12px rgba(0,0,0,0.08);
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.5;
}

a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Layout ── */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
}
.site-header .logo {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.5px;
}
.site-header nav a {
  margin-left: 20px;
  font-size: 14px;
  color: var(--muted);
}
.site-header nav a:hover { color: var(--blue); text-decoration: none; }

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

main { padding: 32px 0 60px; }

/* ── Cards ── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}

.section-title {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 14px;
}

/* ── Hero ── */
.hero {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 60%, #0f3460 100%);
  color: #fff;
  padding: 40px 0 32px;
  margin-bottom: 32px;
}
.hero h1 {
  font-size: clamp(26px, 4vw, 42px);
  font-weight: 800;
  letter-spacing: -1px;
  margin-bottom: 6px;
}
.hero .subtitle {
  font-size: 15px;
  opacity: 0.7;
  margin-bottom: 24px;
}
.hero .updated {
  font-size: 12px;
  opacity: 0.5;
  margin-top: 16px;
}

/* ── Status summary strip ── */
.summary-strip {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 16px;
}
.summary-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 20px;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 500;
}
.dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.dot-green  { background: var(--green); box-shadow: 0 0 6px rgba(52,199,89,0.6); }
.dot-orange { background: var(--orange); }
.dot-red    { background: var(--red); }

/* ── Grid layouts ── */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-auto { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }

@media (max-width: 768px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
}

/* ── Section spacing ── */
.section { margin-bottom: 40px; }

/* ── Semafor ── */
.semafor-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}
.semafor-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
}
.semafor-item.green  { border-color: rgba(52,199,89,0.3);  background: rgba(52,199,89,0.05); }
.semafor-item.orange { border-color: rgba(255,149,0,0.3);  background: rgba(255,149,0,0.05); }
.semafor-item.red    { border-color: rgba(255,59,48,0.3);   background: rgba(255,59,48,0.05); }

.semafor-icon {
  width: 36px; height: 36px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
}
.green  .semafor-icon { background: rgba(52,199,89,0.15);  }
.orange .semafor-icon { background: rgba(255,149,0,0.15);  }
.red    .semafor-icon { background: rgba(255,59,48,0.15);  }

.semafor-name { font-size: 14px; font-weight: 600; }
.semafor-note { font-size: 12px; color: var(--muted); margin-top: 2px; }

/* ── Location cards ── */
.location-card {
  padding: 16px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--surface);
  position: relative;
  overflow: hidden;
}
.location-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 4px; height: 100%;
  border-radius: 4px 0 0 4px;
}
.location-card.green::before  { background: var(--green); }
.location-card.orange::before { background: var(--orange); }
.location-card.red::before    { background: var(--red); }

.location-name { font-size: 16px; font-weight: 700; margin-bottom: 4px; }
.location-altitude { font-size: 11px; color: var(--muted); margin-bottom: 10px; }
.location-stats {
  display: flex; gap: 16px; flex-wrap: wrap;
  font-size: 13px; color: var(--muted);
  margin-bottom: 10px;
}
.location-stats strong { color: var(--text); }
.location-rec {
  font-size: 13px;
  padding: 8px 10px;
  background: var(--bg);
  border-radius: 8px;
  color: var(--text);
}

.rain-eta {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 13px; font-weight: 600;
  color: var(--orange);
  background: rgba(255,149,0,0.1);
  border-radius: 6px;
  padding: 3px 8px;
  margin-bottom: 8px;
}

/* ── Radar placeholder ── */
.radar-box {
  height: 240px;
  background: #1a2a1a;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  flex-direction: column;
  gap: 8px;
  color: rgba(255,255,255,0.6);
  font-size: 14px;
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}
.radar-box::after {
  content: '';
  position: absolute;
  width: 200px; height: 200px;
  border-radius: 50%;
  border: 1px solid rgba(52,199,89,0.2);
  animation: radar-pulse 2s ease-out infinite;
}
@keyframes radar-pulse {
  0%   { transform: scale(0.3); opacity: 0.8; }
  100% { transform: scale(2);   opacity: 0; }
}

/* ── Camera grid ── */
.camera-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
}
.camera-thumb {
  aspect-ratio: 16/9;
  background: #1a1a1a;
  border-radius: 10px;
  overflow: hidden;
  position: relative;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: transform 0.15s;
}
.camera-thumb:hover { transform: scale(1.02); }
.camera-live-img {
  position: absolute; top: 0; left: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}
.camera-label {
  position: absolute; bottom: 0; left: 0; right: 0;
  background: linear-gradient(transparent, rgba(0,0,0,0.75));
  padding: 24px 10px 8px;
  font-size: 12px; font-weight: 600; color: #fff;
  display: flex; align-items: center; gap: 5px;
}
.camera-label span { flex: 1; }
.camera-no-feed {
  width: 100%; height: 100%;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  color: rgba(255,255,255,0.4);
  font-size: 12px; gap: 6px;
}
.cam-live-dot {
  width: 7px; height: 7px; flex-shrink: 0;
  border-radius: 50%;
  background: #ff3b30;
  box-shadow: 0 0 5px rgba(255,59,48,0.9);
  animation: live-blink 1.4s ease-in-out infinite;
}
@keyframes live-blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.25; }
}
.cam-refresh {
  flex-shrink: 0;
  background: rgba(255,255,255,0.15);
  border: none; color: #fff;
  width: 22px; height: 22px;
  border-radius: 50%; cursor: pointer;
  font-size: 14px; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.15s;
}
.cam-refresh:hover { background: rgba(255,255,255,0.35); }

/* ── Alps alert ── */
.alps-alert {
  background: linear-gradient(135deg, #1a1a2e, #0f3460);
  color: #fff;
  border-radius: 14px;
  padding: 20px;
  display: flex; align-items: center; gap: 16px;
}
.alps-icon { font-size: 40px; flex-shrink: 0; }
.alps-prob { font-size: 36px; font-weight: 800; color: var(--green); }
.alps-label { font-size: 12px; opacity: 0.7; }
.alps-note { font-size: 13px; opacity: 0.85; margin-top: 4px; }

/* ── BioWeather ── */
.bio-card {
  background: linear-gradient(135deg, #0d1b2a, #1b263b);
  color: #fff;
  border-radius: 14px;
  padding: 20px;
}
.bio-title { font-size: 16px; font-weight: 700; margin-bottom: 12px; }
.bio-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  font-size: 14px;
}
.bio-row:last-child { border-bottom: none; }
.bio-badge {
  font-size: 11px; font-weight: 600;
  padding: 3px 8px; border-radius: 10px;
}
.bio-badge.medium  { background: rgba(255,149,0,0.2);  color: #ff9500; }
.bio-badge.elevated{ background: rgba(255,149,0,0.2);  color: #ff9500; }
.bio-badge.low     { background: rgba(52,199,89,0.2);  color: #34c759; }
.bio-rec {
  font-size: 13px; opacity: 0.7;
  margin-top: 12px;
  padding: 10px;
  background: rgba(255,255,255,0.05);
  border-radius: 8px;
}

/* ── Knizeci Plane highlight ── */
.kp-card {
  background: linear-gradient(135deg, #1c1c3a, #2d1b69);
  color: #fff;
  border-radius: 14px;
  padding: 24px;
}
.kp-title { font-size: 20px; font-weight: 800; margin-bottom: 4px; }
.kp-alt { font-size: 12px; opacity: 0.6; margin-bottom: 16px; }
.kp-rain-big {
  font-size: 48px; font-weight: 900;
  color: var(--orange);
  line-height: 1;
  margin-bottom: 4px;
}
.kp-rain-label { font-size: 14px; opacity: 0.7; margin-bottom: 16px; }
.kp-prob {
  display: inline-flex; gap: 6px; align-items: center;
  font-size: 14px;
  background: rgba(255,255,255,0.08);
  padding: 6px 12px; border-radius: 8px;
  margin-bottom: 12px;
}
.kp-rec { font-size: 13px; opacity: 0.8; line-height: 1.5; }

/* ── Snow ── */
.snow-empty {
  display: flex; align-items: center; gap: 12px;
  color: var(--muted); font-size: 14px;
  padding: 16px 0;
}
.snow-active {
  padding: 8px 0;
}
.snow-depth-num {
  font-size: 52px; font-weight: 900; color: #007aff;
  line-height: 1; letter-spacing: -2px;
  font-variant-numeric: tabular-nums;
}
.snow-unit { font-size: 22px; font-weight: 600; opacity: .6; }
.snow-depth-label { font-size: 13px; color: var(--muted); margin: 4px 0 12px; }
.snow-fresh {
  font-size: 13px; color: #007aff;
  background: rgba(0,122,255,.08);
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 10px; border-radius: 7px; margin-bottom: 10px;
}
.snow-source { font-size: 11px; color: var(--muted); opacity: .7; }

/* ── Footer ── */
footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 24px 0;
  font-size: 13px;
  color: var(--muted);
  text-align: center;
}
footer a { color: var(--muted); }
footer .sources { margin-top: 8px; font-size: 11px; opacity: 0.6; }

/* ── Loading state ── */
.loading { opacity: 0.4; pointer-events: none; }
.skeleton {
  background: linear-gradient(90deg, #e5e5ea 25%, #f0f0f5 50%, #e5e5ea 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 8px;
}
@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
