/* ========== 全局重置 & 基础 ========== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}
html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'PingFang SC', 'Microsoft YaHei', sans-serif;
    background: linear-gradient(135deg, #f4f7fc 0%, #e8eef6 100%);
    color: #1a2a44;
    line-height: 1.6;
    transition: background 0.4s ease, color 0.4s ease;
    min-height: 100vh;
}
body.dark-mode {
    background: linear-gradient(135deg, #0f1a2e 0%, #1a2a44 100%);
    color: #d0d8e8;
}
a {
    color: #f0c040;
    text-decoration: none;
    transition: color 0.3s ease;
}
a:hover, a:focus {
    color: #ffd866;
    text-decoration: underline;
}
img {
    max-width: 100%;
    height: auto;
    display: block;
}
ul, ol {
    padding-left: 1.5rem;
}
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    border: 0;
}

/* ========== 暗色模式过渡 ========== */
body.dark-mode h1, body.dark-mode h2, body.dark-mode h3,
body.dark-mode h4, body.dark-mode h5, body.dark-mode h6 {
    color: #f0c040;
}
body.dark-mode a {
    color: #f0c040;
}
body.dark-mode a:hover {
    color: #ffd866;
}

/* ========== Header & 导航 ========== */
header {
    background: rgba(11, 26, 46, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: #fff;
    padding: 0.5rem 1rem;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 20px rgba(0,0,0,0.15);
    transition: background 0.4s ease;
}
body.dark-mode header {
    background: rgba(10, 15, 26, 0.95);
}
nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    max-width: 1200px;
    margin: 0 auto;
    gap: 0.5rem;
}
nav ul {
    list-style: none;
    display: flex;
    gap: 1.2rem;
    padding: 0;
    margin: 0;
}
nav ul li a {
    color: #f0c040;
    font-weight: 500;
    padding: 0.3rem 0;
    position: relative;
    transition: color 0.3s ease;
}
nav ul li a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: #f0c040;
    transition: width 0.3s ease;
}
nav ul li a:hover::after,
nav ul li a.active::after {
    width: 100%;
}
nav ul li a.active {
    color: #ffd866;
}
nav button {
    background: transparent;
    border: none;
    color: #f0c040;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.3rem 0.6rem;
    border-radius: 8px;
    transition: background 0.3s ease, transform 0.2s ease;
}
nav button:hover {
    background: rgba(240, 192, 64, 0.15);
    transform: scale(1.05);
}

/* ========== 搜索模拟 ========== */
#searchSimulation {
    background: rgba(11, 26, 46, 0.95);
    backdrop-filter: blur(8px);
    padding: 0.75rem 1rem;
    border-top: 1px solid rgba(240, 192, 64, 0.2);
    transition: all 0.3s ease;
}
#searchSimulation form {
    display: flex;
    gap: 0.5rem;
    max-width: 600px;
    margin: 0 auto;
}
#searchSimulation input {
    flex: 1;
    padding: 0.6rem 1rem;
    border-radius: 8px;
    border: 1px solid rgba(240, 192, 64, 0.3);
    background: rgba(255,255,255,0.08);
    color: #fff;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s ease, background 0.3s ease;
}
#searchSimulation input:focus {
    border-color: #f0c040;
    background: rgba(255,255,255,0.15);
}
#searchSimulation input::placeholder {
    color: rgba(255,255,255,0.5);
}
#searchSimulation button {
    background: #f0c040;
    color: #0b1a2e;
    border: none;
    padding: 0.5rem 1.2rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.2s ease;
}
#searchSimulation button:hover {
    background: #ffd866;
    transform: translateY(-1px);
}

/* ========== Hero 区域 ========== */
#hero {
    padding: 3rem 1rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
    position: relative;
}
#hero h1 {
    font-size: clamp(1.8rem, 5vw, 3.2rem);
    color: #0b1a2e;
    margin-bottom: 0.8rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.05);
    transition: color 0.4s ease;
}
body.dark-mode #hero h1 {
    color: #f0c040;
}
#hero p {
    font-size: clamp(1rem, 2vw, 1.2rem);
    max-width: 700px;
    margin: 0 auto 1.5rem;
    opacity: 0.85;
}
#hero .btn-primary,
#hero .btn-secondary {
    display: inline-block;
    padding: 0.8rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    margin: 0.4rem;
    transition: all 0.3s ease;
    cursor: pointer;
}
.btn-primary {
    background: linear-gradient(135deg, #f0c040, #e6b02a);
    color: #0b1a2e;
    box-shadow: 0 4px 15px rgba(240, 192, 64, 0.3);
}
.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 25px rgba(240, 192, 64, 0.45);
    background: linear-gradient(135deg, #ffd866, #f0c040);
}
.btn-secondary {
    background: transparent;
    border: 2px solid #f0c040;
    color: #f0c040;
}
.btn-secondary:hover {
    background: rgba(240, 192, 64, 0.12);
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(240, 192, 64, 0.2);
}

/* ========== Banner 轮播 ========== */
#bannerSlider {
    margin-top: 2rem;
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
}
#bannerSlider figure {
    margin: 0;
    animation: fadeInUp 0.6s ease;
}
#bannerSlider img {
    width: 100%;
    height: auto;
    max-height: 420px;
    object-fit: cover;
    border-radius: 16px;
}
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ========== 通用 Section 样式 ========== */
section {
    padding: 2.5rem 1rem;
    max-width: 1200px;
    margin: 0 auto;
}
section h2 {
    font-size: clamp(1.5rem, 4vw, 2.2rem);
    color: #0b1a2e;
    margin-bottom: 1.5rem;
    position: relative;
    display: inline-block;
    transition: color 0.4s ease;
}
section h2::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, #f0c040, #e6b02a);
    border-radius: 2px;
    margin-top: 0.5rem;
}
body.dark-mode section h2 {
    color: #f0c040;
}

