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

:root {
    --primary: #1a1a2e;
    --secondary: #e94560;
    --accent: #0f3460;
    --glass-bg: rgba(255, 255, 255, 0.15);
    --glass-border: rgba(255, 255, 255, 0.3);
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    --radius: 20px;
    --transition: 0.3s ease;
    --bg-gradient: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    --text-light: #f0f0f0;
    --text-muted: #b0b0c0;
    --card-bg: rgba(255, 255, 255, 0.08);
    --banner-gradient-1: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --banner-gradient-2: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --banner-gradient-3: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

[data-theme="dark"] {
    --primary: #0d0d1a;
    --secondary: #ff6b81;
    --accent: #1a3a5c;
    --glass-bg: rgba(20, 20, 40, 0.6);
    --glass-border: rgba(255, 255, 255, 0.15);
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    --bg-gradient: linear-gradient(135deg, #0d0d1a 0%, #1a1a2e 50%, #0f3460 100%);
    --text-light: #e0e0f0;
    --text-muted: #8a8a9a;
    --card-bg: rgba(255, 255, 255, 0.05);
    --banner-gradient-1: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    --banner-gradient-2: linear-gradient(135deg, #0f3460 0%, #533483 100%);
    --banner-gradient-3: linear-gradient(135deg, #2d1b69 0%, #1a1a2e 100%);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', 'PingFang SC', Roboto, 'Helvetica Neue', sans-serif;
    background: var(--bg-gradient);
    color: var(--text-light);
    line-height: 1.7;
    overflow-x: hidden;
    min-height: 100vh;
}

a {
    color: var(--secondary);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: #ff8a9e;
}

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

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

/* ===== 头部 ===== */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(26, 26, 46, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
    transition: var(--transition);
}

header.scrolled {
    background: rgba(13, 13, 26, 0.95);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 24px;
    font-weight: 800;
    color: var(--text-light);
}

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

.logo span {
    background: linear-gradient(135deg, var(--secondary), #ff8a9e);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

nav {
    display: flex;
    align-items: center;
    gap: 24px;
}

nav a {
    color: var(--text-muted);
    font-weight: 500;
    font-size: 15px;
    padding: 6px 0;
    position: relative;
}

nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--secondary);
    transition: var(--transition);
}

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

nav a.active {
    color: var(--text-light);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.theme-toggle,
.menu-toggle,
.search-toggle {
    background: none;
    border: none;
    color: var(--text-light);
    font-size: 20px;
    cursor: pointer;
    padding: 6px;
    border-radius: 50%;
    transition: var(--transition);
}

.theme-toggle:hover,
.menu-toggle:hover,
.search-toggle:hover {
    background: var(--glass-bg);
}

.menu-toggle {
    display: none;
}

.search-box {
    display: flex;
    align-items: center;
    background: var(--glass-bg);
    border-radius: 30px;
    padding: 4px 12px;
    border: 1px solid var(--glass-border);
    transition: var(--transition);
}

.search-box:focus-within {
    border-color: var(--secondary);
    box-shadow: 0 0 0 3px rgba(233, 69, 96, 0.2);
}

.search-box input {
    background: none;
    border: none;
    color: var(--text-light);
    padding: 6px 8px;
    font-size: 14px;
    width: 140px;
    outline: none;
}

.search-box input::placeholder {
    color: var(--text-muted);
}

.search-box button {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 16px;
    transition: var(--transition);
}

.search-box button:hover {
    color: var(--secondary);
}

/* ===== 移动端导航 ===== */
.mobile-nav {
    display: none;
    position: fixed;
    top: 68px;
    left: 0;
    width: 100%;
    background: rgba(13, 13, 26, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 20px;
    flex-direction: column;
    gap: 16px;
    z-index: 999;
    border-bottom: 1px solid var(--glass-border);
    animation: slideDown 0.3s ease;
}

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

.mobile-nav.open {
    display: flex;
}

.mobile-nav a {
    color: var(--text-muted);
    font-size: 18px;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: var(--transition);
}

.mobile-nav a:hover {
    color: var(--secondary);
}

.mobile-nav input {
    flex: 1;
    padding: 8px 16px;
    border-radius: 20px;
    border: 1px solid var(--glass-border);
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-light);
    outline: none;
}

.mobile-nav input::placeholder {
    color: var(--text-muted);
}

.mobile-nav button {
    padding: 8px 16px;
    border-radius: 20px;
    border: none;
    background: var(--secondary);
    color: #fff;
    cursor: pointer;
    transition: var(--transition);
}

.mobile-nav button:hover {
    background: #ff6b81;
    transform: scale(1.05);
}

/* ===== Banner ===== */
.banner {
    margin-top: 72px;
    position: relative;
    overflow: hidden;
    min-height: 500px;
    display: flex;
    align-items: center;
}

.banner::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 30% 50%, rgba(233, 69, 96, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 70% 50%, rgba(15, 52, 96, 0.2) 0%, transparent 50%);
    animation: bannerGlow 10s ease-in-out infinite alternate;
    pointer-events: none;
}

@keyframes bannerGlow {
    0% { transform: translate(0, 0) rotate(0deg); }
    100% { transform: translate(20px, -20px) rotate(5deg); }
}

.banner-slider {
    display: flex;
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    width: 100%;
}

.banner-slide {
    min-width: 100%;
    padding: 60px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    text-align: center;
    position: relative;
    z-index: 1;
}

.banner-slide:nth-child(1) {
    background: var(--banner-gradient-1);
}

.banner-slide:nth-child(2) {
    background: var(--banner-gradient-2);
}

.banner-slide:nth-child(3) {
    background: var(--banner-gradient-3);
}

.banner-slide h1 {
    font-size: 48px;
    font-weight: 800;
    margin-bottom: 16px;
    background: linear-gradient(135deg, #fff, var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: none;
}

.banner-slide p {
    font-size: 18px;
    max-width: 600px;
    color: var(--text-muted);
    margin-bottom: 30px;
    line-height: 1.8;
}

.banner-slide .btn {
    display: inline-block;
    padding: 14px 40px;
    background: var(--secondary);
    color: #fff;
    border-radius: 50px;
    font-weight: 600;
    font-size: 16px;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(233, 69, 96, 0.3);
}

.banner-slide .btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(233, 69, 96, 0.4);
    background: #ff6b81;
}

.banner-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 2;
}

.banner-dots span {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--text-muted);
    cursor: pointer;
    transition: var(--transition);
}

.banner-dots span.active {
    background: var(--secondary);
    width: 30px;
    border-radius: 6px;
}

.banner-dots span:hover {
    background: var(--secondary);
    transform: scale(1.2);
}

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

.section-title {
    text-align: center;
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 16px;
    position: relative;
    display: inline-block;
    width: 100%;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: var(--secondary);
    margin: 12px auto 0;
    border-radius: 2px;
}

.section-subtitle {
    text-align: center;
    color: var(--text-muted);
    max-width: 700px;
    margin: 0 auto 50px;
    font-size: 16px;
}

/* ===== 卡片网格 ===== */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.card {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    padding: 30px;
    transition: var(--transition);
    box-shadow: var(--shadow);
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.3);
    border-color: var(--secondary);
}

.card h3 {
    font-size: 22px;
    margin-bottom: 12px;
}

.card p {
    color: var(--text-muted);
    font-size: 15px;
}

.card-icon {
    font-size: 40px;
    margin-bottom: 16px;
    display: block;
    transition: var(--transition);
}

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

/* ===== FAQ ===== */
.faq-list {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    margin-bottom: 12px;
    overflow: hidden;
    transition: var(--transition);
}

.faq-item:hover {
    border-color: var(--secondary);
}

.faq-question {
    padding: 18px 24px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    font-size: 16px;
    transition: var(--transition);
}

.faq-question:hover {
    background: rgba(255, 255, 255, 0.05);
}

.faq-question .icon {
    transition: var(--transition);
    font-size: 20px;
    line-height: 1;
}

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

.faq-answer {
    padding: 0 24px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.3s ease;
    color: var(--text-muted);
}

.faq-item.open .faq-answer {
    padding: 0 24px 18px;
    max-height: 400px;
}

/* ===== HowTo 步骤 ===== */
.howto-steps {
    counter-reset: step;
    max-width: 700px;
    margin: 0 auto;
}

.howto-step {
    display: flex;
    gap: 20px;
    margin-bottom: 24px;
    align-items: flex-start;
    padding: 16px;
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    transition: var(--transition);
}

.howto-step:hover {
    transform: translateX(5px);
    border-color: var(--secondary);
}

.howto-step::before {
    counter-increment: step;
    content: counter(step);
    background: var(--secondary);
    color: #fff;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    flex-shrink: 0;
    transition: var(--transition);
}

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

.howto-step h4 {
    font-size: 18px;
    margin-bottom: 6px;
}

.howto-step p {
    color: var(--text-muted);
}

/* ===== 文章卡片 ===== */
.article-card {
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    padding: 24px;
    transition: var(--transition);
}

.article-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    border-color: var(--secondary);
}

