/* ============ WM26 · Floodlight theme ============ */
:root {
  --bg: #070b14;
  --bg-card: rgba(255, 255, 255, 0.045);
  --bg-card-hover: rgba(255, 255, 255, 0.08);
  --stroke: rgba(255, 255, 255, 0.09);
  --text: #eef2f9;
  --text-dim: #97a3b8;
  --text-faint: #5d6880;
  --lime: #c4f53c;
  --cyan: #39d0ff;
  --magenta: #e20074;
  --ard: #2a6fd6;
  --zdf: #fa7d19;
  --gold: #ffce42;
  --live: #ff4757;
  --radius: 18px;
  --nav-h: 64px;
  font-size: 16px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: "Outfit", system-ui, -apple-system, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100dvh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ambient glows */
.bg-glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(110px);
  opacity: 0.16;
  pointer-events: none;
  z-index: 0;
}
.bg-glow-1 { width: 420px; height: 420px; top: -130px; right: -120px; background: var(--magenta); }
.bg-glow-2 { width: 380px; height: 380px; bottom: 10%; left: -160px; background: var(--cyan); opacity: 0.10; }

/* ============ header ============ */
.app-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  background: rgba(7, 11, 20, 0.72);
  border-bottom: 1px solid var(--stroke);
  padding-top: env(safe-area-inset-top);
}
.header-inner {
  max-width: 880px;
  margin: 0 auto;
  padding: 12px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.wordmark { display: flex; align-items: center; gap: 12px; }
.wordmark-ball { font-size: 1.9rem; filter: drop-shadow(0 0 14px rgba(196, 245, 60, 0.45)); }
.wordmark-text h1 {
  font-size: 1.45rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  line-height: 1;
}
.wordmark-text h1 .grad {
  background: linear-gradient(100deg, var(--lime), var(--cyan));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.wordmark-text p { font-size: 0.68rem; color: var(--text-dim); letter-spacing: 0.06em; margin-top: 3px; }
.header-clock {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.78rem;
  color: var(--text-dim);
  text-align: right;
  line-height: 1.45;
  white-space: nowrap;
}
.header-clock strong { color: var(--lime); font-weight: 700; }

/* ============ layout ============ */
main {
  position: relative;
  z-index: 1;
  max-width: 880px;
  margin: 0 auto;
  padding: 18px 16px calc(var(--nav-h) + env(safe-area-inset-bottom) + 28px);
}
.hidden { display: none !important; }

/* ============ hero (next DFB game) ============ */
.hero {
  position: relative;
  border-radius: 24px;
  padding: 22px 20px 20px;
  margin-bottom: 22px;
  background:
    radial-gradient(120% 160% at 85% -20%, rgba(226, 0, 116, 0.28), transparent 55%),
    radial-gradient(120% 160% at 0% 110%, rgba(57, 208, 255, 0.16), transparent 55%),
    linear-gradient(160deg, rgba(255,255,255,0.07), rgba(255,255,255,0.02));
  border: 1px solid rgba(255, 255, 255, 0.12);
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: linear-gradient(90deg, #000 0 33%, #d00 33% 66%, var(--gold) 66% 100%);
  opacity: 0.85;
}
.hero-tag {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--gold);
  font-weight: 700;
  margin-bottom: 12px;
}
.hero-teams {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 14px;
}
.hero-team { flex: 1; text-align: center; }
.hero-team .flag { font-size: 2.6rem; display: block; line-height: 1.1; }
.hero-team .name { font-weight: 800; font-size: 1.02rem; margin-top: 4px; }
.hero-vs {
  font-family: "JetBrains Mono", monospace;
  color: var(--text-dim);
  font-size: 0.85rem;
  font-weight: 700;
}
.hero-meta {
  text-align: center;
  color: var(--text-dim);
  font-size: 0.82rem;
  margin-bottom: 14px;
}
.hero-meta strong { color: var(--text); }
.countdown {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 14px;
}
.cd-cell {
  min-width: 64px;
  padding: 8px 6px;
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--stroke);
  text-align: center;
}
.cd-cell b {
  display: block;
  font-family: "JetBrains Mono", monospace;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--lime);
  font-variant-numeric: tabular-nums;
}
.cd-cell span { font-size: 0.6rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--text-faint); }
.hero-badges { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; }