/* ========== 卡片网格 ========== */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
}
.card-grid article {
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 1.8rem;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    border: 1px solid rgba(255,255,255,0.3);
    position: relative;
    overflow: hidden;
}
.card-grid article::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(240,192,64,0.05) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
}
.card-grid article:hover::before {
    opacity: 1;
}
.card-grid article:hover {
    transform: translateY(-6px) scale(1.01);
    box-shadow: 0 12px 40px rgba(0,0,0,0.1);
    border-color: rgba(240, 192, 64, 0.3);
}
body.dark-mode .card-grid article {
    background: rgba(30, 42, 58, 0.8);
    backdrop-filter: blur(12px);
    border-color: rgba(255,255,255,0.08);
}
body.dark-mode .card-grid article:hover {
    background: rgba(40, 55, 75, 0.85);
    border-color: rgba(240, 192, 64, 0.25);
}
.card-grid h3 {
    font-size: 1.3rem;
    margin-bottom: 0.6rem;
    color: #0b1a2e;
    transition: color 0.3s ease;
}
body.dark-mode .card-grid h3 {
    color: #f0c040;
}
.card-grid p {
    margin-bottom: 1rem;
    opacity: 0.85;
    font-size: 0.95rem;
}
.card-grid a {
    display: inline-block;
    padding: 0.4rem 1.2rem;
    background: linear-gradient(135deg, #f0c040, #e6b02a);
    color: #0b1a2e;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    text-decoration: none;
}
.card-grid a:hover {
    background: linear-gradient(135deg, #ffd866, #f0c040);
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(240,192,64,0.3);
}

/* ========== About 区域 ========== */
#about p {
    max-width: 800px;
    margin-bottom: 1rem;
    font-size: 1.05rem;
    line-height: 1.8;
}

/* ========== Features 列表 ========== */
#features ul {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    list-style: none;
    padding: 0;
}
#features ul li {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(8px);
    padding: 1rem 1.2rem;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.04);
    border-left: 4px solid #f0c040;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}
#features ul li:hover {
    transform: translateX(4px);
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}
body.dark-mode #features ul li {
    background: rgba(30, 42, 58, 0.7);
    border-left-color: #f0c040;
}
body.dark-mode #features ul li:hover {
    background: rgba(40, 55, 75, 0.8);
}
#features ul li strong {
    color: #0b1a2e;
}
body.dark-mode #features ul li strong {
    color: #f0c040;
}

/* ========== HowTo 步骤列表 ========== */
#howto-section ol {
    max-width: 700px;
    margin: 1.5rem auto;
    padding-left: 2rem;
    counter-reset: step;
}
#howto-section ol li {
    counter-increment: step;
    margin-bottom: 0.8rem;
    padding: 0.6rem 1rem 0.6rem 2.5rem;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(6px);
    border-radius: 10px;
    position: relative;
    transition: all 0.3s ease;
    list-style: none;
}
#howto-section ol li::before {
    content: counter(step);
    position: absolute;
    left: 0.6rem;
    top: 50%;
    transform: translateY(-50%);
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, #f0c040, #e6b02a);
    color: #0b1a2e;
    font-weight: 700;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
}
#howto-section ol li:hover {
    transform: translateX(6px);
    background: rgba(255, 255, 255, 0.85);
}
body.dark-mode #howto-section ol li {
    background: rgba(30, 42, 58, 0.6);
}
body.dark-mode #howto-section ol li:hover {
    background: rgba(40, 55, 75, 0.75);
}

