:root {
    color-scheme: dark;
    --bg: #0a0c11;
    --bg-2: #0e1118;
    --surface: #131720;
    --surface-2: #191e29;
    --surface-3: #212736;
    --border: #252b3a;
    --border-2: #313949;
    --text: #e9ecf3;
    --muted: #8d95a8;
    --faint: #5d6579;
    --accent: #7c5cff;
    --accent-2: #a28bff;
    --win: #2fd27a;
    --lose: #ff5d6c;
    --draw: #f3b53f;
    --live: #ff3b5c;
    --info: #3fb2ff;
    --g: var(--accent);
    --radius: 14px;
    --radius-sm: 9px;
    --shadow: 0 10px 40px rgba(0, 0, 0, .45);
    --display: "Chakra Petch", "Inter", system-ui, sans-serif;
    --sidebar: 240px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
    font: 14px/1.5 "Inter", system-ui, "Segoe UI", sans-serif;
    background: var(--bg);
    color: var(--text);
    -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: var(--accent); color: #fff; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--surface-3); border-radius: 10px; border: 2px solid var(--bg); }
::-webkit-scrollbar-track { background: transparent; }

/* ---------- Layout ---------- */

#app { display: grid; grid-template-columns: var(--sidebar) 1fr; min-height: 100vh; }
.sidebar {
    position: sticky; top: 0; height: 100vh;
    display: flex; flex-direction: column; gap: 18px;
    padding: 20px 14px;
    background: var(--bg-2);
    border-right: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: 12px; padding: 4px 8px 14px; }
.brand-mark {
    width: 42px; height: 42px; flex: none;
    display: grid; place-items: center;
    filter: drop-shadow(0 6px 16px rgba(124, 92, 255, .45));
    transition: transform .3s cubic-bezier(.3, 1.6, .5, 1);
}
.brand:hover .brand-mark { transform: scale(1.08) rotate(-4deg); }
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-text b {
    font: 700 16px var(--display); letter-spacing: .02em;
    background: linear-gradient(90deg, #fff 0%, #fff 40%, #ffc94a 50%, #fff 60%, #fff 100%) 0 0 / 250% 100%;
    -webkit-background-clip: text; background-clip: text; color: transparent;
    animation: brandShine 6s ease-in-out infinite;
}
@keyframes brandShine { 0%, 60% { background-position: 100% 0; } 85%, 100% { background-position: 0 0; } }

/* Logo (Art.logo): Ring-Komet, Bracket wächst zusammen, Krone poppt auf */
.logo { display: block; overflow: visible; }
.logo .ring-base { stroke: rgba(255, 255, 255, .1); stroke-width: 2; }
.logo .ring-comet { fill: none; stroke-width: 3; stroke-linecap: round; stroke-dasharray: 34 66; animation: logoComet 4s linear infinite; }
.logo .br { fill: none; stroke: #c9c3ff; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 100; stroke-dashoffset: 100; animation: logoDraw .45s ease-out var(--d) forwards; }
.logo .hot { stroke: #ffc94a; stroke-width: 3; }
.logo .spark { fill: none; stroke: #fff; stroke-width: 3.4; stroke-linecap: round; stroke-dasharray: 10 110; stroke-dashoffset: 10; opacity: 0; animation: logoSpark 3s ease-in 1.8s infinite; }
.logo .crown { transform-box: view-box; transform-origin: 32px 26px; opacity: 0; animation: logoCrown .7s cubic-bezier(.3, 1.7, .5, 1) 1.35s forwards, logoBob 3s ease-in-out 2.1s infinite; }
.logo .shine { transform: skewX(-20deg) translateX(-14px); animation: logoShine 3.5s ease-in-out 2s infinite; }
.logo .stars path { transform-box: fill-box; transform-origin: center; opacity: 0; animation: logoTwinkle 2.1s ease-in-out calc(2s + var(--d)) infinite; }
@keyframes logoComet { to { stroke-dashoffset: -100; } }
@keyframes logoDraw { to { stroke-dashoffset: 0; } }
@keyframes logoSpark { 0% { stroke-dashoffset: 10; opacity: 1; } 45% { stroke-dashoffset: -100; opacity: 1; } 50%, 100% { stroke-dashoffset: -100; opacity: 0; } }
@keyframes logoCrown { from { opacity: 0; transform: translateY(6px) scale(.2) rotate(-25deg); } to { opacity: 1; transform: none; } }
@keyframes logoBob { 0%, 100% { transform: none; } 50% { transform: translateY(-1px) scale(1.04); } }
@keyframes logoShine { 0% { transform: skewX(-20deg) translateX(-14px); } 40%, 100% { transform: skewX(-20deg) translateX(40px); } }
@keyframes logoTwinkle { 0%, 100% { opacity: 0; transform: scale(.3) rotate(0); } 50% { opacity: 1; transform: scale(1.2) rotate(45deg); } }
.hero-logo { width: 96px; height: 96px; margin-bottom: 6px; filter: drop-shadow(0 10px 30px rgba(255, 79, 154, .35)); }
.hero-logo .logo { width: 100%; height: 100%; }
@media (prefers-reduced-motion: reduce) {
    .logo *, .brand-text b { animation: none !important; }
    .logo .br { stroke-dashoffset: 0; }
    .logo .crown { opacity: 1; }
    .logo .ring-comet { stroke-dasharray: none; opacity: .6; }
    .logo .spark { display: none; }
}
.brand-text small { color: var(--muted); font-size: 12px; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 12px; border-radius: var(--radius-sm);
    color: var(--muted); font-weight: 500;
    transition: background .15s, color .15s;
}
.nav a i { font-style: normal; width: 20px; text-align: center; font-size: 15px; }
.nav a:hover { background: var(--surface); color: var(--text); }
.nav a.active { background: var(--surface-2); color: var(--text); box-shadow: inset 3px 0 0 var(--accent); }
.sidebar-foot { margin-top: auto; }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
    position: sticky; top: 0; z-index: 20;
    display: flex; align-items: center; gap: 16px;
    padding: 14px 28px;
    background: rgba(10, 12, 17, .82);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}
.crumbs { display: flex; align-items: center; gap: 8px; color: var(--muted); font-weight: 500; min-width: 0; }
.crumbs b { color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-actions { margin-left: auto; display: flex; gap: 10px; align-items: center; }
.search {
    display: flex; align-items: center; gap: 8px;
    padding: 0 12px; height: 38px; width: 280px;
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm);
    color: var(--muted);
}
.search:focus-within { border-color: var(--accent); }
.search input { flex: 1; background: none; border: 0; outline: 0; min-width: 0; color: var(--text); }
.menu-btn { display: none; }
.view { padding: 28px; max-width: 1500px; width: 100%; margin: 0 auto; }

/* ---------- Basics ---------- */

h1 { font: 700 28px/1.15 var(--display); letter-spacing: .01em; }
h2 { font: 600 19px/1.3 var(--display); letter-spacing: .01em; }
h3 { font-size: 15px; font-weight: 600; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.small { font-size: 12px; }
.mono { font-variant-numeric: tabular-nums; }
.row { display: flex; align-items: center; gap: 10px; }
.row.wrap { flex-wrap: wrap; }
.spacer { flex: 1; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.grid { display: grid; gap: 16px; }
.section-head { display: flex; align-items: flex-end; gap: 12px; margin: 30px 0 14px; }
.section-head:first-child { margin-top: 0; }
.section-head p { color: var(--muted); }
.page-head { display: flex; align-items: flex-end; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.page-head p { color: var(--muted); margin-top: 6px; }

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px;
}
.card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.card-head h3 { font-size: 14px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.card.flush { padding: 0; overflow: hidden; }

.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    height: 38px; padding: 0 16px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-2);
    background: var(--surface-2);
    font-weight: 600; font-size: 13px;
    cursor: pointer; white-space: nowrap;
    transition: transform .08s, background .15s, border-color .15s, opacity .15s;
}
.btn:hover { background: var(--surface-3); border-color: #3c455a; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-primary:hover { background: #8d71ff; border-color: #8d71ff; }
.btn-game { background: var(--g); border-color: var(--g); color: #0b0c10; }
.btn-game:hover { filter: brightness(1.1); background: var(--g); border-color: var(--g); }
.btn-danger { color: var(--lose); }
.btn-danger:hover { background: rgba(255, 93, 108, .12); border-color: var(--lose); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn-ghost:hover { background: var(--surface-2); color: var(--text); border-color: transparent; }
.btn-sm { height: 30px; padding: 0 11px; font-size: 12px; }
.btn-xs { height: 24px; padding: 0 8px; font-size: 11px; border-radius: 6px; }
.icon-btn {
    width: 34px; height: 34px; display: grid; place-items: center;
    border-radius: 8px; border: 1px solid var(--border); background: var(--surface);
    cursor: pointer; color: var(--muted);
}
.icon-btn:hover { color: var(--text); background: var(--surface-2); }

.pill {
    display: inline-flex; align-items: center; gap: 6px;
    height: 22px; padding: 0 9px; border-radius: 99px;
    font-size: 11px; font-weight: 600; letter-spacing: .03em;
    background: var(--surface-3); color: var(--muted);
    white-space: nowrap;
}
.pill.setup { background: rgba(63, 178, 255, .13); color: var(--info); }
.pill.running { background: rgba(47, 210, 122, .13); color: var(--win); }
.pill.finished { background: rgba(162, 139, 255, .15); color: var(--accent-2); }
.pill.live { background: rgba(255, 59, 92, .16); color: var(--live); }
.pill.live::before, .dot-live::before {
    content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--live);
    animation: pulse 1.4s infinite;
}
.pill.ready { background: rgba(243, 181, 63, .14); color: var(--draw); }
.pill.done { background: var(--surface-3); color: var(--muted); }
.pill.g { background: color-mix(in srgb, var(--g) 18%, transparent); color: var(--g); }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .3; } }

.chip {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 6px 12px; border-radius: 99px;
    border: 1px solid var(--border-2); background: var(--surface);
    color: var(--muted); font-size: 12px; font-weight: 500;
    cursor: pointer; user-select: none;
}
.chip:hover { color: var(--text); border-color: #3c455a; }
.chip.on { background: color-mix(in srgb, var(--g) 16%, var(--surface)); border-color: var(--g); color: var(--text); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }

/* Spiel-Badge */
.gbadge {
    --s: 44px;
    width: var(--s); height: var(--s); flex: none;
    border-radius: calc(var(--s) * .28);
    display: grid; place-items: center;
    font: 700 calc(var(--s) * .3)/1 var(--display); letter-spacing: .02em;
    color: #fff;
    background:
        radial-gradient(120% 120% at 0% 0%, rgba(255, 255, 255, .28), transparent 55%),
        linear-gradient(145deg, var(--g), color-mix(in srgb, var(--g) 45%, #000));
    box-shadow: 0 4px 14px color-mix(in srgb, var(--g) 35%, transparent), inset 0 0 0 1px rgba(255, 255, 255, .12);
    text-shadow: 0 1px 2px rgba(0, 0, 0, .35);
}
.gbadge.sm { --s: 30px; }
.gbadge.lg { --s: 64px; }
.gbadge.xl { --s: 84px; }

/* ---------- Formulare ---------- */

.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > span { font-size: 12px; font-weight: 600; color: var(--muted); letter-spacing: .02em; }
.field small { color: var(--faint); font-size: 11px; }
.input, select.input, textarea.input {
    width: 100%; height: 38px; padding: 0 12px;
    background: var(--bg-2); border: 1px solid var(--border-2); border-radius: var(--radius-sm);
    outline: 0; transition: border-color .15s, box-shadow .15s;
}
textarea.input { height: auto; min-height: 90px; padding: 10px 12px; resize: vertical; }
.input:focus { border-color: var(--g); box-shadow: 0 0 0 3px color-mix(in srgb, var(--g) 20%, transparent); }
.input.sm { height: 30px; padding: 0 8px; font-size: 13px; }
.input.score { width: 64px; text-align: center; font: 700 18px var(--display); height: 44px; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.form-grid .full { grid-column: 1 / -1; }
.toggle { display: flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; }
.toggle input { display: none; }
.toggle i {
    width: 38px; height: 22px; border-radius: 99px; background: var(--surface-3);
    position: relative; transition: background .15s; flex: none;
}
.toggle i::after {
    content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px;
    border-radius: 50%; background: #fff; transition: transform .15s;
}
.toggle input:checked + i { background: var(--g); }
.toggle input:checked + i::after { transform: translateX(16px); }

/* ---------- Dashboard ---------- */

.hero {
    position: relative; overflow: hidden;
    padding: 30px; border-radius: 20px; margin-bottom: 22px;
    background:
        radial-gradient(60% 120% at 100% 0%, rgba(255, 79, 154, .22), transparent 60%),
        radial-gradient(50% 120% at 0% 100%, rgba(124, 92, 255, .3), transparent 60%),
        var(--surface);
    border: 1px solid var(--border);
}
.hero h1 { font-size: 32px; }
.hero p { color: var(--muted); margin-top: 6px; max-width: 620px; }
.hero .row { margin-top: 20px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin-bottom: 8px; }
.stat {
    padding: 16px 18px; border-radius: var(--radius);
    background: var(--surface); border: 1px solid var(--border);
}
.stat b { display: block; font: 700 30px/1.1 var(--display); margin-top: 4px; font-variant-numeric: tabular-nums; }
.stat span { color: var(--muted); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; }
.stat small { color: var(--faint); font-size: 12px; }
.dash-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 18px; }

/* Turnier-Karten */
.t-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.t-card {
    position: relative; overflow: hidden;
    display: flex; flex-direction: column; gap: 14px;
    padding: 18px; border-radius: var(--radius);
    background: linear-gradient(180deg, color-mix(in srgb, var(--g) 10%, var(--surface)), var(--surface) 55%);
    border: 1px solid var(--border);
    transition: transform .15s, border-color .15s, box-shadow .15s;
}
.t-card::before {
    content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: var(--g);
}
.t-card:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--g) 50%, var(--border)); box-shadow: var(--shadow); }
.t-card h3 { font: 600 17px/1.25 var(--display); }
.t-card .meta { display: flex; flex-wrap: wrap; gap: 6px 14px; color: var(--muted); font-size: 12px; }
.progress { height: 6px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.progress i { display: block; height: 100%; background: var(--g); border-radius: inherit; transition: width .3s; }

.empty {
    display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center;
    padding: 46px 20px; color: var(--muted);
    border: 1px dashed var(--border-2); border-radius: var(--radius);
}
.empty .big { font-size: 36px; }

/* Match-Liste */
.mlist { display: flex; flex-direction: column; }
.mrow {
    display: grid; grid-template-columns: 30px minmax(0, 1fr) auto minmax(0, 1fr) auto;
    align-items: center; gap: 12px;
    padding: 11px 14px; border-top: 1px solid var(--border);
    cursor: pointer; transition: background .12s;
}
.mrow:first-child { border-top: 0; }
.mrow:hover { background: var(--surface-2); }
.mrow .side { display: flex; align-items: center; gap: 8px; min-width: 0; font-weight: 600; }
.mrow .side.r { justify-content: flex-end; text-align: right; }
.mrow .side span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mrow .side.win { color: var(--win); }
.mrow .side.lose { color: var(--muted); font-weight: 500; }
.mrow .score { font: 700 16px var(--display); min-width: 64px; text-align: center; font-variant-numeric: tabular-nums; }
.mrow .score.vs { color: var(--faint); font-size: 12px; }
.mrow .info { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; font-size: 11px; color: var(--muted); min-width: 130px; }
.mrow-sub { grid-column: 2 / 5; font-size: 11px; color: var(--faint); margin-top: -6px; display: flex; gap: 12px; flex-wrap: wrap; }
.round-label {
    padding: 10px 14px; background: var(--bg-2);
    border-top: 1px solid var(--border);
    font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--muted);
    display: flex; gap: 10px; align-items: center;
}
.round-label:first-child { border-top: 0; }

/* ---------- Spielekatalog ---------- */

.games-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.game-card {
    position: relative; overflow: hidden; cursor: pointer;
    padding: 16px; border-radius: var(--radius);
    background:
        radial-gradient(90% 80% at 100% 0%, color-mix(in srgb, var(--g) 22%, transparent), transparent 70%),
        var(--surface);
    border: 1px solid var(--border);
    display: flex; flex-direction: column; gap: 12px;
    transition: transform .15s, border-color .15s;
}
.game-card:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--g) 55%, var(--border)); }
.game-card.selected { border-color: var(--g); box-shadow: 0 0 0 2px color-mix(in srgb, var(--g) 40%, transparent); }
.game-card h3 { font: 600 16px/1.2 var(--display); }
.game-card .facts { display: flex; flex-wrap: wrap; gap: 6px; }
.game-card .count { position: absolute; top: 14px; right: 14px; }

/* Detail-Infos */
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 8px 18px; font-size: 13px; }
.kv dt { color: var(--muted); }
.kv dd { font-weight: 500; }
.maps { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.map-tile {
    padding: 12px; border-radius: 10px; font-size: 12px; font-weight: 600;
    background: linear-gradient(135deg, color-mix(in srgb, var(--g) 14%, var(--surface-2)), var(--surface-2));
    border: 1px solid var(--border);
}
.map-tile.off { opacity: .35; text-decoration: line-through; }

/* ---------- Wizard ---------- */

.stepper { display: flex; gap: 8px; margin-bottom: 24px; flex-wrap: wrap; }
.step {
    display: flex; align-items: center; gap: 10px; padding: 8px 14px 8px 8px;
    border-radius: 99px; background: var(--surface); border: 1px solid var(--border);
    color: var(--muted); font-weight: 600; font-size: 13px; cursor: pointer;
}
.step b {
    width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center;
    background: var(--surface-3); font-size: 12px;
}
.step.on { color: var(--text); border-color: var(--g); }
.step.on b { background: var(--g); color: #0b0c10; }
.step.done b { background: var(--win); color: #0b0c10; }
.format-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.format-card {
    padding: 18px; border-radius: var(--radius); cursor: pointer;
    background: var(--surface); border: 1px solid var(--border);
    display: flex; flex-direction: column; gap: 10px;
}
.format-card:hover { border-color: #3c455a; }
.format-card.selected { border-color: var(--g); background: color-mix(in srgb, var(--g) 8%, var(--surface)); }
.format-card.disabled { opacity: .35; pointer-events: none; }
.format-card svg { width: 100%; height: 54px; }
.wizard-foot {
    position: sticky; bottom: 0; margin: 24px -28px -28px; padding: 16px 28px;
    display: flex; gap: 10px; align-items: center;
    background: rgba(10, 12, 17, .9); backdrop-filter: blur(10px);
    border-top: 1px solid var(--border);
}

/* ---------- Turnier-Detail ---------- */

.t-banner {
    position: relative; overflow: hidden;
    padding: 26px; border-radius: 20px; margin-bottom: 18px;
    background:
        radial-gradient(70% 140% at 100% 0%, color-mix(in srgb, var(--g) 35%, transparent), transparent 65%),
        linear-gradient(180deg, color-mix(in srgb, var(--g) 9%, var(--surface)), var(--surface));
    border: 1px solid color-mix(in srgb, var(--g) 30%, var(--border));
    display: flex; gap: 22px; align-items: center; flex-wrap: wrap;
}
.t-banner .title { flex: 1; min-width: 260px; }
.t-banner h1 { margin: 6px 0 10px; }
.t-banner .meta { display: flex; flex-wrap: wrap; gap: 8px; }
.t-banner .actions { display: flex; gap: 8px; flex-wrap: wrap; }
.tabs {
    display: flex; gap: 4px; margin-bottom: 20px; overflow-x: auto;
    border-bottom: 1px solid var(--border);
}
.tabs a {
    padding: 10px 14px; color: var(--muted); font-weight: 600; white-space: nowrap;
    border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.tabs a:hover { color: var(--text); }
.tabs a.active { color: var(--text); border-color: var(--g); }
.tabs a .pill { margin-left: 6px; height: 18px; padding: 0 7px; font-size: 10px; }
.two-col { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(280px, 1fr); gap: 18px; align-items: start; }

/* Podium */
.podium { display: grid; grid-template-columns: 1fr 1.15fr 1fr; gap: 12px; align-items: end; }
.podium > div {
    text-align: center; padding: 16px 10px; border-radius: var(--radius);
    background: var(--surface-2); border: 1px solid var(--border);
}
.podium .p1 { padding-top: 26px; border-color: #e7c14b; background: linear-gradient(180deg, rgba(231, 193, 75, .16), var(--surface-2)); }
.podium .p2 { border-color: #b9c1cf; }
.podium .p3 { border-color: #c98a55; }
.podium .medal { font-size: 30px; }
.podium b { display: block; font: 700 16px var(--display); margin-top: 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Bracket */
.bracket-wrap { overflow-x: auto; padding-bottom: 12px; }
.bracket { position: relative; display: flex; gap: 56px; padding: 8px 4px 4px; min-width: max-content; }
.bracket svg.lines { position: absolute; inset: 0; pointer-events: none; overflow: visible; }
.bracket svg.lines path { fill: none; stroke: var(--border-2); stroke-width: 2; }
.bracket svg.lines path.hot { stroke: color-mix(in srgb, var(--g) 70%, transparent); }
.b-round { display: flex; flex-direction: column; width: 230px; }
.b-round h4 {
    font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted);
    margin-bottom: 12px; text-align: center; height: 16px;
}
.b-col { flex: 1; display: flex; flex-direction: column; justify-content: space-around; gap: 14px; }
.b-match {
    position: relative; z-index: 1;
    border-radius: 10px; overflow: hidden;
    background: var(--surface); border: 1px solid var(--border);
    cursor: pointer; transition: border-color .12s, transform .12s;
}
.b-match:hover { border-color: var(--g); }
.b-match.live { border-color: var(--live); box-shadow: 0 0 0 1px var(--live), 0 0 22px rgba(255, 59, 92, .25); }
.b-match.auto { opacity: .5; }
.b-match .b-top { display: flex; justify-content: space-between; padding: 4px 10px; font-size: 10px; color: var(--faint); background: var(--bg-2); }
.b-slot { display: flex; align-items: center; gap: 8px; padding: 7px 10px; height: 34px; }
.b-slot + .b-slot { border-top: 1px solid var(--border); }
.b-slot .seed { width: 18px; font-size: 10px; color: var(--faint); text-align: right; flex: none; }
.b-slot .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; font-size: 13px; }
.b-slot .sc { font: 700 14px var(--display); min-width: 22px; text-align: right; font-variant-numeric: tabular-nums; }
.b-slot.win { background: color-mix(in srgb, var(--win) 9%, transparent); }
.b-slot.win .sc { color: var(--win); }
.b-slot.lose .nm, .b-slot.lose .sc { color: var(--faint); }
.b-slot.tbd .nm { color: var(--faint); font-weight: 500; font-style: italic; }
.b-section { margin-bottom: 26px; }
.b-section > h3 { margin-bottom: 10px; display: flex; align-items: center; gap: 8px; }

/* Tabellen */
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th {
    text-align: left; padding: 10px 12px; font-size: 11px; text-transform: uppercase; letter-spacing: .08em;
    color: var(--muted); font-weight: 600; background: var(--bg-2); border-bottom: 1px solid var(--border);
    white-space: nowrap;
}
.table td { padding: 10px 12px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: var(--surface-2); }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table .pts { font: 700 15px var(--display); color: var(--text); }
.table tr.adv td:first-child { box-shadow: inset 3px 0 0 var(--win); }
.table tr.top1 td:first-child { box-shadow: inset 3px 0 0 #e7c14b; }
.table-wrap { overflow-x: auto; }
.rank { font: 700 14px var(--display); color: var(--muted); }
.form-dots { display: inline-flex; gap: 3px; }
.form-dots i { width: 16px; height: 16px; border-radius: 4px; font: 700 9px/16px var(--display); text-align: center; font-style: normal; color: #0b0c10; }
.form-dots .W { background: var(--win); }
.form-dots .L { background: var(--lose); }
.form-dots .D { background: var(--draw); }

/* Teilnehmer */
.p-list { display: flex; flex-direction: column; }
.p-row {
    display: grid; grid-template-columns: 40px 36px minmax(0, 1fr) auto; gap: 12px; align-items: center;
    padding: 10px 14px; border-top: 1px solid var(--border);
}
.p-row:first-child { border-top: 0; }
.p-row .seedno { font: 700 15px var(--display); color: var(--faint); text-align: center; }
.avatar {
    width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center;
    font: 700 13px var(--display); color: #fff;
}
.p-row .nm { font-weight: 600; }
.p-row .members { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.p-row .acts { display: flex; gap: 4px; align-items: center; }

/* Lobby */
.lobby-rounds { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.lobby-round {
    padding: 14px; border-radius: var(--radius); cursor: pointer;
    background: var(--surface); border: 1px solid var(--border);
    display: flex; flex-direction: column; gap: 8px;
}
.lobby-round:hover { border-color: var(--g); }
.lobby-round.done { background: linear-gradient(180deg, color-mix(in srgb, var(--win) 7%, var(--surface)), var(--surface)); }
.lobby-round ol { padding-left: 18px; font-size: 12px; color: var(--muted); }

/* Aktivität */
.log { display: flex; flex-direction: column; gap: 10px; font-size: 13px; max-height: 360px; overflow: auto; }
.log div { display: grid; grid-template-columns: 70px 1fr; gap: 10px; }
.log time { color: var(--faint); font-size: 11px; padding-top: 2px; }

/* ---------- Modal / Toast ---------- */

.modal-bg {
    position: fixed; inset: 0; z-index: 100;
    background: rgba(4, 5, 8, .7); backdrop-filter: blur(4px);
    display: grid; place-items: center; padding: 20px;
    animation: fade .15s;
}
.modal {
    width: min(640px, 100%); max-height: calc(100vh - 40px); overflow: auto;
    background: var(--surface); border: 1px solid var(--border-2); border-radius: 18px;
    box-shadow: var(--shadow);
    animation: pop .18s;
}
.modal.wide { width: min(900px, 100%); }
.modal-head { display: flex; align-items: center; gap: 12px; padding: 18px 20px; border-bottom: 1px solid var(--border); }
.modal-body { padding: 20px; display: flex; flex-direction: column; gap: 16px; }
.modal-foot { display: flex; gap: 10px; padding: 16px 20px; border-top: 1px solid var(--border); background: var(--bg-2); flex-wrap: wrap; }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.98); } }

.versus { display: grid; grid-template-columns: 1fr auto 1fr; gap: 16px; align-items: center; text-align: center; }
.versus .who { display: flex; flex-direction: column; align-items: center; gap: 8px; min-width: 0; }
.versus .who b { font: 700 17px var(--display); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.versus .big { font: 700 40px var(--display); font-variant-numeric: tabular-nums; }
.game-rows { display: flex; flex-direction: column; gap: 8px; }
.game-row { display: grid; grid-template-columns: 70px minmax(0, 1fr) 64px 14px 64px; gap: 10px; align-items: center; }
.game-row .lbl { font-size: 12px; font-weight: 600; color: var(--muted); }

#toasts { position: fixed; right: 20px; bottom: 20px; z-index: 200; display: flex; flex-direction: column; gap: 8px; }
.toast {
    padding: 12px 16px; border-radius: 12px; min-width: 240px; max-width: 380px;
    background: var(--surface-2); border: 1px solid var(--border-2); box-shadow: var(--shadow);
    display: flex; gap: 10px; align-items: center; font-weight: 500;
    animation: pop .2s;
}
.toast.ok { border-left: 3px solid var(--win); }
.toast.err { border-left: 3px solid var(--lose); }

.bot-box { padding: 12px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); font-size: 12px; }
.bot-box .row { gap: 8px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--faint); flex: none; }
.dot.on { background: var(--win); box-shadow: 0 0 10px var(--win); }

.embed-preview {
    border-left: 4px solid var(--g); background: #2b2d31; border-radius: 6px; padding: 12px 14px;
    font-size: 13px; display: flex; flex-direction: column; gap: 8px; white-space: pre-wrap;
}
.embed-preview b { font-size: 15px; }
.embed-preview .f { color: #dbdee1; }
.embed-preview .f strong { display: block; color: #fff; }

/* ---------- Overlay (OBS) ---------- */

body.overlay { background: transparent; }
body.overlay #app { display: block; }
body.overlay .sidebar, body.overlay .topbar { display: none; }
body.overlay .view { padding: 24px; max-width: none; }
.ov { display: flex; flex-direction: column; gap: 14px; width: 720px; }
.ov-score {
    display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
    background: rgba(10, 12, 17, .88); border: 1px solid color-mix(in srgb, var(--g) 50%, transparent);
    border-radius: 16px; overflow: hidden;
}
.ov-score .n { padding: 18px 22px; font: 700 26px var(--display); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ov-score .n.r { text-align: right; }
.ov-score .s { padding: 18px 26px; background: var(--g); color: #0b0c10; font: 700 34px var(--display); font-variant-numeric: tabular-nums; }
.ov-bar { display: flex; gap: 10px; align-items: center; padding: 8px 16px; background: rgba(10, 12, 17, .82); border-radius: 10px; font-weight: 600; font-size: 13px; }
.ov-table { background: rgba(10, 12, 17, .85); border-radius: 14px; overflow: hidden; }
.ov-table .table td, .ov-table .table th { background: transparent !important; }

/* ---------- Grafiken ---------- */

.art { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.emblem { display: inline-grid; place-items: center; flex: none; filter: drop-shadow(0 2px 6px rgba(0, 0, 0, .35)); }
.emblem svg { width: 100%; height: 100%; display: block; }
.emblem img { width: 100%; height: 100%; object-fit: cover; border-radius: 22%; display: block; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1); }
.emblem.empty { border-radius: 50%; background: var(--surface-3); color: var(--faint); font: 700 12px var(--display); filter: none; }
.tlink:hover b, a.tlink:hover { color: var(--g); }
.tlink { color: inherit; }

/* Modus-Schalter */
.mode-switch {
    display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 14px;
    border-radius: 99px; border: 1px solid var(--border-2); background: var(--surface);
    cursor: pointer; font-size: 13px;
}
.mode-switch:hover { border-color: var(--accent); }
.mode-switch b { font-weight: 600; }
body.viewer .mode-switch { border-color: rgba(63, 178, 255, .5); background: rgba(63, 178, 255, .08); }
body.viewer .nav a.active { box-shadow: inset 3px 0 0 var(--info); }
.stat { position: relative; overflow: hidden; }
.stat-ic { position: absolute; right: 14px; top: 12px; font-style: normal; font-size: 22px; opacity: .25; }

/* Turnier-Karten mit Artwork */
.t-card { padding: 0; gap: 0; }
.t-card::before { display: none; }
.t-card-art { position: relative; height: 118px; overflow: hidden; border-bottom: 1px solid var(--border); }
.t-card-art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 30%, rgba(10, 12, 17, .75)); }
.t-card-top { position: absolute; z-index: 1; inset: 12px 12px auto 12px; display: flex; gap: 6px; align-items: flex-start; }
.t-card-body { display: flex; flex-direction: column; gap: 10px; padding: 14px 18px 18px; }
.t-card:hover .t-card-art .art { transform: scale(1.04); }
.t-card-art .art { transition: transform .4s; }

/* Spielekarten */
.game-card { padding: 0; gap: 0; }
.game-card-art { position: relative; height: 92px; overflow: hidden; }
.game-card-art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 40%, var(--surface)); }
.game-card-art .count { position: absolute; z-index: 1; top: 10px; right: 10px; }
.game-card-body { display: flex; flex-direction: column; gap: 12px; padding: 0 16px 16px; margin-top: -22px; position: relative; z-index: 1; }
.game-card .count { position: absolute; }
.game-card-art .count, .t-card-top .pill { z-index: 2; background: rgba(10, 12, 17, .8); backdrop-filter: blur(4px); }
.t-card-top { z-index: 2; }
.emblem.empty { aspect-ratio: 1; flex: none; align-self: center; }

/* Maps */
.map-tile { position: relative; overflow: hidden; height: 74px; padding: 0; display: flex; align-items: flex-end; }
.map-tile > span { position: relative; z-index: 1; padding: 8px 10px; text-shadow: 0 1px 3px rgba(0, 0, 0, .8); }
.maps.pick .map-tile { cursor: pointer; }
.maps.pick .map-tile:hover { border-color: var(--g); }
.map-tile.off { opacity: .3; text-decoration: none; filter: grayscale(1); }
.map-tile em { position: absolute; z-index: 1; top: 6px; right: 6px; font-style: normal; font-size: 10px; font-weight: 700; padding: 2px 7px; border-radius: 99px; background: rgba(0, 0, 0, .7); }

/* Banner Detailseite */
.t-banner { isolation: isolate; min-height: 190px; }
.t-banner-art { position: absolute; inset: 0; z-index: -1; }
.t-banner-art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(10, 12, 17, .92) 0%, rgba(10, 12, 17, .7) 55%, rgba(10, 12, 17, .35)); }
.t-banner-side { display: flex; flex-direction: column; gap: 12px; align-items: flex-end; }
.banner-stat { text-align: right; background: rgba(10, 12, 17, .6); border: 1px solid var(--border); border-radius: 12px; padding: 8px 14px; }
.banner-stat span { display: block; font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.banner-stat b { font: 700 22px var(--display); }
.banner-edit { position: relative; height: 150px; border-radius: 12px; overflow: hidden; border: 1px solid var(--border); }
.banner-edit-actions { position: absolute; right: 12px; bottom: 12px; display: flex; gap: 8px; }

/* Live-Hub */
.hub-hero {
    position: relative; isolation: isolate; overflow: hidden; display: block;
    min-height: 320px; border-radius: 22px; margin-bottom: 18px;
    border: 1px solid color-mix(in srgb, var(--g) 35%, var(--border));
}
.hub-hero-art { position: absolute; inset: 0; z-index: -1; }
.hub-hero-art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(10, 12, 17, .95) 0%, rgba(10, 12, 17, .75) 45%, rgba(10, 12, 17, .2)); }
.hub-hero-body { padding: 36px; max-width: 720px; display: flex; flex-direction: column; gap: 14px; }
.hub-hero h1 { font-size: 40px; }
.hub-hero-body > .pill { align-self: flex-start; }
.hub-hero p { color: #c3c8d4; max-width: 560px; }
.hub-hero-facts { display: flex; gap: 12px; flex-wrap: wrap; }
.hub-hero-facts > div { padding: 10px 16px; border-radius: 12px; background: rgba(10, 12, 17, .6); border: 1px solid var(--border); }
.hub-hero-facts span { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.hub-hero-facts b { font: 700 22px var(--display); }
.find-bar { display: flex; align-items: center; gap: 14px; margin-bottom: 8px; flex-wrap: wrap; }
.big-input { height: 52px; font-size: 17px; }
.dot-live { display: inline-flex; width: 10px; height: 10px; }
.dot-live::before { width: 10px; height: 10px; }

.live-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(380px, 100%), 1fr)); gap: 14px; }
.live-grid.single { grid-template-columns: 1fr; }
.live-card {
    position: relative; isolation: isolate; overflow: hidden; cursor: pointer;
    border-radius: 18px; padding: 16px 18px 18px;
    border: 1px solid rgba(255, 59, 92, .45); box-shadow: 0 0 30px rgba(255, 59, 92, .12);
    display: flex; flex-direction: column; gap: 12px;
}
.live-card-art { position: absolute; inset: 0; z-index: -1; }
.live-card-art::after { content: ""; position: absolute; inset: 0; background: rgba(10, 12, 17, .82); }
.live-card-head { display: flex; gap: 10px; align-items: center; }
.live-card-vs { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; text-align: center; }
.live-card-vs .who { display: flex; flex-direction: column; align-items: center; gap: 8px; min-width: 0; }
.live-card-vs .who b { font: 700 16px var(--display); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.live-card-vs .big { font: 700 44px var(--display); font-variant-numeric: tabular-nums; display: flex; gap: 8px; }
.live-card-vs .big span { color: var(--faint); }
.live-watch { align-self: center; background: rgba(145, 70, 255, .2); border-color: rgba(145, 70, 255, .6); }
.mrow.live { background: rgba(255, 59, 92, .06); }

/* Steuerzentrale */
.tasks { display: flex; flex-direction: column; margin-top: 10px; }
.task { display: flex; align-items: center; gap: 12px; padding: 11px 16px; border-top: 1px solid var(--border); }
.task-ic { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 700; flex: none; background: var(--surface-3); color: var(--muted); }
.task.urgent .task-ic { background: rgba(255, 93, 108, .18); color: var(--lose); }
.task.live .task-ic { background: rgba(255, 59, 92, .18); color: var(--live); animation: pulse 1.4s infinite; }
.task.warn .task-ic { background: rgba(243, 181, 63, .18); color: var(--draw); }
.task.info .task-ic { background: rgba(63, 178, 255, .15); color: var(--info); }
.task a { text-decoration: underline; text-decoration-color: var(--border-2); }
.quick-games { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 10px; }
.quick-games a { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; font-size: 11px; color: var(--muted); padding: 10px 4px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface-2); }
.quick-games a:hover { border-color: var(--g); color: var(--text); }
.danger-zone { border-color: rgba(255, 93, 108, .3); }

/* Suche */
.search-hit { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); }
.search-hit:hover { border-color: var(--g); }
.search-hit .gbadge { vertical-align: middle; }
.search-next { display: flex; flex-direction: column; align-items: flex-end; text-align: right; min-width: 140px; }

/* Teams */
.emblem-wall { display: flex; flex-wrap: wrap; gap: 10px; }
.emblem-wall a { transition: transform .15s; }
.emblem-wall a:hover { transform: translateY(-2px) scale(1.06); }
.team-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr)); gap: 14px; }
.team-card { padding: 16px; border-radius: var(--radius); background: linear-gradient(180deg, color-mix(in srgb, var(--g) 8%, var(--surface)), var(--surface)); border: 1px solid var(--border); display: flex; flex-direction: column; gap: 12px; transition: transform .15s, border-color .15s; }
.team-card:hover { transform: translateY(-2px); border-color: var(--g); }
.team-card-top { display: flex; gap: 14px; align-items: center; }
.team-card h3 { font: 600 17px var(--display); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.members-list { display: flex; flex-wrap: wrap; gap: 6px; font-size: 12px; }
.members-list span { padding: 3px 8px; border-radius: 6px; background: var(--surface-3); }
.team-hero { position: relative; isolation: isolate; overflow: hidden; display: flex; gap: 22px; align-items: center; flex-wrap: wrap; padding: 28px; border-radius: 20px; margin-bottom: 18px; border: 1px solid color-mix(in srgb, var(--g) 30%, var(--border)); }
.team-hero .title { flex: 1; min-width: 240px; }
.team-hero h1 { font-size: 34px; margin: 8px 0 4px; }
.roster { display: flex; flex-direction: column; gap: 10px; }
.ring { width: 96px; height: 96px; color: var(--text); }
.map-stats { display: flex; flex-direction: column; margin-top: 10px; }
.map-stat { position: relative; display: grid; grid-template-columns: 64px 1fr 80px; gap: 12px; align-items: center; padding: 8px 16px; border-top: 1px solid var(--border); }
.map-stat > svg { position: relative; width: 64px; height: 36px; border-radius: 6px; }
.map-stat span { display: block; font-size: 12px; color: var(--muted); }
.map-bar { height: 6px; border-radius: 99px; background: rgba(255, 93, 108, .35); overflow: hidden; }
.map-bar i { display: block; height: 100%; background: var(--win); }
.next-match { cursor: pointer; border-color: color-mix(in srgb, var(--g) 40%, var(--border)); }
.next-match:hover { border-color: var(--g); }
.podium-team { display: flex; flex-direction: column; align-items: center; gap: 6px; margin-top: 6px; }
.podium-card .podium > div { display: flex; flex-direction: column; align-items: center; gap: 4px; }

/* Lobby-Runden mit Bild */
.lobby-round { padding: 0; gap: 0; overflow: hidden; }
.lobby-round-art { position: relative; height: 80px; }
.lobby-round-art .pill { position: absolute; top: 10px; right: 10px; z-index: 1; }
.pts-bar { position: relative; display: flex; justify-content: flex-end; align-items: center; min-width: 110px; }
.pts-bar i { position: absolute; left: 0; top: 50%; height: 6px; margin-top: -3px; border-radius: 99px; background: color-mix(in srgb, var(--g) 45%, transparent); }
.pts-bar span { position: relative; }
.points-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; }
.points-grid div { padding: 10px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--border); text-align: center; }
.points-grid div.accent { border-color: var(--g); }
.points-grid span { display: block; font-size: 11px; color: var(--muted); }
.points-grid b { font: 700 20px var(--display); }
.signup-card .big-count { display: flex; flex-direction: column; }
.big-count span { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.big-count b { font: 700 36px var(--display); }
.big-count small { color: var(--faint); }

/* Modal mit Artwork */
.modal-art { position: relative; isolation: isolate; overflow: hidden; border-bottom: 1px solid var(--border); }
.modal-art > .art { z-index: -2; }
.modal-art::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(19, 23, 32, .55), rgba(19, 23, 32, .97)); }
.modal-art-body { display: flex; align-items: center; gap: 12px; padding: 18px 20px; }
.versus .who b a { color: inherit; }
.map-result { position: relative; isolation: isolate; overflow: hidden; display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 12px; border: 1px solid var(--border); min-height: 62px; }
.map-result > .art { z-index: -2; }
.map-result::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(10, 12, 17, .88), rgba(10, 12, 17, .55)); }
.map-result-body { flex: 1; display: flex; flex-direction: column; }
.map-result-score { font: 700 24px var(--display); font-variant-numeric: tabular-nums; }
.map-result-score .w { color: var(--win); }

