
/* 视频网格 */
.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
    margin-top: 30px;
    margin-bottom: 50px;
}

.video-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.video-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.video-thumbnail {
    position: relative;
    overflow: hidden;
    height: 180px;
    background-color: #2c3e50;
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.video-card:hover .video-thumbnail img {
    transform: scale(1.05);
}

.play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background: rgba(52, 152, 219, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
    z-index: 10;
}

.play-button:hover {
    background: rgba(41, 128, 185, 0.9);
    transform: translate(-50%, -50%) scale(1.1);
}

.play-button i {
    color: white;
    font-size: 24px;
    margin-left: 3px;
}

.video-info {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.video-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: #2c3e50;
    line-height: 1.4;
}

.video-desc {
    color: #7f8c8d;
    font-size: 0.95rem;
    margin-bottom: 15px;
    flex-grow: 1;
}

.video-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
}

.video-duration {
    color: #7f8c8d;
    font-size: 0.9rem;
}

.level-badge {
    font-size: 0.8rem;
    padding: 4px 10px;
    border-radius: 20px;
}

/* 视频播放弹窗 */
.video-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-content {
    background: white;
    border-radius: 10px;
    width: 100%;
    max-width: 900px;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title {
    margin: 0;
    color: #2c3e50;
    font-weight: 600;
}

.close-modal {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #7f8c8d;
    transition: color 0.3s;
}

.close-modal:hover {
    color: #e74c3c;
}

.modal-body {
    flex-grow: 1;
    padding: 0;
}

.video-player {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
}

.video-player video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.modal-footer {
    padding: 15px 20px;
    border-top: 1px solid #e9ecef;
}

.video-description {
    margin: 0;
    color: #7f8c8d;
    font-size: 0.95rem;
}


/* 响应式设计 */
@media (max-width: 768px) {
    .nav-menu {
        flex-direction: column;
    }
    
    .nav-item {
        margin: 5px 0;
    }
    
    .video-grid {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        max-height: 80vh;
    }
}