:root {
    --ink: #f8fbff;
    --muted: #9fb0ca;
    --panel: rgba(7, 10, 24, .78);
    --line: rgba(170, 226, 255, .18);
    --cyan: #46e6ff;
    --pink: #ff4fc3;
    --lime: #b6ff6a;
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--ink);
    font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
    background:
        linear-gradient(180deg, rgba(4, 7, 18, .58), rgba(5, 7, 18, .96)),
        url("Images/kpop-stage-hero.png") center top / cover fixed no-repeat,
        #050711;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(90deg, rgba(255, 79, 195, .16), transparent 34%, rgba(70, 230, 255, .16)),
        repeating-linear-gradient(0deg, rgba(255,255,255,.03) 0, rgba(255,255,255,.03) 1px, transparent 1px, transparent 18px);
}

.vip-shell {
    position: relative;
    z-index: 1;
    width: min(1440px, calc(100% - 32px));
    margin: 0 auto;
    padding: 22px 0;
}

.vip-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 16px;
}

.vip-kicker {
    display: inline-flex;
    min-height: 26px;
    align-items: center;
    padding: 0 10px;
    border: 1px solid rgba(255, 79, 195, .48);
    border-radius: 8px;
    background: rgba(255, 79, 195, .12);
    color: #ffd8f3;
    font-size: 12px;
    font-weight: 800;
}

.vip-header h1 {
    margin: 10px 0 0;
    font-size: clamp(30px, 4.5vw, 54px);
    line-height: 1.08;
    letter-spacing: 0;
    text-shadow: 0 0 28px rgba(70, 230, 255, .25);
}

.vip-header p {
    margin: 10px 0 0;
    color: #d7e4f5;
    font-size: 15px;
}

.back-link {
    min-height: 38px;
    padding: 9px 13px;
    border: 1px solid rgba(255, 255, 255, .16);
    border-radius: 8px;
    background: rgba(255, 255, 255, .08);
    color: #edf8ff;
    text-decoration: none;
    font-size: 14px;
    font-weight: 700;
}

.vip-console {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 16px;
    align-items: start;
}

.player-card,
.side-card > section {
    border: 1px solid var(--line);
    border-radius: 8px;
    background:
        linear-gradient(135deg, rgba(11, 15, 34, .84), rgba(8, 11, 24, .74)),
        rgba(5, 7, 18, .76);
    box-shadow:
        0 24px 70px rgba(0, 0, 0, .42),
        inset 0 0 0 1px rgba(255, 255, 255, .05);
    backdrop-filter: blur(16px);
}

.player-card {
    overflow: hidden;
}

.player-topbar {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, .1);
    color: #c8d8ef;
    font-size: 12px;
    font-weight: 800;
}

.live-dot {
    display: inline-block;
    width: 9px;
    height: 9px;
    margin-right: 8px;
    border-radius: 50%;
    background: #ff365f;
    box-shadow: 0 0 18px rgba(255, 54, 95, .8);
}

.player-stage {
    position: relative;
    min-height: 520px;
    aspect-ratio: 16 / 9;
    background:
        radial-gradient(circle at 50% 30%, rgba(70, 230, 255, .12), transparent 28%),
        #02040b;
}

.player-panel,
.vip-player,
.prism-player {
    width: 100% !important;
    height: 100% !important;
}

.player-empty {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: #b9cae7;
    font-weight: 800;
}

.player-empty span {
    padding: 12px 14px;
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 8px;
    background: rgba(255, 255, 255, .08);
}

.side-card {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    gap: 16px;
    position: sticky;
    top: 16px;
    height: min(780px, calc(100vh - 105px));
    min-height: 600px;
    overflow: hidden;
}

.access-card,
.chat-card {
    padding: 14px;
}

.access-card h2,
.chat-card h2 {
    margin: 0;
    font-size: 19px;
    letter-spacing: 0;
}

.vip-input {
    width: 100%;
    height: 40px;
    margin-top: 12px;
    padding: 0 12px;
    border: 1px solid rgba(211, 232, 255, .26);
    border-radius: 8px;
    background: rgba(255, 255, 255, .94);
    color: #111827;
    font-size: 15px;
    outline: none;
}

.vip-input:focus {
    border-color: var(--cyan);
    box-shadow: 0 0 0 4px rgba(70, 230, 255, .16);
}

.channel-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 10px 0 0;
}