/* Veto */
.veto-now { padding: 14px 16px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border-2); display: flex; flex-direction: column; gap: 2px; }
.veto-now.ban { border-color: var(--lose); }
.veto-now.pick { border-color: var(--win); }
.veto-now.decider, .veto-now.done { border-color: var(--g); }
.veto-seq { display: flex; flex-wrap: wrap; gap: 6px; }
.veto-seq span { padding: 4px 9px; border-radius: 6px; font-size: 11px; font-weight: 700; background: var(--surface-3); color: var(--faint); }
.veto-seq span.now { outline: 2px solid var(--g); color: var(--text); }
.veto-seq span.past.ban { background: rgba(255, 93, 108, .2); color: var(--lose); }
.veto-seq span.past.pick { background: rgba(47, 210, 122, .2); color: var(--win); }
.veto-seq span.past.decider { background: color-mix(in srgb, var(--g) 25%, transparent); color: var(--text); }
.veto-maps .map-tile { cursor: pointer; height: 86px; }
.veto-maps .map-tile[data-act]:hover { border-color: var(--g); transform: translateY(-1px); }
.veto-maps .map-tile.veto-ban { opacity: .35; filter: grayscale(1); cursor: default; }
.veto-maps .map-tile.veto-pick { border-color: var(--win); cursor: default; }
.veto-maps .map-tile.veto-decider { border-color: var(--g); cursor: default; }
.veto-list { display: flex; flex-wrap: wrap; gap: 6px; }
.veto-step { font-size: 12px; padding: 5px 10px; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--border); }
.veto-step b { margin-right: 6px; }
.veto-step.ban b { color: var(--lose); }
.veto-step.pick b { color: var(--win); }
.veto-step.decider b { color: var(--g); }