/* ============ section headings ============ */
.day-header {
  position: sticky;
  top: calc(64px + env(safe-area-inset-top));
  z-index: 10;
  margin: 26px 0 10px;
  padding: 7px 14px;
  display: inline-block;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--bg);
  background: linear-gradient(100deg, var(--lime), #9be32f);
  box-shadow: 0 4px 24px rgba(196, 245, 60, 0.25);
}
.day-header.today-hdr { background: linear-gradient(100deg, var(--gold), #ffb52e); }
.section-title {
  font-size: 1.05rem;
  font-weight: 800;
  margin: 6px 0 12px;
  letter-spacing: 0.02em;
}

/* ============ match cards ============ */
.match-card {
  display: grid;
  grid-template-columns: 58px 1fr auto;
  gap: 14px;
  align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  padding: 14px;
  margin-bottom: 10px;
  transition: background 0.2s, transform 0.15s;
}
.match-card:active { transform: scale(0.985); }
@media (hover: hover) { .match-card:hover { background: var(--bg-card-hover); } }

.match-card.is-germany {
  border-color: rgba(255, 206, 66, 0.45);
  background: linear-gradient(120deg, rgba(255, 206, 66, 0.10), var(--bg-card) 45%);
}
.match-card.is-live { border-color: rgba(255, 71, 87, 0.55); }
.match-card.is-done { opacity: 0.82; }

.mc-time {
  text-align: center;
  font-family: "JetBrains Mono", monospace;
  border-right: 1px solid var(--stroke);
  padding-right: 12px;
  align-self: stretch;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
}
.mc-time .clock { font-size: 1.02rem; font-weight: 700; color: var(--text); }
.mc-time .ampm { font-size: 0.58rem; color: var(--text-faint); letter-spacing: 0.08em; text-transform: uppercase; }
.mc-time .live-dot {
  font-size: 0.6rem;
  font-weight: 700;
  color: var(--live);
  letter-spacing: 0.14em;
  animation: pulse 1.4s ease-in-out infinite;
}
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }

.mc-body { min-width: 0; }
.mc-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 0.97rem;
  line-height: 1.65;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mc-row .flag { font-size: 1.15rem; }
.mc-row .ph { color: var(--text-dim); font-weight: 500; font-size: 0.88rem; }
.mc-row .score {
  margin-left: auto;
  font-family: "JetBrains Mono", monospace;
  font-weight: 700;
  color: var(--lime);
  padding-left: 8px;
}
.mc-sub {
  margin-top: 6px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: 0.7rem;
  color: var(--text-faint);
}
.mc-context { white-space: nowrap; }

/* badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  padding: 3px 9px;
  border-radius: 999px;
  white-space: nowrap;
}
a.badge { text-decoration: none; cursor: pointer; }
a.badge:active { transform: scale(0.95); }
.badge.ard { background: rgba(42, 111, 214, 0.22); color: #7fb0f5; border: 1px solid rgba(42, 111, 214, 0.45); }
.badge.zdf { background: rgba(250, 125, 25, 0.18); color: #ffb066; border: 1px solid rgba(250, 125, 25, 0.4); }
.badge.magenta { background: rgba(226, 0, 116, 0.16); color: #ff64b4; border: 1px solid rgba(226, 0, 116, 0.42); }
.badge.magenta.excl { background: rgba(226, 0, 116, 0.32); color: #ffffff; border-color: var(--magenta); }
.badge.freetv { background: rgba(196, 245, 60, 0.14); color: var(--lime); border: 1px solid rgba(196, 245, 60, 0.35); }
.badge.tbd { background: rgba(255, 255, 255, 0.07); color: var(--text-dim); border: 1px dashed rgba(255, 255, 255, 0.25); }

/* ============ filter bar ============ */
.filter-bar {
  position: sticky;
  top: calc(60px + env(safe-area-inset-top));
  z-index: 20;
  background: rgba(7, 11, 20, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  margin: -6px -16px 8px;
  padding: 10px 16px 12px;
  border-bottom: 1px solid var(--stroke);
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.team-select-wrap select {
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
  background: var(--bg-card) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' fill='%2397a3b8' viewBox='0 0 16 16'%3E%3Cpath d='M2 5l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 14px center;
  border: 1px solid var(--stroke);
  color: var(--text);
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  padding: 12px 40px 12px 14px;
  border-radius: 14px;
  outline: none;
}
.chip-row { display: flex; flex-wrap: wrap; gap: 7px; }
.chip {
  border: 1px solid var(--stroke);
  background: var(--bg-card);
  color: var(--text-dim);
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 8px 14px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.18s;
  min-height: 36px;
}
.chip.active {
  background: linear-gradient(100deg, var(--lime), #a8e637);
  color: var(--bg);
  border-color: transparent;
  box-shadow: 0 2px 16px rgba(196, 245, 60, 0.3);
}
.chip.toggle.active { background: linear-gradient(100deg, var(--cyan), #2db4e0); }

.empty-state {
  text-align: center;
  color: var(--text-dim);
  padding: 48px 20px;
  font-size: 0.92rem;
  line-height: 1.7;
}
.empty-state .big { font-size: 2.4rem; display: block; margin-bottom: 10px; }

/* ============ public viewing ============ */
.pv-intro { margin-bottom: 14px; }
.pv-intro h2 {
  font-size: 1.5rem;
  font-weight: 900;
  background: linear-gradient(100deg, var(--lime), var(--cyan));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.pv-intro p { color: var(--text-dim); font-size: 0.86rem; margin-top: 4px; }
.city-chips { margin-bottom: 16px; }

.pv-citynote {
  background: rgba(57, 208, 255, 0.07);
  border: 1px solid rgba(57, 208, 255, 0.22);
  border-radius: var(--radius);
  padding: 13px 15px;
  font-size: 0.84rem;
  color: var(--text-dim);
  line-height: 1.6;
  margin-bottom: 14px;
}
.pv-citynote strong { color: var(--cyan); }

.pv-card {
  background: var(--bg-card);
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 12px;
}
.pv-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}
.pv-card h3 { font-size: 1.02rem; font-weight: 800; line-height: 1.3; }
.pv-card .pv-area { color: var(--text-dim); font-size: 0.78rem; margin-top: 2px; }
.pv-type {
  flex-shrink: 0;
  font-size: 0.62rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(196, 245, 60, 0.12);
  color: var(--lime);
  border: 1px solid rgba(196, 245, 60, 0.3);
}
.pv-type.indoor { background: rgba(226, 0, 116, 0.12); color: #ff64b4; border-color: rgba(226, 0, 116, 0.35); }
.pv-type.biergarten { background: rgba(255, 206, 66, 0.1); color: var(--gold); border-color: rgba(255, 206, 66, 0.3); }
.pv-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  font-size: 0.78rem;
  color: var(--text-dim);
  margin: 10px 0;
}
.pv-facts span strong { color: var(--text); font-weight: 700; }
.pv-note { font-size: 0.8rem; color: var(--text-dim); line-height: 1.55; }
.pv-links { margin-top: 12px; display: flex; gap: 8px; flex-wrap: wrap; }
.pv-links a {
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--cyan);
  text-decoration: none;
  border: 1px solid rgba(57, 208, 255, 0.3);
  background: rgba(57, 208, 255, 0.08);
  padding: 7px 12px;
  border-radius: 999px;
}

/* ============ TV info ============ */
.tv-block {
  background: var(--bg-card);
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 14px;
  line-height: 1.65;
  font-size: 0.88rem;
  color: var(--text-dim);
}
.tv-block h2 { color: var(--text); font-size: 1.1rem; font-weight: 800; margin-bottom: 10px; }
.tv-block h2 .em { color: var(--magenta); }
.tv-block strong { color: var(--text); }
.tv-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 14px 0 4px; }
.tv-stat {
  text-align: center;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--stroke);
  border-radius: 14px;
  padding: 14px 6px;
}
.tv-stat b { display: block; font-size: 1.6rem; font-weight: 900; font-family: "JetBrains Mono", monospace; }
.tv-stat span { font-size: 0.64rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-faint); }
.tv-stat.s-free b { color: var(--lime); }
.tv-stat.s-magenta b { color: #ff64b4; }
.tv-stat.s-all b { color: var(--cyan); }
.tv-block ul { margin: 8px 0 0 18px; }
.tv-block li { margin-bottom: 6px; }
.tv-block a { color: var(--cyan); word-break: break-all; }
.src-list { font-size: 0.74rem; }

/* ============ bottom nav ============ */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 60;
  display: flex;
  justify-content: space-around;
  /* no backdrop-filter here: fixed + backdrop-filter renders invisible on iOS Safari */
  background: #0b101ce8;
  border-top: 1px solid var(--stroke);
  padding: 6px 4px max(calc(6px + env(safe-area-inset-bottom)), 10px);
  transform: translateZ(0);
}
.nav-btn {
  flex: 1;
  max-width: 130px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  background: none;
  border: none;
  color: var(--text-faint);
  font-family: inherit;
  cursor: pointer;
  padding: 6px 2px;
  border-radius: 12px;
  transition: color 0.2s;
  min-height: 52px;
}
.nav-ico { font-size: 1.25rem; filter: grayscale(1) opacity(0.6); transition: filter 0.2s, transform 0.2s; }
.nav-label { font-size: 0.6rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; }
.nav-btn.active { color: var(--lime); }
.nav-btn.active .nav-ico { filter: none; transform: translateY(-2px) scale(1.12); }

/* ============ desktop (real desktops only - landscape phones/tablets keep the bottom nav) ============ */
@media (min-width: 900px) and (min-height: 500px) {
  main { padding-top: 26px; }
  .bottom-nav {
    top: 0;
    bottom: auto;
    left: auto;
    right: max(18px, calc((100vw - 880px) / 2));
    width: auto;
    background: none;
    border: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    padding: 14px 0;
    gap: 4px;
    z-index: 70;
  }
  .nav-btn { flex-direction: row; gap: 7px; padding: 8px 14px; min-height: 0; }
  .nav-btn.active { background: rgba(196, 245, 60, 0.1); }
  .nav-ico { font-size: 1rem; }
  .nav-label { font-size: 0.72rem; }
  .header-clock { display: none; }
  .hero-team .flag { font-size: 3.4rem; }
  .filter-bar { margin: -6px 0 8px; border-radius: 0 0 18px 18px; border: 1px solid var(--stroke); border-top: none; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}
