/* ===== 全局重置 & 基础 ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
}

body {
    background: #f8f9fa;
    color: #333;
    line-height: 1.8;
    font-size: 16px;
    transition: background 0.4s, color 0.4s;
}

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

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

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

/* ===== 导航吸顶 ===== */
.header {
    background: #2c3e50;
    color: #fff;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
    transition: background 0.4s;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.logo {
    font-size: 28px;
    font-weight: 700;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo svg {
    width: 40px;
    height: 40px;
    fill: #e74c3c;
    transition: transform 0.3s;
}

.logo:hover svg {
    transform: rotate(10deg) scale(1.05);
}

.nav {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.nav a {
    color: #ecf0f1;
    font-size: 15px;
    padding: 6px 12px;
    border-radius: 4px;
    transition: background 0.3s, color 0.3s;
}

.nav a:hover {
    background: #34495e;
    text-decoration: none;
    color: #fff;
}

.menu-toggle {
    display: none;
    background: none;
    border: 2px solid #fff;
    color: #fff;
    padding: 6px 14px;
    font-size: 18px;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s;
}

.menu-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
}

.search-box {
    display: flex;
    gap: 6px;
    align-items: center;
}

.search-box input {
    padding: 8px 12px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    width: 180px;
    outline: none;
    transition: box-shadow 0.3s;
}

.search-box input:focus {
    box-shadow: 0 0 0 2px #e74c3c;
}

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

.search-box button:hover {
    background: #c0392b;
    transform: scale(1.05);
}

/* ===== 返回顶部 ===== */
.back-top {
    position: fixed;
    bottom: 40px;
    right: 30px;
    background: #2c3e50;
    color: #fff;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    cursor: pointer;
    z-index: 999;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s;
    border: none;
}

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

.back-top:hover {
    background: #e74c3c;
    transform: translateY(-3px);
}

/* ===== Banner ===== */
.banner {
    background: linear-gradient(135deg, #1a2a3a, #2c3e50);
    color: #fff;
    padding: 60px 20px;
    text-align: center;
    position: relative;
    overflow: hidden;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.banner::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(231, 76, 60, 0.1) 0%, transparent 70%);
    animation: bannerGlow 8s ease-in-out infinite alternate;
}

@keyframes bannerGlow {
    0% { transform: translate(0, 0); }
    100% { transform: translate(20%, 20%); }
}

.banner-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
}

.banner h1 {
    font-size: 44px;
    margin-bottom: 20px;
    font-weight: 800;
    letter-spacing: 1px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.banner p {
    font-size: 20px;
    line-height: 1.8;
    margin-bottom: 30px;
    opacity: 0.9;
}

.banner .btn {
    background: #e74c3c;
    color: #fff;
    padding: 14px 40px;
    border-radius: 30px;
    font-size: 18px;
    font-weight: 600;
    display: inline-block;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.4);
}

.banner .btn:hover {
    background: #c0392b;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(231, 76, 60, 0.6);
}

.banner svg {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 80px;
    fill: #f8f9fa;
    z-index: 1;
}

/* 轮播指示器 */
.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 30px;
}

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

.carousel-dots span.active {
    background: #e74c3c;
    transform: scale(1.2);
}

.carousel-dots span:hover {
    background: rgba(255, 255, 255, 0.7);
}

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

.section-title {
    font-size: 32px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 40px;
    color: #2c3e50;
    position: relative;
    transition: color 0.4s;
}

.section-title:after {
    content: "";
    display: block;
    width: 60px;
    height: 4px;
    background: #e74c3c;
    margin: 12px auto 0;
    border-radius: 2px;
}

.section-sub {
    text-align: center;
    font-size: 17px;
    color: #666;
    margin-top: -20px;
    margin-bottom: 40px;
}

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.grid-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 30px;
}

.grid-4 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    gap: 20px;
}

