.video-player-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.video-player-overlay.hidden {
    display: none;
}

/* 强化overlay背景 */
.video-player-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, 
        rgba(255, 154, 162, 0.92) 0%, 
        rgba(255, 183, 178, 0.88) 12.5%, 
        rgba(255, 218, 193, 0.85) 25%, 
        rgba(226, 240, 203, 0.8) 37.5%, 
        rgba(181, 234, 215, 0.85) 50%, 
        rgba(199, 206, 234, 0.88) 62.5%, 
        rgba(248, 200, 220, 0.92) 75%, 
        rgba(162, 210, 255, 0.95) 100%);
    backdrop-filter: blur(25px) saturate(1.3);
    animation: overlayPulse 10s ease-in-out infinite;
}

@keyframes overlayPulse {
    0%, 100% { 
        opacity: 0.92;
        transform: scale(1) rotate(0deg);
    }
    50% { 
        opacity: 0.96;
        transform: scale(1.005) rotate(0.5deg);
    }
}

/* 播放器主容器 - 大尺寸设计 */
.video-player-container {
    background: rgba(0, 0, 0, 0.95); /* 深色背景，突出视频内容 */
    border-radius: 12px;
    padding: 4px; /* 最小padding，最大化视频面积 */
    width: var(--container-width, 60vw); /* 使用CSS变量，默认60vw */
    height: 90vh; /* 增加到90%高度，更沉浸 */
    max-width: 95vw; /* 最大不超过95%屏幕宽度 */
    min-width: 500px; /* 增加最小宽度，确保不会太窄 */
    min-height: 300px; /* 最小高度保证可用性 */
    position: relative; /* 回到相对定位 */
    box-shadow: 
        0 50px 150px rgba(0, 0, 0, 0.4), 
        0 25px 75px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(40px) saturate(1.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
    animation: containerSlideIn 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    flex-direction: column;
    transition: width 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); /* 平滑宽度过渡 */
}

@keyframes containerSlideIn {
    0% {
        opacity: 0;
        transform: scale(0.9) translateY(80px) rotateX(20deg);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0) rotateX(0deg);
    }
}

/* 全屏模式样式 */
.video-player-overlay:fullscreen .video-player-container,
.video-player-overlay:-webkit-full-screen .video-player-container,
.video-player-overlay:-moz-full-screen .video-player-container {
    width: 100vw;
    height: 100vh;
    max-width: none;
    border-radius: 0;
    padding: 20px;
}

.close-btn {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 52px;
    height: 52px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 1000;
    box-shadow: 
        0 4px 12px rgba(0, 0, 0, 0.15),
        0 2px 6px rgba(0, 0, 0, 0.1);
    border: 2px solid rgba(255, 154, 162, 0.3);
}

.close-btn:hover {
    background: rgba(255, 255, 255, 1);
    transform: scale(1.1);
    box-shadow: 
        0 6px 20px rgba(0, 0, 0, 0.2),
        0 4px 12px rgba(0, 0, 0, 0.15);
    border-color: rgba(255, 154, 162, 0.5);
}

.close-btn:active {
    transform: scale(0.95);
    background: rgba(255, 250, 250, 1);
}

.video-info {
    text-align: center;
    margin-bottom: 4px; /* 进一步减少margin */
    padding: 4px 8px; /* 减少垂直padding */
    position: relative;
    z-index: 2;
    height: 8%; /* 标题区域占8%高度 */
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.video-title {
    font-size: 22px;
    font-weight: 700;
    background: linear-gradient(135deg, #FF9AA2 0%, #A2D2FF 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 6px;
    line-height: 1.3;
}

.video-status {
    font-size: 15px;
    color: #666;
    opacity: 0.9;
    font-weight: 500;
}

.video-area {
    position: relative;
    background: #000; /* 纯黑背景 */
    border-radius: 8px;
    overflow: hidden;
    margin: 1px; /* 最小margin */
    cursor: pointer;
    height: 85%; /* 明确设置为85%高度 */
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-element {
    width: 100%;
    height: 100%;
    object-fit: contain; /* 改回contain，确保视频100%完整显示 */
    border-radius: 12px;
    display: block;
}

/* 全屏模式视频样式 */
.video-player-overlay:fullscreen .video-element,
.video-player-overlay:-webkit-full-screen .video-element,
.video-player-overlay:-moz-full-screen .video-element {
    border-radius: 0;
}

/* 中央播放按钮遮罩 */
.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.3);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.video-overlay.visible {
    opacity: 1;
}

.main-video-control {
    width: 120px;
    height: 120px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    position: relative;
}

.main-video-control:hover {
    transform: scale(1.1);
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.5);
    background: rgba(255, 255, 255, 1);
}

/* 播放状态：脉冲圆环 */
.play-state {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.center-pulse {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: linear-gradient(135deg, #FF9AA2 0%, #FFB7B2 100%);
    position: relative;
    z-index: 2;
    animation: centerPulse 2s ease-in-out infinite;
}

@keyframes centerPulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.3); opacity: 0.8; }
}

