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

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f0f2f5;
    color: #1a1a2e;
    transition: background 0.3s, color 0.3s;
    overflow-x: hidden;
    line-height: 1.6;
}

a {
    color: inherit;
    text-decoration: none;
}

ul {
    list-style: none;
}

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

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

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* ===== 暗色模式 ===== */
.dark-mode {
    background: #0f0f1a;
    color: #e0e0e0;
}

.dark-mode .card {
    background: #1e1e3a;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.05);
}

.dark-mode .counter-item p,
.dark-mode .faq-answer {
    color: #bbb;
}

.dark-mode .section-title::after {
    background: linear-gradient(135deg, #ff6b35, #f7c948);
}

/* ===== 头部导航 ===== */
header {
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

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

.logo {
    font-size: 28px;
    font-weight: 800;
    background: linear-gradient(135deg, #ff6b35, #f7c948);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 1px;
}

.logo span {
    -webkit-text-fill-color: #fff;
    background: none;
}

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

.nav-menu a {
    color: #fff;
    font-size: 16px;
    padding: 8px 12px;
    border-radius: 8px;
    transition: background 0.3s, transform 0.2s;
    position: relative;
}

.nav-menu a:hover {
    background: rgba(255, 107, 53, 0.3);
    transform: translateY(-2px);
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 60%;
    height: 2px;
    background: #ff6b35;
    transition: transform 0.3s;
}

.nav-menu a:hover::after {
    transform: translateX(-50%) scaleX(1);
}

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

.hamburger span {
    width: 28px;
    height: 3px;
    background: #fff;
    border-radius: 3px;
    transition: 0.3s;
}

.dark-toggle {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #fff;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s, transform 0.2s;
}

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

/* ===== 移动菜单 ===== */
.mobile-menu {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 2000;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 30px;
}

.mobile-menu.active {
    display: flex;
}

.mobile-menu a {
    color: #fff;
    font-size: 24px;
    font-weight: 600;
    transition: color 0.3s;
}

.mobile-menu a:hover {
    color: #ff6b35;
}

.mobile-close {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 36px;
    color: #fff;
    background: none;
    border: none;
    cursor: pointer;
    transition: transform 0.3s;
}

.mobile-close:hover {
    transform: rotate(90deg);
}

/* ===== 面包屑 ===== */
.breadcrumb {
    background: rgba(255, 255, 255, 0.05);
    padding: 12px 0;
    font-size: 14px;
    color: #aaa;
}

.breadcrumb a {
    color: #ff6b35;
    transition: color 0.3s;
}

.breadcrumb a:hover {
    color: #f7c948;
}

.breadcrumb span {
    margin: 0 8px;
}

/* ===== Hero 区域 ===== */
.hero {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 40%, #0f3460 70%, #533483 100%);
    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(255, 107, 53, 0.1) 0%, transparent 70%);
    animation: heroGlow 10s infinite;
}

@keyframes heroGlow {
    0%, 100% { transform: rotate(0deg); }
    50% { transform: rotate(180deg); }
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero h1 {
    font-size: 48px;
    font-weight: 800;
    color: #fff;
    margin-bottom: 20px;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    line-height: 1.2;
}

.hero h1 span {
    background: linear-gradient(135deg, #ff6b35, #f7c948);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero p {
    font-size: 20px;
    color: #ccc;
    max-width: 700px;
    margin: 0 auto 30px;
    line-height: 1.6;
}

.hero-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    display: inline-block;
    padding: 14px 36px;
    border-radius: 50px;
    font-size: 18px;
    font-weight: 600;
    transition: all 0.3s;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, #ff6b35, #f7c948);
    color: #1a1a2e;
    box-shadow: 0 8px 30px rgba(255, 107, 53, 0.4);
}

.btn-primary:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(255, 107, 53, 0.6);
}

.btn-outline {
    border: 2px solid #ff6b35;
    color: #fff;
    background: transparent;
}

.btn-outline:hover {
    background: #ff6b35;
    color: #1a1a2e;
    transform: translateY(-4px);
}

/* ===== 搜索框 ===== */
.search-box {
    display: flex;
    gap: 10px;
    max-width: 400px;
    margin: 30px auto 0;
}

.search-box input {
    flex: 1;
    padding: 12px 20px;
    border-radius: 50px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    font-size: 16px;
    outline: none;
    transition: border-color 0.3s;
}

.search-box input:focus {
    border-color: #ff6b35;
}

.search-box input::placeholder {
    color: #aaa;
}

.search-box button {
    padding: 12px 24px;
    border-radius: 50px;
    border: none;
    background: linear-gradient(135deg, #ff6b35, #f7c948);
    color: #1a1a2e;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.3s;
}

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

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

.section-title {
    font-size: 36px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 50px;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background: linear-gradient(135deg, #ff6b35, #f7c948);
    margin: 15px auto 0;
    border-radius: 4px;
}

/* ===== 卡片 ===== */
.card {
    background: #fff;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s, box-shadow 0.3s;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    overflow: hidden;
}

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

.card h3 {
    font-size: 22px;
    margin-bottom: 15px;
    color: inherit;
}

.card p {
    line-height: 1.8;
    color: #666;
}

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

/* ===== 网格布局 ===== */
.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: 25px;
}

/* ===== Banner 轮播 ===== */
.banner-slider {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    height: 450px;
}

.banner-slide {
    position: absolute;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #16213e, #0f3460);
    opacity: 0;
    transition: opacity 0.8s;
    padding: 40px;
    text-align: center;
}

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

.banner-slide h2 {
    font-size: 40px;
    color: #fff;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.banner-slide p {
    color: #ddd;
    font-size: 18px;
    margin-top: 15px;
    max-width: 600px;
}

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

.counter-item h3 {
    font-size: 48px;
    font-weight: 800;
    background: linear-gradient(135deg, #ff6b35, #f7c948);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.counter-item p {
    font-size: 18px;
    color: #666;
    margin-top: 8px;
}

/* ===== FAQ ===== */
.faq-item {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 20px 0;
}

.faq-question {
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: color 0.3s;
}

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

.faq-question::after {
    content: '+';
    font-size: 24px;
    transition: transform 0.3s;
    flex-shrink: 0;
    margin-left: 20px;
}

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

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

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

/* ===== HowTo 步骤 ===== */
.howto-steps {
    counter-reset: step;
}

.howto-step {
    padding: 20px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.howto-step:last-child {
    border-bottom: none;
}

.howto-step::before {
    counter-increment: step;
    content: '步骤 ' counter(step);
    font-weight: 700;
    color: #ff6b35;
    display: block;
    margin-bottom: 8px;
    font-size: 16px;
}

.howto-step h3 {
    margin-bottom: 10px;
}

/* ===== 文章卡片 ===== */
.article-card .read-more {
    display: inline-block;
    margin-top: 15px;
    color: #ff6b35;
    font-weight: 600;
    transition: color 0.3s, transform 0.3s;
}

.article-card .read-more:hover {
    color: #f7c948;
    transform: translateX(5px);
}

.article-card small {
    color: #999;
    font-size: 14px;
}

/* ===== 毛玻璃效果 ===== */
.glassy {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 24px;
}

.dark-mode .glassy {
    background: rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.05);
}

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

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

/* ===== 返回顶部 ===== */
.back-to-top {
    position: fixed;
    bottom: 40px;
    right: 40px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #ff6b35, #f7c948);
    border: none;
    border-radius: 50%;
    color: #1a1a2e;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 8px 30px rgba(255, 107, 53, 0.4);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.back-to-top:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(255, 107, 53, 0.6);
}

/* ===== 页脚 ===== */
.footer {
    background: #1a1a2e;
    color: #aaa;
    padding: 60px 0 20px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer h3 {
    color: #fff;
    margin-bottom: 20px;
    font-size: 18px;
}

.footer a {
    color: #aaa;
    display: block;
    margin-bottom: 10px;
    transition: color 0.3s, transform 0.2s;
}

.footer a:hover {
    color: #ff6b35;
    transform: translateX(3px);
}

.footer p {
    line-height: 1.8;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 20px;
    text-align: center;
    font-size: 14px;
}

.footer-bottom .links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    margin-bottom: 10px;
}

.footer-bottom .links a {
    display: inline;
}

.qr-grid {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-top: 20px;
}

.qr-item {
    text-align: center;
}

.qr-item svg {
    width: 100px;
    height: 100px;
    border-radius: 12px;
    background: #fff;
    padding: 8px;
    transition: transform 0.3s;
}

.qr-item svg:hover {
    transform: scale(1.05);
}

.qr-item p {
    margin-top: 8px;
    font-size: 14px;
}

/* ===== 响应式设计 ===== */
@media (max-width: 768px) {
    .nav-menu {
        display: none;
    }

    .hamburger {
        display: flex;
    }

    .hero h1 {
        font-size: 32px;
    }

    .hero p {
        font-size: 16px;
    }

    .hero {
        padding: 60px 0;
    }

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

    .section {
        padding: 50px 0;
    }

    .section-title {
        font-size: 28px;
        margin-bottom: 30px;
    }

    .banner-slider {
        height: 300px;
    }

    .banner-slide h2 {
        font-size: 28px;
    }

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

    .counter-item h3 {
        font-size: 36px;
    }

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

    .card {
        padding: 20px;
    }

    .search-box {
        flex-direction: column;
        max-width: 100%;
    }

    .search-box button {
        width: 100%;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    .btn {
        width: 100%;
        max-width: 280px;
    }

    .qr-grid {
        flex-wrap: wrap;
    }
}

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

    .hero h1 {
        font-size: 40px;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }

    .banner-slider {
        height: 380px;
    }
}

/* ===== 针对大屏幕的微调 ===== */
@media (min-width: 1400px) {
    .container {
        max-width: 1320px;
    }

    .hero h1 {
        font-size: 56px;
    }

    .hero p {
        font-size: 22px;
    }
}

/* ===== 打印样式 ===== */
@media print {
    header,
    .breadcrumb,
    .footer,
    .back-to-top,
    .search-box,
    .dark-toggle,
    .hamburger,
    .mobile-menu {
        display: none !important;
    }

    .section {
        padding: 30px 0;
        page-break-inside: avoid;
    }

    .card {
        box-shadow: none;
        border: 1px solid #ddd;
    }

    body {
        background: #fff;
        color: #000;
    }

    a {
        color: #000;
        text-decoration: underline;
    }
}