.legend { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; }
.lg-live { background: var(--live); }
.lg-win { background: var(--win); }
.b-slot { gap: 6px; }
.b-round { width: 240px; }
.wiz-game { position: relative; overflow: hidden; margin-bottom: 18px; min-height: 96px; }
.wiz-game-art { position: absolute; inset: 0; }
.wiz-game-art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(19, 23, 32, .95), rgba(19, 23, 32, .5)); }

/* Login */
.btn-discord { background: #5865f2; border-color: #5865f2; color: #fff; }
.btn-discord:hover { background: #6d78f5; border-color: #6d78f5; }
.user-chip { display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 4px 0 5px; border-radius: 99px; border: 1px solid var(--border-2); background: var(--surface); font-size: 13px; font-weight: 600; }
.user-chip > span { max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-avatar { border-radius: 50%; flex: none; object-fit: cover; }

/* ---------- Responsive ---------- */

@media (max-width: 1100px) {
    .dash-grid, .two-col { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
    #app { grid-template-columns: 1fr; }
    .sidebar {
        position: fixed; z-index: 50; left: 0; width: var(--sidebar);
        transform: translateX(-100%); transition: transform .2s;
    }
    body.nav-open .sidebar { transform: none; box-shadow: var(--shadow); }
    .menu-btn { display: grid; }
    .topbar { padding: 12px 16px; }
    .search { display: none; }
    .view { padding: 18px 16px; }
    .wizard-foot { margin: 24px -16px -18px; padding: 14px 16px; }
    .mrow { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); }
    .mrow > .idx, .mrow .info { display: none; }
    .mrow-sub { grid-column: 1 / -1; }
    .game-row { grid-template-columns: 1fr 54px 10px 54px; }
    .game-row .lbl { display: none; }
    .ov { width: 100%; }
    .mode-switch b { display: none; }
    .user-chip > span { display: none; }
    .btn-discord { padding: 0 10px; font-size: 0; gap: 0; }
    .btn-discord svg { width: 20px; height: 20px; }
    #new-btn { display: none !important; }
    .hub-hero-body { padding: 22px; }
    .hub-hero h1 { font-size: 28px; }
    .t-banner-side { align-items: flex-start; width: 100%; }
    .banner-stat { text-align: left; }
    .live-card-vs .big { font-size: 32px; }
    .search-next { display: none; }
    .team-hero h1 { font-size: 26px; }
    .find-bar .input { max-width: none !important; }
}

/* Echte Spielbilder über dem generierten Artwork */
.game-img { z-index: 0; }
.gimg-prev { position: relative; height: 150px; border-radius: 12px; overflow: hidden; border: 1px solid var(--border); }

/* ---------- Live & Effekte ---------- */

@property --ang { syntax: "<angle>"; inherits: false; initial-value: 0deg; }

/* Live-Verbindung in der Kopfzeile */
.live-dot { display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 11px; border-radius: 99px;
    font-size: 12px; font-weight: 600; color: var(--muted); background: var(--surface); border: 1px solid var(--border); }
.live-dot i { width: 8px; height: 8px; border-radius: 50%; background: var(--faint); }
.live-dot.on { color: var(--win); border-color: rgba(47, 210, 122, .35); }
.live-dot.on i { background: var(--win); box-shadow: 0 0 0 0 rgba(47, 210, 122, .6); animation: ping 2s infinite; }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(47, 210, 122, .55); } 70%, 100% { box-shadow: 0 0 0 8px rgba(47, 210, 122, 0); } }

/* Seitenwechsel & gestaffeltes Einblenden */
.view.enter { animation: viewIn .35s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes viewIn { from { opacity: 0; transform: translateY(10px); } }
.pop-in { animation: popIn .5s cubic-bezier(.2, .8, .2, 1) both; animation-delay: var(--d, 0ms); }
@keyframes popIn { from { opacity: 0; transform: translateY(14px) scale(.97); } }
.modal { animation: pop .25s cubic-bezier(.2, .8, .2, 1); }
.toast { animation: toastIn .35s cubic-bezier(.2, .8, .2, 1); }
@keyframes toastIn { from { opacity: 0; transform: translateX(30px) scale(.96); } }

/* Live geänderte Matches leuchten auf */
.flash { animation: flash 1.8s ease-out; }
@keyframes flash {
    0% { box-shadow: 0 0 0 2px var(--g), 0 0 34px color-mix(in srgb, var(--g) 70%, transparent); background-color: color-mix(in srgb, var(--g) 22%, transparent); }
    100% { box-shadow: 0 0 0 0 transparent; }
}
.flash .score, .flash .sc, .flash .big { animation: scorePop .7s cubic-bezier(.2, 1.6, .4, 1); display: inline-block; }
@keyframes scorePop { 0% { transform: scale(1); } 35% { transform: scale(1.45); color: var(--g); } 100% { transform: scale(1); } }

/* Live-Matches: umlaufender Leuchtrand */
.live-card { border: 1px solid transparent; animation: spinBorder 3.5s linear infinite;
    background: linear-gradient(var(--bg), var(--bg)) padding-box,
                conic-gradient(from var(--ang), #ff3b5c, rgba(255, 59, 92, .1) 30%, var(--g) 55%, rgba(255, 59, 92, .1) 75%, #ff3b5c) border-box; }
.b-match.live { animation: livePulse 2s ease-in-out infinite; }
@keyframes spinBorder { to { --ang: 360deg; } }
@keyframes livePulse { 50% { box-shadow: 0 0 0 1px var(--live), 0 0 30px rgba(255, 59, 92, .45); } }

/* Glanz beim Drüberfahren */
.t-card::before, .game-card::before {
    display: block; content: ""; position: absolute; inset: 0; z-index: 3; pointer-events: none; height: auto;
    background: linear-gradient(115deg, transparent 35%, rgba(255, 255, 255, .13) 50%, transparent 65%);
    transform: translateX(-120%); transition: transform .7s ease;
}
.t-card:hover::before, .game-card:hover::before { transform: translateX(120%); }
.t-card, .game-card { transition: transform .2s cubic-bezier(.2, .8, .2, 1), border-color .2s, box-shadow .2s; }
.t-card:hover, .game-card:hover { transform: translateY(-4px); }
.btn { transition: transform .12s, background .15s, border-color .15s, box-shadow .2s, filter .15s; }
.btn-primary:hover, .btn-game:hover { box-shadow: 0 8px 24px color-mix(in srgb, var(--g) 40%, transparent); transform: translateY(-1px); }

/* Bewegte Lichter im Hero */
.hub-hero::after, .t-banner::after { content: ""; position: absolute; inset: -40%; z-index: -1; pointer-events: none;
    background: radial-gradient(30% 30% at 30% 40%, color-mix(in srgb, var(--g) 28%, transparent), transparent 70%),
                radial-gradient(25% 25% at 70% 60%, rgba(255, 79, 154, .18), transparent 70%);
    animation: drift 14s ease-in-out infinite alternate; }
@keyframes drift { to { transform: translate(8%, -6%) rotate(8deg); } }

/* Fortschrittsbalken mit Schimmer */
.progress i { position: relative; overflow: hidden; transition: width .8s cubic-bezier(.2, .8, .2, 1); }
.progress i::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .35), transparent);
    transform: translateX(-100%); animation: shimmer 2.4s ease-in-out infinite; }
@keyframes shimmer { 60%, 100% { transform: translateX(100%); } }

/* Bracket-Linien zeichnen sich beim Öffnen */
.bracket svg.lines.draw path { stroke-dasharray: 3000; stroke-dashoffset: 3000; animation: drawLine 1.4s ease forwards .15s; }
.bracket svg.lines.draw path.hot { animation-delay: .5s; }
@keyframes drawLine { to { stroke-dashoffset: 0; } }

/* Podium hüpft rein, Champion glänzt */
.podium .p1 { position: relative; overflow: hidden; }
.podium .p1::after { content: ""; position: absolute; inset: 0; background: linear-gradient(115deg, transparent 30%, rgba(255, 230, 150, .25) 50%, transparent 70%);
    transform: translateX(-120%); animation: shine 3.5s ease-in-out infinite 1s; }
@keyframes shine { 40%, 100% { transform: translateX(120%); } }
.podium .medal { display: inline-block; animation: bob 2.6s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-5px) rotate(-4deg); } }

