:root {
    color-scheme: dark;
    --bg: #07111a;
    --bg-strong: #0b1824;
    --panel: rgba(9, 22, 34, 0.78);
    --panel-strong: rgba(12, 28, 42, 0.92);
    --panel-soft: rgba(255, 255, 255, 0.04);
    --line: rgba(255, 255, 255, 0.08);
    --line-strong: rgba(255, 255, 255, 0.14);
    --text: #f4f0e8;
    --muted: #9eb0c0;
    --muted-strong: #cad3dc;
    --warm: #ff6f3c;
    --gold: #f0bc59;
    --green: #3fd094;
    --blue: #63c7ff;
    --danger: #ff7a7a;
    --shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
    --headline-font: "Space Grotesk", "Trebuchet MS", sans-serif;
    --body-font: "Archivo", "Segoe UI Variable", sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    font-family: var(--body-font);
    background:
        radial-gradient(circle at top left, rgba(255, 111, 60, 0.2), transparent 28%),
        radial-gradient(circle at top right, rgba(63, 208, 148, 0.1), transparent 24%),
        radial-gradient(circle at bottom right, rgba(240, 188, 89, 0.12), transparent 30%),
        linear-gradient(135deg, #050d14 0%, #09131d 40%, #08111a 100%);
    position: relative;
    overflow-x: hidden;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 120px 120px;
    mask-image: radial-gradient(circle at center, rgba(0, 0, 0, 0.7), transparent 85%);
    opacity: 0.28;
}

button,
input,
video {
    font: inherit;
}

[hidden] {
    display: none !important;
}

.page-shell {
    position: relative;
    z-index: 1;
    width: min(1480px, calc(100% - 40px));
    margin: 0 auto;
    padding: 20px 0 32px;
    display: grid;
    gap: 18px;
}

.card-surface {
    border: 1px solid var(--line);
    background: linear-gradient(180deg, rgba(13, 26, 38, 0.88), rgba(8, 18, 29, 0.92));
    backdrop-filter: blur(18px);
    box-shadow: var(--shadow);
}

.masthead {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 20px;
    border-radius: 22px;
}

.brand-block {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.eyebrow,
.section-tag,
.status-kicker,
.step-index {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    padding: 7px 12px;
    border-radius: 999px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    font-size: 11px;
    font-weight: 800;
}

.eyebrow,
.section-tag {
    background: rgba(255, 111, 60, 0.13);
    color: var(--gold);
}

.masthead h1,
.intro-card h2,
.auth-card h2,
.dashboard-bar h2,
.stage-card h3,
.lineup-card h3 {
    margin: 0;
    font-family: var(--headline-font);
    letter-spacing: -0.05em;
}

.masthead h1 {
    font-size: clamp(1.45rem, 3vw, 2rem);
    line-height: 1;
    max-width: none;
}

.event-label {
    margin: 0;
    font-size: 0.92rem;
    color: var(--muted-strong);
    font-weight: 600;
}

.status-tile {
    display: grid;
    gap: 6px;
    align-content: start;
    padding: 12px 14px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.07);
}

.status-tile strong {
    font-size: 1.15rem;
    line-height: 1.15;
}

.status-tile small {
    color: var(--muted);
    font-size: 0.8rem;
    line-height: 1.35;
}

.status-kicker {
    padding: 0;
    color: var(--muted-strong);
    background: none;
}

.status-tile--accent {
    background: linear-gradient(135deg, rgba(63, 208, 148, 0.12), rgba(93, 199, 255, 0.08));
    border-color: rgba(93, 199, 255, 0.18);
}

.top-status {
    min-width: 260px;
    max-width: 320px;
}

.top-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.auth-layout,
.dashboard {
    display: grid;
    gap: 16px;
}

.auth-layout {
    grid-template-columns: minmax(320px, 560px);
    justify-content: center;
}

.intro-card,
.auth-card,
.stage-card,
.lineup-card {
    border-radius: 24px;
    padding: 22px;
}

.intro-card h2,
.auth-card h2,
.dashboard-bar h2 {
    font-size: clamp(1.8rem, 3vw, 2.45rem);
    line-height: 0.94;
}

.lead {
    margin: 0;
    font-size: 1.05rem;
    line-height: 1.7;
    color: var(--muted-strong);
    max-width: 54ch;
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.step-card {
    display: grid;
    gap: 14px;
    padding: 20px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.07);
}

.step-card h3 {
    margin: 0;
    font-family: var(--headline-font);
    font-size: 1.25rem;
    letter-spacing: -0.04em;
}

.step-card p,
.intro-note,
.support-copy,
.muted,
.channel-meta,
.empty-state span,
.overlay-copy span,
.stage-helper {
    color: var(--muted);
}

.step-card p,
.intro-note,
.support-copy,
.muted,
.empty-state span,
.overlay-copy span {
    margin: 0;
    line-height: 1.6;
}

.step-index {
    background: rgba(240, 188, 89, 0.12);
    color: var(--gold);
}

.intro-note {
    padding: 18px 20px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.auth-card {
    display: grid;
    gap: 16px;
    align-content: start;
}

.access-form {
    display: grid;
    gap: 16px;
}

.field {
    display: grid;
    gap: 12px;
}

.field span {
    font-size: 0.85rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--muted-strong);
}

.field input {
    width: 100%;
    padding: 18px 20px;
    border-radius: 20px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.035);
    color: var(--text);
    outline: none;
    transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.field input::placeholder {
    color: rgba(202, 211, 220, 0.45);
}

.field input:focus {
    border-color: rgba(240, 188, 89, 0.7);
    box-shadow: 0 0 0 4px rgba(240, 188, 89, 0.12);
    transform: translateY(-1px);
}

button {
    cursor: pointer;
    border: 0;
    border-radius: 18px;
    padding: 16px 22px;
    background: linear-gradient(135deg, var(--gold), var(--warm));
    color: #10151b;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    transition: transform 180ms ease, box-shadow 180ms ease, opacity 180ms ease;
    box-shadow: 0 14px 30px rgba(255, 111, 60, 0.22);
}

button:hover {
    transform: translateY(-1px);
    box-shadow: 0 18px 34px rgba(255, 111, 60, 0.28);
}

button:disabled {
    cursor: wait;
    opacity: 0.65;
    transform: none;
    box-shadow: none;
}

.ghost-button {
    color: var(--text);
    background: rgba(255, 255, 255, 0.05);
    box-shadow: none;
    border: 1px solid var(--line);
}

.inline-error {
    margin: 0;
    color: var(--danger);
    font-weight: 700;
    line-height: 1.5;
}

.topbar-button {
    white-space: nowrap;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.82fr);
    gap: 18px;
    align-items: start;
}

