/* 视频播放弹窗样式优化 */

/* 弹窗滚动条样式 */
#videoPlayerModal::-webkit-scrollbar {
    width: 8px;
}

#videoPlayerModal::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

#videoPlayerModal::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.5);
    border-radius: 4px;
}

#videoPlayerModal::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.8);
}

/* 剧集列表滚动条样式 */
#episodesContainer::-webkit-scrollbar {
    width: 8px;
}

#episodesContainer::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

#episodesContainer::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.5);
    border-radius: 4px;
}

#episodesContainer::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.8);
}

/* 响应式视频容器样式 */
@media (max-width: 768px) {
    #videoContainer {
        width: 95% !important;
        position: relative;
        height: 0;
        padding-bottom: 56.25%; /* 16:9 比例 */
    }
    
    #videoContainer iframe {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        min-height: unset !important;
        max-height: unset;
        aspect-ratio: auto;
    }
}

/* 确保iframe在各种情况下都能正确显示 */
#videoContainer {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
}

#videoContainer iframe {
    max-width: 100%;
    display: block;
    margin: 0 auto;
    height: 100% !important;
    object-fit: cover !important;
}

/* 弹窗基础样式 */
#videoPlayerModal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(10, 20, 40, 0.95);
    z-index: 9999;
    display: flex;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
    overflow-y: auto;
}

#modalScrollContainer {
    width: 100%;
    max-width: 1200px;
    max-height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    touch-action: pan-y;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    padding-bottom: 40px;
}

/* 按钮样式 */
#videoPlayerModal .close-btn {
    position: fixed;
    top: 20px;
    right: 20px;
    background-color: #d00;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    z-index: 10000;
}

#videoPlayerModal .user-center-btn {
    position: fixed;
    top: 20px;
    right: 140px;
    background-color: #007bff;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    z-index: 10000;
    transition: all 0.3s ease;
}

#videoPlayerModal .user-center-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.4);
}

/* 手机端按钮样式 */
@media (max-width: 768px) {
    #videoPlayerModal .user-center-btn {
        right: 120px;
        padding: 8px 16px;
        font-size: 14px;
    }
    
    #videoPlayerModal .close-btn {
        padding: 8px 16px;
        font-size: 14px;
    }
}

/* 标题样式 */
#videoPlayerTitle {
    color: white;
    margin-bottom: 5px;
    text-align: center;
    max-width: 80%;
    margin-top: 70px;
    font-size: 18px;
    font-weight: bold;
}

/* 视频容器样式 */
#videoContainer {
    width: 90%;
    max-width: 1200px;
    background-color: #000;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    flex-shrink: 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* 剧集列表容器样式 */
#episodesContainer {
    width: 90%;
    max-width: 1200px;
    margin-top: 20px;
    max-height: 250px;
    overflow-y: auto;
    display: none;
    flex-shrink: 0;
}

/* 安全提醒样式 */
#videoPlayerModal .safety-notice {
    width: 90%;
    max-width: 1200px;
    background-color: rgba(255, 0, 0, 0.1);
    border: 1px solid rgba(255, 0, 0, 0.3);
    border-radius: 6px;
    padding: 12px 16px;
    margin-top: 15px;
    color: #ffcccc;
    font-size: 14px;
    text-align: center;
    line-height: 1.5;
    box-sizing: border-box;
}

/* 免责声明样式 */
#videoPlayerModal .disclaimer {
    width: 90%;
    max-width: 1200px;
    margin-top: 20px;
    padding: 15px;
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #cccccc;
    font-size: 12px;
    line-height: 1.6;
    text-align: center;
}