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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    background: #f5f7fa;
    color: #333;
    line-height: 1.8;
    transition: background 0.4s ease, color 0.4s ease;
}

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

a:hover {
    text-decoration: underline;
}

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

/* ========== 头部导航 ========== */
header {
    background: rgba(44, 62, 80, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: #fff;
    padding: 12px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.15);
    transition: background 0.4s;
}

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

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

.logo span {
    color: #f1c40f;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
}

nav ul li a {
    color: #ecf0f1;
    font-size: 0.95rem;
    padding: 6px 12px;
    border-radius: 20px;
    transition: background 0.3s, color 0.3s, transform 0.2s;
    font-weight: 500;
}

nav ul li a:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #f1c40f;
    transform: translateY(-1px);
    text-decoration: none;
}

.menu-toggle {
    display: none;
    background: none;
    border: 2px solid rgba(236, 240, 241, 0.8);
    color: #ecf0f1;
    font-size: 1.6rem;
    padding: 4px 14px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.3s, border-color 0.3s;
}

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

.search-box {
    display: flex;
    gap: 0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.search-box input {
    padding: 8px 14px;
    border: none;
    width: 200px;
    font-size: 0.9rem;
    background: #fff;
    color: #333;
    outline: none;
    transition: width 0.3s;
}

.search-box input:focus {
    width: 240px;
}

.search-box button {
    padding: 8px 18px;
    background: #e74c3c;
    color: #fff;
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    transition: background 0.3s;
}

.search-box button:hover {
    background: #c0392b;
}

/* ========== 面包屑 ========== */
.breadcrumb {
    background: rgba(236, 240, 241, 0.7);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    padding: 10px 0;
    font-size: 0.9rem;
    color: #7f8c8d;
    border-bottom: 1px solid rgba(0,0,0,0.03);
}

.breadcrumb a {
    color: #1a73e8;
    font-weight: 500;
}

.breadcrumb span {
    margin: 0 6px;
    color: #bdc3c7;
}

/* ========== Banner 轮播 ========== */
.banner {
    position: relative;
    overflow: hidden;
    height: 420px;
    border-radius: 0 0 30px 30px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.1);
}

.banner-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    padding: 0 30px;
    text-align: center;
}

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

.banner-slide:nth-child(1) {
    background: linear-gradient(135deg, #2c3e50 0%, #4ca1af 100%);
}

.banner-slide:nth-child(2) {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.banner-slide:nth-child(3) {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.banner-slide h2 {
    color: #fff;
    font-size: 2.6rem;
    text-shadow: 0 4px 15px rgba(0,0,0,0.3);
    margin-bottom: 15px;
    letter-spacing: 1px;
}

.banner-slide p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.2rem;
    max-width: 650px;
    line-height: 1.7;
    text-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

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

.banner-dots span {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #fff;
    opacity: 0.4;
    cursor: pointer;
    transition: opacity 0.4s, transform 0.3s;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.banner-dots span.active {
    opacity: 1;
    transform: scale(1.15);
}

.banner-dots span:hover {
    opacity: 0.8;
}

/* ========== Hero 区域 ========== */
.hero {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: #fff;
    padding: 80px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(241, 196, 15, 0.03) 0%, transparent 70%);
    animation: heroGlow 12s ease-in-out infinite alternate;
}

@keyframes heroGlow {
    0% { transform: translate(0, 0); }
    100% { transform: translate(10%, 10%); }
}

.hero h1 {
    font-size: 2.8rem;
    margin-bottom: 20px;
    color: #f1c40f;
    position: relative;
    z-index: 1;
    text-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.hero p {
    font-size: 1.15rem;
    max-width: 800px;
    margin: 0 auto 30px;
    color: rgba(189, 195, 199, 0.95);
    position: relative;
    z-index: 1;
    line-height: 1.9;
}

.hero .btn {
    display: inline-block;
    background: #e74c3c;
    color: #fff;
    padding: 14px 44px;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    transition: background 0.3s, transform 0.3s, box-shadow 0.3s;
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.4);
    position: relative;
    z-index: 1;
}

.hero .btn:hover {
    background: #c0392b;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(231, 76, 60, 0.5);
    text-decoration: none;
}

/* ========== 通用章节 ========== */
.section {
    padding: 70px 0;
}

.section-title {
    text-align: center;
    font-size: 2.1rem;
    margin-bottom: 45px;
    color: #2c3e50;
    position: relative;
    font-weight: 700;
}

.section-title::after {
    content: '';
    display: block;
    width: 70px;
    height: 4px;
    background: linear-gradient(90deg, #e74c3c, #f1c40f);
    margin: 12px auto 0;
    border-radius: 4px;
}

/* ========== 网格布局 ========== */
.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: repeat(4, 1fr);
    gap: 24px;
}

/* ========== 卡片组件 ========== */
.card {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 30px 25px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.05);
    transition: transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94), box-shadow 0.35s ease, background 0.4s;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
    background: rgba(255, 255, 255, 0.95);
    border-color: rgba(231, 76, 60, 0.2);
}

.card h3 {
    color: #2c3e50;
    margin-bottom: 12px;
    font-size: 1.25rem;
    font-weight: 700;
}

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

.card .more {
    display: inline-block;
    margin-top: 12px;
    color: #e74c3c;
    font-weight: 600;
    transition: color 0.3s, transform 0.2s;
}

.card .more:hover {
    color: #c0392b;
    transform: translateX(4px);
    text-decoration: none;
}

/* ========== 品牌信息块 ========== */
.about-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 30px;
}

