:root {
    --bg: transparent;
    --panel: rgba(9, 9, 14, 0.50);
    --panel-strong: rgba(255, 255, 255, 0.095);
    --panel-soft: rgba(255, 255, 255, 0.052);
    --text: #ffffff;
    --muted: rgba(255, 255, 255, 0.72);
    --accent: #ec008c;
    --border: rgba(255, 255, 255, 0.13);
}

* { box-sizing: border-box; }

html,
body {
    width: 100%;
    height: 100%;
    margin: 0;
    overflow: hidden;
    background: transparent;
    color: var(--text);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.obs-stage {
    width: 100vw;
    height: 100vh;
    max-width: 1920px;
    max-height: 1080px;
    overflow: hidden;
    padding: 24px;
    background: transparent;
}

.leaderboard-shell {
    display: grid;
    grid-template-rows: auto auto minmax(0, 1fr);
    height: 100%;
    min-height: 0;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 28px;
    padding: 24px;
    background: linear-gradient(145deg, var(--panel), rgba(0, 0, 0, 0.38));
    box-shadow: none;
    backdrop-filter: blur(18px);
}

.board-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    min-height: 0;
}

.eyebrow {
    margin: 0 0 5px;
    color: var(--accent);
    font-size: 17px;
    font-weight: 900;
    line-height: 1;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

h1 {
    margin: 0;
    font-size: clamp(56px, 5.6vw, 102px);
    font-weight: 950;
    line-height: 0.86;
    letter-spacing: -0.075em;
    text-transform: uppercase;
}

.since-pill {
    flex: 0 0 auto;
    min-width: 250px;
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 14px 18px;
    background: var(--panel-soft);
    text-align: right;
}

.since-pill span,
.since-pill strong {
    display: block;
}

.since-pill span {
    color: var(--accent);
    font-size: 14px;
    font-weight: 900;
    letter-spacing: 0.12em;
    line-height: 1;
    text-transform: uppercase;
}

.since-pill strong {
    margin-top: 5px;
    font-size: 30px;
    font-weight: 950;
    line-height: 1;
    letter-spacing: -0.055em;
}

.board-copy {
    max-width: 1720px;
    margin: 12px 0 16px;
    color: var(--muted);
    font-size: clamp(19px, 1.28vw, 25px);
    font-weight: 700;
    line-height: 1.12;
    letter-spacing: -0.035em;
}

.leaderboard-content {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    gap: 14px;
    min-height: 0;
    overflow: hidden;
}

.podium-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: end;
    gap: 14px;
    min-height: 0;
}

.podium-card,
.leaderboard-card {
    min-width: 0;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.09);
    background: var(--panel-soft);
}

.podium-card {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 13px;
    border-radius: 22px;
    padding: 16px 18px;
}

.podium-one {
    min-height: 150px;
    border-color: rgba(236, 0, 140, 0.62);
    background: linear-gradient(90deg, rgba(236, 0, 140, 0.36), rgba(255, 255, 255, 0.08));
}

.podium-two {
    min-height: 126px;
    background: var(--panel-strong);
}

.podium-three {
    min-height: 106px;
    background: rgba(255, 255, 255, 0.088);
}

.rank,
.channel,
.count {
    min-width: 0;
}

.rank {
    color: var(--accent);
    font-weight: 950;
    line-height: 1;
    letter-spacing: -0.04em;
    white-space: nowrap;
}

.podium-one .rank { font-size: 42px; }
.podium-two .rank { font-size: 34px; }
.podium-three .rank { font-size: 28px; }

.channel {
    overflow: hidden;
}

.channel-name {
    display: block;
    min-width: 0;
    overflow: hidden;
    color: var(--text);
    font-weight: 920;
    line-height: 1;
    letter-spacing: -0.055em;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.podium-one .channel-name { font-size: 54px; letter-spacing: -0.075em; }
.podium-two .channel-name { font-size: 43px; letter-spacing: -0.065em; }
.podium-three .channel-name { font-size: 36px; letter-spacing: -0.06em; }

.count {
    display: flex;
    align-items: baseline;
    justify-content: flex-end;
    gap: 7px;
    white-space: nowrap;
}

.count strong {
    font-weight: 950;
    line-height: 1;
    letter-spacing: -0.055em;
}

.count span {
    color: var(--muted);
    font-weight: 900;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.podium-one .count strong { font-size: 58px; }
.podium-two .count strong { font-size: 48px; }
.podium-three .count strong { font-size: 40px; }

.podium-one .count span,
.podium-two .count span,
.podium-three .count span { font-size: 15px; }

.leaderboard-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-auto-rows: minmax(48px, auto);
    gap: 9px;
    min-height: 0;
    overflow: hidden;
}

.leaderboard-card {
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr) 92px;
    align-items: center;
    min-height: 48px;
    border-radius: 14px;
    padding: 7px 10px;
    gap: 8px;
}

.leaderboard-card .rank {
    font-size: 16px;
}

.leaderboard-card .channel-name {
    font-size: 21px;
    letter-spacing: -0.045em;
}

.leaderboard-card .count strong {
    font-size: 27px;
}

.leaderboard-card .count span {
    font-size: 12px;
}

.leaderboard-card.lower-rank {
    grid-template-columns: 42px minmax(0, 1fr) 70px;
    min-height: 34px;
    border-radius: 10px;
    padding: 4px 8px;
    gap: 6px;
    background: rgba(255, 255, 255, 0.038);
}

.leaderboard-card.lower-rank .rank {
    font-size: 13px;
}

.leaderboard-card.lower-rank .channel-name {
    font-size: 16px;
    letter-spacing: -0.035em;
}

.leaderboard-card.lower-rank .count {
    gap: 4px;
}

.leaderboard-card.lower-rank .count strong {
    font-size: 20px;
}

.leaderboard-card.lower-rank .count span {
    font-size: 9px;
    letter-spacing: 0.08em;
}

.compact-state {
    display: grid;
    place-items: center;
    align-content: center;
    min-height: 0;
    border: 1px dashed var(--border);
    border-radius: 20px;
    padding: 22px;
    color: var(--muted);
    text-align: center;
}

.compact-state h2 {
    margin: 0 0 8px;
    color: var(--text);
    font-size: 42px;
    font-weight: 950;
    line-height: 1;
    letter-spacing: -0.06em;
}

.compact-state p {
    max-width: 900px;
    margin: 0;
    font-size: 22px;
    font-weight: 700;
    line-height: 1.15;
}

.error-state p {
    color: rgba(255, 195, 225, 0.95);
}

@media (max-width: 1600px) {
    .leaderboard-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-height: 900px) {
    .obs-stage { padding: 16px; }
    .leaderboard-shell { padding: 18px; border-radius: 24px; }
    .board-copy { margin: 9px 0 10px; }
    .leaderboard-content { gap: 10px; }
    .podium-one { min-height: 126px; }
    .podium-two { min-height: 106px; }
    .podium-three { min-height: 92px; }
    .podium-one .channel-name { font-size: 46px; }
    .podium-two .channel-name { font-size: 38px; }
    .podium-three .channel-name { font-size: 32px; }
    .leaderboard-card { min-height: 42px; }
}
