:root {
    /* 夜空、车身光线和紫色霓虹 */
    --bg-gradient-start: #0d1439;
    --bg-gradient-mid: #101b36;
    --bg-gradient-end: #211638;
    --bg-gradient-dark: #0b1232;
    --surface: #172342;
    --surface-raised: #1d2a50;
    --surface-border: #3b4b76;
    --media-gradient-end: #2c1e48;

    --accent-cyan: #69dafa;
    --accent-blue: #789aff;
    --accent-violet: #d1aaf5;

    --text-primary: #f0f5ff;
    --text-secondary: #cad6ef;
    --text-muted: #afbfdb;

    --shadow-md: 0 12px 28px rgba(5, 9, 24, 0.3);
    --shadow-lg: 0 18px 42px rgba(5, 9, 24, 0.44);
    --shadow-glow: 0 12px 28px rgba(105, 218, 250, 0.16);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
    background: linear-gradient(135deg, var(--bg-gradient-start) 0%, var(--bg-gradient-mid) 52%, var(--bg-gradient-end) 100%) var(--bg-gradient-mid);
    background-attachment: fixed;
    min-height: 100vh;
    color: var(--text-primary);
    line-height: 1.7;
}

/* 头图区域 */
.hero {
    background-color: var(--bg-gradient-start);
    overflow: hidden;
}

.hero img {
    display: block;
    width: 100%;
    max-width: 1920px;
    height: auto;
    /* 裁掉图片上下沿的浅色边线。 */
    margin: -2px auto;
}

/* 主内容区域 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
}

/* 摘要区域 */
.summary {
    background: linear-gradient(120deg, var(--surface-raised), var(--surface));
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: 20px;
    padding: 40px;
    margin: 24px auto 40px;
    border: 1px solid var(--surface-border);
    border-left: 4px solid var(--accent-cyan);
    box-shadow: var(--shadow-md), inset 0 1px 0 rgba(120, 154, 255, 0.16);
}

.summary h1 {
    font-size: 28px;
    background: linear-gradient(90deg, var(--text-primary), var(--accent-cyan), var(--accent-violet));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 20px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-wrap: balance;
}

.summary p {
    font-size: 16px;
    color: var(--text-secondary);
    text-indent: 2em;
    line-height: 1.9;
    text-wrap: pretty;
}

/* 标题装饰 */
.section-title {
    text-align: center;
    margin-bottom: 32px;
    position: relative;
}

.section-title h2 {
    font-size: 24px;
    color: var(--text-primary);
    display: inline-flex;
    align-items: center;
    padding: 0 24px;
    background: var(--surface);
    position: relative;
    z-index: 1;
    font-weight: 600;
    letter-spacing: 2px;
}

.section-title::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent-cyan), var(--accent-blue), var(--accent-violet), transparent);
}

.section-title .icon {
    display: inline-block;
    width: 10px;
    height: 10px;
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-blue));
    transform: rotate(45deg);
    margin-right: 10px;
    box-shadow: 0 0 10px rgba(105, 218, 250, 0.34);
}

/* 新闻列表 */
.news-list {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    padding-bottom: 60px;
}

.news-card,
a.news-card {
    display: block;
    background: var(--surface);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--surface-border);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
}

.news-card:hover,
a.news-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-glow), var(--shadow-lg);
    border-color: var(--accent-cyan);
}

.news-card .card-image {
    width: 100%;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: linear-gradient(135deg, var(--surface-raised), var(--media-gradient-end));
    position: relative;
}

.news-card .card-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, transparent 70%, rgba(11, 18, 50, 0.22) 100%);
    pointer-events: none;
}

.news-card .card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.news-card:hover .card-image img {
    transform: scale(1.08);
}

.news-card .card-content {
    padding: 20px;
    background: var(--surface);
}

.news-card .card-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.2s ease;
}

.news-card:hover .card-title {
    color: var(--accent-cyan);
}