.about-info div {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: 22px 20px;
    border-radius: 12px;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.04);
    transition: transform 0.3s, box-shadow 0.3s;
    border: 1px solid rgba(255,255,255,0.3);
}

.about-info div:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.06);
}

.about-info h4 {
    color: #2c3e50;
    margin-bottom: 8px;
    font-size: 1.05rem;
    font-weight: 600;
}

/* ========== FAQ ========== */
.faq-item {
    border-bottom: 1px solid rgba(224, 224, 224, 0.6);
    padding: 18px 0;
    transition: border-color 0.3s;
}

.faq-item:last-child {
    border-bottom: none;
}

.faq-question {
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.1rem;
    color: #2c3e50;
    transition: color 0.3s;
    padding: 4px 0;
}

.faq-question:hover {
    color: #e74c3c;
}

.faq-answer {
    padding-top: 12px;
    color: #555;
    display: none;
    line-height: 1.7;
    font-size: 0.95rem;
}

.faq-answer.show {
    display: block;
    animation: fadeSlide 0.35s ease;
}

@keyframes fadeSlide {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

.faq-icon {
    font-size: 1.2rem;
    transition: transform 0.35s ease;
    color: #7f8c8d;
}

.faq-icon.rotated {
    transform: rotate(180deg);
    color: #e74c3c;
}

/* ========== 教程步骤 ========== */
.howto-steps {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 35px;
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(255,255,255,0.3);
}

.howto-steps h3 {
    color: #2c3e50;
    margin: 20px 0 10px;
    font-size: 1.2rem;
    font-weight: 700;
}

.howto-steps h3:first-of-type {
    margin-top: 0;
}

.howto-steps ol,
.howto-steps ul {
    padding-left: 22px;
    margin: 12px 0;
}

.howto-steps li {
    margin-bottom: 10px;
    line-height: 1.7;
    color: #444;
}

.howto-steps p {
    color: #555;
}

/* ========== 文章列表 ========== */
.article-list .article-item {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 12px;
    padding: 22px 25px;
    margin-bottom: 20px;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.04);
    transition: transform 0.3s, box-shadow 0.3s, background 0.4s;
    border: 1px solid rgba(255,255,255,0.3);
}

.article-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.06);
    background: rgba(255, 255, 255, 0.95);
}

.article-item h3 {
    color: #2c3e50;
    margin-bottom: 6px;
    font-size: 1.15rem;
    font-weight: 700;
}

.article-item .meta {
    color: #999;
    font-size: 0.85rem;
    margin-bottom: 10px;
}

.article-item p {
    color: #555;
    line-height: 1.7;
}

.article-item .read-more {
    color: #e74c3c;
    font-weight: 600;
    transition: color 0.3s, transform 0.2s;
    display: inline-block;
}

.article-item .read-more:hover {
    color: #c0392b;
    transform: translateX(4px);
    text-decoration: none;
}

/* ========== Footer ========== */
.footer {
    background: rgba(44, 62, 80, 0.97);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: #ecf0f1;
    padding: 50px 0 30px;
    margin-top: 50px;
}

.footer a {
    color: #f1c40f;
    transition: color 0.3s;
}

.footer a:hover {
    color: #e74c3c;
    text-decoration: none;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

.footer h4 {
    color: #f1c40f;
    margin-bottom: 18px;
    font-size: 1.1rem;
    font-weight: 700;
    position: relative;
    padding-bottom: 8px;
}

.footer h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 30px;
    height: 2px;
    background: #e74c3c;
    border-radius: 2px;
}

.footer ul {
    list-style: none;
}

.footer ul li {
    margin-bottom: 10px;
}

.footer ul li a {
    font-size: 0.9rem;
    opacity: 0.85;
    transition: opacity 0.3s, transform 0.2s;
    display: inline-block;
}

.footer ul li a:hover {
    opacity: 1;
    transform: translateX(4px);
}

