/* ========== 播放器容器样式 ========== */
#playerSection {
    display: none;
    position: relative;
    width: 100%;
    max-width: 1200px;
    margin: 30px auto;
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

/* 播放器iframe */
#customPlayer {
    width: 100%;
    height: 600px;
    border: none;
    display: block;
}

/* 关闭按钮 */
.player-close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 100;
    padding: 8px 16px;
    background: rgba(255, 68, 68, 0.9);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s;
}

.player-close-btn:hover {
    background: rgba(255, 0, 0, 0.9);
    transform: scale(1.05);
}

/* 线路按钮激活状态 */
.episode-item.active {
    background: #007bff !important;
    color: white !important;
    border-color: #007bff !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 123, 255, 0.3);
}

/* 播放器加载动画 */
@keyframes pulse {
    0% { opacity: 0.6; }
    50% { opacity: 1; }
    100% { opacity: 0.6; }
}

.player-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 18px;
    animation: pulse 1.5s infinite;
    display: none;
    z-index: 10;
}

/* 播放器控制面板 */
.player-controls {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 50;
    opacity: 0;
    transition: opacity 0.3s;
}

#playerSection:hover .player-controls {
    opacity: 1;
}

.control-btn {
    padding: 8px 16px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s;
}

.control-btn:hover {
    background: rgba(0, 0, 0, 0.9);
}

/* 响应式设计 */
@media (max-width: 768px) {
    #customPlayer {
        height: 400px;
    }
    
    .player-controls {
        flex-wrap: wrap;
        justify-content: center;
        bottom: 10px;
    }
}

@media (max-width: 480px) {
    #customPlayer {
        height: 300px;
    }
    
    .player-close-btn {
        padding: 6px 12px;
        font-size: 12px;
        top: 10px;
        right: 10px;
    }
    
    .control-btn {
        padding: 6px 10px;
        font-size: 12px;
    }
}

/* 全屏样式 */
#playerSection.fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    max-width: none;
    margin: 0;
    z-index: 9999;
    border-radius: 0;
}

#playerSection.fullscreen #customPlayer {
    height: 100vh;
}

/* 错误提示 */
.player-error {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #ff4444;
    background: rgba(0, 0, 0, 0.8);
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    max-width: 80%;
    display: none;
}

/* 播放器标题 */
.player-title {
    position: absolute;
    top: 15px;
    left: 15px;
    color: white;
    font-size: 16px;
    background: rgba(0, 0, 0, 0.6);
    padding: 5px 10px;
    border-radius: 4px;
    max-width: 70%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    z-index: 50;
}