.article-card h3 {
    font-size: 18px;
    margin-bottom: 8px;
}

.article-card .meta {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.article-card p {
    color: var(--text-muted);
    font-size: 14px;
}

.article-card .btn {
    margin-top: 12px;
    display: inline-block;
    color: var(--secondary);
    font-weight: 600;
    transition: var(--transition);
}

.article-card .btn:hover {
    color: #ff8a9e;
    padding-left: 5px;
}

/* ===== 页脚 ===== */
footer {
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 60px 0 30px;
    border-top: 1px solid var(--glass-border);
}

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

.footer-col h4 {
    font-size: 18px;
    margin-bottom: 16px;
    position: relative;
    padding-bottom: 8px;
}

.footer-col h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 30px;
    height: 2px;
    background: var(--secondary);
}

.footer-col a {
    display: block;
    color: var(--text-muted);
    margin-bottom: 8px;
    font-size: 14px;
    transition: var(--transition);
}

.footer-col a:hover {
    color: var(--secondary);
    padding-left: 5px;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid var(--glass-border);
    color: var(--text-muted);
    font-size: 13px;
}

.footer-bottom a {
    color: var(--text-muted);
    margin: 0 8px;
    transition: var(--transition);
}

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

/* ===== 回到顶部 ===== */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--secondary);
    color: #fff;
    border: none;
    font-size: 24px;
    cursor: pointer;
    box-shadow: var(--shadow);
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 999;
}

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

