/* 自定义样式 */
:root {
    --primary-blue: #165DFF;
    --secondary-blue: #4080FF;
    --dark-blue: #0E2B5C;
    --light-blue: #E8F3FF;
    --text-blue: #1D4ED8;
}

/* 基础样式 */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

.bg-blue-light {
    background-color: var(--light-blue);
}

.main-content {
    padding: 0;
}

/* 视频部分样式 */
.video-section {
    margin-bottom: 60px;
}

.section-title {
    font-size: 15px;
    font-weight: 700;
    color: white;
    background-color: var(--dark-blue);
    text-align: center;
    padding: 12px 20px;
    margin-bottom: 20px;
    border-radius: 8px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
    'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
    sans-serif;
}

/* 视频网格样式 - 固定每列两个卡片 */
.video-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* 视频卡片样式 */
.video-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: default;
}

.video-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.video-thumbnail {
    position: relative;
    width: 100%;
    background-color: #f0f0f0;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 250px;
    margin-bottom: 0; /* 消除底部间距 */
}

.video-thumbnail img {
    width: 100%;
    height: 200px;
    object-fit: cover; /* 拉伸填满容器，保持比例 */
    transition: transform 0.3s ease;
}

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



.video-info {
    padding: 12px 15px;
    background-color: #ffffff;
    border-bottom: 2px solid var(--light-blue);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-card:hover .video-info {
    background-color: var(--light-blue);
}

.video-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--dark-blue);
    margin-bottom: 0;
    line-height: 1.4;
    transition: color 0.3s ease;
    text-align: center;
    white-space: pre-line; /* 允许换行符正确显示 */
}

.video-card:hover .video-title {
    color: var(--primary-blue);
}

/* 视频操作区域样式 */
.video-actions {
    background-color: #f9f9f9;
    display: flex;
    justify-content: center;
    margin-top: 0; /* 消除顶部间距 */
    padding: 0; /* 移除内部padding */
}

/* 播放按钮样式 */
.play-button {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 24px; /* 适当增加内边距以保持良好的可点击区域 */
    background-color: var(--dark-blue);
    color: white;
    border: none;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    justify-content: center;
    margin: 0; /* 确保按钮没有额外的margin */
}

.play-button:hover {
    background-color: var(--dark-blue);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(22, 93, 255, 0.25);
}

.play-button:active {
    transform: translateY(0);
}

/* 播放图标样式 */
.play-icon {
    font-size: 18px;
    margin-right: 2px;
    transition: transform 0.2s ease;
}

.play-button:hover .play-icon {
    transform: scale(1.1);
}

/* 播放文本样式 */
.play-text {
    font-weight: 600;
}

.video-description {
    font-size: 14px;
    color: #666;
    line-height: 1.5;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

.video-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--dark-blue);
    margin-bottom: 0;
    line-height: 1.4;
    text-align: center;
    white-space: pre-line;
}

.video-description {
    font-size: 14px;
    color: #666;
    line-height: 1.5;
}

/* 模态框样式 */
#videoModal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-content {
    width: 90%;
    max-width: 800px;
    position: relative;
}

#videoModal.show {
    opacity: 1;
    visibility: visible;
}

/* 关闭按钮样式 */
.close-modal-btn {
    position: absolute;
    top: -40px;
    right: 0;
    width: 36px;
    height: 36px;
    background-color: var(--dark-blue);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.close-modal-btn:hover {
    background-color: var(--primary-blue);
    transform: scale(1.1);
}

/* 自定义滚动条 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--secondary-blue);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-blue);
}

/* 响应式调整 */
@media (max-width: 640px) {
    .video-title {
        font-size: 16px;
    }
    
    .video-thumbnail {
        min-height: 200px;
    }
    
    .video-info {
        padding: 10px 12px;
    }
}

/* 加载动画 */
.loading-spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--primary-blue);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 40px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 视频播放器自定义样式 */
.vjs-big-play-button {
    background-color: rgba(22, 93, 255, 0.8) !important;
    border: none !important;
}

.vjs-big-play-button:hover {
    background-color: rgba(14, 43, 92, 0.9) !important;
}

.vjs-control-bar {
    background-color: rgba(14, 43, 92, 0.85) !important;
}

/* 页脚样式 */
.footer {
    background-color: var(--dark-blue);
    color: white;
    padding: 10px 0;
    text-align: center;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.footer-bottom {
    margin-top: 10px;
    font-size: 14px;
    opacity: 0.9;
}