/* ===== 全局重置与变量 ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg: #f4f7fc;
    --card: #ffffff;
    --text: #1a1a2e;
    --primary: #0d1b2a;
    --accent: #f0c040;
    --accent2: #e94560;
    --glass: rgba(255, 255, 255, 0.7);
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    --radius: 20px;
    --transition: 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

[data-theme="dark"] {
    --bg: #0d1b2a;
    --card: #1b2a3a;
    --text: #e0e6f0;
    --primary: #f0c040;
    --glass: rgba(13, 27, 42, 0.8);
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
}

/* ===== 基础样式 ===== */
html {
    scroll-behavior: smooth;
}

body {
    font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    transition: background 0.4s, color 0.4s;
    overflow-x: hidden;
}

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

img,
svg {
    display: block;
    max-width: 100%;
}

ul,
ol {
    list-style: none;
}

/* ===== 容器 ===== */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ===== 毛玻璃效果 ===== */
.glass {
    background: var(--glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

/* ===== 按钮 ===== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    background: var(--accent);
    color: #0d1b2a;
    border-radius: 50px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(240, 192, 64, 0.4);
}

.btn-outline {
    background: transparent;
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: #fff;
}

.btn-outline:hover {
    border-color: var(--accent);
    box-shadow: 0 8px 20px rgba(240, 192, 64, 0.2);
}

/* ===== 标题与描述 ===== */
.section-title {
    font-size: 2.4rem;
    font-weight: 700;
    margin-bottom: 1.2rem;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.section-sub {
    font-size: 1.1rem;
    opacity: 0.8;
    max-width: 640px;
    margin-bottom: 2.5rem;
    line-height: 1.5;
}

/* ===== 网格布局 ===== */
.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 28px;
}

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

/* ===== 卡片 ===== */
.card {
    background: var(--card);
    border-radius: var(--radius);
    padding: 28px;
    box-shadow: var(--shadow);
    transition: transform 0.4s, box-shadow 0.4s;
}

.card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.12);
}

.card h3 {
    font-size: 1.3rem;
    margin-bottom: 12px;
    color: var(--primary);
}

.card p {
    opacity: 0.85;
    line-height: 1.7;
}

/* ===== 滚动动画 ===== */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s, transform 0.8s;
}

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

/* ===== Banner 区域 ===== */
.banner {
    position: relative;
    min-height: 85vh;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, #0d1b2a 0%, #1b2a3a 50%, #0d1b2a 100%);
    color: #fff;
    overflow: hidden;
}