.stage-card {
    display: grid;
    gap: 18px;
}

.stage-top,
.lineup-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
}

.stage-card h3,
.lineup-card h3 {
    font-size: clamp(1.5rem, 3vw, 2.25rem);
    line-height: 0.95;
}

.player-state {
    min-width: 136px;
    padding: 11px 14px;
    border-radius: 999px;
    text-align: center;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.76rem;
    background: rgba(99, 199, 255, 0.12);
    color: var(--blue);
}

.player-state[data-tone="live"] {
    background: rgba(63, 208, 148, 0.12);
    color: var(--green);
}

.player-state[data-tone="loading"] {
    background: rgba(240, 188, 89, 0.12);
    color: var(--gold);
}

.player-state[data-tone="error"] {
    background: rgba(255, 122, 122, 0.12);
    color: var(--danger);
}

.stage-helper {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.04);
    font-size: 0.92rem;
}

.video-frame {
    position: relative;
    aspect-ratio: 16 / 9;
    border-radius: 28px;
    overflow: hidden;
    background:
        radial-gradient(circle at top, rgba(255, 111, 60, 0.18), transparent 30%),
        #04080d;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.video-frame video {
    width: 100%;
    height: 100%;
    display: block;
    background: #04080d;
}

.player-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 28px;
    background:
        linear-gradient(180deg, rgba(8, 18, 29, 0.35), rgba(5, 10, 16, 0.82)),
        linear-gradient(135deg, rgba(240, 188, 89, 0.08), rgba(255, 111, 60, 0.08));
    text-align: center;
}

