.auth-section {
    min-height: calc(100vh - 74px);
    display: grid;
    align-items: center;
    padding: 68px 0;
}

.auth-section-centered {
    place-items: center;
}

.auth-layout {
    display: grid;
    grid-template-columns: minmax(0,1fr) minmax(420px,.78fr);
    align-items: center;
    gap: 70px;
}

.auth-promo,
.auth-card {
    min-width: 0;
}

.auth-promo h1 {
    margin: 22px 0 28px;
    font: 700 clamp(58px, 7vw, 92px)/.87 Rajdhani, sans-serif;
    letter-spacing: -.045em;
}

.auth-promo h1 span {
    background: linear-gradient(90deg, var(--purple-2), var(--teal));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.auth-promo > p {
    max-width: 620px;
    color: #bcb5c7;
    font-size: 17px;
}

.check-list {
    display: grid;
    gap: 10px;
    margin: 26px 0 0;
    padding: 0;
    list-style: none;
}

.check-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #d9d3e3;
}

.check-list li::before {
    content: "✓";
    display: grid;
    place-items: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: rgba(16,223,210,.12);
    color: var(--teal);
    font-size: 12px;
    font-weight: 900;
}

.auth-card {
    width: 100%;
    padding: 34px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: linear-gradient(180deg, rgba(20,14,34,.98), rgba(11,8,18,.98));
    box-shadow: var(--shadow);
}

.auth-card-narrow {
    width: min(520px, calc(100% - 30px));
    margin-inline: auto;
}

.auth-card h2 {
    margin: 0 0 6px;
    font: 700 34px/1 Rajdhani, sans-serif;
}

.auth-card > p {
    margin: 0 0 22px;
    color: var(--muted);
}

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

.stack-form label {
    min-width: 0;
    display: grid;
    gap: 8px;
    color: #f1edf6;
    font-size: 13px;
    font-weight: 800;
}

.stack-form input,
.stack-form textarea,
.stack-form select,
.search-bar input,
.chat-input input {
    width: 100%;
    min-width: 0;
    border: 1px solid var(--line);
    border-radius: 10px;
    outline: none;
    background: #0b0812;
    color: #fff;
    padding: 13px 14px;
    transition: border-color .18s ease, box-shadow .18s ease;
}

.stack-form input:focus,
.stack-form textarea:focus,
.stack-form select:focus,
.search-bar input:focus {
    border-color: rgba(16,223,210,.55);
    box-shadow: 0 0 0 3px rgba(16,223,210,.08);
}

.stack-form small {
    color: #8f879d;
    font-size: 11px;
    font-weight: 500;
}

.field-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0,1fr));
    gap: 14px;
}

.check-field {
    display: flex !important;
    grid-template-columns: none !important;
    flex-direction: row;
    align-items: flex-start;
    gap: 10px !important;
    font-weight: 600 !important;
}

.check-field input,
.stack-form input[type="checkbox"] {
    width: 16px;
    min-width: 16px;
    height: 16px;
    margin-top: 2px;
    padding: 0;
    accent-color: var(--teal);
}

.auth-switch {
    margin-top: 20px;
    padding-top: 18px;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 13px;
    text-align: center;
}

.auth-switch a,
.label-row a {
    color: var(--teal);
    font-weight: 800;
}

.label-row {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
}

.page-hero {
    padding: 72px 0 46px;
    border-bottom: 1px solid var(--line);
    background: radial-gradient(circle at 70% 10%, rgba(139,44,255,.15), transparent 36%);
}

.page-hero h1 {
    margin: 10px 0 14px;
    font: 700 clamp(48px, 6vw, 74px)/.95 Rajdhani, sans-serif;
}

.page-hero p {
    color: var(--muted);
}

.search-bar {
    max-width: 720px;
    display: flex;
    gap: 10px;
    margin-top: 24px;
}

.chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-bottom: 34px;
}

.chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 12px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255,255,255,.025);
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}

.chip.active,
.chip:hover {
    border-color: rgba(139,44,255,.4);
    background: rgba(139,44,255,.13);
    color: #fff;
}

.chip span {
    color: var(--teal);
}

.browse-grid {
    grid-template-columns: repeat(4, minmax(0,1fr));
}

