/* 伪视频效果样式 - 增强版 */

/* 视频卡片容器 */
.video-card {
    cursor: pointer;
    position: relative;
    transition: transform 0.3s ease;
}

.video-card:hover {
    transform: translateY(-4px);
}

/* 视频缩略图容器 */
.video-thumb {
    position: relative;
    padding-top: 56.25%;
    background: #000;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* 缩略图 */
.video-thumb .thumb-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

/* 伪视频Canvas */
.fake-video-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 5;
}

/* 伪视频层 - 使用CSS动画模拟视频播放 */
.video-thumb .fake-video-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.video-card:hover .fake-video-layer {
    opacity: 0.3;
}

.video-card:hover .thumb-img {
    transform: scale(1.02);
}

/* 动态扫描线效果 */
.video-thumb::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, transparent, rgba(255,107,107,0.8), transparent);
    transform: translateY(-100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 6;
}

.video-card:hover .video-thumb::after {
    opacity: 1;
    animation: scanline 3s linear infinite;
}

@keyframes scanline {
    0% { transform: translateY(-100%); }
    100% { transform: translateY(calc(100% + 100vh)); }
}

/* 播放按钮 */
.play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 70px;
    height: 70px;
    background: rgba(255, 107, 107, 0.9);
    border-radius: 50%;
    opacity: 0;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(255, 107, 107, 0.5);
    z-index: 7;
    cursor: pointer;
}

.play-btn::after {
    content: '';
    width: 0;
    height: 0;
    border-left: 22px solid #fff;
    border-top: 14px solid transparent;
    border-bottom: 14px solid transparent;
    margin-left: 6px;
}

.video-card:hover .play-btn {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { 
        box-shadow: 0 4px 20px rgba(255, 107, 107, 0.5);
        transform: translate(-50%, -50%) scale(1);
    }
    50% { 
        box-shadow: 0 4px 40px rgba(255, 107, 107, 0.8);
        transform: translate(-50%, -50%) scale(1.1);
    }
}

/* 视频时长标签 */
.video-duration {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.85);
    color: #fff;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 500;
    z-index: 10;
    backdrop-filter: blur(4px);
}

/* 伪进度条 */
.fake-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 4px;
    background: linear-gradient(90deg, #ff6b6b, #ff8e53);
    z-index: 10;
    opacity: 0;
    transition: opacity 0.3s ease;
    box-shadow: 0 0 10px rgba(255, 107, 107, 0.5);
}

.video-card:hover .fake-progress {
    opacity: 1;
    animation: progress 8s linear infinite;
}

@keyframes progress {
    0% { width: 0; }
    100% { width: 100%; }
}

/* 伪控制条 */
.fake-controls {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 40px;
    background: linear-gradient(transparent, rgba(0,0,0,0.95));
    display: flex;
    align-items: flex-end;
    padding: 0 12px 8px;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 9;
    backdrop-filter: blur(8px);
}

.video-card:hover .fake-controls {
    opacity: 1;
}

.fake-controls-inner {
    display: flex;
    align-items: center;
    width: 100%;
    color: #fff;
    font-size: 12px;
    gap: 8px;
}

.fake-time {
    min-width: 80px;
    font-family: 'Courier New', monospace;
    font-weight: bold;
}

.fake-icons {
    display: flex;
    gap: 12px;
    margin-left: auto;
}

.fake-icons span {
    cursor: pointer;
    opacity: 0.8;
    transition: all 0.2s;
    font-size: 14px;
}

.fake-icons span:hover {
    opacity: 1;
    transform: scale(1.2);
}

/* 播放中指示器 */
.playing-indicator {
    position: absolute;
    top: 12px;
    left: 12px;
    display: flex;
    align-items: flex-end;
    gap: 3px;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 8;
}

.video-card:hover .playing-indicator {
    opacity: 1;
}

.playing-indicator span {
    width: 4px;
    height: 16px;
    background: #ff6b6b;
    border-radius: 2px;
    animation: equalizer 0.8s ease-in-out infinite;
    box-shadow: 0 0 8px rgba(255, 107, 107, 0.6);
}

.playing-indicator span:nth-child(1) { animation-delay: 0s; }
.playing-indicator span:nth-child(2) { animation-delay: 0.2s; }
.playing-indicator span:nth-child(3) { animation-delay: 0.4s; }

@keyframes equalizer {
    0%, 100% { height: 8px; }
    50% { height: 20px; }
}

/* 视频质量标签 */
.video-quality {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255, 107, 107, 0.95);
    color: #fff;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: bold;
    z-index: 10;
    backdrop-filter: blur(4px);
    box-shadow: 0 2px 8px rgba(255, 107, 107, 0.4);
}

/* 播放状态徽章 */
.video-playing-badge {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 107, 107, 0.95);
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: bold;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 8;
    white-space: nowrap;
    backdrop-filter: blur(8px);
    box-shadow: 0 4px 20px rgba(255, 107, 107, 0.4);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .play-btn {
        width: 50px;
        height: 50px;
    }
    
    .play-btn::after {
        border-left: 16px solid #fff;
        border-top: 10px solid transparent;
        border-bottom: 10px solid transparent;
        margin-left: 4px;
    }
    
    .fake-controls {
        height: 32px;
        padding: 0 8px 6px;
    }
    
    .fake-controls-inner {
        font-size: 11px;
    }
    
    .fake-time {
        min-width: 70px;
    }
    
    .fake-icons {
        gap: 8px;
    }
    
    .fake-icons span {
        font-size: 12px;
    }
}

/* 深色模式支持 */
@media (prefers-color-scheme: dark) {
    .video-thumb {
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    }
    
    .fake-controls {
        background: linear-gradient(transparent, rgba(0,0,0,0.98));
    }
}

/* 打印样式 */
@media print {
    .play-btn,
    .fake-progress,
    .fake-controls,
    .playing-indicator,
    .video-playing-badge {
        display: none;
    }
}