.outer-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    border: 3px solid #FFDAC1;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    animation: ringExpand 2.5s ease-out infinite;
}

.ring-1 {
    width: 60px;
    height: 60px;
    animation-delay: 0s;
}

.ring-2 {
    width: 90px;
    height: 90px;
    animation-delay: 0.5s;
}

@keyframes ringExpand {
    0% {
        transform: translate(-50%, -50%) scale(0.5);
        opacity: 0.8;
    }
    100% {
        transform: translate(-50%, -50%) scale(1.2);
        opacity: 0;
    }
}

/* 暂停状态：双方块波纹 */
.pause-state {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pause-blocks {
    display: flex;
    gap: 12px;
    position: relative;
    z-index: 2;
}

.block {
    width: 10px;
    height: 30px;
    border-radius: 5px;
    background: linear-gradient(135deg, #FFB7B2 0%, #FFDAC1 100%);
    animation: blockPulse 1.8s ease-in-out infinite alternate;
}

.block-2 {
    animation-delay: 0.3s;
}

@keyframes blockPulse {
    0% { transform: scaleY(0.7); opacity: 0.7; }
    100% { transform: scaleY(1.2); opacity: 1; }
}

.wave-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    border: 2px solid #E2F0CB;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    animation: waveExpand 2s ease-out infinite;
}

.wave-1 {
    width: 70px;
    height: 70px;
    animation-delay: 0s;
}

.wave-2 {
    width: 100px;
    height: 100px;
    animation-delay: 0.6s;
}

@keyframes waveExpand {
    0% {
        transform: translate(-50%, -50%) scale(0.6);
        opacity: 0.7;
    }
    100% {
        transform: translate(-50%, -50%) scale(1.3);
        opacity: 0;
    }
}

/* 加载指示器 */
.video-loading {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.8);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.video-loading.visible {
    opacity: 1;
}

.loading-orbit {
    position: relative;
    width: 60px;
    height: 60px;
    margin-bottom: 20px;
}

.orbit-dot {
    position: absolute;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #FF9AA2;
    animation: orbitRotate 2s linear infinite;
}

.dot-1 {
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    animation-delay: 0s;
}

.dot-2 {
    top: 50%;
    right: 0;
    transform: translateY(-50%);
    animation-delay: 0.66s;
}

.dot-3 {
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    animation-delay: 1.33s;
}

@keyframes orbitRotate {
    0% { opacity: 1; transform: scale(1); }
    33% { opacity: 0.7; transform: scale(1.2); }
    66% { opacity: 0.4; transform: scale(0.8); }
    100% { opacity: 1; transform: scale(1); }
}

.loading-text {
    color: white;
    font-size: 16px;
    font-weight: 500;
    opacity: 0.9;
}

.video-controls {
    display: flex;
    align-items: center;
    gap: 8px; /* 减少间距 */
    padding: 6px 12px; /* 进一步减少padding */
    background: rgba(0, 0, 0, 0.8); /* 深色背景，增强按钮对比度 */
    border-radius: 8px;
    transition: all 0.3s ease;
    opacity: 1;
    backdrop-filter: blur(20px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    margin: 1px; /* 最小外边距 */
    height: 7%; /* 控制条占7%高度 */
    flex-shrink: 0; /* 防止控制条被压缩 */
}

.video-controls.visible {
    opacity: 1;
    transform: translateY(0);
}

/* 控制条播放按钮 */
.control-play-pause {
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2); /* 白色背景，增强可见性 */
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.control-play-pause:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.small-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #FF9AA2;
    animation: smallDotPulse 1.5s ease-in-out infinite;
}

.small-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    border: 1px solid #FFB7B2;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    animation: smallRingPulse 1.5s ease-out infinite;
}