.channel-shell {
    min-height: calc(100vh - 74px);
}

.channel-banner {
    padding: 44px 0;
    border-bottom: 1px solid var(--line);
    background:
        radial-gradient(circle at 20%, color-mix(in srgb, var(--channel-accent) 34%, transparent), transparent 34%),
        #0a0711;
}

.channel-banner-inner {
    display: flex;
    align-items: center;
    gap: 18px;
}

.channel-avatar {
    width: 82px;
    height: 82px;
    font-size: 28px;
}

.channel-banner h1 {
    margin: 4px 0;
    font: 700 48px/1 Rajdhani, sans-serif;
}

.channel-banner p {
    margin: 0;
    color: var(--muted);
}

.channel-actions {
    margin-left: auto;
}

.channel-layout {
    display: grid;
    grid-template-columns: minmax(0,1fr) 330px;
    gap: 22px;
    padding-top: 22px;
    padding-bottom: 70px;
}

.channel-main {
    min-width: 0;
}

.video-player {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #050309;
}

.video-player video {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.offline-screen {
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 10px;
    padding: 30px;
    text-align: center;
    background:
        radial-gradient(circle, color-mix(in srgb, var(--channel-accent) 34%, transparent), transparent 44%),
        #08050f;
}

.offline-screen img {
    width: 110px;
    height: auto;
    opacity: .5;
}

.offline-screen span {
    color: var(--teal);
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .16em;
    text-transform: uppercase;
}

.player-live {
    position: absolute;
    top: 14px;
    left: 14px;
}

.channel-stream-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 20px 4px;
}

.channel-stream-meta h2 {
    margin: 0;
    font: 700 27px Rajdhani, sans-serif;
}

.channel-stream-meta p {
    margin: 0;
    color: var(--muted);
}

.channel-stream-meta > strong {
    color: #ff7f9d;
}

.about-card,
.dashboard-panel {
    padding: 26px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--panel);
}

.about-card h3 {
    margin-top: 0;
    font: 700 24px Rajdhani, sans-serif;
}

.about-card p {
    color: var(--muted);
}

.chat-panel {
    min-height: 590px;
    height: calc(100vh - 110px);
    position: sticky;
    top: 90px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #0b0811;
}

.chat-header {
    display: flex;
    justify-content: space-between;
    padding: 15px;
    border-bottom: 1px solid var(--line);
    font-size: 13px;
}

.chat-body {
    flex: 1;
    display: grid;
    place-items: center;
}

.chat-empty {
    padding: 20px;
    color: var(--muted);
    text-align: center;
}

.chat-empty span {
    font-size: 30px;
}

.chat-empty strong {
    display: block;
    margin: 8px;
    color: #fff;
}

.chat-input,
.chat-login {
    display: flex;
    padding: 12px;
    border-top: 1px solid var(--line);
}

.chat-input input {
    flex: 1;
}

.chat-input button {
    border: 0;
    background: none;
    color: var(--teal);
}

.dashboard-shell {
    padding: 34px 0 80px;
}

.dashboard-layout {
    display: grid;
    grid-template-columns: 250px minmax(0,1fr);
    gap: 28px;
}

.dashboard-sidebar {
    position: sticky;
    top: 100px;
    align-self: start;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--panel);
}

.sidebar-profile {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 6px 4px 18px;
    border-bottom: 1px solid var(--line);
}

.sidebar-profile > div {
    display: flex;
    flex-direction: column;
}

.sidebar-profile span {
    color: var(--muted);
    font-size: 11px;
}

.dashboard-sidebar nav {
    display: flex;
    flex-direction: column;
    padding-top: 12px;
}

.dashboard-sidebar nav a {
    padding: 10px;
    border-radius: 8px;
    color: var(--muted);
    font-size: 13px;
}

.dashboard-sidebar nav a.active,
.dashboard-sidebar nav a:hover {
    background: rgba(139,44,255,.12);
    color: #fff;
}

.dashboard-sidebar nav > span {
    padding: 20px 10px 6px;
    color: #716a7c;
    font-size: 9px;
    letter-spacing: .14em;
}

.dashboard-content {
    min-width: 0;
}

.dashboard-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin: 8px 0 28px;
}