/* ===== 卡片 ===== */
.card {
    background: #fff;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.06);
    transition: transform 0.3s, box-shadow 0.3s;
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #e74c3c, #f39c12);
    opacity: 0;
    transition: opacity 0.3s;
}

.card:hover::before {
    opacity: 1;
}

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

.card h3 {
    font-size: 20px;
    margin-bottom: 12px;
    color: #2c3e50;
    transition: color 0.3s;
}

.card:hover h3 {
    color: #e74c3c;
}

.card p {
    color: #555;
    font-size: 15px;
    line-height: 1.7;
}

/* ===== 毛玻璃效果 ===== */
.glass {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 25px;
}

/* ===== 数字动画 ===== */
.stats {
    background: #2c3e50;
    color: #fff;
    padding: 50px 0;
    text-align: center;
    transition: background 0.4s;
}

.stats .grid-4 {
    color: #fff;
}

.stat-item h3 {
    font-size: 40px;
    font-weight: 800;
    color: #e74c3c;
    margin-bottom: 6px;
}

.stat-item p {
    font-size: 16px;
    opacity: 0.85;
}

.stat-item {
    padding: 20px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    transition: transform 0.3s, background 0.3s;
}

.stat-item:hover {
    transform: translateY(-3px);
    background: rgba(255, 255, 255, 0.1);
}

/* ===== FAQ ===== */
.faq-item {
    border-bottom: 1px solid #e9ecef;
    padding: 18px 0;
    cursor: pointer;
    transition: background 0.3s;
}

.faq-item:hover {
    background: rgba(0, 0, 0, 0.02);
}

.faq-question {
    font-weight: 600;
    font-size: 17px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #2c3e50;
    transition: color 0.3s;
}

.faq-question .icon {
    font-size: 22px;
    transition: transform 0.3s, color 0.3s;
    color: #e74c3c;
}

.faq-item.open .faq-question .icon {
    transform: rotate(45deg);
}

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

.faq-item.open .faq-answer {
    max-height: 500px;
    padding-top: 15px;
}

/* ===== 文章卡片 ===== */
.article-card {
    border-bottom: 1px solid #e9ecef;
    padding: 20px 0;
    transition: padding-left 0.3s;
}

.article-card:hover {
    padding-left: 10px;
}

.article-card:last-child {
    border: none;
}

.article-card h4 {
    font-size: 18px;
    margin-bottom: 6px;
    transition: color 0.3s;
}

.article-card:hover h4 {
    color: #e74c3c;
}

.article-card .meta {
    font-size: 13px;
    color: #999;
    margin-bottom: 8px;
}

.article-card p {
    color: #555;
    font-size: 15px;
}

.article-card .read-more {
    color: #e74c3c;
    font-weight: 600;
    font-size: 14px;
    transition: color 0.3s;
}

.article-card .read-more:hover {
    color: #c0392b;
}

/* ===== 页脚 ===== */
.footer {
    background: #1a252f;
    color: #bdc3c7;
    padding: 50px 0 30px;
    font-size: 14px;
    transition: background 0.4s;
}

.footer .grid-4 {
    color: #bdc3c7;
}

.footer h4 {
    color: #fff;
    font-size: 18px;
    margin-bottom: 16px;
    position: relative;
}

.footer h4::after {
    content: '';
    display: block;
    width: 30px;
    height: 2px;
    background: #e74c3c;
    margin-top: 6px;
}

.footer a {
    color: #bdc3c7;
    display: block;
    margin-bottom: 6px;
    transition: color 0.3s, padding-left 0.3s;
}

.footer a:hover {
    color: #fff;
    padding-left: 5px;
}

.footer-bottom {
    border-top: 1px solid #2c3e50;
    padding-top: 20px;
    margin-top: 30px;
    text-align: center;
    font-size: 13px;
}

.footer-bottom a {
    display: inline;
    margin: 0 8px;
}

