:root {
  --fs:  1.65rem;
  --pad: 0.75rem;
}

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

body {
  background: #0d0d0d;
  color: #fff;
  font-family: 'Segoe UI', Arial, sans-serif;
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* ── Rote Kopfzeile ── */
.header {
  background: #cc0000;
  padding: 0 1.2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 4.8rem;
  flex-shrink: 0;
}

.weather {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 2.6rem;
  font-weight: bold;
}
.weather img {
  height: 2.8rem;
  margin: -0.6rem -0.3rem;
}
.weather .desc {
  font-size: 2.3rem;
  font-weight: normal;
  opacity: 0.92;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.clock {
  font-size: 2.9rem;
  font-weight: bold;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
}

.settings-btn {
  background: none;
  border: none;
  color: rgba(255,255,255,0.75);
  font-size: 1.4rem;
  cursor: pointer;
  padding: 0.2rem 0.3rem;
  line-height: 1;
  border-radius: 4px;
  transition: color 0.15s, background 0.15s;
}
.settings-btn:hover { color: #fff; background: rgba(0,0,0,0.2); }

/* ── Tabelle ── */
.board-wrap { flex: 1; overflow: hidden; }
.board-wrap.scrollable { overflow-y: auto; }

table { width: 100%; border-collapse: collapse; }
thead tr { background: #1c1c1c; }
thead th {
  padding: 0.35rem 0.9rem;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #888;
  text-align: left;
}
thead th.right { text-align: right; }

tbody tr { border-bottom: 1px solid #1e1e1e; }
tbody tr:nth-child(odd)  { background: #111; }
tbody tr:nth-child(even) { background: #161616; }
tbody td {
  padding: var(--pad) 0.9rem;
  font-size: var(--fs);
  vertical-align: middle;
}

td.zeit {
  font-variant-numeric: tabular-nums;
  color: #ccc;
  font-size: calc(var(--fs) * 0.88);
  white-space: nowrap;
}
.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  color: #fff;
  white-space: nowrap;
}
.badge.rect {
  min-width: calc(var(--fs) * 1.8);
  height: calc(var(--fs) * 1.45);
  border-radius: 5px;
  padding: 0 0.5rem;
  font-size: calc(var(--fs) * 0.82);
}
.badge.circle {
  width: calc(var(--fs) * 1.7);
  height: calc(var(--fs) * 1.7);
  border-radius: 50%;
  font-size: calc(var(--fs) * 0.55);
  background: #7b2d8b !important;
}
td.dir { font-weight: 500; }
td.pl { color: #aaa; font-size: calc(var(--fs) * 0.7); }
td.vsp { font-size: calc(var(--fs) * 0.68); min-width: 3.5rem; }
.ontime { color: #00cc55; }
.late   { color: #ff6600; }
.early  { color: #5599ff; }
td.los {
  text-align: right;
  font-size: calc(var(--fs) * 1.03);
  font-weight: bold;
  font-variant-numeric: tabular-nums;
  min-width: 5rem;
}
.los.gone   { color: #555; }
.los.urgent { color: #ff3333; }
.los.soon   { color: #ffaa00; }
.los.ok     { color: #fff; }
.empty td { text-align: center; padding: 3rem; color: #444; font-size: 1.1rem; }

/* ── Special Content ── */
.special-wrap {
  display: none;
  flex: 1;
  flex-direction: column;
  overflow: hidden;
}
.special-wrap.visible { display: flex; }
.special-card {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: #0d0d0d;
  overflow: hidden;
}
.countdown-bar-wrap { height: 5px; background: #1a1a1a; flex-shrink: 0; }
.countdown-bar { height: 100%; background: #cc0000; transition: width 1s linear; }

/* ── Keyframes ── */
@keyframes imgWipe {
  from { clip-path: inset(0 100% 0 0); }
  to   { clip-path: inset(0 0%   0 0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes slideFromTop {
  from { opacity: 0; transform: translateY(calc(-50% - 28px)); }
  to   { opacity: 1; transform: translateY(-50%); }
}
@keyframes slideFromRight {
  from { opacity: 0; transform: translateX(40px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* ── News Card ── */
.news-image-wrap {
  flex: 0 0 50%;
  overflow: hidden;
  position: relative;
  background: #111;
}
.news-image {
  width: 100%; height: 100%; object-fit: cover; display: block;
  animation: imgWipe 0.9s cubic-bezier(0.4,0,0.2,1) both;
}
.news-image-wrap::before {
  content: '';
  position: absolute; left: 0; top: 0; bottom: 0; width: 6px;
  background: var(--news-accent, #cc0000);
  animation: fadeIn 0.1s 0.1s both;
  z-index: 1;
}
.news-dim-overlay {
  position: absolute; inset: 0;
  background: rgba(0,0,0,0.65);
  opacity: 0; animation: fadeIn 0.7s ease 0.7s both; z-index: 2;
}
.news-title-overlay {
  position: absolute; top: 50%; left: 0; right: 0;
  padding: 0 1.2rem 0 1.4rem;
  font-family: 'Oswald', sans-serif;
  font-weight: 700;
  font-size: clamp(1.8rem, 4.5vw, 3.5rem);
  color: #fff; text-transform: uppercase; line-height: 1.15;
  z-index: 3; opacity: 0;
  animation: slideFromTop 0.55s cubic-bezier(0.2,0.8,0.3,1) 1.1s both;
  text-shadow: 0 2px 14px rgba(0,0,0,0.95);
  transform: translateY(-50%);
}
/* No-image placeholder */
.news-image-placeholder {
  width: 100%; height: 100%;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 0.8rem;
  background: var(--news-placeholder-bg, linear-gradient(135deg, #1a1a2e, #16213e));
}
.news-image-placeholder .news-source-logo {
  font-family: 'Oswald', sans-serif;
  font-size: clamp(2rem, 6vw, 4rem);
  font-weight: 700;
  color: rgba(255,255,255,0.15);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.news-body {
  flex: 1; display: flex; flex-direction: column;
  overflow: hidden; background: #0d0d0d;
}
.news-tag {
  font-size: 25px;
  margin-top: 20px;
  font-weight: 700; text-transform: uppercase; letter-spacing: 0.2em;
  color: var(--news-accent, #cc0000); flex-shrink: 0; padding: 0.55rem 1.4rem 0.35rem;
  opacity: 0; animation: fadeIn 0.45s ease 1.5s both;
}
.news-scroll-wrap {
  flex: 1; overflow: hidden; position: relative; padding: 0 1.4rem 0.8rem;
}
.news-scroll-text {
  font-family: 'Segoe UI', Arial, sans-serif;
  font-size: 45px; line-height: 1.45; color: #ddd;
  opacity: 0; animation: fadeIn 0.5s ease 1.9s both; margin-top: 30px; margin-bottom: 30px;
}

/* ── Bird of the Day ── */
.birb-screen { flex: 1; display: flex; overflow: hidden; }
.birb-img-wrap {
  flex: 0 0 45%; overflow: hidden; position: relative; background: #0a0a0a;
}
.birb-img-wrap img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  animation: imgWipe 0.9s cubic-bezier(0.4,0,0.2,1) both;
}
.birb-img-wrap::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 6px;
  background: #00cc77; z-index: 1;
}
.birb-info {
  flex: 1; display: flex; flex-direction: column;
  justify-content: center; padding: 2rem 2.5rem; gap: 1.2rem; overflow: hidden;
}
.birb-tag {
  font-size: 0.75rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.22em; color: #00cc77;
  opacity: 0; animation: fadeIn 0.4s ease 0.8s both;
}
.birb-name {
  font-family: 'Oswald', sans-serif; font-weight: 700;
  font-size: clamp(2rem, 4vw, 3.2rem); color: #fff;
  text-transform: uppercase; line-height: 1.1;
  opacity: 0; animation: slideFromRight 0.5s ease 1.0s both;
}
.birb-latin {
  font-size: 1.1rem; color: #888; font-style: italic; margin-top: 0.2rem;
  opacity: 0; animation: fadeIn 0.4s ease 1.3s both;
}
.birb-fact {
  font-size: clamp(0.95rem, 1.8vw, 1.25rem); color: #ccc; line-height: 1.65;
  border-left: 4px solid #00cc77; padding-left: 1rem;
  opacity: 0; animation: fadeIn 0.5s ease 1.6s both;
}
.birb-placeholder {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 1rem; color: #444;
}
.birb-placeholder .icon  { font-size: 5rem; }
.birb-placeholder .label { font-size: 1.2rem; letter-spacing: 0.1em; text-transform: uppercase; }

/* ── Latest Bird Screen ── */
.lb-screen {
  flex: 1; display: flex; overflow: hidden;
  background: #000;
}
.lb-fullscreen {
  position: relative;
}
.lb-fullscreen .lb-video {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: 20% center;
  transform-origin: 20% center;
  display: block;
  animation: lbVideoEnter 0.7s cubic-bezier(0.4,0,0.2,1) both;
}
@keyframes lbVideoEnter {
  from { opacity: 0; transform: scale(1.06); }
  to   { opacity: 1; transform: scale(1); }
}
.lb-overlay {
  position: absolute; bottom: 0; right: 0;
  width: 52%;
  padding: 2.8rem 3rem 3rem;
  background: linear-gradient(to top, rgba(0,0,0,0.92) 0%, rgba(0,0,0,0.75) 65%, transparent 100%),
              linear-gradient(to left, rgba(0,0,0,0.7) 0%, transparent 100%);
  display: flex; flex-direction: column; gap: 0.7rem;
  opacity: 0; animation: slideUp 0.55s cubic-bezier(0.2,0.8,0.3,1) 0.5s both;
}
.lb-overlay-time {
  font-family: 'Oswald', sans-serif; font-weight: 400;
  font-size: clamp(1rem, 1.8vw, 1.3rem);
  color: rgba(255,255,255,0.6);
  letter-spacing: 0.14em; text-transform: uppercase;
}
.lb-overlay-fact {
  font-size: clamp(1.7rem, 3.2vw, 2.6rem);
  color: #fff; font-weight: 400; line-height: 1.4;
}
@keyframes slideUp {
  from { opacity: 0; transform: translateY(1.2rem); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ══════════════════════════════════════════
   WETTER-SCREEN
   ══════════════════════════════════════════ */

.weather-split { flex: 1; display: flex; overflow: hidden; }

.weather-cam-wrap {
  flex: 0 0 50%; overflow: hidden; position: relative; background: #000;
}
.weather-cam {
  /* Zeige nur die linke Hälfte des Streams */
  width: 200%;
  height: 100%;
  object-fit: cover;
  object-position: left center;
  display: block;
}
.weather-cam-label {
  position: absolute; bottom: 0.7rem; left: 0.8rem;
  font-size: 0.7rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.16em;
  color: rgba(255,255,255,0.55);
  background: rgba(0,0,0,0.5);
  padding: 0.15rem 0.6rem; border-radius: 3px;
}
.cam-state {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 0.9rem;
  background: #0a0a0a; z-index: 2;
}
.cam-state-icon { font-size: 2.8rem; opacity: 0.3; }
.cam-state-text {
  font-size: 0.85rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.18em; color: #444;
}
.cam-state-text.error { color: #883333; }

.weather-info-wrap {
  flex: 1;
  position: relative;
  overflow: hidden;
  background: linear-gradient(160deg, #1e2e40, #111e2a);
  transition: background 1.2s ease;
}

/* Weather animation canvas */
#weather-canvas {
  position: absolute; inset: 0; pointer-events: none; z-index: 5;
}

.w-dots {
  position: absolute;
  bottom: 1.1rem; left: 50%; transform: translateX(-50%);
  display: flex; gap: 0.55rem; z-index: 20;
}
.w-dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: rgba(255,255,255,0.22);
  transition: background 0.35s, transform 0.35s;
}
.w-dot.active { background: rgba(255,255,255,0.88); transform: scale(1.35); }

.w-step {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 1.8rem 2.2rem 3.2rem;
  gap: 0.6rem;
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.65s ease, transform 0.65s ease;
  pointer-events: none;
}
.w-step.active {
  opacity: 1; transform: translateY(0); pointer-events: auto;
}

.w-step-label {
  align-self: flex-start;
  font-size: 0.7rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.24em;
  color: rgba(255,255,255,0.4);
  opacity: 0;
  transition: opacity 0.5s ease 0.15s;
}
.w-step.active .w-step-label { opacity: 1; }

/* Step 1 – Aktuell */
.w-hero {
  display: flex; align-items: center; gap: 0.2rem;
  margin: 0.2rem 0;
}
.w-hero-icon {
  width: 120px; height: 120px;
  filter: drop-shadow(0 4px 24px rgba(0,0,0,0.4));
  opacity: 0; transform: scale(0.7);
  transition: opacity 0.65s ease 0.25s, transform 0.7s cubic-bezier(0.2,0.8,0.3,1) 0.25s;
}
.w-step.active .w-hero-icon { opacity: 1; transform: scale(1); }

.w-hero-temp {
  font-family: 'Oswald', sans-serif;
  font-size: clamp(5.5rem, 12vw, 8.5rem);
  font-weight: 700; color: #fff; line-height: 1;
  text-shadow: 0 4px 30px rgba(0,0,0,0.3);
  opacity: 0; transform: translateX(30px);
  transition: opacity 0.55s ease 0.4s, transform 0.55s cubic-bezier(0.2,0.8,0.3,1) 0.4s;
}
.w-step.active .w-hero-temp { opacity: 1; transform: translateX(0); }

.w-hero-desc {
  font-size: clamp(1.5rem, 3.5vw, 2.4rem);
  color: rgba(255,255,255,0.88);
  text-transform: capitalize; font-weight: 500;
  text-align: center;
  opacity: 0;
  transition: opacity 0.5s ease 0.6s;
}
.w-step.active .w-hero-desc { opacity: 1; }

.w-chips {
  display: flex; gap: 0.65rem; flex-wrap: wrap;
  justify-content: center; margin-top: 0.4rem;
}
.w-chip {
  background: rgba(255,255,255,0.14);
  backdrop-filter: blur(10px);
  border-radius: 50px;
  padding: 0.5rem 1.25rem;
  display: flex; align-items: center; gap: 0.45rem;
  opacity: 0; transform: translateY(12px);
}
.w-chip:nth-child(1) { transition: opacity 0.45s ease 0.75s, transform 0.45s ease 0.75s; }
.w-chip:nth-child(2) { transition: opacity 0.45s ease 0.9s,  transform 0.45s ease 0.9s; }
.w-chip:nth-child(3) { transition: opacity 0.45s ease 1.05s, transform 0.45s ease 1.05s; }
.w-step.active .w-chip { opacity: 1; transform: translateY(0); }

.w-chip-icon { font-size: 2.45rem; }
.w-chip-val {
  font-size: clamp(2rem, 4.2vw, 2.4rem);
  color: rgba(255,255,255,0.92); font-weight: 600; white-space: nowrap;
}

/* Step 2 – Vorhersage */
.w-forecast-big {
  display: flex; gap: 1.2rem; width: 100%; justify-content: center;
  margin-top: 0.5rem;
}
.w-day-big {
  flex: 1; max-width: 300px;
  background: rgba(255,255,255,0.1);
  backdrop-filter: blur(10px);
  border-radius: 16px; padding: 1.4rem 1rem;
  display: flex; flex-direction: column; align-items: center; gap: 0.35rem;
  opacity: 0; transform: translateY(24px);
}
.w-day-big:nth-child(1) { transition: opacity 0.55s ease 0.25s, transform 0.55s ease 0.25s; }
.w-day-big:nth-child(2) { transition: opacity 0.55s ease 0.45s, transform 0.55s ease 0.45s; }
.w-step.active .w-day-big { opacity: 1; transform: translateY(0); }

.w-day-name-big {
  font-family: 'Oswald', sans-serif;
  font-size: clamp(1.5rem, 3.2vw, 2.2rem);
  font-weight: 700; color: rgba(255,255,255,0.65);
  text-transform: uppercase; letter-spacing: 0.12em;
}
.w-day-icon-big { width: 90px; height: 90px; filter: drop-shadow(0 2px 10px rgba(0,0,0,0.3)); }
.w-day-temp-big {
  font-family: 'Oswald', sans-serif;
  font-size: clamp(3rem, 8vw, 5.5rem);
  font-weight: 700; color: #fff; line-height: 1;
}
.w-day-desc-big {
  font-size: clamp(1rem, 2vw, 2rem);
  color: rgba(255,255,255,0.6); text-transform: capitalize; text-align: center;
}
.w-day-range { display: flex; gap: 0.6rem; margin-top: 0.2rem; }
.w-day-min { font-size: 1rem; color: rgba(255,255,255,0.4); font-weight: 600; }
.w-day-max { font-size: 1rem; color: rgba(255,255,255,0.75); font-weight: 700; }

/* ── Regen-Sub-Step innerhalb Wetter-Screen ── */
.w-step-rain {
  align-items: stretch !important;
  justify-content: flex-start !important;
}
.w-rain-chart-inner {
  flex: 1;
  display: flex;
  align-items: stretch;
  gap: 0.6rem;
  overflow: hidden;
  padding: 0.5rem 0.5rem 0;
  min-height: 0;
  width: 100%;
}

/* Kein-Regen-Anzeige */
.w-no-rain {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.2rem;
  flex: 1;
}
.w-no-rain-icon {
  font-size: 5rem;
  opacity: 0;
  transition: opacity 0.6s ease 0.3s;
}
.w-step.active .w-no-rain-icon { opacity: 1; }
.w-no-rain-text {
  font-family: 'Oswald', sans-serif;
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 700;
  color: #fff;
  text-align: center;
  letter-spacing: 0.06em;
  line-height: 1.25;
  opacity: 0;
  transform: scale(0.9);
  transition: opacity 0.55s ease 0.5s, transform 0.55s cubic-bezier(0.2,0.8,0.3,1) 0.5s;
}
.w-step.active .w-no-rain-text { opacity: 1; transform: scale(1); }

/* ── Regen-Balkendiagramm (Standalone-Screen, bleibt für Referenz) ── */
.rain-screen {
  flex: 1; display: flex; flex-direction: column;
  background: linear-gradient(160deg, #08182e, #030c1a);
  padding: 2rem 2rem 1.2rem;
}
.rain-title {
  font-family: 'Oswald', sans-serif;
  font-size: clamp(1.2rem, 3vw, 2rem);
  font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
  color: rgba(255,255,255,0.4); margin-bottom: 1.5rem; flex-shrink: 0;
  opacity: 0; animation: fadeIn 0.5s ease 0.1s both;
}
.rain-chart-wrap {
  flex: 1; display: flex; align-items: flex-end; gap: 1.2rem;
  overflow: hidden; padding: 0 0.5rem;
}
.rain-bar-col {
  flex: 1; display: flex; flex-direction: column; align-items: center;
  justify-content: flex-end; gap: 0.5rem; min-width: 0;
}
.rain-bar-outer {
  width: 100%; background: rgba(255,255,255,0.06);
  border-radius: 10px 10px 0 0; position: relative; overflow: hidden;
  flex: 1; border: 1px solid rgba(255,255,255,0.05);
  border-bottom: none;
}
.rain-bar-inner {
  position: absolute; bottom: 0; left: 0; right: 0;
  border-radius: 10px 10px 0 0;
  background: linear-gradient(to top, #004fa3, #0077cc, #00a8ff, #66d4ff);
  transform: scaleY(0); transform-origin: bottom;
  transition: transform 0.9s cubic-bezier(0.2,0.85,0.3,1);
  overflow: hidden;
}
.rain-bar-inner.filled { transform: scaleY(1); }

/* animated rain drops inside bar */
.rain-bar-inner::after {
  content: '';
  position: absolute; inset: 0;
  background-image:
    radial-gradient(ellipse 2px 6px at 20% 15%, rgba(255,255,255,0.35) 0%, transparent 100%),
    radial-gradient(ellipse 2px 5px at 60% 40%, rgba(255,255,255,0.25) 0%, transparent 100%),
    radial-gradient(ellipse 2px 7px at 80% 25%, rgba(255,255,255,0.30) 0%, transparent 100%),
    radial-gradient(ellipse 1.5px 5px at 40% 65%, rgba(255,255,255,0.20) 0%, transparent 100%),
    radial-gradient(ellipse 2px 6px at 10% 55%, rgba(255,255,255,0.28) 0%, transparent 100%);
  animation: rain-drops 1.4s linear infinite;
  opacity: 0;
  transition: opacity 0.4s ease 0.8s;
}
.rain-bar-inner.filled::after { opacity: 1; }

@keyframes rain-drops {
  0%   { background-position: 0 -40px, 0 -20px, 0 -60px, 0 -10px, 0 -35px; }
  100% { background-position: 0  60px, 0  80px, 0  50px, 0  90px, 0  65px; }
}

/* snow variant */
.rain-bar-inner.snow-bar {
  background: linear-gradient(to top, #6ea8d8, #aaccee, #ddeeff, #ffffff);
}
.rain-bar-inner.snow-bar::after {
  background-image:
    radial-gradient(circle 3px at 25% 20%, rgba(255,255,255,0.6) 0%, transparent 100%),
    radial-gradient(circle 2px at 65% 45%, rgba(255,255,255,0.5) 0%, transparent 100%),
    radial-gradient(circle 2.5px at 45% 70%, rgba(255,255,255,0.55) 0%, transparent 100%),
    radial-gradient(circle 2px at 80% 30%, rgba(255,255,255,0.5) 0%, transparent 100%),
    radial-gradient(circle 3px at 15% 60%, rgba(255,255,255,0.6) 0%, transparent 100%);
  animation: snow-fall 2.2s linear infinite;
}
@keyframes snow-fall {
  0%   { background-position: 0 -30px, 0 -15px, 0 -50px, 0 -5px, 0 -25px; }
  100% { background-position: 0  70px, 0  85px, 0  55px, 0 95px,  0  75px; }
}

.rain-bar-val {
  font-family: 'Oswald', sans-serif;
  font-size: clamp(1rem, 2.5vw, 1.7rem);
  font-weight: 700; color: #66ccff; text-align: center;
  opacity: 0; animation: fadeIn 0.4s ease 1.0s both;
  white-space: nowrap;
}
.rain-bar-time {
  font-size: clamp(0.7rem, 1.3vw, 1rem);
  color: rgba(255,255,255,0.45); text-align: center; white-space: nowrap;
  opacity: 0; animation: fadeIn 0.4s ease 0.6s both;
}
.rain-pop-label {
  font-size: clamp(0.6rem, 1.1vw, 0.85rem);
  color: rgba(100,200,255,0.65); text-align: center;
  opacity: 0; animation: fadeIn 0.4s ease 1.2s both;
}

/* ── Luftqualität Detail ── */
.aq-detail-screen {
  flex: 1; display: flex; overflow: hidden;
  background: linear-gradient(160deg, #071812, #030c0a);
}
.aq-detail-left {
  flex: 0 0 44%; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 2rem 1.5rem; gap: 1rem;
  border-right: 1px solid rgba(255,255,255,0.05);
}
.aq-detail-label {
  font-size: 0.7rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.26em; color: rgba(255,255,255,0.3);
  opacity: 0; animation: fadeIn 0.4s ease 0.2s both;
}
.aq-detail-component {
  font-family: 'Oswald', sans-serif;
  font-size: clamp(1.8rem, 4.5vw, 3.2rem);
  font-weight: 700; color: #fff; letter-spacing: 0.06em;
  text-align: center;
  opacity: 0; animation: slideFromRight 0.5s ease 0.35s both;
}

/* Gauge ring around the value */
.aq-gauge-ring {
  position: relative;
  display: flex; align-items: center; justify-content: center;
  opacity: 0;
  transform: scale(0.7);
  transition: opacity 0.7s ease 0.45s, transform 0.8s cubic-bezier(0.2,0.85,0.3,1) 0.45s;
}
.aq-detail-screen.active-screen .aq-gauge-ring { opacity: 1; transform: scale(1); }
.aq-gauge-svg {
  position: absolute; top: 0; left: 0; width: 100%; height: 100%;
  transform: rotate(-90deg);
}
.aq-gauge-track { fill: none; stroke: rgba(255,255,255,0.07); }
.aq-gauge-fill  { fill: none; stroke-linecap: round;
  transition: stroke-dashoffset 1.2s cubic-bezier(0.2,0.85,0.3,1) 0.5s; }
.aq-detail-value {
  font-family: 'Oswald', sans-serif;
  font-size: clamp(3.5rem, 10vw, 6.5rem);
  font-weight: 700; line-height: 1;
  text-align: center; z-index: 1;
}
.aq-detail-unit {
  font-size: clamp(0.7rem, 1.4vw, 1rem);
  color: rgba(255,255,255,0.4); font-weight: 600;
  opacity: 0; animation: fadeIn 0.4s ease 1.1s both;
  text-align: center;
}
.aq-detail-badge {
  padding: 0.38rem 1.4rem; border-radius: 50px;
  font-size: clamp(0.85rem, 1.8vw, 1.25rem); font-weight: 700;
  opacity: 0; animation: fadeIn 0.5s ease 1.2s both;
  letter-spacing: 0.05em;
}

/* min / max row below gauge */
.aq-minmax {
  display: flex; gap: 1.5rem;
  opacity: 0; animation: fadeIn 0.4s ease 1.4s both;
}
.aq-minmax-item {
  display: flex; flex-direction: column; align-items: center; gap: 0.15rem;
}
.aq-minmax-val {
  font-family: 'Oswald', sans-serif;
  font-size: clamp(1rem, 2.5vw, 1.6rem); font-weight: 700; color: #fff;
}
.aq-minmax-lbl {
  font-size: 0.58rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.14em; color: rgba(255,255,255,0.3);
}

.aq-detail-right {
  flex: 1; display: flex; flex-direction: column;
  padding: 1.8rem 2rem 1.8rem 1.5rem; gap: 1rem;
}
.aq-chart-title {
  font-size: 0.62rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.2em; color: rgba(255,255,255,0.28);
  opacity: 0; animation: fadeIn 0.4s ease 0.6s both;
}
.aq-chart-wrap {
  flex: 1; position: relative;
  opacity: 0; animation: fadeIn 0.7s ease 0.8s both;
}
.aq-chart-wrap svg { width: 100%; height: 100%; overflow: visible; }

/* Threshold reference line badge */
.aq-threshold-badge {
  display: flex; align-items: center; gap: 0.5rem;
  opacity: 0; animation: fadeIn 0.5s ease 1.3s both;
}
.aq-threshold-dot {
  width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0;
}
.aq-threshold-text {
  font-size: 0.62rem; color: rgba(255,255,255,0.35);
  font-weight: 600; letter-spacing: 0.06em;
}

/* ── Luftqualität Detail – neue vertikale Liste ── */
.aq-list-screen {
  flex: 1; display: flex; flex-direction: column;
  background: linear-gradient(160deg, #071812, #030c0a);
  padding: 1.4rem 1.8rem 1.2rem;
  gap: 0.9rem; overflow: hidden;
}
.aq-list-header {
  display: flex; align-items: center; gap: 1rem; flex-shrink: 0;
  opacity: 0; animation: fadeIn 0.4s ease 0.1s both;
}
.aq-list-title {
  font-size: 0.68rem; font-weight: 700; letter-spacing: 0.28em;
  color: rgba(255,255,255,0.3); text-transform: uppercase;
}
.aq-list-badge {
  padding: 0.22rem 0.9rem; border-radius: 50px;
  font-size: 0.78rem; font-weight: 700; letter-spacing: 0.04em;
}
.aq-list-rows {
  flex: 1; display: flex; flex-direction: column;
  gap: 0.55rem; justify-content: space-around;
}
.aq-row {
  display: flex; align-items: center; gap: 1.2rem;
  background: rgba(255,255,255,0.03); border-radius: 10px;
  padding: 0.7rem 1rem;
  opacity: 0; animation: fadeIn 0.45s ease both;
}
.aq-row:nth-child(1) { animation-delay: 0.2s; }
.aq-row:nth-child(2) { animation-delay: 0.35s; }
.aq-row:nth-child(3) { animation-delay: 0.5s; }
.aq-row-meta {
  flex: 1; display: flex; flex-direction: column; gap: 0.32rem; min-width: 0;
}
.aq-row-name {
  font-family: 'Oswald', sans-serif;
  font-size: clamp(1.1rem, 2.8vw, 1.6rem);
  font-weight: 600; color: #fff; line-height: 1;
  display: flex; align-items: baseline; gap: 0.5rem;
}
.aq-row-sublabel {
  font-family: inherit; font-size: 0.58em; font-weight: 400;
  color: rgba(255,255,255,0.4); text-transform: uppercase; letter-spacing: 0.08em;
}
.aq-row-desc {
  font-size: clamp(0.6rem, 1.3vw, 0.78rem);
  color: rgba(255,255,255,0.35); line-height: 1.35;
}
.aq-row-bar-wrap {
  position: relative; display: flex; height: 6px;
  border-radius: 3px; overflow: visible; gap: 1px;
}
.aq-bar-seg {
  border-radius: 3px; height: 100%;
}
.aq-needle {
  position: absolute; top: -4px; bottom: -4px;
  width: 3px; border-radius: 2px;
  background: #fff; box-shadow: 0 0 5px rgba(255,255,255,0.7);
  transform: translateX(-50%);
}
.aq-row-zone-labels {
  display: flex; justify-content: space-between;
  font-size: 0.52rem; font-weight: 700; letter-spacing: 0.06em;
  text-transform: uppercase; margin-top: 0.1rem;
  opacity: 0.65;
}
.aq-row-val-wrap {
  flex-shrink: 0; text-align: right;
  display: flex; flex-direction: column; align-items: flex-end;
  gap: 0.05rem;
}
.aq-row-value {
  font-family: 'Oswald', sans-serif;
  font-size: clamp(1.8rem, 4.5vw, 3rem);
  font-weight: 700; line-height: 1;
}
.aq-row-unit {
  font-size: 0.6rem; color: rgba(255,255,255,0.35);
  font-weight: 600; letter-spacing: 0.06em;
}
.aq-row-status {
  font-size: 0.65rem; font-weight: 700; letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* ── Old AQ overview (in weather steps) ── */
.w-aq-wrap {
  display: flex; flex-direction: column; align-items: center;
  gap: 1rem; width: 100%; max-width: 400px;
}
.w-aq-num-row {
  display: flex; align-items: flex-end; gap: 1rem;
  opacity: 0; transform: scale(0.82);
  transition: opacity 0.55s ease 0.25s, transform 0.6s cubic-bezier(0.2,0.8,0.3,1) 0.25s;
}
.w-step.active .w-aq-num-row { opacity: 1; transform: scale(1); }

.w-aq-big-num {
  font-family: 'Oswald', sans-serif;
  font-size: clamp(5rem, 13vw, 8rem);
  font-weight: 700; color: #fff; line-height: 1;
  text-shadow: 0 4px 24px rgba(0,0,0,0.3);
}
.w-aq-label-col {
  display: flex; flex-direction: column; align-items: flex-start;
  gap: 0.3rem; padding-bottom: 0.6rem;
}
.w-aq-aqi-text {
  font-size: 0.7rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.18em; color: rgba(255,255,255,0.4);
}
.w-aq-badge-large {
  padding: 0.3rem 1.1rem; border-radius: 50px;
  font-size: clamp(1rem, 2.5vw, 1.5rem); font-weight: 700;
}
.w-aq-bar-wrap {
  width: 100%; opacity: 0;
  transition: opacity 0.5s ease 0.45s;
}
.w-step.active .w-aq-bar-wrap { opacity: 1; }

.w-aq-bar { display: flex; gap: 5px; height: 14px; border-radius: 8px; overflow: hidden; }
.w-aq-seg { flex: 1; border-radius: 6px; transition: opacity 0.6s ease; }

.w-aq-seg-labels {
  display: flex; justify-content: space-between;
  margin-top: 0.3rem;
}
.w-aq-seg-label {
  font-size: 0.55rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.06em; color: rgba(255,255,255,0.3); flex: 1; text-align: center;
}
.w-aq-seg-label.cur { color: rgba(255,255,255,0.85); }

.w-aq-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.7rem; width: 100%;
  opacity: 0; transform: translateY(14px);
  transition: opacity 0.5s ease 0.65s, transform 0.5s ease 0.65s;
}
.w-step.active .w-aq-grid { opacity: 1; transform: translateY(0); }

.w-aq-item {
  display: flex; flex-direction: column; align-items: center;
  background: rgba(255,255,255,0.1); backdrop-filter: blur(6px);
  border-radius: 11px; padding: 0.65rem 0.4rem; gap: 0.15rem;
}
.w-aq-val {
  font-family: 'Oswald', sans-serif;
  font-size: clamp(2.4rem, 6.5vw, 4.2rem); font-weight: 700; color: #fff;
}
.w-aq-name {
  font-size: 0.6rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.1em; color: rgba(255,255,255,0.45);
}

/* ── Breaking Birb Overlay ── */
#birb-alert-overlay {
  display: none; position: fixed; inset: 0; z-index: 200;
  background: #000; flex-direction: column;
}
#birb-alert-overlay.active { display: flex; }

#birb-phase1 { flex: 1; display: flex; flex-direction: column; overflow: hidden; }
.birb-alert-header-bar {
  flex-shrink: 0;
  background: linear-gradient(135deg, #cc0000, #880000);
  padding: 0.5rem 1.2rem;
  display: flex; align-items: center; gap: 0.8rem;
}
.birb-alert-icon { font-size: 1.8rem; animation: birb-pulse 0.8s ease-in-out infinite alternate; }
@keyframes birb-pulse {
  from { transform: scale(1); }
  to   { transform: scale(1.18) rotate(8deg); }
}
.birb-alert-title {
  font-family: 'Oswald', sans-serif;
  font-size: clamp(1.4rem, 3vw, 2rem); font-weight: 700;
  letter-spacing: 0.2em; text-transform: uppercase;
}
.birb-alert-video-wrap {
  flex: 1; overflow: hidden; background: #000;
  display: flex; align-items: center; justify-content: center;
}
#birb-video { max-width: 100%; max-height: 100%; object-fit: contain; }
.birb-ticker-wrap {
  flex-shrink: 0; height: 2.8rem; background: #cc0000;
  overflow: hidden; display: flex; align-items: center;
}
.birb-ticker {
  white-space: nowrap;
  font-family: 'Oswald', sans-serif; font-size: 1.3rem;
  font-weight: 700; letter-spacing: 0.12em;
  animation: birb-scroll 22s linear infinite; padding-right: 4rem;
}
@keyframes birb-scroll {
  from { transform: translateX(100vw); }
  to   { transform: translateX(-100%); }
}

#birb-phase2 { flex: 1; display: none; overflow: hidden; }
.birb-alert-phase2-inner { flex: 1; display: flex; overflow: hidden; }
.birb-alert-species-img-wrap { flex: 0 0 42%; overflow: hidden; background: #0a0a0a; }
.birb-alert-species-img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  animation: fadeIn 0.6s ease both;
}
.birb-alert-text {
  flex: 1; display: flex; flex-direction: column; justify-content: center;
  padding: 2.5rem 3rem; gap: 1.4rem; background: #0d0d0d;
}
.birb-alert-label {
  font-size: 0.72rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.22em; color: #cc0000;
  opacity: 0; animation: fadeIn 0.4s ease 0.2s both;
}
.birb-alert-species-name {
  font-family: 'Oswald', sans-serif;
  font-size: clamp(2rem, 5vw, 4rem); font-weight: 700;
  color: #fff; text-transform: uppercase; line-height: 1.1;
  opacity: 0; animation: slideFromRight 0.5s ease 0.4s both;
}
.birb-alert-species-latin {
  font-size: 1.1rem; color: #777; font-style: italic; margin-top: 0.3rem;
  opacity: 0; animation: fadeIn 0.4s ease 0.6s both;
}
.birb-alert-fact {
  font-size: clamp(1rem, 2vw, 1.35rem); color: #ddd; line-height: 1.7;
  border-left: 4px solid #cc0000; padding-left: 1.1rem;
  opacity: 0; animation: fadeIn 0.5s ease 0.9s both;
}
.birb-alert-confidence {
  font-size: 0.8rem; color: #555; text-transform: uppercase; letter-spacing: 0.1em;
  opacity: 0; animation: fadeIn 0.4s ease 1.2s both;
}
.birb-phase2-ticker {
  flex-shrink: 0; height: 2.8rem; background: #1a0000;
  overflow: hidden; display: flex; align-items: center;
}

/* ── Settings Panel ── */
.settings-overlay {
  display: none; position: fixed; inset: 0; z-index: 99;
}
.settings-overlay.open { display: block; }
.settings-panel {
  position: fixed; top: 0; right: -340px;
  width: 320px; height: 100vh;
  background: #1a1a1a; border-left: 1px solid #2e2e2e;
  padding: 1.4rem 1.2rem;
  transition: right 0.22s ease;
  z-index: 100;
  display: flex; flex-direction: column; gap: 1.4rem;
  overflow-y: auto;
}
.settings-panel.open { right: 0; }
.settings-panel h2 {
  font-size: 0.75rem; color: #666; text-transform: uppercase;
  letter-spacing: 0.14em; padding-bottom: 0.6rem;
  border-bottom: 1px solid #2e2e2e;
}
.setting-row { display: flex; flex-direction: column; gap: 0.5rem; }
.setting-label { display: flex; justify-content: space-between; font-size: 0.95rem; color: #ccc; }
.setting-label span { color: #fff; font-weight: 600; }
input[type=range] { width: 100%; accent-color: #cc0000; cursor: pointer; }
.toggle-row {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 0.95rem; color: #ccc;
}
.toggle { position: relative; width: 48px; height: 26px; flex-shrink: 0; }
.toggle input { opacity: 0; width: 0; height: 0; position: absolute; }
.toggle-slider {
  position: absolute; inset: 0; background: #444;
  border-radius: 26px; cursor: pointer; transition: background 0.2s;
}
.toggle-slider::before {
  content: ''; position: absolute; width: 20px; height: 20px;
  left: 3px; top: 3px; background: #fff; border-radius: 50%;
  transition: transform 0.2s;
}
.toggle input:checked + .toggle-slider { background: #cc0000; }
.toggle input:checked + .toggle-slider::before { transform: translateX(22px); }
.settings-divider { border: none; border-top: 1px solid #2e2e2e; margin: 0; }