@keyframes smallDotPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.4); }
}

@keyframes smallRingPulse {
    0% {
        transform: translate(-50%, -50%) scale(0.5);
        opacity: 0.8;
    }
    100% {
        transform: translate(-50%, -50%) scale(1.5);
        opacity: 0;
    }
}

.small-bars {
    display: flex;
    gap: 4px;
}

.small-bar {
    width: 3px;
    height: 16px;
    border-radius: 2px;
    background: #FFB7B2;
    animation: smallBarPulse 1.2s ease-in-out infinite alternate;
}

.small-bar:nth-child(2) {
    animation-delay: 0.2s;
}

@keyframes smallBarPulse {
    0% { transform: scaleY(0.6); }
    100% { transform: scaleY(1.2); }
}

.progress-section {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px; /* 减少间距 */
    margin: 0 4px; /* 调整对齐 */
}

.progress-container {
    flex: 1;
    height: 12px;
    background: rgba(255, 154, 162, 0.2);
    border-radius: 12px;
    cursor: pointer;
    position: relative;
    overflow: visible;
}

.progress-track {
    width: 100%;
    height: 100%;
    position: relative;
    border-radius: 12px;
}

.progress-buffer {
    height: 100%;
    background: rgba(255, 183, 178, 0.4);
    border-radius: 12px;
    width: 0%;
    position: absolute;
    top: 0;
    left: 0;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, 
        #FF9AA2 0%, 
        #FFB7B2 30%, 
        #FFDAC1 60%, 
        #E2F0CB 100%);
    border-radius: 12px;
    width: 0%;
    transition: width 0.1s linear;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
}

.progress-thumb {
    width: 20px;
    height: 20px;
    background: linear-gradient(135deg, #FF9AA2 0%, #FFB7B2 100%);
    border: 3px solid white;
    border-radius: 50%;
    position: absolute;
    top: 50%;
    left: 0%;
    transform: translate(-50%, -50%);
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 3px 12px rgba(255, 154, 162, 0.4);
    z-index: 2;
}

.progress-thumb:hover {
    transform: translate(-50%, -50%) scale(1.3);
    box-shadow: 0 5px 16px rgba(255, 154, 162, 0.6);
}

.time-display {
    font-size: 13px;
    color: white; /* 改为白色以适配深色背景 */
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    display: flex;
    margin-left: 12px; /* 增加与进度条的间距 */
    padding: 2px 4px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 4px;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
    font-weight: 600;
}

.time-separator {
    opacity: 0.7;
}

.volume-section {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.volume-btn {
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 154, 162, 0.1);
    color: #FF9AA2;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.volume-btn:hover {
    background: rgba(255, 154, 162, 0.2);
    transform: scale(1.1);
}

.volume-slider-container {
    width: 80px;
}

.volume-slider {
    width: 100%;
    height: 6px;
    background: rgba(255, 154, 162, 0.2);
    border-radius: 6px;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    transition: all 0.3s ease;
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    background: #FF9AA2;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
}

.volume-slider::-webkit-slider-thumb:hover {
    transform: scale(1.3);
    background: #FFB7B2;
}

.fullscreen-btn {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2); /* 白色背景，增强可见性 */
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

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

.hidden {
    display: none !important;
}

/* 竖屏视频样式 */
.video-player-container.vertical-video .video-controls {
    gap: 6px;
    padding: 4px 8px;
}

.video-player-container.vertical-video .time-display {
    font-size: 11px;
    margin-left: 6px;
    padding: 1px 3px;
}

.video-player-container.vertical-video .control-play-pause,
.video-player-container.vertical-video .fullscreen-btn {
    width: 28px;
    height: 28px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .video-player-container {
        height: 85vh;
        padding: 16px;
        min-width: 280px;
    }
    
    .video-area {
        height: 80%;
    }
    
    .video-controls {
        height: 10%;
        gap: 6px;
        padding: 8px;
    }
    
    .video-title {
        font-size: 16px;
    }
    
    .time-display {
        font-size: 11px;
    }
}