.footer-bottom {
    text-align: center;
    padding-top: 25px;
    border-top: 1px solid rgba(68, 68, 68, 0.5);
    margin-top: 25px;
    font-size: 0.9rem;
    color: rgba(236, 240, 241, 0.7);
}

/* ========== 浮动按钮 ========== */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: #e74c3c;
    color: #fff;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    border: none;
    z-index: 999;
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.4);
}

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

.back-to-top:hover {
    background: #c0392b;
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(231, 76, 60, 0.5);
}

.dark-mode-toggle {
    position: fixed;
    bottom: 95px;
    right: 30px;
    background: rgba(52, 73, 94, 0.9);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: #fff;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    cursor: pointer;
    border: none;
    z-index: 999;
    transition: background 0.3s, transform 0.3s, box-shadow 0.3s;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.dark-mode-toggle:hover {
    background: #2c3e50;
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

/* ========== SVG 图标 ========== */
.svg-icon {
    width: 60px;
    height: 60px;
    margin-bottom: 18px;
    fill: #e74c3c;
    transition: transform 0.4s ease, fill 0.4s;
}

.card:hover .svg-icon {
    transform: scale(1.1) rotate(-5deg);
    fill: #c0392b;
}

/* ========== 计数器 ========== */
.counter {
    font-size: 2.5rem;
    font-weight: 700;
    color: #e74c3c;
}

/* ========== 滚动动画 ========== */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(35px);
    transition: opacity 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94), transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

/* ========== 暗色模式 ========== */
body.dark {
    background: #0f0f1a;
    color: #d0d0d0;
}

body.dark header {
    background: rgba(22, 33, 62, 0.95);
}

body.dark .card,
body.dark .about-info div,
body.dark .howto-steps,
body.dark .article-item {
    background: rgba(30, 42, 58, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: #c0c0c0;
    border-color: rgba(255,255,255,0.05);
}

body.dark .card h3,
body.dark .section-title,
body.dark .faq-question,
body.dark .howto-steps h3 {
    color: #f1c40f;
}

body.dark .card p,
body.dark .faq-answer,
body.dark .howto-steps p,
body.dark .howto-steps li,
body.dark .article-item p {
    color: #b0b0b0;
}

body.dark .hero {
    background: linear-gradient(135deg, #16213e 0%, #1a1a2e 100%);
}

body.dark .footer {
    background: rgba(15, 15, 26, 0.98);
}

body.dark .breadcrumb {
    background: rgba(30, 42, 58, 0.8);
    color: #999;
}

body.dark .breadcrumb a {
    color: #4a9eff;
}

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

body.dark .search-box input {
    background: #1e2a3a;
    color: #ddd;
}

body.dark .faq-item {
    border-bottom-color: rgba(255,255,255,0.08);
}

body.dark .article-item .meta {
    color: #888;
}

body.dark .banner {
    box-shadow: 0 8px 30px rgba(0,0,0,0.4);
}

body.dark .banner-dots span {
    background: rgba(255,255,255,0.6);
}

body.dark .banner-dots span.active {
    background: #f1c40f;
}

body.dark .dark-mode-toggle {
    background: rgba(241, 196, 15, 0.2);
    color: #f1c40f;
}

body.dark .dark-mode-toggle:hover {
    background: rgba(241, 196, 15, 0.35);
}

/* ========== 响应式 ========== */
@media (max-width: 1024px) {
    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

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

    .menu-toggle {
        display: block;
    }

    nav ul {
        display: none;
        flex-direction: column;
        width: 100%;
        margin-top: 12px;
        gap: 8px;
        background: rgba(44, 62, 80, 0.95);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        padding: 15px;
        border-radius: 12px;
    }

    nav ul.show {
        display: flex;
    }

    nav ul li a {
        padding: 10px 16px;
        border-radius: 8px;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .banner {
        height: 320px;
        border-radius: 0;
    }

    .banner-slide h2 {
        font-size: 1.8rem;
    }

    .banner-slide p {
        font-size: 1rem;
    }

    .section-title {
        font-size: 1.7rem;
    }

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

    .search-box input:focus {
        width: 160px;
    }

    .back-to-top,
    .dark-mode-toggle {
        width: 44px;
        height: 44px;
        font-size: 1.3rem;
    }

    .dark-mode-toggle {
        bottom: 80px;
    }

    .footer-grid {
        gap: 20px;
    }

    .footer h4 {
        margin-bottom: 12px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    .logo {
        font-size: 1.5rem;
    }

    .hero h1 {
        font-size: 1.6rem;
    }

    .banner {
        height: 260px;
    }

    .banner-slide h2 {
        font-size: 1.4rem;
    }

    .card {
        padding: 20px 18px;
    }

    .howto-steps {
        padding: 20px;
    }

    .article-item {
        padding: 16px 18px;
    }
}