.confetti { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: 300; pointer-events: none; }

/* Schnellstart mit Spielbildern */
.quick-games a { position: relative; overflow: hidden; padding: 0 0 10px; gap: 4px; }
.qg-art { position: relative; display: block; width: 100%; height: 56px; overflow: hidden; }
.qg-art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 30%, var(--surface-2)); }
.quick-games a .gbadge { margin-top: -18px; position: relative; z-index: 1; }
.quick-games a:hover .qg-art .art { transform: scale(1.08); }
.qg-art .art { transition: transform .4s; }
.qg-name { padding: 0 6px; line-height: 1.25; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
}
@media (max-width: 820px) { .live-dot span { display: none; } .live-dot { padding: 0 9px; } }
.toast.live { border-left: 3px solid var(--live); }

/* Eigene Map-Bilder + Spiel-Editor */
.map-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.map-tile .map-img + span, .map-stat .map-img { z-index: 1; }
.map-tile:has(.map-img)::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0, 0, 0, .75), transparent 70%); }
.map-stat, .map-result, .lobby-round-art { position: relative; }
.gedit-maps { display: flex; flex-direction: column; gap: 6px; max-height: 46vh; overflow: auto; padding-right: 4px; margin: 8px 0 12px; }
.gedit-map { display: flex; align-items: center; gap: 10px; padding: 6px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-2); transition: opacity .2s; }
.gedit-map.off { opacity: .55; }
.gedit-map > .input { flex: 1; min-width: 0; }
.gedit-thumb { position: relative; flex: none; width: 96px; height: 54px; border-radius: 7px; overflow: hidden; cursor: pointer; }
.gedit-thumb svg { width: 100%; height: 100%; display: block; }
.gedit-thumb > span { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(0, 0, 0, .55); opacity: 0; transition: opacity .15s; }
.gedit-thumb:hover > span { opacity: 1; }
.icon-btn.danger:hover { color: var(--lose); border-color: var(--lose); }
@media (max-width: 600px) { .gedit-thumb { width: 64px; height: 40px; } .gedit-map .toggle span { display: none; } }

