:root {
  --bg: #0b0b0f;
  --surface: #16161d;
  --surface-2: #1f1f28;
  --line: #2a2a35;
  --text: #f2f2f5;
  --muted: #9a9aa8;
  --accent: #ff3b30;
  --win: #34d399;
  color-scheme: dark;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body {
  font: 16px/1.4 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  padding: env(safe-area-inset-top) 0 0;
}
#app {
  max-width: 640px; margin: 0 auto;
  padding: 16px 16px calc(84px + env(safe-area-inset-bottom));
}
h1, h2, h3, p { margin: 0; }
.page-title { font-size: 28px; font-weight: 800; margin: 8px 0 16px; letter-spacing: -.02em; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.center { text-align: center; padding: 24px 0; }
.note { padding-top: 8px; }

.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px;
  padding: 16px; margin-bottom: 12px;
}
.event { cursor: pointer; display: grid; gap: 6px; }
.event:active { background: var(--surface-2); }
.event h3 { font-size: 20px; font-weight: 800; letter-spacing: -.01em; }
.subtitle { color: var(--text); opacity: .85; }
.main-line { font-weight: 600; }
.win { color: var(--win); font-weight: 700; }
.event-top { display: flex; gap: 8px; align-items: center; }
.event-top .time { margin-left: auto; font-size: 13px; }