.banner-bg {
    position: absolute;
    inset: 0;
    opacity: 0.15;
    background: radial-gradient(circle at 20% 50%, #f0c040 0%, transparent 60%),
        radial-gradient(circle at 80% 30%, #e94560 0%, transparent 50%);
    pointer-events: none;
}

.banner .container {
    position: relative;
    z-index: 2;
}

.banner h1 {
    font-size: clamp(2.8rem, 8vw, 5.2rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.2rem;
}

.banner h1 span {
    color: var(--accent);
}

.banner p {
    font-size: 1.2rem;
    max-width: 560px;
    margin-bottom: 2rem;
    opacity: 0.85;
}

.banner-slide {
    display: none;
}

.banner-slide.active {
    display: block;
    animation: fadeSlide 0.8s ease;
}

@keyframes fadeSlide {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ===== 导航栏 ===== */
.nav-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(13, 27, 42, 0.9);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

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

.logo {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--accent);
    letter-spacing: -0.02em;
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo svg {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
}

.nav-links {
    display: flex;
    gap: 28px;
    list-style: none;
    font-weight: 500;
}

.nav-links a {
    color: #fff;
    opacity: 0.8;
    transition: opacity 0.3s;
    position: relative;
    padding: 4px 0;
}

.nav-links a:hover,
.nav-links a.active {
    opacity: 1;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: width 0.3s;
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: #fff;
    font-size: 1.8rem;
    cursor: pointer;
    padding: 4px;
    line-height: 1;
}

.dark-toggle {
    background: none;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 50px;
    color: #fff;
    padding: 6px 14px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: border-color 0.3s, background 0.3s;
}

.dark-toggle:hover {
    border-color: var(--accent);
    background: rgba(240, 192, 64, 0.1);
}

/* ===== 统计数字 ===== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin: 40px 0;
}

.stat-item {
    text-align: center;
    padding: 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    backdrop-filter: blur(4px);
}

.stat-number {
    font-size: 2.8rem;
    font-weight: 800;
    color: var(--accent);
    line-height: 1.2;
}

.stat-label {
    font-size: 0.95rem;
    opacity: 0.7;
    margin-top: 4px;
}

/* ===== FAQ ===== */
.faq-item {
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    padding: 18px 0;
    cursor: pointer;
    transition: background 0.2s;
}

[data-theme="dark"] .faq-item {
    border-bottom-color: rgba(255, 255, 255, 0.06);
}

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

[data-theme="dark"] .faq-item:hover {
    background: rgba(255, 255, 255, 0.02);
}

.faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    font-size: 1.1rem;
    gap: 16px;
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease, padding 0.3s;
    padding-top: 0;
    color: var(--text);
    opacity: 0.8;
    line-height: 1.7;
}

.faq-item.open .faq-answer {
    max-height: 400px;
    padding-top: 16px;
}

.faq-icon {
    transition: transform 0.3s;
    font-size: 1.4rem;
    flex-shrink: 0;
}

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

/* ===== 使用教程步骤 ===== */
.howto-step {
    display: flex;
    gap: 20px;
    margin-bottom: 28px;
    align-items: flex-start;
}

.howto-step-num {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    background: var(--accent);
    color: #0d1b2a;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.2rem;
}

.howto-step h3 {
    margin-bottom: 6px;
    font-size: 1.2rem;
}

.howto-step p {
    opacity: 0.85;
    line-height: 1.7;
}

/* ===== 页脚 ===== */
.footer {
    background: #0d1b2a;
    color: #a0b0c0;
    padding: 60px 0 30px;
    margin-top: 60px;
}

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

.footer a:hover {
    color: var(--accent);
}

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

.footer h4 {
    color: #fff;
    font-size: 1.1rem;
    margin-bottom: 16px;
}

.footer ul {
    list-style: none;
}

.footer li {
    margin-bottom: 8px;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 24px;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 16px;
    font-size: 0.9rem;
}

.qrcode-placeholder {
    width: 100px;
    height: 100px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 8px;
}

/* ===== 返回顶部 ===== */
.back-top {
    position: fixed;
    bottom: 40px;
    right: 40px;
    width: 48px;
    height: 48px;
    background: var(--accent);
    color: #0d1b2a;
    border: none;
    border-radius: 50%;
    font-size: 1.4rem;
    cursor: pointer;
    box-shadow: var(--shadow);
    opacity: 0;
    transform: scale(0.8);
    transition: opacity 0.3s, transform 0.3s;
    z-index: 999;
}

.back-top.show {
    opacity: 1;
    transform: scale(1);
}

.back-top:hover {
    transform: scale(1.1);
}

/* ===== 移动菜单 ===== */
.mobile-menu {
    display: none;
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    background: rgba(13, 27, 42, 0.98);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 24px;
    z-index: 999;
    max-height: calc(100vh - 70px);
    overflow-y: auto;
}

.mobile-menu.open {
    display: block;
    animation: slideDown 0.3s ease;
}

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

.mobile-menu a {
    display: block;
    padding: 12px 0;
    color: #fff;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-weight: 500;
    transition: opacity 0.3s;
}

.mobile-menu a:hover {
    opacity: 0.8;
}

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

.search-box input {
    flex: 1;
    padding: 12px 18px;
    border-radius: 50px;
    border: none;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    font-size: 1rem;
    outline: none;
    transition: background 0.3s;
}

.search-box input:focus {
    background: rgba(255, 255, 255, 0.15);
}

.search-box input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.search-box button {
    padding: 12px 24px;
    border-radius: 50px;
    border: none;
    background: var(--accent);
    color: #0d1b2a;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.3s;
}

.search-box button:hover {
    opacity: 0.9;
}

/* ===== 友情链接 ===== */
.friend-links {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    justify-content: center;
}

.friend-links a {
    padding: 6px 14px;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.03);
    transition: background 0.3s, color 0.3s;
}

[data-theme="dark"] .friend-links a {
    background: rgba(255, 255, 255, 0.05);
}

.friend-links a:hover {
    background: var(--accent);
    color: #0d1b2a;
}

/* ===== 响应式设计 ===== */
@media (max-width: 1024px) {
    .section-title {
        font-size: 2rem;
    }
    
    .stats-grid {
        gap: 16px;
    }
    
    .stat-number {
        font-size: 2.2rem;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    
    .menu-toggle {
        display: block;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .stat-item {
        padding: 16px;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .section-sub {
        font-size: 1rem;
    }
    
    .banner {
        min-height: 70vh;
    }
    
    .banner h1 {
        font-size: clamp(2rem, 10vw, 3.2rem);
    }
    
    .banner p {
        font-size: 1rem;
    }
    
    .grid-2 {
        grid-template-columns: 1fr;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }
    
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
    
    .back-top {
        bottom: 20px;
        right: 20px;
        width: 42px;
        height: 42px;
        font-size: 1.2rem;
    }
    
    .howto-step {
        flex-direction: column;
        gap: 12px;
    }
    
    .howto-step-num {
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }
    
    .mobile-menu {
        top: 62px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }
    
    .card {
        padding: 20px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }
    
    .stat-number {
        font-size: 1.6rem;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
    
    .faq-question {
        font-size: 1rem;
    }
}

/* ===== 暗色模式额外调整 ===== */
[data-theme="dark"] .card {
    border: 1px solid rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] .card:hover {
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .banner {
    background: linear-gradient(135deg, #0a1628 0%, #142240 50%, #0a1628 100%);
}

[data-theme="dark"] .stat-item {
    background: rgba(255, 255, 255, 0.03);
}

/* ===== 打印样式 ===== */
@media print {
    .nav-header,
    .back-top,
    .mobile-menu,
    .dark-toggle,
    .menu-toggle {
        display: none !important;
    }
    
    .banner {
        min-height: auto;
        padding: 60px 0;
    }
    
    .fade-in {
        opacity: 1 !important;
        transform: none !important;
    }
}