/* Ränge */
.role-badge {
    display: inline-flex; align-items: center; gap: 5px; white-space: nowrap;
    padding: 3px 9px; border-radius: 99px; font-size: 11px; font-weight: 700; letter-spacing: .02em;
    color: var(--rc); background: color-mix(in srgb, var(--rc) 14%, transparent); border: 1px solid color-mix(in srgb, var(--rc) 40%, transparent);
}
.user-chip .role-badge { padding: 2px 7px; font-size: 10px; }
.role-legend { display: flex; align-items: center; gap: 12px; }
.role-legend .role-badge { min-width: 128px; justify-content: center; }
.input-sm { padding: 6px 10px; font-size: 13px; min-width: 160px; }
/* Knöpfe nach Rang ausblenden — die eigentliche Prüfung macht der Server */
body:not(.can-manage) a[href^="#/neu"], body:not(.can-manage) [data-act="announce"], body:not(.can-manage) label:has([data-upload="import"]),
body:not(.can-manage) .need-manage, body:not(.can-admin) .need-admin { display: none !important; }
@media (max-width: 600px) { .user-chip .role-badge { display: none; } }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 900px) { .grid-2 { grid-template-columns: 1fr; } }

/* Selbst-Anmeldung */
.signup-box { margin-top: 14px; padding: 14px 16px; border-radius: var(--radius-sm); border: 1px solid var(--border-2); background: color-mix(in srgb, var(--g) 7%, var(--surface-2)); }
.signup-box.ok { border-color: color-mix(in srgb, var(--win) 45%, transparent); background: color-mix(in srgb, var(--win) 8%, var(--surface-2)); }
.signup-icon { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--win); color: #0b0c10; font-weight: 800; flex: none; }
.invite { margin-top: 12px; padding: 10px 12px; border-radius: 8px; border: 1px dashed var(--border-2); }
.invite-code { font-size: 22px; letter-spacing: .25em; color: var(--g); margin-right: auto; }
.signup-or { display: flex; align-items: center; gap: 10px; margin: 14px 0 10px; color: var(--muted); font-size: 12px; }
.signup-or::before, .signup-or::after { content: ""; flex: 1; height: 1px; background: var(--border); }

