/* --- 基础重置 --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
    background-color: #ffffff;
    color: #333;
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 30px; /* 增加全局边距，防止手机端贴边 */
    width: 100%;
}

/* --- 导航栏 --- */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 35px 0;
    height: auto;
    transition: background 0.3s ease, backdrop-filter 0.3s ease, height 0.3s ease, padding 0.3s ease;
}

/* 滚动时显示毛玻璃效果 */
header.scrolled {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    height: 66px;
    padding: 0;
    display: flex;
    align-items: center;
}

/* 滚动时导航菜单和logo颜色 */
header.scrolled .nav-menu a,
header.scrolled .logo {
    color: #252525;
}

/* 滚动时菜单按钮颜色 */
header.scrolled .menu-toggle span {
    background: #252525;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* 文章详情页导航栏样式 - 使用和首页/分类页相同的样式 */
.header-wrapper header {
    position: relative;
    padding: 35px 0;
    margin-bottom: 40px;
    background: transparent;
    transition: background 0.3s ease, backdrop-filter 0.3s ease, height 0.3s ease, padding 0.3s ease;
}

/* 阅读页滚动时显示毛玻璃效果 - 使用和首页/分类页相同的样式 */
.header-wrapper header.scrolled {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    height: 66px;
    padding: 0;
    margin-bottom: 0;
    display: flex;
    align-items: center;
}

/* 阅读页滚动时导航菜单和logo颜色 - 使用和首页/分类页相同的样式 */
.header-wrapper header.scrolled .nav-menu a,
.header-wrapper header.scrolled .logo {
    color: #252525;
}

/* 阅读页滚动时菜单按钮颜色 */
.header-wrapper header.scrolled .menu-toggle span {
    background: #252525;
}

/* 阅读页未滚动时的导航菜单和logo颜色 */
.header-wrapper header .logo {
    color: #666666;
}

.header-wrapper header .nav-menu a {
    color: #666666;
}

.logo {
    font-size: 26px;
    font-weight: bold;
    color: #fff;
    text-decoration: none;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
}

.logo img {
    height: 32px;
    width: auto;
    display: block;
}

.logo svg {
    height: 32px;
    width: auto;
    display: block;
}

.nav-menu {
    display: flex;
    list-style: none;
}

.nav-menu li { margin-left: 35px; }

.nav-menu a {
    color: #fff;
    text-decoration: none;
    font-size: 15px;
    opacity: 0.85;
    transition: 0.3s;
}

/* 手机端菜单按钮 */
.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 6px;
    z-index: 1100;
}

.menu-toggle span {
    width: 25px;
    height: 2px;
    background: #fff;
    transition: 0.3s;
}

/* 手机端点击遮罩层 */
.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    opacity: 0;
    visibility: hidden;
    transition: 0.4s;
    z-index: 1050;
}

.menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* 手机端遮罩只覆盖左侧内容，不覆盖右侧菜单 */
@media (max-width: 992px) {
    .menu-overlay {
        right: 280px; /* 遮罩右侧边界，留出菜单宽度 */
        width: auto; /* 宽度自动，从left到right */
    }
}

.menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* --- 幻灯片区域 --- */
.slider-wrapper {
    position: relative;
    min-height: 850px; 
    display: flex;
    align-items: center;
    transition: background 1.5s ease;
    padding-top: 120px; /* 为固定导航栏留出空间 */
}