.back-to-top:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(233, 69, 96, 0.4);
    background: #ff6b81;
}

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

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

/* ===== 计数动画 ===== */
.count-up {
    font-size: 48px;
    font-weight: 800;
    color: var(--secondary);
}

/* ===== 地图占位 ===== */
.map-placeholder {
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    padding: 20px;
    text-align: center;
    transition: var(--transition);
}

.map-placeholder:hover {
    border-color: var(--secondary);
}

/* ===== 响应式 ===== */
@media (max-width: 1024px) {
    .banner-slide h1 {
        font-size: 40px;
    }
    
    .section-title {
        font-size: 32px;
    }
}

@media (max-width: 768px) {
    nav {
        display: none;
    }
    
    .menu-toggle {
        display: block;
    }
    
    .search-box {
        display: none;
    }
    
    .banner {
        min-height: 400px;
    }
    
    .banner-slide {
        padding: 40px 20px;
    }
    
    .banner-slide h1 {
        font-size: 32px;
    }
    
    .banner-slide p {
        font-size: 16px;
    }
    
    .section-title {
        font-size: 28px;
    }
    
    .header-inner {
        padding: 10px 16px;
    }
    
    .card-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    section {
        padding: 60px 0;
    }
    
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 20px;
    }
    
    .howto-step {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .back-to-top {
        width: 40px;
        height: 40px;
        font-size: 20px;
        bottom: 20px;
        right: 20px;
    }
}

@media (max-width: 480px) {
    .banner {
        min-height: 360px;
        margin-top: 60px;
    }
    
    .banner-slide h1 {
        font-size: 26px;
    }
    
    .banner-slide p {
        font-size: 14px;
    }
    
    .banner-slide .btn {
        padding: 12px 30px;
        font-size: 14px;
    }
    
    .section-title {
        font-size: 24px;
    }
    
    .section-subtitle {
        font-size: 14px;
    }
    
    .card {
        padding: 20px;
    }
    
    .card h3 {
        font-size: 18px;
    }
    
    .logo {
        font-size: 20px;
    }
    
    .logo svg {
        width: 32px;
        height: 32px;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
    }
    
    .faq-question {
        padding: 14px 18px;
        font-size: 14px;
    }
    
    .faq-answer {
        font-size: 14px;
    }
}

/* ===== 性能优化 ===== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ===== 滚动条美化 ===== */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--primary);
}

::-webkit-scrollbar-thumb {
    background: var(--secondary);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #ff6b81;
}

/* ===== 选中文本样式 ===== */
::selection {
    background: var(--secondary);
    color: #fff;
}

/* ===== 焦点样式 ===== */
:focus-visible {
    outline: 2px solid var(--secondary);
    outline-offset: 2px;
}

/* ===== 按钮通用样式 ===== */
.btn {
    display: inline-block;
    padding: 14px 40px;
    background: var(--secondary);
    color: #fff;
    border-radius: 50px;
    font-weight: 600;
    font-size: 16px;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    text-align: center;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(233, 69, 96, 0.4);
    background: #ff6b81;
}

.btn:active {
    transform: translateY(-1px);
}

/* ===== 网格布局增强 ===== */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

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

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

/* ===== 间距工具 ===== */
.mt-1 { margin-top: 10px; }
.mt-2 { margin-top: 20px; }
.mt-3 { margin-top: 30px; }
.mt-4 { margin-top: 40px; }
.mb-1 { margin-bottom: 10px; }
.mb-2 { margin-bottom: 20px; }
.mb-3 { margin-bottom: 30px; }
.mb-4 { margin-bottom: 40px; }
.p-1 { padding: 10px; }
.p-2 { padding: 20px; }
.p-3 { padding: 30px; }

/* ===== 文本对齐 ===== */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

/* ===== 弹性布局 ===== */
.flex {
    display: flex;
}

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

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

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

.gap-1 { gap: 10px; }
.gap-2 { gap: 20px; }
.gap-3 { gap: 30px; }

/* ===== 暗色模式过渡 ===== */
body,
header,
.card,
.faq-item,
footer,
.banner-slide {
    transition: background 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}