.dashboard-top p {
    margin: 0;
    color: var(--muted);
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0,1fr));
    gap: 13px;
    margin-bottom: 18px;
}

.stat-grid article {
    display: flex;
    flex-direction: column;
    padding: 19px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--panel);
}

.stat-grid span {
    color: var(--muted);
    font-size: 11px;
}

.stat-grid strong {
    margin: 5px 0;
    font: 700 31px Rajdhani, sans-serif;
}

.stat-grid small {
    color: #777080;
    font-size: 10px;
}

.status-offline {
    color: #ff6c8c !important;
}

.dashboard-panel {
    margin-top: 18px;
}

.panel-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 22px;
}

.panel-heading h2 {
    margin: 4px 0;
    font: 700 27px Rajdhani, sans-serif;
}

.phase-badge,
.role-badge,
.state-badge {
    display: inline-flex;
    padding: 5px 8px;
    border-radius: 6px;
    background: rgba(16,223,210,.1);
    color: var(--teal);
    font-size: 9px;
    font-weight: 900;
    text-transform: uppercase;
}

.state-active,
.state-live {
    background: rgba(24,215,160,.1);
    color: var(--success);
}

.state-ended,
.state-offline {
    background: rgba(255,255,255,.06);
    color: #aaa2ba;
}

.setting-row {
    display: grid;
    grid-template-columns: minmax(0,1fr) minmax(320px,1fr);
    align-items: center;
    gap: 24px;
    padding: 18px 0;
    border-top: 1px solid var(--line);
}

.setting-row p {
    margin: 4px 0;
    color: var(--muted);
    font-size: 12px;
}

.copy-field {
    min-width: 0;
    display: flex;
    align-items: stretch;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: #090611;
}

.copy-field code {
    min-width: 0;
    flex: 1;
    overflow: hidden;
    padding: 11px 12px;
    color: #c9c2d3;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.copy-field button {
    border: 0;
    border-left: 1px solid var(--line);
    background: rgba(255,255,255,.04);
    color: var(--teal);
    padding: 11px;
    cursor: pointer;
}

.secret-reveal {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 18px;
    padding: 18px;
    border: 1px solid rgba(16,223,210,.3);
    border-radius: 12px;
    background: rgba(16,223,210,.06);
}

.secret-reveal > div {
    margin-right: auto;
}

.secret-reveal p {
    margin: 2px 0;
    color: var(--muted);
    font-size: 12px;
}

.secret-reveal code {
    max-width: 400px;
    overflow: auto;
    color: var(--teal);
}

.table-wrap {
    overflow: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

th,
td {
    padding: 13px;
    border-top: 1px solid var(--line);
    text-align: left;
    vertical-align: middle;
}

th {
    color: #7e7788;
    font-size: 9px;
    letter-spacing: .1em;
    text-transform: uppercase;
}

@media (max-width: 1000px) {
    .auth-layout,
    .channel-layout,
    .dashboard-layout {
        grid-template-columns: 1fr;
    }

    .auth-card {
        max-width: 680px;
    }

    .browse-grid {
        grid-template-columns: repeat(2, minmax(0,1fr));
    }

    .chat-panel,
    .dashboard-sidebar {
        position: static;
        height: auto;
    }

    .stat-grid {
        grid-template-columns: repeat(2, minmax(0,1fr));
    }
}

@media (max-width: 760px) {
    .auth-section {
        padding: 42px 0;
    }

    .auth-promo h1 {
        font-size: 58px;
    }

    .field-grid,
    .setting-row {
        grid-template-columns: 1fr;
    }

    .search-bar,
    .channel-banner-inner,
    .dashboard-top,
    .secret-reveal {
        flex-direction: column;
        align-items: stretch;
    }

    .channel-actions {
        margin-left: 0;
    }

    .browse-grid {
        grid-template-columns: 1fr;
    }

    .secret-reveal code {
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    .auth-card {
        padding: 24px;
    }

    .auth-promo h1 {
        font-size: 50px;
    }

    .stat-grid {
        grid-template-columns: 1fr;
    }

    .channel-avatar {
        width: 64px;
        height: 64px;
    }

    .channel-banner h1 {
        font-size: 36px;
    }
}
