/* 直播页独立样式，隔离前缀 .live-page */
.live-page {
    background: #0b0c0f;
    color: #e5e7eb;
    min-height: 100vh;
    /* 给固定导航栏留出空间，避免内容覆盖导航栏 */
    padding-top: 64px;
    box-sizing: border-box;
}
.live-container {
    display: flex;
    flex-wrap: nowrap;
    height: calc(100vh - 120px);
    min-height: 560px;
    max-width: 1920px;
    margin: 0 auto;
    padding: 15px;
    box-sizing: border-box;
    gap: 15px;
    position: relative;
    z-index: 1;
}

/* 左侧播放器区 */
.live-player-wrap {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    min-width: 0;
    background: #11131a;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 0 20px rgba(0,0,0,0.35);
}
.live-player-box {
    position: relative;
    flex: 1 1 auto;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 360px;
}
.live-player-box video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    outline: none;
}
.live-player-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #9ca3af;
    font-size: 14px;
    gap: 12px;
    text-align: center;
    padding: 20px;
}
.live-player-placeholder .icon {
    width: 64px;
    height: 64px;
    border: 3px solid rgba(255,255,255,0.15);
    border-top-color: #3b82f6;
    border-radius: 50%;
    animation: live-spin 1s linear infinite;
}
@keyframes live-spin {
    to { transform: rotate(360deg); }
}
.live-player-error {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.82);
    color: #e5e7eb;
    font-size: 14px;
    gap: 10px;
    text-align: center;
    padding: 20px;
    z-index: 5;
}
.live-player-error.visible {
    display: flex;
}
.live-player-error i {
    font-size: 42px;
    color: #ef4444;
}
.live-player-info {
    padding: 14px 18px;
    background: #161922;
    border-top: 1px solid #232633;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}
.live-player-info h2 {
    margin: 0;
    font-size: 18px;
    color: #fff;
    font-weight: 500;
}
.live-player-info .meta {
    color: #9ca3af;
    font-size: 13px;
}

/* 右侧边栏 */
.live-sidebar {
    width: 360px;
    flex: 0 0 360px;
    background: #11131a;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: row;
    box-shadow: 0 0 20px rgba(0,0,0,0.35);
}
.live-sidebar-inner {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    overflow: hidden;
    min-width: 0;
}
/* 竖向分类栏 */
.live-cate-tabs {
    display: flex;
    flex-direction: column;
    flex: 0 0 auto;
    width: 44px;
    background: #161922;
    border-left: 1px solid #232633;
    overflow-y: auto;
    scrollbar-width: none;
}
.live-cate-tabs::-webkit-scrollbar {
    display: none;
}
.live-cate-tab {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 14px 4px;
    color: #9ca3af;
    font-size: 12px;
    line-height: 1.25;
    cursor: pointer;
    transition: all .2s;
    border-bottom: 1px solid #232633;
    user-select: none;
    writing-mode: vertical-rl;
    text-orientation: upright;
    letter-spacing: 2px;
    min-height: 72px;
    flex: 0 0 auto;
}
.live-cate-tab:hover,
.live-cate-tab.active {
    color: #fff;
    background: #1f6feb;
}
.live-channel-list {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 10px;
}
.live-channel-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: background .2s;
    margin-bottom: 6px;
}
.live-channel-item:hover {
    background: rgba(59,130,246,0.12);
}
.live-channel-item.active {
    background: rgba(59,130,246,0.22);
}
.live-channel-item img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    background: #232633;
    flex: 0 0 36px;
}
.live-channel-item .name {
    flex: 1 1 auto;
    font-size: 14px;
    color: #e5e7eb;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.live-channel-item.active .name {
    color: #fff;
    font-weight: 500;
}
.live-channel-item .badge {
    flex: 0 0 auto;
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 4px;
    background: #ef4444;
    color: #fff;
}

/* 空态 */
.live-empty {
    padding: 40px 20px;
    text-align: center;
    color: #6b7280;
    font-size: 13px;
    display: none;
}
.live-empty.visible {
    display: block;
}

/* 响应式 */
@media (max-width: 991px) {
    .live-page {
        padding-top: 56px;
    }
    .live-container {
        flex-direction: column;
        height: auto;
        min-height: auto;
    }
    .live-player-wrap {
        height: 56vw;
        min-height: 240px;
        max-height: 420px;
    }
    .live-sidebar {
        width: 100%;
        flex: 0 0 auto;
        height: auto;
        max-height: 420px;
    }
    .live-cate-tabs {
        width: 38px;
    }
    .live-cate-tab {
        padding: 10px 3px;
        font-size: 11px;
        min-height: 56px;
        letter-spacing: 1px;
    }
}
@media (max-width: 480px) {
    .live-page {
        padding-top: 52px;
    }
    .live-player-info h2 {
        font-size: 15px;
    }
    .live-channel-item {
        padding: 8px 10px;
    }
    .live-channel-item img {
        width: 32px;
        height: 32px;
    }
}