.chip {
  display: inline-block; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
  background: var(--surface-2); border-radius: 999px; padding: 3px 10px;
}
.chip-accent { background: rgba(255, 59, 48, .15); color: var(--accent); }
.chip-live { background: var(--accent); color: #fff; }

.btn {
  display: inline-flex; flex-direction: column; align-items: center; justify-content: center;
  font: inherit; font-weight: 700; color: var(--text); background: var(--surface-2);
  border: 1px solid var(--line); border-radius: 12px; padding: 12px 18px; text-decoration: none; min-height: 48px;
}
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-block { display: flex; width: 100%; margin-top: 8px; }
.btn-sub { font-size: 11px; font-weight: 500; opacity: .85; }

.back { display: inline-block; color: var(--muted); text-decoration: none; padding: 8px 0 12px; }
.hero { display: grid; gap: 4px; margin-bottom: 20px; }
.hero h1 { font-size: 30px; font-weight: 800; letter-spacing: -.02em; }
.seg {
  font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted);
  margin: 20px 0 8px; font-weight: 700;
}
.fights { padding: 0; overflow: hidden; }
.fight { padding: 14px 16px; border-top: 1px solid var(--line); display: grid; gap: 4px; }
.fight:first-child { border-top: 0; }
.fight-main { background: linear-gradient(90deg, rgba(255, 59, 48, .10), transparent); }
.fight-meta { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 2px; }
.fighter { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.fighter.loser { opacity: .55; font-weight: 500; }
.fighter.winner .fname { color: var(--win); }
.fname { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rec { margin-left: auto; }
.tick { color: var(--win); margin-left: auto; }
.flag { width: 22px; height: 15px; object-fit: cover; border-radius: 2px; flex: none; }

.skeleton { height: 150px; background: linear-gradient(90deg, var(--surface), var(--surface-2), var(--surface)); background-size: 200% 100%; animation: sh 1.2s infinite linear; }
@keyframes sh { to { background-position: -200% 0; } }

.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; display: flex; justify-content: center; gap: 8px;
  padding: 8px 16px calc(8px + env(safe-area-inset-bottom));
  background: rgba(11, 11, 15, .92); backdrop-filter: blur(14px); border-top: 1px solid var(--line);
}
.tabbar a {
  flex: 1; max-width: 200px; display: flex; flex-direction: column; align-items: center; gap: 2px;
  font-size: 11px; font-weight: 600; color: var(--muted); text-decoration: none; padding: 4px 0;
}
.tabbar svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tabbar a.active { color: var(--accent); }

/* ---- Events-Zeitleiste ---- */
.strip {
  position: sticky; top: env(safe-area-inset-top); z-index: 5; display: flex; gap: 8px; align-items: center;
  margin: 0 -16px 8px; padding: 8px 16px; background: rgba(11, 11, 15, .94); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.strip-days { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; flex: 1; }
.strip-days::-webkit-scrollbar { display: none; }
.day {
  flex: none; display: flex; flex-direction: column; align-items: center; min-width: 54px; padding: 6px 10px;
  background: var(--surface); color: var(--text); border: 1px solid var(--line); border-radius: 12px; font: inherit; font-size: 12px;
}
.day span { color: var(--muted); text-transform: uppercase; font-size: 11px; }
.day b { font-size: 14px; }
.day-past { opacity: .55; }
.day.active { background: var(--accent); border-color: var(--accent); opacity: 1; }
.day.active span { color: #fff; }
.day-today { background: var(--surface-2); }
.today-marker {
  font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--accent);
  margin: 18px 0 10px; scroll-margin-top: 80px;
}
.event { scroll-margin-top: 80px; }
.event.past { opacity: .8; }
.chip-fav { background: rgba(250, 204, 21, .15); color: #facc15; }
.flink { color: inherit; text-decoration: none; }
.flink:active { opacity: .6; }
.star { color: #facc15; }

/* ---- Kämpfer ---- */
.pills { display: flex; gap: 8px; overflow-x: auto; margin: 0 -16px 12px; padding: 0 16px 4px; scrollbar-width: none; }
.pills::-webkit-scrollbar { display: none; }
.pill {
  flex: none; padding: 8px 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line);
  color: var(--text); text-decoration: none; font-size: 14px; font-weight: 600;
}
.pill.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.div-head { margin: 8px 0 12px; }
.div-head h2 { font-size: 22px; font-weight: 800; }
.rank-row {
  display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-top: 1px solid var(--line);
  color: inherit; text-decoration: none; font-weight: 600;
}
.rank-row:first-child { border-top: 0; }
.rank-row:active { background: var(--surface-2); }
.rank-row.champ { background: linear-gradient(90deg, rgba(250, 204, 21, .12), transparent); }
.rank { width: 24px; text-align: center; color: var(--muted); font-weight: 700; }

/* ---- Profil eines Kämpfers ---- */
.profile { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.profile-name { min-width: 0; flex: 1; }
.profile h1 { font-size: 26px; font-weight: 800; letter-spacing: -.02em; }
.avatar {
  flex: none; width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center;
  background: var(--surface-2); border: 2px solid var(--accent); font-weight: 800; font-size: 22px;
}
.fav {
  flex: none; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line);
  background: var(--surface); color: var(--muted); font-size: 22px; line-height: 1;
}
.fav.on { color: #facc15; border-color: #facc15; }
.small-fav { width: 36px; height: 36px; margin-left: auto; }
.record { display: grid; gap: 2px; text-align: center; }
.record b { font-size: 32px; letter-spacing: .02em; }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; }
.stat { display: grid; gap: 2px; min-width: 0; }
.stat b { font-weight: 600; overflow-wrap: anywhere; }
.hist { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-top: 1px solid var(--line); color: inherit; text-decoration: none; }
.hist:first-child { border-top: 0; }
.hist-main { display: grid; gap: 2px; min-width: 0; }
.res { flex: none; width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; font-weight: 800; background: var(--surface-2); color: var(--muted); }
.res-w { background: rgba(52, 211, 153, .18); color: var(--win); }
.res-l { background: rgba(255, 59, 48, .18); color: var(--accent); }

/* ---- News ---- */
.news { display: block; color: inherit; text-decoration: none; overflow: hidden; padding: 0; }
.news:active { background: var(--surface-2); }
.news-img { width: 100%; height: 160px; object-fit: cover; display: block; }
.news-body { padding: 14px 16px; display: grid; gap: 6px; }
.news h3 { font-size: 17px; line-height: 1.3; }
.teaser { font-size: 14px; }
.src { color: var(--accent); }

/* ---- Profil-Tab ---- */
.toggle { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; border-top: 1px solid var(--line); }
.toggle:first-child { border-top: 0; }
.toggle > span { display: grid; gap: 2px; }
.toggle input { position: absolute; opacity: 0; pointer-events: none; }
.switch { flex: none; width: 48px; height: 28px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); position: relative; transition: background .15s; }
.switch::after { content: ''; position: absolute; top: 2px; left: 2px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: transform .15s; }
.toggle input:checked + .switch { background: var(--accent); border-color: var(--accent); }
.toggle input:checked + .switch::after { transform: translateX(20px); }
.note { padding: 8px 0; }
.fname-col { display: grid; gap: 2px; min-width: 0; flex: 1; }
.fname-col .small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.push-on { display: grid; gap: 10px; }
.push-actions { display: flex; gap: 8px; }
.push-actions .btn { flex: 1; }
.btn:disabled { opacity: .6; }