/* ===== 面包屑 ===== */
.breadcrumb {
    background: #fff;
    padding: 12px 0;
    border-bottom: 1px solid #eee;
    font-size: 14px;
    color: #888;
    transition: background 0.4s;
}

.breadcrumb a {
    color: #1a73e8;
}

.breadcrumb span {
    margin: 0 6px;
}

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

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

/* ===== HowTo步骤 ===== */
.step-list {
    counter-reset: step;
    list-style: none;
    padding: 0;
}

.step-list li {
    counter-increment: step;
    padding: 16px 0 16px 50px;
    position: relative;
    border-left: 3px solid #e74c3c;
    margin-left: 20px;
    transition: background 0.3s;
}

.step-list li:hover {
    background: rgba(231, 76, 60, 0.05);
}

.step-list li:before {
    content: counter(step);
    position: absolute;
    left: -20px;
    top: 14px;
    width: 40px;
    height: 40px;
    background: #e74c3c;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 18px;
    transition: transform 0.3s;
}

.step-list li:hover:before {
    transform: scale(1.1);
}

.step-list li strong {
    display: block;
    font-size: 17px;
    color: #2c3e50;
    margin-bottom: 4px;
}

.step-list li p {
    color: #555;
    font-size: 15px;
}

/* ===== 暗黑模式 ===== */
.dark-mode {
    background: #1a1a2e;
    color: #e0e0e0;
}

.dark-mode .card {
    background: #16213e;
    color: #e0e0e0;
}

.dark-mode .card h3 {
    color: #eee;
}

.dark-mode .card p {
    color: #bbb;
}

.dark-mode .section-title {
    color: #eee;
}

.dark-mode .breadcrumb {
    background: #16213e;
    color: #aaa;
}

.dark-mode .faq-question {
    color: #eee;
}

.dark-mode .faq-answer {
    color: #bbb;
}

.dark-mode .article-card p {
    color: #bbb;
}

.dark-mode .footer {
    background: #0f0f1a;
}

.dark-mode .banner {
    background: linear-gradient(135deg, #0f0f1a, #1a1a2e);
}

.dark-mode .header {
    background: #0f0f1a;
}

.dark-mode .stats {
    background: #0f0f1a;
}

.dark-mode .glass {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
}

.dark-toggle {
    background: none;
    border: 1px solid #fff;
    color: #fff;
    padding: 6px 14px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    margin-left: 10px;
    transition: background 0.3s, transform 0.2s;
}

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

/* ===== 响应式 ===== */
@media (max-width: 768px) {
    .nav {
        display: none;
        flex-direction: column;
        width: 100%;
        background: #2c3e50;
        position: absolute;
        top: 60px;
        left: 0;
        padding: 20px;
        z-index: 999;
    }

    .nav.active {
        display: flex;
    }

    .menu-toggle {
        display: block;
    }

    .search-box input {
        width: 120px;
    }

    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }

    .banner h1 {
        font-size: 30px;
    }

    .banner p {
        font-size: 17px;
    }

    .section-title {
        font-size: 26px;
    }

    .logo {
        font-size: 22px;
    }

    .stat-item h3 {
        font-size: 30px;
    }

    .back-top {
        width: 40px;
        height: 40px;
        font-size: 20px;
        bottom: 20px;
        right: 20px;
    }
}

@media (max-width: 480px) {
    .banner {
        padding: 40px 15px;
        min-height: 300px;
    }

    .banner h1 {
        font-size: 24px;
    }

    .banner p {
        font-size: 15px;
    }

    .banner .btn {
        padding: 10px 30px;
        font-size: 16px;
    }

    .section {
        padding: 40px 0;
    }

    .section-title {
        font-size: 22px;
    }

    .card {
        padding: 20px;
    }

    .search-box input {
        width: 100px;
        font-size: 12px;
    }

    .search-box button {
        font-size: 12px;
        padding: 6px 12px;
    }
}