/* 视频列表和播放器样式 */

/* 视频列表容器 */
.video-items {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 15px;
    margin: 20px 0;
}

/* 视频项卡片 - 新版设计 */
.video-item {
    background: rgba(40, 40, 40, 0.6);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-rows: auto 1fr auto;
    gap: 15px;
}

/* 浅色背景时的video-item样式 */
.video-item.light-bg {
    background: rgba(50, 50, 50, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* 深色背景时的video-item样式 */
.video-item.dark-bg {
    background: rgba(30, 30, 30, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.25);
}

.video-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
    background: rgba(50, 50, 50, 0.7);
    border-color: rgba(255, 255, 255, 0.25);
}

.video-item.active {
    background: linear-gradient(135deg, rgba(60, 60, 60, 0.8), rgba(40, 40, 40, 0.6));
    backdrop-filter: blur(20px);
    box-shadow: 0 0 30px rgba(255, 255, 255, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.3);
    transform: scale(1.02);
}

/* 分类图标区域 */
.video-category-icon {
    grid-column: 1;
    grid-row: 1;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: white;
    transition: all 0.3s ease;
}

.video-item:hover .video-category-icon {
    background: rgba(255, 255, 255, 0.15);
    transform: scale(1.05);
}

/* 视频标题区域 */
.video-title {
    grid-column: 2;
    grid-row: 1;
    display: flex;
    align-items: center;
}

.video-title h3 {
    color: white;
    font-size: 18px;
    margin: 0;
    font-weight: 600;
    line-height: 1.3;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* 分割线 */
.video-divider {
    grid-column: 1 / -1;
    grid-row: 2;
    height: 1px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(255, 255, 255, 0.2) 20%, 
        rgba(255, 255, 255, 0.2) 80%, 
        transparent 100%);
    margin: 5px 0;
}

/* 视频描述区域 */
.video-description {
    grid-column: 1 / -1;
    grid-row: 3;
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    line-height: 1.5;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 视频元信息区域 */
.video-meta {
    grid-column: 1 / -1;
    grid-row: 4;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
    padding-top: 10px;
}

.video-filename {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 60%;
    font-family: monospace;
}

.video-duration {
    background: rgba(255, 255, 255, 0.1);
    padding: 4px 10px;
    border-radius: 10px;
    font-weight: 500;
    color: #00b09b;
    font-family: monospace;
}

/* 视频播放器 */
.video-player {
    width: 100%;
    max-height: 80vh;
    margin: 40px 0;
    background: rgba(92, 92, 92, 0.5);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(211, 211, 211, 0.2);
    position: relative;
    display: none;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s ease;
    backdrop-filter: blur(32px);
}

.video-player.show {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

#mainVideo {
    width: 100%;
    height: auto;
    max-height: 80vh;
    object-fit: contain;
    display: block;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .video-items {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 12px;
    }
    
    .video-item {
        padding: 18px;
        gap: 12px;
        border-radius: 18px;
    }
    
    .video-category-icon {
        width: 45px;
        height: 45px;
        font-size: 22px;
        border-radius: 10px;
    }
    
    .video-title h3 {
        font-size: 16px;
    }
    
    .video-description {
        font-size: 13px;
        -webkit-line-clamp: 2;
    }
    
    .video-meta {
        font-size: 12px;
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .video-filename {
        max-width: 100%;
    }
    
    .video-duration {
        align-self: flex-start;
    }
}

@media (max-width: 480px) {
    .video-items {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .video-item {
        padding: 16px;
        gap: 10px;
        border-radius: 16px;
    }
    
    .video-category-icon {
        width: 40px;
        height: 40px;
        font-size: 20px;
        border-radius: 8px;
    }
    
    .video-title h3 {
        font-size: 15px;
    }
    
    .video-description {
        font-size: 12px;
        -webkit-line-clamp: 2;
    }
    
    .video-meta {
        font-size: 11px;
    }
    
    .video-player {
        margin: 20px 0;
        border-radius: 10px;
    }
}
