* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    height: 100%;
}

body {
    overflow: hidden;
    background: #ffffff;
    color: #1f2329;
    font-family:
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        "PingFang SC",
        "Microsoft YaHei",
        Arial,
        sans-serif;
}

button,
input,
video {
    font: inherit;
}

.video-site {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    background: #ffffff;
}

.video-header {
    height: 58px;
    flex: 0 0 58px;
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 0 22px;
    background: #ffffff;
    border-bottom: 1px solid #e8eaed;
}

.video-brand {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: #2b3245;
    font-size: 14px;
    font-weight: 700;
    white-space: nowrap;
}

.brand-mark {
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #5865d8;
    color: #ffffff;
    font-size: 15px;
    font-weight: 800;
    border-radius: 4px;
}

.video-page-title {
    min-width: 0;
    color: #1f2329;
    font-size: 16px;
    font-weight: 650;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.video-main {
    flex: 1;
    min-height: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 0;
    padding: 0;
    background: #ffffff;
}

.player-section,
.playlist-section {
    min-width: 0;
    min-height: 0;
    background: #ffffff;
}

.player-section {
    display: flex;
    flex-direction: column;
    border-right: 1px solid #e6e8eb;
}

.player-box {
    position: relative;
    flex: 1;
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #000000;
}

video {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
    background: #000000;
}

.loading-layer {
    position: absolute;
    inset: 0;
    z-index: 12;
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 13px;
    pointer-events: none;
    background: rgba(0, 0, 0, 0.18);
    color: #ffffff;
}

.loading-layer.show {
    display: flex;
}

.loading-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: loading-rotate 0.8s linear infinite;
}

.loading-text {
    font-size: 13px;
}

@keyframes loading-rotate {
    to {
        transform: rotate(360deg);
    }
}

.video-info {
    flex: 0 0 auto;
    padding: 15px 20px 17px;
    background: #ffffff;
    border-top: 1px solid #e8eaed;
}

.video-info h1 {
    max-width: 100%;
    margin-bottom: 6px;
    color: #1f2329;
    font-size: 21px;
    font-weight: 700;
    line-height: 1.45;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.video-info p {
    min-height: 22px;
    color: #737982;
    font-size: 13px;
    line-height: 1.7;
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.playlist-section {
    display: flex;
    flex-direction: column;
}

.playlist-header {
    height: 54px;
    flex: 0 0 54px;
    display: flex;
    align-items: center;
    padding: 0 16px;
    background: #ffffff;
    border-bottom: 1px solid #e8eaed;
}

.playlist-heading {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 9px;
}

.playlist-heading strong {
    color: #1f2329;
    font-size: 15px;
    font-weight: 700;
}

.playlist-heading span {
    color: #8a9099;
    font-size: 12px;
}

.playlist {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    background: #ffffff;
    scrollbar-width: thin;
    scrollbar-color: #c9cdd4 transparent;
}

.playlist::-webkit-scrollbar {
    width: 6px;
}

.playlist::-webkit-scrollbar-thumb {
    background: #c9cdd4;
    border-radius: 6px;
}

.playlist::-webkit-scrollbar-track {
    background: transparent;
}

.playlist-item {
    display: grid;
    grid-template-columns: 32px minmax(0, 1fr);
    gap: 9px;
    padding: 12px 14px;
    border-bottom: 1px solid #f0f1f3;
    background: #ffffff;
    cursor: pointer;
    transition:
        background 0.16s,
        box-shadow 0.16s;
}

.playlist-item:hover {
    background: #f7f8fa;
}

.playlist-item.active {
    background: #f0f2ff;
    box-shadow: inset 3px 0 0 #5865d8;
}

.play-index {
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9aa0a8;
    font-size: 12px;
    font-weight: 700;
    line-height: 24px;
}

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

.play-title {
    color: #2a2f38;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.55;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.play-meta {
    min-height: 18px;
    margin-top: 3px;
    color: #8b919a;
    font-size: 11px;
    line-height: 1.5;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}


.playlist-item.completed {background:#f2fbf5;box-shadow:inset 3px 0 0 #22c55e;}
.playlist-item.completed:hover{background:#e9f8ee;}
.playlist-item.completed .play-index,.playlist-item.completed .play-title{color:#16a34a;}
.playlist-item.completed .play-meta{color:#5b8a69;}
.playlist-item.completed .play-progress-inner{background:#22c55e;}

.playlist-item.active .play-index,
.playlist-item.active .play-title {
    color: #4e5ac7;
}

.play-progress {
    height: 3px;
    margin-top: 7px;
    overflow: hidden;
    background: #e8eaf0;
}

.play-progress-inner {
    width: 0;
    height: 100%;
    background: #5865d8;
}

.st-error {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    color: #747b85;
    font-size: 16px;
    font-weight: 600;
}

@media (max-width: 900px) {
    html,
    body {
        overflow: auto;
    }

    .video-site {
        height: auto;
        min-height: 100%;
    }

    .video-header {
        min-height: 56px;
        height: auto;
        padding: 11px 14px;
        flex-wrap: wrap;
    }

    .video-main {
        height: auto;
        min-height: 0;
        grid-template-columns: 1fr;
    }

    .player-section,
    .playlist-section {
        min-height: auto;
    }

    .player-section {
        border-right: 0;
        border-bottom: 1px solid #e6e8eb;
    }

    .player-box {
        flex: none;
        width: 100%;
        height: auto;
        aspect-ratio: 16 / 9;
    }

    .video-info {
        padding: 13px 15px 15px;
    }

    .video-info h1 {
        font-size: 18px;
    }

    .playlist {
        max-height: none;
        overflow: visible;
    }
}