.news-card .card-excerpt {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 底部 */
.footer {
    background: linear-gradient(180deg, var(--surface-raised) 0%, var(--bg-gradient-dark) 100%);
    color: var(--text-secondary);
    text-align: center;
    padding: 28px;
    font-size: 14px;
    border-top: 3px solid var(--accent-cyan);
    border-image: linear-gradient(90deg, var(--accent-cyan), var(--accent-blue), var(--accent-violet)) 1;
}

.footer a {
    color: var(--accent-cyan);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer a:hover {
    color: var(--accent-violet);
}

.news-card:focus-visible,
.footer a:focus-visible {
    outline-color: var(--accent-cyan);
}

/* 响应式 */
@media (max-width: 1199px) {
    .news-list {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 767px) {
    .summary {
        padding: 24px;
        margin: 16px auto 30px;
        border-radius: 16px;
    }

    .summary h1 {
        font-size: 22px;
    }

    .summary p {
        font-size: 15px;
    }

    .news-list {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .section-title h2 {
        font-size: 20px;
        letter-spacing: 1px;
    }
}

/* ========== 现场图片模块 ========== */
.scene-gallery {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    padding-bottom: 60px;
}

/* 只有1张图片：居中显示（大图） */
.scene-gallery:has(.gallery-item:nth-child(1):last-child) {
    grid-template-columns: 1fr;
    max-width: 60%;
    margin: 0 auto;
}

/* 只有2张图片：一行显示2个 */
.scene-gallery:has(.gallery-item:nth-child(2):last-child) {
    grid-template-columns: repeat(2, 1fr);
    max-width: 80%;
    margin: 0 auto;
}

.gallery-item {
    position: relative;
    aspect-ratio: 16 / 10;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    background: linear-gradient(135deg, var(--surface-raised), var(--media-gradient-end));
    border: 1px solid var(--surface-border);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.gallery-item:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-glow), var(--shadow-lg);
    border-color: var(--accent-cyan);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.gallery-item:hover img {
    transform: scale(1.08);
}

/* 懒加载渐入动画 */
.gallery-item img {
    opacity: 0;
    animation: fadeIn 0.5s ease forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(1.02);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* 错开动画延迟 */
.gallery-item:nth-child(1) img { animation-delay: 0.05s; }
.gallery-item:nth-child(2) img { animation-delay: 0.1s; }
.gallery-item:nth-child(3) img { animation-delay: 0.15s; }
.gallery-item:nth-child(4) img { animation-delay: 0.2s; }
.gallery-item:nth-child(5) img { animation-delay: 0.25s; }
.gallery-item:nth-child(6) img { animation-delay: 0.3s; }
.gallery-item:nth-child(7) img { animation-delay: 0.35s; }
.gallery-item:nth-child(8) img { animation-delay: 0.4s; }

/* ========== 灯箱查看器 ========== */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(11, 18, 50, 0.94);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lightbox.active {
    display: flex;
    opacity: 1;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 40px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: color 0.3s ease;
    z-index: 10001;
    line-height: 1;
}

.lightbox-close:hover {
    color: var(--accent-cyan);
}

.lightbox-img {
    max-width: 90%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 0 40px rgba(5, 9, 24, 0.65);
}

/* ========== 现场图片响应式 ========== */
@media (max-width: 1199px) {
    .scene-gallery {
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
    }

    /* 2张图片时保持双列 */
    .scene-gallery:has(.gallery-item:nth-child(2):last-child) {
        grid-template-columns: repeat(2, 1fr);
    }

    .gallery-item {
        border-radius: 10px;
    }
}

@media (max-width: 767px) {
    .scene-gallery {
        grid-template-columns: 1fr !important;
        max-width: 100% !important;
        gap: 8px;
    }

    .gallery-item {
        border-radius: 8px;
    }

    .lightbox-img {
        max-width: 95%;
        max-height: 70vh;
    }
}
