/* 全局基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: #f8f9fc;
    color: #1a1a2e;
    line-height: 1.7;
    transition: background 0.3s, color 0.3s;
}

body.dark {
    background: #0d1117;
    color: #e6edf3;
}

a {
    color: #1a2a6c;
    text-decoration: none;
    transition: color 0.3s;
}

body.dark a {
    color: #8b9dc3;
}

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

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

body.dark header {
    background: linear-gradient(135deg, #0d1117, #1a2a6c);
}

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

.logo {
    font-size: 1.8rem;
    font-weight: 900;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo svg {
    width: 40px;
    height: 40px;
}

.nav {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.nav a {
    color: #fff;
    font-weight: 500;
    transition: opacity 0.3s;
}

.nav a:hover {
    opacity: 0.8;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: #fff;
    font-size: 1.8rem;
    cursor: pointer;
}

@media (max-width: 768px) {
    .nav {
        display: none;
        flex-direction: column;
        background: #1a2a6c;
        position: absolute;
        top: 70px;
        left: 0;
        right: 0;
        padding: 1rem;
        gap: 1rem;
    }
    .nav.open {
        display: flex;
    }
    .menu-toggle {
        display: block;
    }
}

/* 英雄区渐变Banner */
.hero {
    background: linear-gradient(135deg, #1a2a6c, #2d4373, #4b6cb7);
    color: #fff;
    padding: 6rem 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    font-weight: 800;
}

.hero p {
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto 2rem;
    opacity: 0.9;
}

.hero .btn {
    background: #ff6b35;
    color: #fff;
    padding: 1rem 2.5rem;
    border-radius: 50px;
    font-weight: 700;
    display: inline-block;
    transition: transform 0.3s, box-shadow 0.3s;
    box-shadow: 0 8px 25px rgba(255, 107, 53, 0.4);
}

.hero .btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(255, 107, 53, 0.5);
}

