/* 视频列表容器 */
.video-list-container {
    margin: 20px 0;
    width: 100%;
}

/* 视频网格布局 */
.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
    width: 100%;
}

/* 视频卡片 */
.video-card {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
    background: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.video-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

/* 视频缩略图 */
.video-thumbnail {
    position: relative;
    overflow: hidden;
    background: #f5f5f5;
    width: 100%;
}

.video-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.video-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    background: #e9e9e9;
    color: #ccc;
    font-size: 48px;
    width: 100%;
}

/* 视频悬停效果 */
.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.video-card:hover .video-overlay {
    opacity: 1;
}

.play-video {
    background: rgba(34, 113, 177, 0.9);
    border: none;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
    font-size: 24px;
}

.play-video:hover {
    transform: scale(1.1);
    background: rgba(34, 113, 177, 1);
}

/* 视频信息 */
.video-info {
    padding: 15px;
}

.video-title {
    margin: 0 0 10px 0;
    font-size: 16px;
    line-height: 1.4;
    font-weight: 600;
    color: #333;
}

.video-sku {
    margin: 0 0 15px 0;
    color: #666;
    font-size: 14px;
}

.video-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.btn-play,
.btn-product {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    text-decoration: none;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    flex: 1;
    text-align: center;
    min-width: 120px;
}

.btn-play {
    background: #2271b1;
    color: white;
}

.btn-play:hover {
    background: #135e96;
}

.btn-product {
    background: #f0f0f0;
    color: #333;
    border: 1px solid #ddd;
}

.btn-product:hover {
    background: #e0e0e0;
}

/* 分类筛选器 */
.video-filters {
    margin-bottom: 30px;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 8px;
}

.video-filters h4 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #333;
}

.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.filter-btn {
    padding: 8px 16px;
    border: 2px solid #ddd;
    background: white;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-btn.active,
.filter-btn:hover {
    background: #2271b1;
    color: white;
    border-color: #2271b1;
}

/* 分页样式 */
.video-pagination {
    margin-top: 40px;
    text-align: center;
    width: 100%;
}

.pagination-nav {
    display: inline-block;
}

.pagination-nav .page-numbers {
    display: inline-block;
    padding: 8px 16px;
    margin: 0 2px;
    border: 1px solid #ddd;
    text-decoration: none;
    color: #2271b1;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.pagination-nav .page-numbers.current {
    background: #2271b1;
    color: white;
    border-color: #2271b1;
}

.pagination-nav .page-numbers:hover {
    background: #f0f0f0;
}

.pagination-nav .page-numbers.dots {
    border: none;
    background: none;
}
/* 备用图片显示方案 */
.video-thumbnail.fixed-ratio {
    aspect-ratio: 16 / 9;
    padding-bottom: 0;
    height: auto;
}

/* 如果浏览器支持 aspect-ratio */
@supports (aspect-ratio: 16 / 9) {
    .video-thumbnail {
        aspect-ratio: 16 / 9;
        padding-bottom: 0;
        height: auto;
    }
}

/* 图片加载失败时的备用样式 */
.video-thumbnail img:before {
    content: " ";
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 100%;
    background-color: #f5f5f5;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 24 24" fill="none" stroke="%23ccc" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="3" width="18" height="18" rx="2" ry="2"></rect><circle cx="8.5" cy="8.5" r="1.5"></circle><polyline points="21 15 16 10 5 21"></polyline></svg>');
    background-repeat: no-repeat;
    background-position: center;
    background-size: 48px 48px;
}

.video-thumbnail img:after {
    content: "图片加载失败";
    display: block;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #999;
    font-size: 12px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .video-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 15px;
    }
    
    .video-actions {
        flex-direction: column;
    }
    
    .btn-play,
    .btn-product {
        min-width: auto;
        width: 100%;
    }
    
    .filter-buttons {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .video-grid {
        grid-template-columns: 1fr;
    }
    
    .video-thumbnail {
        height: 180px;
    }
}
/* 响应式图片优化 */
@media (max-width: 1024px) {
    .video-thumbnail {
        padding-bottom: 60%; /* 在平板设备上调整比例 */
    }
}

@media (max-width: 768px) {
    .video-thumbnail {
        padding-bottom: 65%; /* 在手机上调整比例 */
    }
    
    .video-thumbnail img {
        object-fit: contain; /* 在小屏幕上完整显示图片 */
    }
}

@media (max-width: 480px) {
    .video-thumbnail {
        padding-bottom: 70%; /* 在小手机上调整比例 */
    }
}

/* 确保图片加载时的平滑显示 */
.video-thumbnail img {
    transition: opacity 0.3s ease;
}

.video-thumbnail img[data-src] {
    opacity: 0;
}

.video-thumbnail img.loaded {
    opacity: 1;
}