/* ==========================================================
   前台样式 · 金山文档式纯排版（纯白、无卡片、无模块框）
   ========================================================== */
:root {
    --text: #1f2329;
    --text-2: #8a9099;
    --line: #e8e9ec;
    --img-bg: #f7f8fa;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
    font-family: system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
    background: #ffffff;
    color: var(--text);
    line-height: 1.85;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    width: 100%;
    max-width: 700px;
    margin: 0 auto;
    padding-left: 22px;
    padding-right: 22px;
}

/* ---------- 标题 ---------- */
.page-body {
    flex: 1;
    padding-bottom: 52px;
}

.page-head {
    padding: 40px 0 6px;
    text-align: center;
}

.site-title {
    font-size: 34px;
    font-weight: 700;
    letter-spacing: 3px;
    line-height: 1.4;
    word-break: break-word;
}

/* ---------- 章节（纯文档排版，无边框无底色） ---------- */
.section { margin-top: 36px; }

.section-title {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 0.5px;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* 章节标题图标（内联 SVG，彩色渐变描边，无底色保持文档简洁风） */
.sec-icon {
    flex: none;
    width: 36px;
    height: 36px;
    margin-right: 2px;
}

/* ---------- 游戏介绍正文 ---------- */
.article {
    font-size: 16px;
    word-break: break-word;
}

/* ---------- 宣传五图：3D 幻灯片（coverflow） ---------- */
.promo-swiper {
    position: relative;
    padding: 6px 0 26px;
}

.promo-swiper .swiper-slide {
    width: 66%;
    max-width: 320px;
}

.promo-swiper .swiper-slide img {
    display: block;
    width: 100%;
    aspect-ratio: 3 / 5;
    object-fit: cover;
    border-radius: 10px;
}

/* 手动切换：左右箭头按钮（SVG 图标，半透明圆底） */
.promo-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-92%);
    z-index: 3;
    width: 38px;
    height: 38px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.92);
    color: #4a5158;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.16);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

.promo-nav svg {
    width: 20px;
    height: 20px;
}

.promo-nav:hover {
    background: #333b45;
    color: #fff;
}

.promo-prev { left: 6px; }
.promo-next { right: 6px; }

.promo-prev.swiper-button-disabled,
.promo-next.swiper-button-disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

/* 单张时静态居中（不初始化 Swiper，同时隐藏箭头） */
.promo-swiper.single-slide { text-align: center; }
.promo-swiper.single-slide .swiper-wrapper { display: block; }
.promo-swiper.single-slide .swiper-slide { display: inline-block; }
.promo-swiper.single-slide .promo-nav { display: none; }

/* 圆点指示器 */
.promo-swiper .swiper-pagination-bullet {
    background: #d5d9e0;
    opacity: 1;
    width: 7px;
    height: 7px;
    transition: all 0.2s ease;
}

.promo-swiper .swiper-pagination-bullet-active {
    background: #646a73;
    width: 16px;
    border-radius: 4px;
}

/* ---------- 游戏截图（保持 2 列网格） ---------- */
.img-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.img-grid figure {
    position: relative;
    overflow: hidden;
    background: var(--img-bg);
    cursor: zoom-in;
    border-radius: 6px;
}

.img-grid img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.18s ease;
}

.img-grid figure:hover img {
    opacity: 0.88;
}

.shot-grid img { aspect-ratio: 433 / 767; }

/* 智能识别：横版宽图整行独占显示（16:9） */
.shot-grid figure.wide {
    grid-column: 1 / -1;
}

.shot-grid figure.wide img {
    aspect-ratio: 16 / 9;
}

/* ---------- 空状态（纯文字，无框） ---------- */
.empty-box {
    padding: 22px 0;
    text-align: center;
    color: var(--text-2);
    font-size: 14px;
}

/* ---------- 页脚：文字嵌在横线中间 ---------- */
.footer { padding-bottom: 40px; }

.footer-rule {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 13px;
    color: var(--text-2);
    letter-spacing: 1px;
}

.footer-rule::before,
.footer-rule::after {
    content: "";
    flex: 1;
    border-top: 1px solid var(--line);
}

/* ---------- 图片放大层 ---------- */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 999;
    background: rgba(17, 20, 26, 0.88);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s ease;
    cursor: zoom-out;
}

/* 修复：确保 hidden 属性生效，避免透明层拦截整页点击 */
.lightbox[hidden] {
    display: none !important;
}

.lightbox.show { opacity: 1; }

.lightbox img {
    max-width: 96vw;
    max-height: 96vh;
    border-radius: 4px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.4);
}

/* ---------- 桌面微调 ---------- */
@media (min-width: 768px) {
    .page-head { padding: 68px 0 10px; }
    .site-title { font-size: 40px; letter-spacing: 4px; }
    .section { margin-top: 64px; }
    .section-title { font-size: 24px; }
}
