@font-face { font-family: "Barlow Condensed"; font-weight: 600; font-style: normal; font-display: swap; src: url(/fonts/bc-600.woff2) format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-weight: 800; font-style: normal; font-display: swap; src: url(/fonts/bc-800.woff2) format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-weight: 800; font-style: italic; font-display: swap; src: url(/fonts/bc-800i.woff2) format("woff2"); }

:root {
  --bg: #05070b; --card: #10161f; --card2: #151e29; --line: rgba(255,255,255,.08); --text: #f4f1ea; --muted: #93a0ad;
  --ice: #9fd8ff; --gold: #e8b23a; --red: #e3241c; --green: #2fbf71;
  --cond: "Barlow Condensed", "Arial Narrow", "Roboto Condensed", system-ui, sans-serif;
  --r: 14px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; color: var(--text); font: 16px/1.4 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg) radial-gradient(120% 60% at 50% -10%, rgba(120,190,255,.16), transparent 60%) fixed;
  padding-bottom: calc(76px + env(safe-area-inset-bottom)); min-height: 100vh;
}
/* angedeutete Eisfläche: rote Mittellinie, blaue Linien */
body::before { content: ""; position: fixed; inset: 0; pointer-events: none; z-index: -1; opacity: .07;
  background: linear-gradient(90deg, transparent calc(50% - 2px), var(--red) calc(50% - 2px) calc(50% + 2px), transparent calc(50% + 2px)),
              linear-gradient(90deg, transparent 30%, #3a7bd5 30% calc(30% + 6px), transparent calc(30% + 6px) 70%, #3a7bd5 70% calc(70% + 6px), transparent calc(70% + 6px)); }
a { color: var(--gold); }
h2, h3 { font: italic 800 1.25rem/1.1 var(--cond); text-transform: uppercase; letter-spacing: .03em; color: var(--text); margin: 0 0 .7em; display: flex; align-items: center; gap: .5em; }
h2::before { content: ""; width: 10px; height: 1em; background: var(--red); transform: skewX(-18deg); flex: none; }
h3 { font-size: 1.05rem; color: #fff; opacity: .85; }
button, input, select { font: inherit; }
[hidden] { display: none !important; }
.muted { color: var(--muted); }
small { display: block; color: var(--muted); font-size: .8rem; }

/* Kopf + Navigation */
.top { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 10px; padding: 8px 14px; padding-top: max(8px, env(safe-area-inset-top));
  background: rgba(5,7,11,.82); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.top img { filter: drop-shadow(0 0 10px rgba(232,178,58,.35)); }
.top b { font: italic 800 1.3rem/1 var(--cond); text-transform: uppercase; letter-spacing: .03em; display: block; }
.top > div { flex: 1; line-height: 1.15; min-width: 0; }
.st { font-size: .72rem; color: var(--muted); text-align: right; max-width: 42%; }
.st.off { color: var(--red); font-weight: 700; }
main { padding: 14px; max-width: 820px; margin: 0 auto; }
.tabs { position: fixed; bottom: 0; left: 0; right: 0; z-index: 10; display: flex; background: rgba(5,7,11,.92); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
.tabs a { flex: 1; text-align: center; padding: 16px 2px 14px; color: var(--muted); text-decoration: none; font: 800 .95rem var(--cond); text-transform: uppercase; letter-spacing: .04em; position: relative; }
.tabs a.on { color: var(--text); }
.tabs a.on::after { content: ""; position: absolute; left: 25%; right: 25%; top: 0; height: 3px; background: var(--red); border-radius: 0 0 3px 3px; box-shadow: 0 0 12px var(--red); }

.card { background: linear-gradient(180deg, var(--card2), var(--card)); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; margin-bottom: 14px; }

/* ---------- Scoreboard (Hero) ---------- */
.hero { position: relative; overflow: hidden; border-radius: 18px; margin-bottom: 14px; padding: 16px 16px 14px; text-align: center;
  background: linear-gradient(160deg, #18222f 0%, #0c1219 70%); border: 1px solid var(--line); box-shadow: 0 20px 50px rgba(0,0,0,.45); }
.hero.is-live { border-top: 3px solid var(--red); }
.hero.is-live::before { content: ""; position: absolute; inset: -40% -10% auto; height: 80%; background: radial-gradient(closest-side, rgba(227,36,28,.22), transparent); pointer-events: none; }
.hero-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; font: 800 .95rem var(--cond); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); position: relative; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 99px; font: 800 .85rem var(--cond); letter-spacing: .08em; text-transform: uppercase; background: #2a3440; color: var(--text); }
.pill.live { background: var(--red); color: #fff; }
.pill.live::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #fff; animation: pulse 1.2s infinite; }
@keyframes pulse { 50% { opacity: .25; } }
.clock { font: 800 1.35rem var(--cond); color: #fff; font-variant-numeric: tabular-nums; letter-spacing: .04em; }
.sb, .scoreline { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; margin: 14px 0 10px; position: relative; }
.sb .tn, .scoreline .tn { font: 800 1.35rem/1.05 var(--cond); text-transform: uppercase; letter-spacing: .02em; word-break: break-word; }
.sb .sc, .scoreline .sc { font: 800 3.6rem/1 var(--cond); font-variant-numeric: tabular-nums; display: flex; align-items: center; gap: 4px; text-shadow: 0 0 24px rgba(255,255,255,.12); }
.scoreline .sc span { display: inline-block; min-width: .62em; }
.scoreline .sc .colon { color: var(--muted); min-width: 0; }
.sc small, .np { display: block; font: 800 .95rem var(--cond); color: var(--gold); letter-spacing: .06em; }
.bump { animation: bump .9s ease-out; }
@keyframes bump { 0% { transform: scale(1.6); color: var(--red); } 100% { transform: scale(1); } }
.hero-foot { font-size: .9rem; color: var(--muted); position: relative; }
.hero-foot b { color: var(--text); }
.box { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 10px; position: relative; }
.box span { background: rgba(227,36,28,.15); border: 1px solid rgba(227,36,28,.45); color: #ffd6d3; border-radius: 8px; padding: 3px 8px; font-size: .82rem; font-variant-numeric: tabular-nums; }
.countdown { font: 800 3rem/1 var(--cond); color: var(--gold); font-variant-numeric: tabular-nums; margin: 6px 0; }
.hero .big-label { font: italic 800 1.1rem var(--cond); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.champ { font: italic 800 2.4rem/1 var(--cond); text-transform: uppercase; color: var(--gold); margin: 8px 0; text-shadow: 0 0 30px rgba(232,178,58,.4); }

/* Alte Klassen (Admin) */
.board { text-align: center; }
.live-dot { display: inline-block; background: var(--red); color: #fff; font-weight: 800; font-size: .75rem; padding: 2px 8px; border-radius: 99px; }

/* ---------- Listen, Spiele ---------- */
.row { display: flex; gap: 12px; align-items: center; padding: 11px 0; border-bottom: 1px solid var(--line); color: inherit; text-decoration: none; }
.row:last-child { border-bottom: 0; }
.row .time { width: 3.1em; flex: none; font: 800 1.05rem var(--cond); color: var(--muted); font-variant-numeric: tabular-nums; }
.row .teams { flex: 1; min-width: 0; }
.row .teams b { font-weight: 600; }
.row .res { font: 800 1.35rem var(--cond); font-variant-numeric: tabular-nums; text-align: right; }
.row .res small { font-size: .7rem; color: var(--gold); }
.row.mine { background: linear-gradient(90deg, rgba(232,178,58,.16), transparent); margin: 0 -16px; padding-left: 12px; padding-right: 16px; border-left: 4px solid var(--gold); }
.row.live .res, .row.pause .res { color: var(--red); }
.row.done .teams .w { color: var(--text); font-weight: 700; }
.row.pausezeile { color: var(--ice); font-size: .9rem; }
.row.pausezeile .time { color: var(--ice); }
.w { font-weight: 700; }
.list { list-style: none; margin: 0; padding: 0; }
.list li { padding: 10px 0; border-bottom: 1px solid var(--line); }
.list li:last-child { border-bottom: 0; }
.tag { display: inline-block; font: 800 .72rem var(--cond); text-transform: uppercase; letter-spacing: .06em; padding: 1px 7px; border-radius: 5px; background: #243040; color: var(--ice); margin-right: 4px; vertical-align: 1px; }
.tag.ko { background: rgba(232,178,58,.18); color: var(--gold); }
.tag.live { background: var(--red); color: #fff; }

table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
th, td { padding: 9px 4px; text-align: center; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font: 600 .78rem var(--cond); text-transform: uppercase; letter-spacing: .06em; }
td.l, th.l { text-align: left; }
td.pk { font: 800 1.15rem var(--cond); }
tr.mine td { color: var(--gold); font-weight: 700; }
tr.q td:first-child { box-shadow: inset 3px 0 0 var(--green); }

/* Playoff-Baum */
.bracket { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(210px, 1fr); gap: 12px; overflow-x: auto; padding-bottom: 6px; scroll-snap-type: x mandatory; }
.bracket .col { display: flex; flex-direction: column; justify-content: space-around; gap: 10px; scroll-snap-align: start; }
.bracket .col > b { font: italic 800 .9rem var(--cond); text-transform: uppercase; letter-spacing: .06em; color: var(--gold); }
.match { background: #0d131b; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.match.live { border-color: var(--red); box-shadow: 0 0 0 1px var(--red), 0 0 18px rgba(227,36,28,.35); }
.match .m { display: flex; justify-content: space-between; gap: 8px; padding: 7px 10px; }
.match .m + .m { border-top: 1px solid var(--line); }
.match .m.tbd { color: var(--muted); font-style: italic; }
.match .m.win { font-weight: 700; }
.match .m.win span:last-child { color: var(--gold); }
.match .m span:last-child { font: 800 1.05rem var(--cond); font-variant-numeric: tabular-nums; }
.match small { padding: 4px 10px; background: rgba(255,255,255,.03); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.btn, .chips button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 48px; padding: 10px 16px; border-radius: 10px; border: 1px solid var(--gold);
  background: transparent; color: var(--gold); font-weight: 700; text-decoration: none; cursor: pointer; }
.btn.solid, .chips button.solid { background: var(--gold); color: #111; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 8px 14px; margin: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 700; }
.big-count { font: 800 1.4rem var(--cond); color: var(--gold); }
.podium { display: grid; grid-template-columns: 1fr 1.15fr 1fr; align-items: end; gap: 8px; text-align: center; margin-top: 10px; }
.podium div { background: linear-gradient(180deg, #1d2835, #111821); border: 1px solid var(--line); border-radius: 10px 10px 0 0; padding: 10px 6px; font: 800 1rem/1.1 var(--cond); text-transform: uppercase; }
.podium div:nth-child(1) { min-height: 90px; } .podium div:nth-child(2) { min-height: 120px; border-color: var(--gold); } .podium div:nth-child(3) { min-height: 70px; }
.podium i { display: block; font-style: normal; font-size: 1.6rem; margin-bottom: 4px; }
.linkcard { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--text); }
.linkcard span:first-child { font-size: 1.6rem; }
.linkcard b { font: italic 800 1.15rem var(--cond); text-transform: uppercase; }

/* ---------- Tor-Animation ---------- */
#goal { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; text-align: center; pointer-events: none; overflow: hidden;
  background: radial-gradient(circle at 50% 50%, rgba(227,36,28,.55), rgba(5,7,11,.92) 70%); animation: fadeio var(--dur, 4s) ease forwards; }
#goal::before { content: ""; position: absolute; width: 220vmax; height: 220vmax; left: 50%; top: 50%; margin: -110vmax 0 0 -110vmax;
  background: repeating-conic-gradient(rgba(255,60,40,.22) 0 8deg, transparent 8deg 24deg); animation: spin 3s linear infinite; }
#goal .g1 { position: relative; font: italic 800 min(34vw, 30vh)/.85 var(--cond); color: #fff; text-shadow: 0 0 40px var(--red), 0 0 90px var(--red); animation: zoom .6s cubic-bezier(.2,1.6,.4,1); }
#goal .g2 { position: relative; font: 800 min(9vw, 7vh)/1.05 var(--cond); text-transform: uppercase; margin-top: 2vh; }
#goal .g3 { position: relative; font-size: min(4.6vw, 3.4vh); color: #ffe3e0; margin-top: 1vh; }
#goal .g4 { position: relative; font: 800 min(12vw, 10vh) var(--cond); color: var(--gold); margin-top: 1vh; font-variant-numeric: tabular-nums; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes zoom { from { transform: scale(3); opacity: 0; } }
@keyframes fadeio { 0% { opacity: 0; } 8%, 85% { opacity: 1; } 100% { opacity: 0; visibility: hidden; } }
@media (prefers-reduced-motion: reduce) { #goal::before, .pill.live::before, .bump, #goal .g1 { animation: none; } }

@media (min-width: 700px) { .sb .sc, .scoreline .sc { font-size: 4.6rem; } .sb .tn, .scoreline .tn { font-size: 1.8rem; } }

/* ================= Hallen-Bildschirm (/tv/) ================= */
body.tv { padding: 0; overflow: hidden; height: 100vh; cursor: none; font-size: 1.6vh; }
.tv-wrap { height: 100vh; display: grid; grid-template-rows: auto 1fr auto; }
.tv-head { display: flex; align-items: center; gap: 1.6vh; padding: 1.2vh 2.4vh; border-bottom: 1px solid var(--line); background: rgba(5,7,11,.7); }
.tv-head img { height: 7vh; width: auto; }
.tv-head .t1 { font: italic 800 4vh/1 var(--cond); text-transform: uppercase; letter-spacing: .02em; }
.tv-head .t2 { font: 600 2.1vh var(--cond); color: var(--muted); text-transform: uppercase; letter-spacing: .1em; }
.tv-head .now { margin-left: auto; font: 800 5vh var(--cond); font-variant-numeric: tabular-nums; color: var(--gold); }
.tv-grid { display: grid; grid-template-columns: 62fr 38fr; grid-template-rows: auto 1fr; gap: 1.8vh; padding: 1.8vh 2.4vh; min-height: 0; }
.tv-grid > * { min-height: 0; }
.tv .hero { margin: 0; padding: 2.4vh; border-radius: 2vh; display: flex; flex-direction: column; justify-content: center; }
.tv .hero-top { font-size: 2.6vh; }
.tv .pill { font-size: 2.4vh; padding: .4vh 1.4vh; }
.tv .clock { font-size: 4.4vh; }
.tv .sb, .tv .scoreline { margin: 2vh 0 1.4vh; gap: 2vh; }
.tv .sb .tn, .tv .scoreline .tn { font-size: 5.2vh; }
.tv .sb .sc, .tv .scoreline .sc { font-size: 17vh; }
.tv .hero-foot { font-size: 2.6vh; }
.tv .box span { font-size: 2.2vh; padding: .4vh 1.2vh; }
.tv .countdown { font-size: 13vh; }
.tv .hero .big-label { font-size: 3.2vh; }
.tv .champ { font-size: 9vh; }
.tv .card { margin: 0; padding: 2vh; border-radius: 1.6vh; overflow: hidden; }
.tv h2 { font-size: 3.2vh; }
.tv h3 { font-size: 2.5vh; }
.tv .row { padding: 1.1vh 0; gap: 1.6vh; font-size: 2.3vh; }
.tv .row .time { font-size: 2.8vh; }
.tv .row .res { font-size: 3.2vh; }
.tv small { font-size: 1.8vh; }
.tv th { font-size: 1.9vh; } .tv td { font-size: 2.4vh; padding: .9vh .4vh; } .tv td.pk { font-size: 2.8vh; }
.tv .tv-next { grid-row: 1 / 3; grid-column: 2; display: flex; flex-direction: column; gap: 1.8vh; }
.tv .tv-next .card:first-child { flex: 1; }
.tv .tv-rot { grid-column: 1; position: relative; }
.tv .tv-rot .card { height: 100%; animation: panel .6s ease; }
@keyframes panel { from { opacity: 0; transform: translateY(1.5vh); } }
.tv .tables2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: 2.4vh; }
.tv .bracket { grid-auto-columns: minmax(0, 1fr); overflow: hidden; }
.tv .match .m { padding: .8vh 1.2vh; font-size: 2.2vh; } .tv .match .m span:last-child { font-size: 2.6vh; } .tv .match small { font-size: 1.6vh; }
.tv .qr { display: flex; align-items: center; gap: 2vh; }
.tv .qr svg, .tv .qr img { width: 17vh; height: 17vh; background: #fff; padding: .8vh; border-radius: 1vh; flex: none; }
.tv .qr b { font: italic 800 3vh/1.05 var(--cond); text-transform: uppercase; display: block; }
.tv .qr span { font-size: 2vh; color: var(--muted); }
.tv .next1 { border-left: .5vh solid var(--gold); padding-left: 1.4vh; margin-bottom: 1vh; }
.tv .next1 .row .teams { font: 800 3.2vh/1.1 var(--cond); text-transform: uppercase; }
.tv-ticker { overflow: hidden; white-space: nowrap; border-top: 1px solid var(--line); background: #0a0e14; font: 600 2.6vh var(--cond); padding: 1vh 0; }
.tv-ticker div { display: inline-block; padding-left: 100%; animation: ticker var(--tick, 40s) linear infinite; }
.tv-ticker span { margin-right: 6vh; } .tv-ticker b { color: var(--gold); }
@keyframes ticker { to { transform: translateX(-100%); } }
.sound { position: fixed; right: 2vh; bottom: 8vh; z-index: 60; background: var(--red); color: #fff; font: 800 2.4vh var(--cond); text-transform: uppercase; letter-spacing: .05em; padding: 1.2vh 2vh; border-radius: 1vh; animation: pulse 1.6s infinite; cursor: pointer; }
body.tv:has(.sound:not([hidden])) { cursor: pointer; }
.to h3 { margin-top: 1.4em; } .to p { margin: .5em 0; }