/* Live-Map-Veto */
.live-veto-entry { display: flex; align-items: center; gap: 12px; margin-top: 12px; padding: 12px 14px; border-radius: var(--radius-sm); border: 1px solid var(--border-2); background: color-mix(in srgb, var(--g) 8%, var(--surface-2)); }
.live-veto-entry.on { border-color: color-mix(in srgb, var(--live) 55%, transparent); animation: lvGlow 2s ease-in-out infinite; }
@keyframes lvGlow { 50% { box-shadow: 0 0 0 4px color-mix(in srgb, var(--live) 18%, transparent); } }
.veto-now.my-turn { border-color: var(--g); box-shadow: 0 0 0 3px color-mix(in srgb, var(--g) 30%, transparent); animation: lvGlow 1.6s ease-in-out infinite; }
.veto-maps .map-tile.locked { cursor: default; filter: saturate(.7); }
.veto-maps .map-tile[data-act="lv-pick"] { cursor: pointer; transition: transform .15s; }
.veto-maps .map-tile[data-act="lv-pick"]:hover { transform: translateY(-2px); outline: 2px solid var(--g); }
.my-match { border-color: color-mix(in srgb, var(--g) 45%, var(--border)); }

/* Sprachumschalter */
.lang-switch { display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 12px; border-radius: 99px; border: 1px solid var(--border-2); background: var(--surface); color: var(--text); font-size: 13px; cursor: pointer; transition: border-color .15s; }
.lang-switch:hover { border-color: var(--accent); }
.lang-switch b { font-weight: 700; letter-spacing: .04em; }
@media (max-width: 600px) { .lang-switch span { display: none; } .lang-switch { padding: 0 10px; } }
