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

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

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

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

a:hover {
    color: #e6951f;
}

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;
}

/* 头部导航 */
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;
    flex-wrap: wrap;
}

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

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

.nav-toggle {
    display: none;
    background: none;
    border: 2px solid #f5a623;
    color: #f5a623;
    font-size: 24px;
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.3s, transform 0.2s;
}

.nav-toggle:hover {
    background: rgba(245, 166, 35, 0.1);
    transform: scale(1.05);
}

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

nav ul li a {
    color: #fff;
    font-size: 15px;
    padding: 8px 14px;
    border-radius: 6px;
    transition: background 0.3s, transform 0.2s;
}

nav ul li a:hover {
    background: rgba(245, 166, 35, 0.2);
    transform: translateY(-1px);
}

/* Hero 区域 */
.hero {
    background: linear-gradient(135deg, #0f0c29, #302b63, #24243e);
    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(245, 166, 35, 0.05) 0%, transparent 70%);
    animation: heroGlow 10s ease-in-out infinite;
}

@keyframes heroGlow {
    0%, 100% {
        transform: translate(0, 0);
    }
    50% {
        transform: translate(30px, 30px);
    }
}

.hero h1 {
    font-size: 48px;
    color: #fff;
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

.hero h1 span {
    color: #f5a623;
}

.hero p {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.8);
    max-width: 700px;
    margin: 0 auto 30px;
    position: relative;
    z-index: 1;
}

.hero .btn {
    display: inline-block;
    background: #f5a623;
    color: #1a1a2e;
    padding: 14px 40px;
    border-radius: 50px;
    font-size: 18px;
    font-weight: 600;
    transition: transform 0.3s, box-shadow 0.3s;
    position: relative;
    z-index: 1;
}

.hero .btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(245, 166, 35, 0.4);
}

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

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

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

/* 卡片 */
.card {
    background: #fff;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.06);
    transition: transform 0.3s, box-shadow 0.3s;
    margin-bottom: 30px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

body.dark .card {
    background: #1e1e1e;
    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.12);
}

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

.flex-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 面包屑 */
.breadcrumb {
    background: rgba(245, 166, 35, 0.08);
    padding: 12px 0;
    font-size: 14px;
}

.breadcrumb a {
    color: #f5a623;
    margin: 0 5px;
}

.breadcrumb span {
    color: #666;
}

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

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

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

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

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

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

.faq-item.active .faq-question::after {
    transform: rotate(45deg);
}

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

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

/* 暗黑模式切换 */
.dark-toggle {
    background: none;
    border: 2px solid #f5a623;
    color: #f5a623;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s, transform 0.2s;
}

.dark-toggle:hover {
    background: rgba(245, 166, 35, 0.2);
    transform: scale(1.1);
}

/* 返回顶部 */
.back-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: #f5a623;
    color: #1a1a2e;
    border: none;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(245, 166, 35, 0.3);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 999;
    transition: transform 0.3s, box-shadow 0.3s;
}

.back-top:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 30px rgba(245, 166, 35, 0.5);
}

/* 轮播 */
.carousel {
    overflow: hidden;
    position: relative;
    border-radius: 16px;
}

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

.carousel-item {
    min-width: 100%;
    padding: 20px;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    border: none;
    font-size: 28px;
    padding: 10px 15px;
    cursor: pointer;
    border-radius: 8px;
    z-index: 10;
    transition: background 0.3s, transform 0.2s;
}

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

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

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

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

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

/* 计数器 */
.counter {
    font-size: 48px;
    font-weight: 700;
    color: #f5a623;
    text-align: center;
}

.counter-label {
    text-align: center;
    color: #666;
    margin-top: 5px;
}

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

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

.search-box input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #ddd;
    border-radius: 30px;
    font-size: 16px;
    background: #fff;
    transition: border 0.3s, box-shadow 0.3s;
}

body.dark .search-box input {
    background: #2a2a2a;
    border-color: #444;
    color: #e0e0e0;
}

.search-box input:focus {
    outline: none;
    border-color: #f5a623;
    box-shadow: 0 0 10px rgba(245, 166, 35, 0.2);
}

.search-box button {
    background: #f5a623;
    color: #1a1a2e;
    border: none;
    padding: 12px 24px;
    border-radius: 30px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s, transform 0.2s;
}

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

/* 页脚 */
.footer {
    background: #1a1a2e;
    color: rgba(255, 255, 255, 0.7);
    padding: 50px 0 20px;
}

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

.footer a:hover {
    color: #e6951f;
}

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

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

/* 二维码网格 */
.qr-grid {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

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

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

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

/* 文章卡片 */
.article-card {
    background: #fff;
    border-radius: 16px;
    padding: 25px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.06);
    transition: transform 0.3s, box-shadow 0.3s;
    margin-bottom: 20px;
}

body.dark .article-card {
    background: #1e1e1e;
}

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

.article-card h4 {
    font-size: 20px;
    margin-bottom: 10px;
}

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

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

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

.article-card .btn {
    display: inline-block;
    margin-top: 15px;
    background: #f5a623;
    color: #1a1a2e;
    padding: 8px 20px;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 600;
    transition: background 0.3s, transform 0.2s;
}

.article-card .btn:hover {
    background: #e6951f;
    transform: translateY(-2px);
}

/* 操作步骤 */
.howto-step {
    background: #fff;
    border-radius: 16px;
    padding: 25px;
    margin-bottom: 20px;
    border-left: 5px solid #f5a623;
    transition: transform 0.3s, box-shadow 0.3s;
}

body.dark .howto-step {
    background: #1e1e1e;
}

.howto-step:hover {
    transform: translateX(5px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
}

.howto-step h4 {
    color: #f5a623;
    margin-bottom: 10px;
}

/* 响应式 */
@media (max-width: 768px) {
    .nav-toggle {
        display: block;
    }

    nav ul {
        display: none;
        flex-direction: column;
        width: 100%;
        padding-top: 15px;
    }

    nav ul.open {
        display: flex;
    }

    nav ul li a {
        padding: 12px 0;
    }

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

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

    .counter {
        font-size: 36px;
    }

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

@media (max-width: 480px) {
    .hero h1 {
        font-size: 26px;
    }

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

    .section {
        padding: 40px 0;
    }

    .card {
        padding: 20px;
    }
}