/**
 * 播放器基础样式 - 所有播放器共享的通用样式
 * 确保位置、大小和基本布局的一致性
 */

/* ===== 基础容器样式 ===== */
.video-player {
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    margin: 0 auto !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    position: relative !important;
    background-color: var(--background-medium, #1e293b) !important;
    border-radius: 10px !important;
    overflow: hidden !important;
    aspect-ratio: 16/9 !important;
    box-sizing: border-box !important;
}

/* ===== 视频元素基础样式 ===== */
.video-player video {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
    display: block !important;
    margin: 0 auto !important;
    border-radius: 10px !important;
    background-color: transparent !important;
}

/* ===== 响应式基础样式 ===== */
@media (max-width: 768px) {
    .video-player {
        border-radius: 8px !important;
    }
    
    .video-player video {
        border-radius: 8px !important;
    }
}

/* ===== 尺寸控制变量 ===== */
:root {
    --player-size-default: 1000px;
    --player-size-large: 1200px;
    --player-size-medium: 800px;
    --player-size-small: 100%;
}

/* ===== 通用工具类 ===== */
.player-hidden {
    display: none !important;
}

.player-visible {
    display: flex !important;
}

.player-fullscreen {
    border-radius: 0 !important;
    background: #000 !important;
}

/* ===== 错误状态基础样式 ===== */
.video-player.player-error {
    background: rgba(255, 107, 107, 0.1) !important;
    border: 1px solid rgba(255, 107, 107, 0.3) !important;
}

/* ===== 加载状态基础样式 ===== */
.video-player.player-loading {
    position: relative !important;
}

.video-player.player-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    margin: -20px 0 0 -20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: var(--accent-color, #ff6b9d);
    animation: player-spin 1s ease-in-out infinite;
}

@keyframes player-spin {
    to { transform: rotate(360deg); }
}

/* ===== 确保所有播放器类型的基础一致性 ===== */
.video-player * {
    box-sizing: border-box !important;
}