/* 全局重置与基础 */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', 'PingFang SC', Roboto, 'Helvetica Neue', sans-serif;
    background: #f5f7fa;
    color: #1a1a2e;
    line-height: 1.6;
    transition: background 0.3s ease, color 0.3s ease;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body.dark {
    background: #121212;
    color: #e0e0e0;
}

a {
    color: #2563eb;
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    text-decoration: underline;
    color: #1d4ed8;
}

body.dark a {
    color: #90caf9;
}

body.dark a:hover {
    color: #64b5f6;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

ul {
    list-style: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 头部导航 */
header {
    background: linear-gradient(135deg, #1e3a5f, #2d6a9f);
    color: #fff;
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.logo {
    font-size: 28px;
    font-weight: 800;
    letter-spacing: 1px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.logo span {
    color: #fbbf24;
}

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

.nav-menu li a {
    color: #fff;
    font-weight: 500;
    padding: 8px 0;
    border-bottom: 2px solid transparent;
    transition: border-color 0.3s ease, color 0.3s ease;
    font-size: 15px;
}

.nav-menu li a:hover {
    border-bottom-color: #fbbf24;
    color: #fbbf24;
    text-decoration: none;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
    padding: 5px;
}

.nav-toggle span {
    width: 28px;
    height: 3px;
    background: #fff;
    border-radius: 2px;
    transition: transform 0.3s, opacity 0.3s;
}

.search-box {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 30px;
    padding: 5px 15px;
    backdrop-filter: blur(4px);
    transition: background 0.3s;
}

.search-box:focus-within {
    background: rgba(255, 255, 255, 0.25);
}

.search-box input {
    background: transparent;
    border: none;
    color: #fff;
    outline: none;
    padding: 6px 0;
    width: 140px;
    font-size: 14px;
}

.search-box input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.search-box button {
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    font-size: 16px;
    padding: 4px 8px;
    transition: transform 0.2s;
}

.search-box button:hover {
    transform: scale(1.1);
}

.theme-toggle {
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: #fff;
    padding: 8px 14px;
    border-radius: 30px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s, transform 0.2s;
    backdrop-filter: blur(4px);
}

.theme-toggle:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: scale(1.05);
}

@media (max-width: 768px) {
    .header-inner {
        justify-content: space-between;
    }
    .nav-menu {
        display: none;
        flex-direction: column;
        background: #1e3a5f;
        position: absolute;
        top: 70px;
        left: 0;
        width: 100%;
        padding: 20px;
        gap: 15px;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
        border-radius: 0 0 20px 20px;
    }
    .nav-menu.active {
        display: flex;
    }
    .nav-toggle {
        display: flex;
    }
    .search-box input {
        width: 100px;
    }
    .search-box {
        order: 3;
    }
    .theme-toggle {
        order: 4;
    }
}

/* 面包屑导航 */
.breadcrumb {
    background: #e9edf2;
    padding: 12px 0;
    font-size: 14px;
    border-bottom: 1px solid #d1d5db;
}

.breadcrumb a {
    color: #2563eb;
    font-weight: 500;
}

.breadcrumb span {
    color: #555;
}

body.dark .breadcrumb {
    background: #1e1e2a;
    border-bottom-color: #2a2a3a;
}

body.dark .breadcrumb a {
    color: #90caf9;
}

body.dark .breadcrumb span {
    color: #aaa;
}

/* 英雄区 Hero */
.hero {
    background: linear-gradient(135deg, #1e3a5f 0%, #4a90d9 100%);
    color: #fff;
    padding: 80px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero h1 {
    font-size: 48px;
    margin-bottom: 20px;
    animation: fadeInUp 1s ease;
    text-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    font-weight: 800;
    letter-spacing: -0.5px;
}

.hero p {
    font-size: 20px;
    max-width: 700px;
    margin: 0 auto 30px;
    opacity: 0.9;
    line-height: 1.8;
}

.hero .btn {
    background: #fbbf24;
    color: #1e3a5f;
    padding: 14px 40px;
    border-radius: 50px;
    font-weight: 700;
    display: inline-block;
    transition: all 0.3s ease;
    box-shadow: 0 8px 20px rgba(251, 191, 36, 0.3);
    font-size: 16px;
    letter-spacing: 0.5px;
}

.hero .btn:hover {
    background: #f59e0b;
    transform: scale(1.05);
    box-shadow: 0 12px 28px rgba(251, 191, 36, 0.4);
    text-decoration: none;
}

.hero svg {
    position: absolute;
    bottom: -20px;
    left: 0;
    width: 100%;
    height: 80px;
    fill: #f5f7fa;
}

body.dark .hero svg {
    fill: #121212;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 600px) {
    .hero {
        padding: 60px 0 80px;
        min-height: 300px;
    }
    .hero h1 {
        font-size: 30px;
    }
    .hero p {
        font-size: 16px;
        padding: 0 10px;
    }
    .hero .btn {
        padding: 12px 30px;
        font-size: 14px;
    }
}

/* 通用区块 */
section {
    padding: 60px 0;
}

.section-title {
    text-align: center;
    font-size: 32px;
    margin-bottom: 40px;
    position: relative;
    font-weight: 700;
    letter-spacing: -0.3px;
}

.section-title:after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, #2563eb, #4a90d9);
    margin: 10px auto;
    border-radius: 2px;
}

body.dark .section-title:after {
    background: linear-gradient(90deg, #90caf9, #64b5f6);
}

/* 卡片网格 */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.card {
    background: #fff;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    display: flex;
    flex-direction: column;
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

body.dark .card {
    background: #1e1e2a;
    border-color: #2a2a3a;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

body.dark .card:hover {
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

.card img {
    width: 100%;
    border-radius: 12px;
    margin-bottom: 15px;
    object-fit: cover;
    background: #ddd;
    min-height: 180px;
    transition: transform 0.3s ease;
}

.card:hover img {
    transform: scale(1.02);
}

.card h3 {
    font-size: 20px;
    margin-bottom: 10px;
    font-weight: 600;
    color: inherit;
}

.card p {
    color: #555;
    line-height: 1.7;
    flex-grow: 1;
}

body.dark .card p {
    color: #bbb;
}

/* 毛玻璃效果 */
.glass {
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
}

body.dark .glass {
    background: rgba(30, 30, 42, 0.7);
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

/* 页脚 */
footer {
    background: #1a1a2e;
    color: #ccc;
    padding: 40px 0 20px;
    border-top: 1px solid #2a2a3a;
}

footer a {
    color: #90caf9;
    transition: color 0.2s;
}

footer a:hover {
    color: #64b5f6;
    text-decoration: underline;
}

footer .footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

footer h4 {
    color: #fff;
    margin-bottom: 15px;
    font-size: 18px;
    font-weight: 600;
    position: relative;
    padding-bottom: 8px;
}

footer h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background: #fbbf24;
}

footer ul {
    list-style: none;
}

footer ul li {
    margin-bottom: 8px;
}

footer .copyright {
    text-align: center;
    border-top: 1px solid #333;
    padding-top: 20px;
    font-size: 14px;
    color: #888;
}

.qrcode {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin: 20px 0;
    flex-wrap: wrap;
}

.qrcode svg {
    width: 100px;
    height: 100px;
    border-radius: 8px;
    background: #fff;
    padding: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s;
}

.qrcode svg:hover {
    transform: scale(1.05);
}

/* 返回顶部 */
#backTop {
    position: fixed;
    bottom: 40px;
    right: 40px;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: #fff;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 24px;
    border: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    z-index: 999;
    transition: all 0.3s ease;
}

#backTop:hover {
    background: linear-gradient(135deg, #1d4ed8, #1e3a5f);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

body.dark #backTop {
    background: linear-gradient(135deg, #90caf9, #64b5f6);
    color: #121212;
}

body.dark #backTop:hover {
    background: linear-gradient(135deg, #64b5f6, #42a5f5);
}

/* FAQ 折叠 */
.faq-item {
    border-bottom: 1px solid #ddd;
    padding: 18px 0;
    cursor: pointer;
    transition: background 0.2s;
}

.faq-item:hover {
    background: rgba(37, 99, 235, 0.02);
}

body.dark .faq-item {
    border-color: #333;
}

body.dark .faq-item:hover {
    background: rgba(144, 202, 249, 0.05);
}

.faq-question {
    font-weight: 600;
    font-size: 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    user-select: none;
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.3s ease;
    color: #555;
    padding-top: 0;
    line-height: 1.7;
}

body.dark .faq-answer {
    color: #aaa;
}

.faq-item.active .faq-answer {
    max-height: 300px;
    padding-top: 10px;
}

.faq-item .icon {
    transition: transform 0.3s ease;
    font-size: 14px;
}

.faq-item.active .icon {
    transform: rotate(180deg);
}

/* HowTo 步骤 */
.howto-step {
    display: flex;
    gap: 20px;
    margin-bottom: 25px;
    align-items: flex-start;
    padding: 15px;
    border-radius: 12px;
    transition: background 0.3s;
}

.howto-step:hover {
    background: rgba(37, 99, 235, 0.04);
}

body.dark .howto-step:hover {
    background: rgba(144, 202, 249, 0.05);
}

.step-num {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: #fff;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    flex-shrink: 0;
    font-size: 16px;
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.3);
}

body.dark .step-num {
    background: linear-gradient(135deg, #90caf9, #64b5f6);
    color: #121212;
    box-shadow: 0 4px 10px rgba(144, 202, 249, 0.3);
}

/* 滚动动画 */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* 计数器 */
.counter-grid {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 20px;
    text-align: center;
    padding: 20px 0;
}

.counter-item {
    padding: 20px;
    min-width: 150px;
}

.counter-item h3 {
    font-size: 40px;
    background: linear-gradient(135deg, #2563eb, #4a90d9);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 5px;
    font-weight: 800;
}

body.dark .counter-item h3 {
    background: linear-gradient(135deg, #90caf9, #64b5f6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.counter-item p {
    font-size: 16px;
    color: #666;
    font-weight: 500;
}

body.dark .counter-item p {
    color: #aaa;
}

/* 轮播 */
.carousel {
    overflow: hidden;
    position: relative;
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

body.dark .carousel {
    background: #1e1e2a;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.carousel-track {
    display: flex;
    transition: transform 0.5s ease;
}

.carousel-slide {
    min-width: 100%;
    padding: 0 10px;
}

.carousel-slide .card {
    border: none;
    box-shadow: none;
    background: transparent;
    margin: 10px;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.4);
    color: #fff;
    border: none;
    padding: 12px 16px;
    cursor: pointer;
    border-radius: 50%;
    z-index: 2;
    font-size: 20px;
    transition: all 0.3s ease;
    backdrop-filter: blur(4px);
}

.carousel-btn:hover {
    background: rgba(0, 0, 0, 0.6);
    transform: translateY(-50%) scale(1.1);
}

.carousel-btn.prev {
    left: 10px;
}

.carousel-btn.next {
    right: 10px;
}

body.dark .carousel-btn {
    background: rgba(255, 255, 255, 0.2);
}

body.dark .carousel-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* 图片懒加载 */
.lazy {
    opacity: 0;
    transition: opacity 0.4s ease;
}

.lazy.loaded {
    opacity: 1;
}

/* 响应式适配 */
@media (max-width: 600px) {
    .section-title {
        font-size: 26px;
    }
    section {
        padding: 40px 0;
    }
    .card-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .card {
        padding: 20px;
    }
    .counter-item h3 {
        font-size: 32px;
    }
    .howto-step {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    .step-num {
        margin-bottom: 10px;
    }
    footer .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
    footer h4::after {
        left: 50%;
        transform: translateX(-50%);
    }
    .qrcode {
        justify-content: center;
    }
    #backTop {
        bottom: 20px;
        right: 20px;
        width: 44px;
        height: 44px;
        font-size: 20px;
    }
}

@media (max-width: 400px) {
    .hero h1 {
        font-size: 24px;
    }
    .hero p {
        font-size: 14px;
    }
    .logo {
        font-size: 22px;
    }
}

/* 品牌故事区域增强 */
#brand .glass {
    padding: 40px;
    line-height: 1.9;
}

#brand .glass p {
    margin-bottom: 16px;
}

#brand .glass p:last-child {
    margin-bottom: 0;
}

/* 联系区域 */
#contact .glass {
    padding: 40px;
    text-align: center;
}

#contact .glass p {
    margin-bottom: 12px;
    font-size: 16px;
}

#contact .glass p:last-child {
    margin-bottom: 0;
}

/* 侧边栏 aside */
aside {
    padding: 20px 0 40px;
}

/* 暗色模式下的表单与输入适配 */
body.dark input,
body.dark textarea {
    background: #2a2a3a;
    color: #e0e0e0;
    border-color: #3a3a4a;
}

/* 平滑过渡 */
* {
    transition-property: background-color, border-color, color, box-shadow;
    transition-duration: 0.2s;
    transition-timing-function: ease;
}