:root {
    --bg: #0f1115;
    --panel: #171a21;
    --panel-hover: #1f2430;
    --text: #e6e8ec;
    --muted: #8a90a2;
    --accent: #5b8cff;
    --live: #ff4d5e;
    --win: #35d07f;
    --radiant: #66bb6a;
    --dire: #ef5350;
    --border: #262b36;
}
* { box-sizing: border-box; }
body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
.topbar {
    padding: 16px 24px;
    border-bottom: 1px solid var(--border);
}
.brand { color: var(--text); text-decoration: none; font-size: 20px; font-weight: 700; }
.brand-accent { color: var(--accent); }
main { max-width: 960px; margin: 0 auto; padding: 24px; }
h1 { font-size: 22px; margin: 0 0 16px; }
.muted { color: var(--muted); }
.back-link { color: var(--accent); text-decoration: none; font-size: 14px; }

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 14px;
    margin-top: 16px;
}
.tourney-card {
    display: block;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 16px;
    text-decoration: none;
    color: var(--text);
    transition: background 0.15s;
}
.tourney-card:hover { background: var(--panel-hover); }
.tourney-card.is-live { border-color: var(--live); }
.tourney-card h2 { font-size: 16px; margin: 6px 0 10px; }
.live-dot { color: var(--live); font-size: 12px; font-weight: 700; }
.tourney-stats { display: flex; gap: 12px; font-size: 13px; color: var(--muted); }

.section-heading { font-size: 15px; color: var(--muted); margin: 24px 0 8px; text-transform: uppercase; letter-spacing: 0.04em; }

.bracket-scroll { overflow-x: auto; padding-bottom: 8px; }
.bracket-tree-label { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; margin: 14px 0 8px; }
.bracket-tree-label:first-child { margin-top: 0; }
.bracket-tree { display: flex; gap: 30px; min-width: max-content; }
.bracket-col { display: flex; flex-direction: column; justify-content: space-around; gap: 14px; min-width: 190px; }
.bracket-col-header { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.03em; text-align: center; margin-bottom: 2px; }
.bracket-match {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 8px 10px;
    cursor: pointer;
    position: relative;
}
.bracket-match:hover { background: var(--panel-hover); }
.bracket-match.is-live { border-color: var(--live); }
.bracket-team { display: flex; justify-content: space-between; font-size: 13px; padding: 3px 0; }
.bracket-team.winner { color: var(--win); font-weight: 700; }
.bracket-score { color: var(--muted); font-variant-numeric: tabular-nums; }
.bracket-live-badge { position: absolute; top: -8px; right: -8px; font-size: 10px; padding: 1px 6px; }

.bracket-arrow {
    position: absolute;
    top: 50%;
    right: -30px;
    width: 22px;
    height: 2px;
    background: var(--accent);
    opacity: 0.55;
    transform: translateY(-50%);
    pointer-events: none;
}
.bracket-arrow::after {
    content: '';
    position: absolute;
    top: 50%;
    right: -1px;
    width: 0;
    height: 0;
    border-top: 4px solid transparent;
    border-bottom: 4px solid transparent;
    border-left: 6px solid var(--accent);
    opacity: 0.85;
    transform: translateY(-50%);
}

.match-table { width: 100%; border-collapse: collapse; margin-top: 12px; }
.match-table th { text-align: left; color: var(--muted); font-size: 12px; padding: 8px; border-bottom: 1px solid var(--border); }
.match-row { cursor: pointer; border-bottom: 1px solid var(--border); }
.match-row:hover { background: var(--panel); }
.match-row td { padding: 10px 8px; font-size: 14px; }
.match-row.is-live { background: rgba(255, 77, 94, 0.08); }
.section-label { color: var(--muted); font-size: 12px; }
.winner { font-weight: 700; color: var(--win); }
.score { text-align: center; color: var(--muted); }

.badge { display: inline-block; padding: 2px 8px; border-radius: 6px; font-size: 12px; font-weight: 600; }
.badge-live { background: rgba(255, 77, 94, 0.15); color: var(--live); }
.badge-done { background: rgba(53, 208, 127, 0.15); color: var(--win); }
.badge-upcoming { background: rgba(138, 144, 162, 0.15); color: var(--muted); }

.overlay-card {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    margin-top: 16px;
}
.overlay-header { display: flex; align-items: center; justify-content: space-between; }
.overlay-team .team-name { font-size: 20px; font-weight: 700; }
.overlay-score { font-size: 28px; font-weight: 800; }
#live-status { margin-top: 10px; }

.net-worth-bar-wrap { margin-top: 16px; }
.net-worth-bar { height: 10px; border-radius: 6px; background: linear-gradient(90deg, var(--radiant), var(--border) 50%, var(--dire)); position: relative; overflow: hidden; }
.nw-fill { position: absolute; top: 0; bottom: 0; width: 50%; background: rgba(255,255,255,0.08); }
.nw-label { margin-top: 6px; font-size: 13px; color: var(--muted); }

.hero-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 18px; }
.hero-col { display: flex; flex-direction: column; gap: 6px; }
.hero-chip { display: flex; align-items: center; gap: 8px; background: rgba(255,255,255,0.03); border-radius: 6px; padding: 4px 8px; font-size: 13px; }
.hero-chip img { width: 24px; height: 24px; border-radius: 4px; }

.prediction-box { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--border); }
.prediction-box h3 { font-size: 14px; color: var(--muted); margin: 0 0 6px; }
