/**
 * Video Fullscreen Styles
 * 视频全屏功能样式文件
 */

/* 视频容器基础样式 */
.video-container {
    position: relative;
    width: 100%;
    height: 100%;
}

/* 全屏按钮样式 */
.fullscreen-btn {
    position: absolute;
    bottom: 3px;
    right: 3px;
    width: 40px;
    height: 40px;
    background:rgb(53 53 53 / 28%);
    border: none;
    border-radius: 6px;
    cursor: pointer;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.fullscreen-btn:hover {
    background: rgba(0, 0, 0, 0.3);
    transform: scale(1.1);
}

.fullscreen-btn:active {
    transform: scale(0.95);
}

.fullscreen-btn svg {
    width: 20px;
    height: 20px;
    fill: white;
    transition: fill 0.2s ease;
}

.fullscreen-btn:hover svg {
    fill: #ffffff;
}

/* 全屏状态样式 */
.fullscreen-container {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 9999 !important;
    background: black !important;
    border-radius: 0 !important;
    overflow: hidden !important;
}

.fullscreen-container iframe {
    width: 100% !important;
    height: 100% !important;
    border: none !important;
    border-radius: 0 !important;
}

/* 全屏时按钮位置调整 */
.fullscreen-container .fullscreen-btn {
    bottom: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.8);
}

/* 移动端适配 */
@media (max-width: 768px) {
    .fullscreen-btn {
        width: 35px;
        height: 35px;
        bottom: 8px;
        right: 8px;
    }
    
    .fullscreen-btn svg {
        width: 18px;
        height: 18px;
    }
    
    .fullscreen-container .fullscreen-btn {
        bottom: 15px;
        right: 15px;
        width: 40px;
        height: 40px;
    }
    
    .fullscreen-container .fullscreen-btn svg {
        width: 20px;
        height: 20px;
    }
}

/* 超小屏幕适配 */
@media (max-width: 480px) {
    .fullscreen-btn {
        width: 32px;
        height: 32px;
        bottom: 6px;
        right: 6px;
    }
    
    .fullscreen-btn svg {
        width: 16px;
        height: 16px;
    }
}

/* 横屏模式适配（移动端） */
@media (max-height: 500px) and (orientation: landscape) {
    .fullscreen-btn {
        bottom: 5px;
        right: 5px;
        width: 30px;
        height: 30px;
    }
    
    .fullscreen-btn svg {
        width: 15px;
        height: 15px;
    }
    
    .fullscreen-container .fullscreen-btn {
        bottom: 10px;
        right: 10px;
        width: 35px;
        height: 35px;
    }
    
    .fullscreen-container .fullscreen-btn svg {
        width: 18px;
        height: 18px;
    }
}

/* 自定义错误覆盖层样式 */
.custom-error-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 999;
    font-size: 16px;
    text-align: center;
    padding: 20px;
    box-sizing: border-box;
}

.custom-error-overlay.show {
    display: flex;
}

/* 全屏时错误覆盖层样式 */
.fullscreen-container .custom-error-overlay {
    font-size: 18px;
    padding: 40px;
}

/* 加载动画 */
.fullscreen-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1001;
}

.fullscreen-loading::after {
    content: '';
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 全屏过渡动画 */
.video-container {
    transition: all 0.3s ease;
}

.fullscreen-container {
    animation: fullscreenEnter 0.3s ease;
}

@keyframes fullscreenEnter {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* 高对比度模式支持 */
@media (prefers-contrast: high) {
    .fullscreen-btn {
        background: rgba(0, 0, 0, 0.9);
        border: 2px solid white;
    }
    
    .fullscreen-btn:hover {
        background: black;
    }
}

/* 减少动画模式支持 */
@media (prefers-reduced-motion: reduce) {
    .fullscreen-btn,
    .video-container,
    .fullscreen-container {
        transition: none;
        animation: none;
    }
}

/* 深色模式支持 */
@media (prefers-color-scheme: dark) {
    .custom-error-overlay {
        background: rgba(0, 0, 0, 0.9);
        color: #ffffff;
    }
}

/* 浅色模式支持 */
@media (prefers-color-scheme: light) {
    .custom-error-overlay {
        background: rgba(0, 0, 0, 0.8);
        color: #ffffff;
    }
}

/* 触摸设备优化 */
@media (pointer: coarse) {
    .fullscreen-btn {
        width: 30px;
        height: 30px;
        bottom: 5px;
        right: 5px;
    }
    
    .fullscreen-btn svg {
        width: 22px;
        height: 22px;
    }
}

/* 鼠标设备优化 */
@media (pointer: fine) {
    .fullscreen-btn:hover {
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    }
}

/* 打印样式 */
@media print {
    .fullscreen-btn {
        display: none;
    }
}