.overlay-copy {
    display: grid;
    gap: 10px;
    max-width: 460px;
}

.overlay-copy strong {
    font-family: var(--headline-font);
    font-size: clamp(1.7rem, 4vw, 2.45rem);
    letter-spacing: -0.05em;
}

.lineup-card {
    display: grid;
    gap: 18px;
}

.channels-grid {
    display: grid;
    gap: 14px;
}

.channel-card {
    display: grid;
    gap: 16px;
    padding: 18px;
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.07);
    background: rgba(255, 255, 255, 0.035);
    transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.channel-card:hover {
    transform: translateY(-1px);
    border-color: rgba(240, 188, 89, 0.18);
    background: rgba(255, 255, 255, 0.05);
}

.channel-card.is-active {
    border-color: rgba(63, 208, 148, 0.35);
    background: linear-gradient(135deg, rgba(63, 208, 148, 0.12), rgba(93, 199, 255, 0.08));
}

.channel-card--skeleton {
    min-height: 116px;
    overflow: hidden;
    position: relative;
}

.channel-card--skeleton::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.08), transparent);
    transform: translateX(-100%);
    animation: shimmer 1.35s infinite;
}

.channel-skeleton-line,
.channel-skeleton-pill {
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
}

.channel-skeleton-line {
    height: 14px;
}

.channel-skeleton-line--lg {
    width: 58%;
    height: 18px;
}

.channel-skeleton-line--sm {
    width: 32%;
}

.channel-skeleton-pill {
    width: 104px;
    height: 36px;
}

.channel-main {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 14px;
    align-items: center;
}

.channel-rank,
.channel-logo {
    width: 58px;
    height: 58px;
    border-radius: 18px;
}

.channel-rank {
    display: grid;
    place-items: center;
    background: rgba(255, 255, 255, 0.06);
    color: var(--gold);
    font-weight: 900;
    letter-spacing: 0.08em;
}

.channel-logo {
    object-fit: contain;
    padding: 8px;
    background: rgba(255, 255, 255, 0.06);
}

.channel-logo--fallback {
    display: grid;
    place-items: center;
    font-weight: 900;
    color: var(--gold);
}

.channel-content {
    min-width: 0;
    display: grid;
    gap: 4px;
}

.channel-content h4 {
    margin: 0;
    font-family: var(--headline-font);
    font-size: 1.2rem;
    letter-spacing: -0.04em;
}

.channel-meta {
    font-size: 0.92rem;
}

.channel-action {
    width: 100%;
}

.channel-action.is-active {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: none;
}

.empty-state {
    display: grid;
    gap: 10px;
    padding: 26px;
    border-radius: 24px;
    border: 1px dashed rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.025);
}

.empty-state strong {
    font-family: var(--headline-font);
    font-size: 1.3rem;
    letter-spacing: -0.04em;
}

@keyframes shimmer {
    100% {
        transform: translateX(100%);
    }
}

@media (max-width: 1180px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 860px) {
    .page-shell {
        width: min(100% - 24px, 1480px);
        padding-top: 18px;
    }

    .masthead,
    .auth-card,
    .stage-card,
    .lineup-card {
        padding: 22px;
        border-radius: 24px;
    }

    .masthead,
    .stage-top,
    .lineup-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .top-actions,
    .top-status {
        min-width: 0;
        width: 100%;
        max-width: none;
    }

    .top-actions {
        align-items: stretch;
        width: 100%;
    }
}

@media (max-width: 560px) {
    .page-shell {
        width: min(100% - 16px, 1480px);
    }

    .masthead h1,
    .intro-card h2,
    .auth-card h2,
    .dashboard-bar h2 {
        line-height: 1;
    }

    .player-state {
        min-width: 0;
        width: 100%;
    }

    .channel-main {
        grid-template-columns: 1fr;
    }

    .channel-rank,
    .channel-logo {
        width: 52px;
        height: 52px;
    }
}
