/* ==================== 视频模块样式 ==================== */
.video-section {
    background: var(--bg-secondary);
}

.video-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 40px;
    justify-content: center;
}

.video-cat {
    padding: 10px 24px;
    border: 2px solid var(--border);
    border-radius: 30px;
    background: white;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.video-cat:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.video-cat.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* 视频主区域 */
.video-main {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 30px;
    margin-bottom: 60px;
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.video-player-wrapper {
    padding: 0;
}

.video-player {
    position: relative;
    width: 100%;
    background: #000;
    aspect-ratio: 16/9;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.video-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    text-align: center;
    padding: 40px;
}

.video-placeholder i {
    font-size: 64px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.video-placeholder p {
    font-size: 18px;
    opacity: 0.7;
}

#mainVideo {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* 视频标注层 */
.video-annotations {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 10;
}

.annotation-marker {
    position: absolute;
    background: rgba(37, 99, 235, 0.9);
    color: white;
    padding: 6px 12px;
    border-radius: var(--radius);
    font-size: 13px;
    font-weight: 500;
    pointer-events: auto;
    cursor: pointer;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.4); }
    50% { box-shadow: 0 0 0 8px rgba(37, 99, 235, 0); }
}

.video-info {
    padding: 20px;
}

.video-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
    line-height: 1.4;
}

.video-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 16px;
    font-size: 13px;
    color: var(--text-secondary);
}

.video-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.video-desc {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* 视频章节列表 */
.video-chapters {
    padding: 20px;
    border-left: 1px solid var(--border);
    max-height: 600px;
    overflow-y: auto;
}

.video-chapters h4 {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.chapter-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.chapter-item {
    padding: 12px;
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid transparent;
}

.chapter-item:hover {
    background: var(--bg-secondary);
}

.chapter-item.active {
    background: rgba(37, 99, 235, 0.1);
    border-color: var(--primary);
}

.chapter-time {
    font-size: 12px;
    color: var(--primary);
    font-weight: 600;
    margin-bottom: 4px;
}

.chapter-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.chapter-desc {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* 视频卡片网格 */
.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
}

.video-card {
    background: white;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--border);
    transition: var(--transition);
    cursor: pointer;
}

.video-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary);
}

.video-card-thumb {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.video-card-thumb i {
    font-size: 48px;
    opacity: 0.8;
}

.video-card-duration {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
}

.video-card-body {
    padding: 16px;
}

.video-card-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.video-card-meta {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--text-light);
}

/* 字幕控制 */
.subtitle-controls {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
}

/* ==================== 响应式 ==================== */
@media (max-width: 1024px) {
    .video-main {
        grid-template-columns: 1fr;
    }
    
    .video-chapters {
        border-left: none;
        border-top: 1px solid var(--border);
        max-height: 300px;
    }
}

@media (max-width: 768px) {
    .video-grid {
        grid-template-columns: 1fr;
    }
}