.channel-list input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.channel-list label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 48px;
    min-height: 32px;
    padding: 0 11px;
    border: 1px solid rgba(255, 255, 255, .16);
    border-radius: 8px;
    background: rgba(255, 255, 255, .08);
    color: #e8f6ff;
    font-weight: 800;
    cursor: pointer;
}

.channel-list input:checked + label {
    border-color: rgba(70, 230, 255, .72);
    background: rgba(70, 230, 255, .16);
    color: #ffffff;
}

.access-actions {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.vip-button {
    flex: 1 1 auto;
    min-height: 38px;
    border: 1px solid rgba(255, 79, 195, .72);
    border-radius: 8px;
    background: linear-gradient(135deg, #ff3eb8, #7c5cff 52%, #21c8ff);
    color: #fff;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
}

.vip-button.ghost {
    border-color: rgba(255, 255, 255, .18);
    background: rgba(255, 255, 255, .08);
}

.vip-message {
    display: block;
    margin-top: 10px;
    color: #d9e7f8;
    font-size: 13px;
    line-height: 1.7;
}

.chat-card {
    min-height: 0;
    height: 100%;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    overflow: hidden;
}

.chat-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.chat-head p {
    margin: 5px 0 0;
    color: var(--muted);
    font-size: 12px;
}

#chatStatus {
    padding: 5px 8px;
    border: 1px solid rgba(182, 255, 106, .38);
    border-radius: 8px;
    color: #dcffb3;
    font-size: 12px;
    font-weight: 800;
}

.chat-list {
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 10px;
    border: 1px solid rgba(70, 230, 255, .16);
    border-radius: 8px;
    background: rgba(2, 4, 11, .48);
}

.chat-item {
    padding: 9px 10px;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
}

.chat-item:last-child {
    border-bottom: 0;
}

.chat-item div {
    display: flex;
    justify-content: space-between;
    gap: 8px;
}

.chat-item strong {
    color: #ffffff;
    font-size: 13px;
}

.chat-item time {
    color: #7f91ad;
    font-size: 11px;
}

.chat-item p {
    margin: 6px 0 0;
    color: #d8e4f6;
    font-size: 13px;
    line-height: 1.6;
    word-break: break-word;
}

.chat-form {
    display: grid;
    gap: 8px;
    margin-top: 10px;
}

.chat-form input,
.chat-form textarea {
    width: 100%;
    border: 1px solid rgba(211, 232, 255, .2);
    border-radius: 8px;
    background: rgba(255, 255, 255, .93);
    color: #111827;
    font: inherit;
    outline: none;
}

.chat-form input {
    height: 38px;
    padding: 0 11px;
}

.chat-form textarea {
    min-height: 72px;
    max-height: 120px;
    padding: 10px 11px;
    resize: vertical;
}

.chat-form button {
    min-height: 40px;
    border: 0;
    border-radius: 8px;
    background: linear-gradient(135deg, #ff3eb8, #21c8ff);
    color: #ffffff;
    font-weight: 800;
    cursor: pointer;
}

.chat-form button:disabled {
    cursor: wait;
    opacity: .64;
}

@media (max-width: 980px) {
    .vip-console {
        grid-template-columns: 1fr;
    }

    .side-card {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: none;
        align-items: start;
        position: static;
        height: auto;
        min-height: 0;
        overflow: visible;
    }

    .chat-card {
        height: min(620px, calc(100vh - 180px));
        min-height: 480px;
    }
}

@media (max-width: 720px) {
    body {
        background-attachment: scroll;
    }

    .vip-shell {
        width: min(100% - 20px, 1440px);
        padding-top: 8px;
    }

    .vip-header {
        display: block;
        margin-bottom: 10px;
    }

    .vip-kicker,
    .vip-header p {
        display: none;
    }

    .vip-header h1 {
        margin: 0;
        font-size: 26px;
    }

    .back-link {
        display: inline-flex;
        align-items: center;
        min-height: 32px;
        margin-top: 8px;
        padding: 6px 10px;
        font-size: 13px;
    }

    .player-card {
        position: sticky;
        top: 0;
        z-index: 5;
    }

    .player-topbar {
        padding: 9px 10px;
    }

    .player-stage {
        min-height: 0;
        height: min(38vh, 220px);
        aspect-ratio: auto;
    }

    .side-card {
        grid-template-columns: 1fr;
    }

    .access-actions {
        display: grid;
    }

    .access-card h2 {
        display: none;
    }

    .vip-input {
        margin-top: 0;
    }

    .chat-card {
        height: min(60vh, 540px);
        min-height: 420px;
    }
}
