﻿/* 全局重置与基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
}

body {
    background-color: #f5f7fa;
    flex-direction: column;
    align-items: center;
    padding: 20px 20px 40px;
    display: flex;
    justify-content: center; /* 添加垂直居中 */
    min-height: 100vh; /* 确保body至少占满视口高度 */
}

/* 主容器：固定宽度1200px，左右自动边距，符合大屏PC */
.container {
    width: 1500px;
    max-width: 100%; /* 移动端下自动缩小为屏幕宽度 */
    background-color: #ffffff;
    border-radius: 32px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.06);
    overflow: hidden;
    padding: 24px 24px 40px;
}

/* 播放器容器：保持16:9比例，宽度自适应 */
.player-wrapper {
    width: 100%;
    background: #000;
    border-radius: 24px;
    overflow: hidden;
    margin-bottom: 24px;
}

/* 往期回顾模块 - 静态编写，不再依赖js生成 */
.review-section {
    margin-top: 30px;
}

.section-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: #1e2b3c;
    padding-left: 15px;
    border-left: 8px solid #ff6b35;
    margin-bottom: 24px;
    line-height: 1.3;
    letter-spacing: -0.3px;
}

/* 网格布局：一行4个（1200px下足够展示4个），移动端自动折行 */
.video-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}
/* 小屏幕时改为2列，再小时1列，完美自适应 */
@media (max-width: 900px) {
    .video-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 520px) {
    .video-grid {
        grid-template-columns: 1fr;
    }
}

.video-card {
    background: #fff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 6px 16px rgba(0,0,0,0.03);
    transition: all 0.3s ease;
    border: 1px solid #f0f2f5;
}

    .video-card:hover {
        transform: translateY(-6px);
        box-shadow: 0 20px 28px rgba(0,0,0,0.08);
        border-color: #e8ecf0;
    }

.card-info {
    padding: 20px 18px;
}

.card-title {
    font-weight: 650;
    font-size: 1.1rem;
    color: #1e2b3c;
    line-height: 1.45;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-date {
    font-size: 0.9rem;
    color: #7f8e9e;
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 20px;
}

    .card-date::before {
        content: "📅";
        font-size: 0.9rem;
        opacity: 0.8;
    }


.watch-btn {
    display: inline-block;
    background: linear-gradient(135deg, #3498db 0%, #5dade2 100%);
    color: white;
    padding: 12px 20px;
    border-radius: 40px;
    font-size: 0.9rem;
    font-weight: 600;
    text-align: center;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    width: 100%;
    letter-spacing: 0.5px;
}

    .watch-btn:hover {
        background: linear-gradient(135deg, #2980b9 0%, #3498db 100%);
        transform: translateY(-2px);
        box-shadow: 0 6px 16px rgba(52, 152, 219, 0.3);
    }

/* 弹窗 (模态框) 样式 — 完全自适应，且禁止点击遮罩关闭 */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s;
    padding: 16px;
    /* 关键：让遮罩不捕获点击事件，点击直接穿透？
               但我们需要阻止点击遮罩关闭，所以保留捕获，但不添加关闭逻辑即可 */
    pointer-events: auto; /* 确保遮罩可以捕获点击，但我们不处理关闭 */
}

    .modal-overlay.show {
        opacity: 1;
        visibility: visible;
    }

.modal-box {
    background: #ffffff;
    border-radius: 40px;
    max-width: 460px;
    width: 100%;
    padding: 34px 28px 28px;
    box-shadow: 0 30px 50px rgba(0, 0, 0, 0.3);
    transform: scale(0.95);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    /* 确保模态框内容可以正常交互 */
    pointer-events: auto;
}

.modal-overlay.show .modal-box {
    transform: scale(1);
}

.modal-box h3 {
    font-size: 2.2rem;
    font-weight: 700;
    color: #1e2b3c;
    margin-bottom: 6px;
    letter-spacing: -0.5px;
}

.modal-sub {
    color: #5e6f7e;
    margin-bottom: 28px;
    font-size: 1.1rem;
    border-bottom: 1px solid #eef2f5;
    padding-bottom: 14px;
}

.input-field {
    margin-bottom: 24px;
}

    .input-field label {
        display: block;
        font-size: 0.95rem;
        font-weight: 500;
        color: #3a4b5a;
        margin-bottom: 8px;
        margin-left: 10px;
    }

    .input-field input {
        width: 100%;
        padding: 18px 22px;
        font-size: 1.05rem;
        background-color: #f8fafd;
        border: 1.5px solid #e2e8f0;
        border-radius: 60px;
        outline: none;
        transition: 0.2s;
    }

        .input-field input:focus {
            border-color: #ff6b35;
            background-color: #ffffff;
            box-shadow: 0 0 0 4px rgba(255,107,53,0.15);
        }

.modal-actions {
    display: flex;
    gap: 14px;
    margin-top: 30px;
}

.btn {
    flex: 1;
    padding: 16px 12px;
    border-radius: 60px;
    font-weight: 600;
    font-size: 1.05rem;
    border: none;
    background: none;
    cursor: pointer;
    transition: 0.15s;
}

.btn-primary {
    background-color: #ff6b35;
    color: white;
    box-shadow: 0 8px 18px rgba(255,107,53,0.25);
}

    .btn-primary:hover {
        background-color: #e85a2a;
        transform: scale(1.02);
    }

/* 针对只有一个按钮的情况，让按钮居中且宽度适当 */
.modal-actions.single-button {
    justify-content: center;
}

    .modal-actions.single-button .btn {
        flex: 0 1 auto;
        min-width: 200px;
    }

.footer-note {
    margin-top: 24px;
    font-size: 0.9rem;
    color: #9aabb8;
    text-align: center;
}