/* 渐变背景组 */
.bg-0 { background: linear-gradient(180deg, #e7ebf7 0%, #ffffff 100%); }
.bg-1 { background: linear-gradient(180deg, #e0e8d5 0%, #d5e4e8 100%); }
.bg-2 { background: linear-gradient(180deg, #e9d9d3 0%, #d3dee0 100%); }

.slides-container {
    position: relative;
    width: 100%;
    display: grid;
}

.slide {
    grid-area: 1 / 1 / 2 / 2;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.8s ease, transform 0.8s ease;
    transform: translateY(15px);
}

.slide.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* 统一布局布局：左图右文 */
.slide-content, .list-item {
    display: flex;
    align-items: center;
    gap: 80px;
}

.img-box {
    flex: 1.2;
    aspect-ratio: 1 / 1;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 25px 50px rgba(0,0,0,0.15);
}

.img-box a {
    display: block;
    width: 100%;
    height: 100%;
}

.img-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.text-box { flex: 1; }

.text-box h2 { font-size: 42px; margin-bottom: 25px; font-weight: 500; }
.text-box h3 { font-size: 32px; margin-bottom: 20px; font-weight: 500; }

.text-box p {
    font-size: 16px;
    color: #555;
    margin-bottom: 40px;
    max-width: 480px;
}

/* 首页幻灯片文本颜色为白色 */
.slider-wrapper .text-box h2,
.slider-wrapper .text-box h2 a {
    color: #fff;
}

.slider-wrapper .text-box p {
    color: #fff;
}

.btn-group { display: flex; gap: 15px; }
.btn {
    padding: 14px 35px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 15px;
    transition: 0.3s;
    border: none;
    cursor: pointer;
    font-family: inherit;
    display: inline-block;
}
.btn-dark { background: #1a1a1a; color: #fff; }
.btn-white { background: #fff; color: #1a1a1a; box-shadow: 0 4px 10px rgba(0,0,0,0.05); }

.dots {
    position: absolute;
    bottom: 25px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 12px;
}

.dot {
    width: 10px;
    height: 10px;
    background: rgba(255,255,255,0.4);
    border-radius: 50%;
    cursor: pointer;
}

.dot.active { background: #fff; width: 30px; border-radius: 5px; }

/* --- 列表区域 --- */
.list-section { padding: 100px 0; }
.list-item { margin-bottom: 120px; }

/* --- 触底加载 --- */
.load-more-container {
    text-align: center;
    margin-top: 60px;
    padding: 40px 0;
}

.load-more-loader {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.loader-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #333;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.load-more-loader p {
    color: #999;
    font-size: 14px;
    margin: 0;
}

.load-more-end p {
    color: #999;
    font-size: 14px;
    margin: 0;
}

/* --- 页脚 --- */
footer {
    padding: 60px 0;
    text-align: center;
    border-top: 1px solid #eee;
    color: #999;
    font-size: 14px;
}

footer a {
    color: inherit;
    text-decoration: none;
}

/* --- 响应式适配 --- */
@media (max-width: 992px) {
    .container { padding: 0 25px; } /* 手机端统一左右间距 */
    
    .menu-toggle { display: flex; }

    .nav-menu {
        position: fixed;
        top: 0;
        right: -280px; /* 初始隐藏在右侧 */
        width: 280px;
        height: 100vh;
        background: #fff;
        flex-direction: column;
        padding: 100px 40px;
        transition: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 1070;
        box-shadow: -10px 0 30px rgba(0,0,0,0.1);
    }

    .nav-menu.active { right: 0; }
    .nav-menu li { margin: 20px 0; margin-left: 0; }
    .nav-menu a { color: #333; font-size: 18px; }

    /* 汉堡按钮交互效果 */
    .menu-toggle.active span { background: #333; }
    .menu-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 6px); }
    .menu-toggle.active span:nth-child(2) { opacity: 0; }
    .menu-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -7px); }

    .slider-wrapper { min-height: auto; padding-top: 100px; padding-bottom: 60px; }
    
    /* 手机端图片与文字改为上下结构 */
    .slide-content, .list-item { 
        flex-direction: column; 
        gap: 35px; 
        text-align: center; 
    }

    /* 关键：确保列表图片和幻灯片图片在手机端宽度一致 */
    .img-box { 
        width: 100%; 
        max-width: 100%; /* 充满容器，受限于 container 的 padding */
        flex: none; 
    }

    .text-box p { margin: 0 auto 30px; }
    .btn-group { justify-content: center; }
    .text-box h2 { font-size: 32px; }
    .text-box h3 { font-size: 26px; }

        /* 手机端列表区域增加顶部间距 */
        .list-section { padding-top: 60px; }
        
        /* 阅读页手机端导航栏样式 - 和分类页一致 */
        .header-wrapper header .menu-toggle {
            display: flex;
        }
        
        .header-wrapper header .nav-menu {
            position: fixed;
            top: 0;
            right: -280px;
            width: 280px;
            height: 100vh;
            background: #fff;
            flex-direction: column;
            padding: 100px 40px;
            transition: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
            z-index: 1070;
            box-shadow: -10px 0 30px rgba(0,0,0,0.1);
            margin: 0;
        }
        
        .header-wrapper header .nav-menu.active {
            right: 0;
        }
        
        .header-wrapper header .nav-menu li {
            margin: 20px 0;
            margin-left: 0;
        }
        
        .header-wrapper header .nav-menu a {
            color: #333;
            font-size: 18px;
        }
        
        .header-wrapper header .menu-toggle.active span {
            background: #333;
        }
        
        .header-wrapper header .menu-toggle.active span:nth-child(1) {
            transform: rotate(45deg) translate(5px, 6px);
        }
        
        .header-wrapper header .menu-toggle.active span:nth-child(2) {
            opacity: 0;
        }
        
        .header-wrapper header .menu-toggle.active span:nth-child(3) {
            transform: rotate(-45deg) translate(5px, -7px);
        }
    }

/* 分类页标题头 */
.archive-header { text-align: center; padding: 120px 0 80px; margin-top: 80px; }
.archive-header h1 { font-size: 38px; color: #333; margin-bottom: 15px; }
.archive-header p { color: #999; font-size: 16px; }

/* 分类页导航栏字体颜色 */
body:has(.archive-header) header .logo,
body:has(.archive-header) header .nav-menu a {
    color: #666666;
}

body:has(.archive-header) header .menu-toggle span {
    background: #666666;
}

/* 分类页背景 - 和阅读页面一致 */
body:has(.archive-header) {
    background: linear-gradient(180deg, #e7ebf7 0%, #ffffff 100%);
    background-attachment: fixed;
}

/* 独立页面导航栏字体颜色 - 和分类页一致 */
body.page-body header .logo,
body.page-body header .nav-menu a {
    color: #666666;
}

body.page-body header .menu-toggle span {
    background: #666666;
}

/* 独立页面背景 - 和分类页一致 */
body.page-body {
    background: linear-gradient(180deg, #e7ebf7 0%, #ffffff 100%);
    background-attachment: fixed;
}

/* 文章详情页样式 */
.post-content {
    max-width: 900px;
    margin: 0 auto;
    padding: 60px 0;
    line-height: 2;
    font-size: 16px;
    color: #333;
}

/* 独立页面内容宽度和导航栏一致 */
main.container .post-content {
    max-width: 100%;
}

/* 独立页面样式 */
main.container {
    padding-top: 100px; /* 为固定导航栏留出空间 */
}

.post-content h1,
.post-content h2,
.post-content h3,
.post-content h4 {
    margin: 40px 0 20px;
    font-weight: 500;
}

.post-content p {
    margin-bottom: 20px;
}

.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 30px 0;
}

/* 隐藏阅读页正文中已在幻灯片使用的图片 */
body:has(.header-wrapper) .post-content img[style*="display:none"] {
    display: none !important;
}

.post-meta {
    text-align: center;
    color: #999;
    font-size: 14px;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

/* 文章详情页顶部渐变背景区 */
.header-wrapper {
    background: linear-gradient(180deg, #e7ebf7 0%, #ffffff 100%);
    padding-top: 0; /* 导航栏的padding已经包含了顶部间距 */
    padding-bottom: 60px;
    position: relative;
    transition: background 1.5s ease;
}

/* 阅读页滚动时，为固定导航栏留出空间 */
.header-wrapper:has(header.scrolled) {
    padding-top: 66px;
}

/* Hero 区域 */
.hero-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 50px;
}

.hero-left { flex: 1; }
.hero-left h1 { 
    font-size: clamp(28px, 4vw, 42px); 
    color: #333; 
    margin-bottom: 20px; 
    font-weight: 500;
}
.hero-left p { 
    font-size: 16px; 
    color: #8e9297; 
    margin-bottom: 30px; 
    max-width: 480px; 
    line-height: 1.8;
}

.price-tag { 
    font-size: 32px; 
    color: #ff5c5c; 
    font-weight: bold; 
    margin-bottom: 30px; 
}
.price-tag span { 
    font-size: 16px; 
    color: #cbd0d6; 
    text-decoration: line-through; 
    margin-left: 10px; 
}

.btn-black { 
    background: #222; 
    color: #fff; 
}
.btn-white { 
    background: #fff; 
    color: #333; 
    border: 1px solid #eee; 
}

/* 阅读页幻灯片 */
.post-slider {
    display: flex;
    height: 100%;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}
.post-slider img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    flex-shrink: 0;
    display: block;
}
.slider-dots {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 14px;
}
.slider-dots .dot {
    width: 8px;
    height: 8px;
    background: #d1d8e0;
    border-radius: 50%;
    cursor: pointer;
    transition: 0.3s;
}
.slider-dots .dot.active {
    background: #5d6d7e;
    width: 22px;
    border-radius: 10px;
}

/* 幻灯片容器（用于文章详情页） */
.slider-container { 
    width: 100%; 
    max-width: 700px; 
    position: relative; 
}
.slider-box {
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    background: #eee;
}

/* 通用标题居中 */
.section-title-group { 
    text-align: center; 
    margin-bottom: 50px; 
}
.section-title-group h2 { 
    font-size: 32px; 
    margin-bottom: 10px; 
    color: #333; 
}
.section-title-group p { 
    color: #999; 
    font-size: 15px; 
}

/* 主题特点 */
.features-section { 
    padding: 80px 0; 
}

/* 手机端主题特点宽度 - 和顶部幻灯片一致 */
@media (max-width: 992px) {
    .features-section.container {
        padding-left: 25px !important;
        padding-right: 25px !important;
    }
}
.feature-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
}

.feature-item {
    background: #fff;
    border: 1px solid #f2f4f7;
    padding: 40px 20px;
    border-radius: 12px;
    cursor: pointer;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.feature-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.08);
    border-color: #e0e5f5;
}

.feature-item:hover .icon-box {
    background: #5d6d7e;
    transform: scale(1.1);
}

.icon-box {
    width: 50px;
    height: 50px;
    background: #f0f2f5;
    border-radius: 50%;
    margin: 0 auto 20px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon-box img,
.icon-box svg {
    width: 40px;
    height:40px;
    object-fit: contain;
    display: block;
}

/* SVG图标样式优化 */
.icon-box svg {
    fill: currentColor;
    color: #5d6d7e;
}

.feature-item:hover .icon-box svg {
    color: #fff;
}

.feature-item h3 { 
    font-size: 16px; 
    margin-bottom: 8px; 
    color: #444; 
    display: block; 
}
.feature-item span { 
    font-size: 13px; 
    color: #bbb; 
    display: block; 
}

/* 更新记录 */
.updates-section { 
    padding: 60px 0 100px;
}

/* 手机端更新记录宽度 - 和顶部幻灯片一致 */
@media (max-width: 992px) {
    .updates-section.container {
        padding-left: 25px !important;
        padding-right: 25px !important;
    }
}

.updates-container { 
    max-width: 900px; 
    margin: 0 auto; 
}
.accordion-item { 
    margin-bottom: 15px; 
    border-radius: 10px; 
    background: #f9fbff; 
    overflow: hidden; 
}

.accordion-header {
    padding: 22px 30px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 15px;
    color: #666;
    transition: background 0.3s;
}
.accordion-header:hover { 
    background: #f0f4ff; 
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
    background: #fff;
}
.accordion-item.active .accordion-content { 
    max-height: 300px; 
    border-top: 1px solid #edf1f7; 
}
.content-body { 
    padding: 25px 30px; 
    color: #888; 
    font-size: 14px; 
    line-height: 2; 
    text-align: left;
}
.arrow { 
    transition: transform 0.3s; 
    color: #cbd0d6; 
    font-size: 12px; 
}
.accordion-item.active .arrow { 
    transform: rotate(180deg); 
}

/* 响应式适配 */
@media (max-width: 1024px) {
    .hero-flex { 
        flex-direction: column; 
        text-align: center; 
    }
    .hero-left { 
        order: 2; 
        text-align: center;
    }
    .hero-left p {
        margin: 0 auto 30px;
    }
    .slider-container { 
        order: 1; 
        margin-bottom: 20px; 
        width: 100%;
    }
    .btn-group { 
        justify-content: center; 
    }
    
    /* 手机端特点：两列并保持居中 */
    .feature-grid { 
        grid-template-columns: repeat(2, 1fr); 
        gap: 15px; 
    }

    /* 手机端更新记录间距优化 */
    .updates-section { 
        margin-top: 80px; 
        padding-top: 0;
    }
    .updates-container { 
        padding: 0; /* 移除额外padding，使用container的padding */
    }
}

@media (max-width: 480px) {
    .hero-left h1 { 
        font-size: 26px; 
    }
    .updates-section { 
        margin-top: 60px; 
    }
}

/* --- 弹出层样式 --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease-in-out;
    padding: 20px;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-container {
    background: #fff;
    width: 100%;
    max-width: 850px;
    max-height: 90vh;
    border-radius: 24px;
    position: relative;
    box-shadow: 0 20px 50px rgba(0,0,0,0.1);
    overflow-y: auto;
    transform: scale(0.9);
    transition: transform 0.3s ease;
    padding: 40px;
}

.modal-overlay.active .modal-container {
    transform: scale(1);
}

.modal-close-x {
    position: absolute;
    top: 20px;
    right: 25px;
    font-size: 28px;
    color: #ccc;
    cursor: pointer;
    line-height: 1;
    transition: color 0.3s;
}

.modal-close-x:hover {
    color: #999;
}

.modal-info-section {
    display: flex;
    gap: 30px;
    align-items: flex-start;
    flex-wrap: wrap;
}

.modal-img-box {
    flex: 0 0 280px;
    width: 280px;
    aspect-ratio: 1 / 1;
    border-radius: 15px;
    overflow: hidden;
    background: #f5f5f5;
}

.modal-img-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.modal-text-box {
    flex: 1;
    min-width: 280px;
}

.modal-text-box h2 {
    margin: 0 0 15px 0;
    font-size: 32px;
    color: #333;
    font-weight: 500;
}

.modal-text-box p {
    font-size: 15px;
    line-height: 1.8;
    color: #666;
    margin: 0;
}

.modal-line {
    height: 1px;
    background: #eee;
    margin: 30px 0;
}

.modal-price-row {
    margin-bottom: 30px;
}

.modal-price-new {
    font-size: 42px;
    color: #ff5c5c;
    font-weight: bold;
    margin-right: 10px;
}

.modal-price-old {
    font-size: 18px;
    color: #bbb;
    text-decoration: line-through;
}

.modal-qr-section {
    background: #fbfbfb;
    border: 1px solid #f0f0f0;
    border-radius: 20px;
    padding: 30px;
    text-align: center;
}

.modal-qr-section h4 {
    margin: 0 0 20px 0;
    font-weight: normal;
    color: #444;
}

.modal-qr-img {
    width: 200px;
    height: 200px;
    margin: 0 auto;
    background: #eee;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
}

.modal-qr-img img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

@media (max-width: 600px) {
    .modal-container {
        padding: 25px;
    }
    .modal-img-box {
        flex: 1 1 100%;
        width: 100%;
    }
    .modal-text-box h2 {
        font-size: 24px;
    }
    .modal-price-new {
        font-size: 32px;
    }
}