/* ========== FAQ 区域 ========== */
.faq-list details {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(8px);
    margin-bottom: 0.6rem;
    padding: 0.8rem 1.2rem;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.2);
    transition: all 0.3s ease;
    cursor: pointer;
}
.faq-list details:hover {
    background: rgba(255, 255, 255, 0.85);
    box-shadow: 0 2px 12px rgba(0,0,0,0.05);
}
body.dark-mode .faq-list details {
    background: rgba(30, 42, 58, 0.7);
    border-color: rgba(255,255,255,0.05);
}
body.dark-mode .faq-list details:hover {
    background: rgba(40, 55, 75, 0.8);
}
.faq-list details summary {
    font-weight: 600;
    font-size: 1.05rem;
    color: #0b1a2e;
    padding: 0.2rem 0;
    position: relative;
    list-style: none;
    transition: color 0.3s ease;
}
.faq-list details summary::-webkit-details-marker {
    display: none;
}
.faq-list details summary::after {
    content: '+';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.4rem;
    color: #f0c040;
    transition: transform 0.3s ease;
}
.faq-list details[open] summary::after {
    content: '−';
    transform: translateY(-50%) rotate(180deg);
}
body.dark-mode .faq-list details summary {
    color: #f0c040;
}
.faq-list details p {
    margin-top: 0.8rem;
    padding-top: 0.8rem;
    border-top: 1px solid rgba(240, 192, 64, 0.15);
    font-size: 0.95rem;
    line-height: 1.7;
}

/* ========== Contact 区域 ========== */
#contact dl {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem 2rem;
    max-width: 600px;
    margin: 1.5rem auto;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    border: 1px solid rgba(255,255,255,0.2);
}
body.dark-mode #contact dl {
    background: rgba(30, 42, 58, 0.6);
    border-color: rgba(255,255,255,0.05);
}
#contact dt {
    font-weight: 700;
    color: #f0c040;
    min-width: 100px;
}
#contact dd {
    margin: 0;
    color: inherit;
}

/* ========== Footer ========== */
footer {
    background: rgba(11, 26, 46, 0.95);
    backdrop-filter: blur(12px);
    color: #ccc;
    padding: 2rem 1rem;
    text-align: center;
    margin-top: 2rem;
}
body.dark-mode footer {
    background: rgba(10, 15, 26, 0.95);
}
footer nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1.2rem;
    padding: 0;
    margin-bottom: 1rem;
}
footer nav ul li a {
    color: #f0c040;
    font-weight: 500;
    transition: color 0.3s ease;
}
footer nav ul li a:hover {
    color: #ffd866;
}
footer p {
    margin: 0.4rem 0;
    font-size: 0.9rem;
}
footer a {
    color: #f0c040;
}

/* ========== Back to Top 按钮 ========== */
#backToTop {
    position: fixed;
    bottom: 2.5rem;
    right: 2.5rem;
    background: linear-gradient(135deg, #f0c040, #e6b02a);
    color: #0b1a2e;
    border: none;
    border-radius: 50%;
    width: 52px;
    height: 52px;
    font-size: 1.6rem;
    cursor: pointer;
    display: none;
    z-index: 999;
    box-shadow: 0 4px 20px rgba(240, 192, 64, 0.35);
    transition: all 0.3s ease;
    line-height: 1;
}
#backToTop:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 30px rgba(240, 192, 64, 0.5);
    background: linear-gradient(135deg, #ffd866, #f0c040);
}

/* ========== 滚动动画 (Intersection Observer 配合) ========== */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ========== 响应式设计 ========== */
@media (max-width: 768px) {
    nav {
        flex-direction: column;
        align-items: stretch;
    }
    nav ul {
        flex-direction: column;
        gap: 0.4rem;
        margin-top: 0.5rem;
    }
    nav ul li a {
        display: block;
        padding: 0.4rem 0;
    }
    nav button {
        align-self: flex-end;
    }
    #hero h1 {
        font-size: 1.8rem;
    }
    .card-grid {
        grid-template-columns: 1fr;
    }
    #features ul {
        grid-template-columns: 1fr;
    }
    #contact dl {
        flex-direction: column;
        gap: 0.8rem;
    }
    #backToTop {
        bottom: 1.5rem;
        right: 1.5rem;
        width: 44px;
        height: 44px;
        font-size: 1.3rem;
    }
    section {
        padding: 1.5rem 0.8rem;
    }
    #bannerSlider img {
        max-height: 250px;
    }
}

@media (max-width: 480px) {
    #hero h1 {
        font-size: 1.5rem;
    }
    #hero p {
        font-size: 0.9rem;
    }
    .btn-primary, .btn-secondary {
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
    }
    .card-grid article {
        padding: 1.2rem;
    }
    footer nav ul {
        gap: 0.8rem;
    }
}

/* ========== 暗色模式下的微调 ========== */
body.dark-mode #hero {
    color: #d0d8e8;
}
body.dark-mode .faq-list details p {
    border-top-color: rgba(240, 192, 64, 0.1);
}
body.dark-mode #searchSimulation input {
    background: rgba(255,255,255,0.05);
    color: #fff;
}
body.dark-mode #searchSimulation input:focus {
    background: rgba(255,255,255,0.1);
}

/* ========== 打印优化 ========== */
@media print {
    header, footer, #backToTop, #searchSimulation, #bannerSlider {
        display: none !important;
    }
    body {
        background: #fff;
        color: #000;
    }
    section {
        page-break-inside: avoid;
    }
}