.banner-slider {
    position: relative;
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.banner-slide {
    position: absolute;
    opacity: 0;
    transition: opacity 0.8s ease;
    width: 100%;
}

.banner-slide.active {
    opacity: 1;
}

.banner-dots {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 2rem;
}

.banner-dots span {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    transition: background 0.3s;
}

.banner-dots span.active {
    background: #ff6b35;
}

/* 通用区块 */
section {
    padding: 5rem 0;
}

.section-title {
    text-align: center;
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 1rem;
    color: #1a2a6c;
}

body.dark .section-title {
    color: #8b9dc3;
}

.section-sub {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 3rem;
    color: #555;
}

body.dark .section-sub {
    color: #aaa;
}

/* 网格布局 - 响应式 */
.grid {
    display: grid;
    gap: 2rem;
}

.grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 768px) {
    .grid-2, .grid-3, .grid-4 {
        grid-template-columns: 1fr;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }
    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* 圆角毛玻璃卡片 */
.card {
    background: #fff;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.06);
    transition: transform 0.3s, box-shadow 0.3s;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

body.dark .card {
    background: #161b22;
    border-color: #30363d;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

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

.card-icon {
    margin-bottom: 1rem;
}

.card h3 {
    font-size: 1.4rem;
    margin-bottom: 0.8rem;
    color: #1a2a6c;
}

body.dark .card h3 {
    color: #8b9dc3;
}

.card p {
    color: #555;
    font-size: 0.95rem;
}

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

/* 统计数据 */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    text-align: center;
}

@media (max-width: 768px) {
    .stat-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.stat-item .number {
    font-size: 3rem;
    font-weight: 900;
    color: #ff6b35;
    display: block;
}

.stat-item .label {
    color: #666;
    font-size: 1rem;
}

body.dark .stat-item .label {
    color: #aaa;
}

/* FAQ 折叠 */
.faq-item {
    border-bottom: 1px solid #e0e0e0;
    padding: 1rem 0;
}

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

.faq-question {
    font-weight: 700;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.1rem;
    color: #1a2a6c;
    padding: 0.5rem 0;
}

body.dark .faq-question {
    color: #8b9dc3;
}

.faq-question::after {
    content: '+';
    font-size: 1.5rem;
    transition: transform 0.3s;
}

.faq-item.open .faq-question::after {
    content: '−';
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
    color: #555;
}

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

.faq-item.open .faq-answer {
    max-height: 500px;
    padding: 0.5rem 0;
}

/* 教程步骤 */
.howto-steps {
    list-style: none;
    counter-reset: step;
}

.howto-steps li {
    counter-increment: step;
    background: #fff;
    padding: 1.5rem 2rem;
    margin-bottom: 1rem;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

body.dark .howto-steps li {
    background: #161b22;
}

.howto-steps li::before {
    content: counter(step);
    background: #ff6b35;
    color: #fff;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    flex-shrink: 0;
}

/* 文章卡片 */
.article-card {
    background: #fff;
    border-radius: 20px;
    padding: 1.5rem;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s;
}

body.dark .article-card {
    background: #161b22;
}

.article-card:hover {
    transform: translateY(-5px);
}

.article-card .date {
    color: #999;
    font-size: 0.85rem;
}

.article-card h3 {
    font-size: 1.2rem;
    margin: 0.5rem 0;
    color: #1a2a6c;
}

body.dark .article-card h3 {
    color: #8b9dc3;
}

.article-card p {
    color: #555;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

body.dark .article-card p {
    color: #b0b8c4;
}

.article-card .btn {
    background: transparent;
    border: 2px solid #1a2a6c;
    color: #1a2a6c;
    padding: 0.5rem 1.5rem;
    border-radius: 30px;
    font-weight: 600;
    transition: all 0.3s;
    display: inline-block;
}

body.dark .article-card .btn {
    border-color: #8b9dc3;
    color: #8b9dc3;
}

.article-card .btn:hover {
    background: #1a2a6c;
    color: #fff;
}

/* 客户评价 */
.testimonial-card {
    background: #fff;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
    text-align: center;
}

body.dark .testimonial-card {
    background: #161b22;
}

.testimonial-card .avatar {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    margin: 0 auto 1rem;
    display: block;
}

.testimonial-card .name {
    font-weight: 700;
    color: #1a2a6c;
}

body.dark .testimonial-card .name {
    color: #8b9dc3;
}

.testimonial-card .role {
    color: #999;
    font-size: 0.85rem;
}

/* 页脚 */
footer {
    background: #1a2a6c;
    color: #fff;
    padding: 3rem 0 1rem;
}

body.dark footer {
    background: #0d1117;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    margin-bottom: 2rem;
}

@media (max-width: 768px) {
    .footer-grid {
        grid-template-columns: 1fr;
    }
}

.footer-grid h4 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: #ff6b35;
}

.footer-grid a {
    color: #ccc;
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.footer-grid a:hover {
    color: #fff;
}

.footer-bottom {
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 2rem;
    font-size: 0.85rem;
    color: #aaa;
}

.footer-bottom a {
    color: #aaa;
    margin: 0 8px;
}

/* 返回顶部按钮 */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: #ff6b35;
    color: #fff;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
    z-index: 999;
    box-shadow: 0 5px 20px rgba(255, 107, 53, 0.4);
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

/* 暗色模式切换按钮 */
.dark-toggle {
    position: fixed;
    bottom: 90px;
    right: 30px;
    background: #1a2a6c;
    color: #fff;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 999;
    border: none;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}

body.dark .dark-toggle {
    background: #ff6b35;
}

/* 滚动动画 */
.scroll-animate {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.scroll-animate.visible {
    opacity: 1;
    transform: translateY(0);
}

/* 搜索模态框 */
.search-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.search-modal.open {
    display: flex;
}

.search-modal input {
    width: 80%;
    max-width: 500px;
    padding: 1rem;
    border-radius: 50px;
    border: none;
    font-size: 1.1rem;
    outline: none;
    background: #fff;
    color: #333;
}

body.dark .search-modal input {
    background: #161b22;
    color: #e6edf3;
}

.search-modal .close-search {
    position: absolute;
    top: 20px;
    right: 30px;
    color: #fff;
    font-size: 2rem;
    cursor: pointer;
}