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

:root {
    --primary: #ff6b35;
    --secondary: #1a1a2e;
    --accent: #e94560;
    --bg: #0f0f23;
    --text: #f0f0f0;
    --glass: rgba(255, 255, 255, 0.08);
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    --radius: 20px;
    --transition: 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

/* 暗色模式 */
.dark-mode {
    --bg: #f5f5f5;
    --text: #1a1a2e;
    --glass: rgba(0, 0, 0, 0.05);
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

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

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

.glass {
    background: var(--glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

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

h1 {
    font-size: 3.2rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 24px;
}

h2 {
    font-size: 2.4rem;
    font-weight: 700;
    margin-bottom: 48px;
    position: relative;
    display: inline-block;
}

h2:after {
    content: '';
    position: absolute;
    bottom: -12px;
    left: 0;
    width: 60px;
    height: 4px;
    background: var(--primary);
    border-radius: 2px;
}

h3 {
    font-size: 1.6rem;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--primary);
}

p {
    font-size: 1.1rem;
    margin-bottom: 16px;
    color: rgba(255, 255, 255, 0.9);
}

.dark-mode p {
    color: rgba(0, 0, 0, 0.8);
}

/* 按钮 */
.btn {
    display: inline-block;
    padding: 14px 36px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: #fff;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1.1rem;
    border: none;
    cursor: pointer;
    transition: transform var(--transition), box-shadow var(--transition);
}

.btn:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(233, 69, 96, 0.4);
}

/* 网格 */
.grid {
    display: grid;
    gap: 32px;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

/* 卡片 */
.card {
    padding: 32px;
    border-radius: var(--radius);
    background: var(--glass);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: transform var(--transition), box-shadow var(--transition);
}

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

.card svg {
    width: 64px;
    height: 64px;
    margin-bottom: 20px;
    fill: var(--primary);
}

/* Banner */
.banner {
    position: relative;
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
}

.banner-bg {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 20% 50%, var(--secondary), #0a0a1e);
    z-index: -1;
}

.banner .glass {
    padding: 60px 48px;
    max-width: 800px;
    width: 100%;
}

/* 导航 */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 16px 0;
    transition: background var(--transition);
}

.nav.scrolled {
    background: rgba(15, 15, 35, 0.95);
    backdrop-filter: blur(20px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

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

.nav-logo {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--primary);
}

.nav-links {
    display: flex;
    gap: 32px;
    list-style: none;
}

.nav-links a {
    color: var(--text);
    font-weight: 500;
    transition: color var(--transition);
    position: relative;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary);
}

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

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

/* 菜单按钮 */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
    background: none;
    border: none;
    padding: 8px;
}

.menu-toggle span {
    width: 28px;
    height: 3px;
    background: var(--text);
    border-radius: 2px;
    transition: var(--transition);
}

/* 移动菜单 */
.mobile-menu {
    display: none;
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    background: rgba(15, 15, 35, 0.98);
    backdrop-filter: blur(20px);
    padding: 32px;
    z-index: 999;
    flex-direction: column;
    gap: 24px;
    list-style: none;
    text-align: center;
}

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

/* 页脚 */
.footer {
    background: var(--secondary);
    padding: 64px 0 32px;
    margin-top: 80px;
}

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

.footer-col h4 {
    font-size: 1.3rem;
    margin-bottom: 20px;
    color: var(--primary);
}

.footer-col ul {
    list-style: none;
}

.footer-col li {
    margin-bottom: 12px;
}

.footer-col a {
    color: rgba(255, 255, 255, 0.7);
    transition: color var(--transition);
}

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

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 24px;
    text-align: center;
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.6);
}

/* 回到顶部 */
.scroll-top {
    position: fixed;
    bottom: 40px;
    right: 40px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    border: none;
    cursor: pointer;
    font-size: 1.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 24px rgba(255, 107, 53, 0.4);
    transition: transform var(--transition), opacity var(--transition);
    opacity: 0;
    visibility: hidden;
    z-index: 999;
}

.scroll-top.visible {
    opacity: 1;
    visibility: visible;
}

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

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

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

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

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.6s ease, opacity 0.4s ease;
    opacity: 0;
    margin-top: 0;
}

.faq-item.active .faq-answer {
    max-height: 400px;
    opacity: 1;
    margin-top: 16px;
}

.faq-toggle {
    font-size: 1.6rem;
    transition: transform 0.4s ease;
    color: var(--primary);
}

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

/* 统计数字 */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 32px;
    text-align: center;
}

.stat-number {
    font-size: 3.2rem;
    font-weight: 800;
    color: var(--primary);
}

.stat-label {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.7);
}

.dark-mode .stat-label {
    color: rgba(0, 0, 0, 0.6);
}

/* Banner轮播 */
.banner-slider {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius);
}

.banner-slide {
    display: none;
    padding: 48px;
    animation: fadeIn 0.8s ease;
}

.banner-slide.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.slider-dots {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 24px;
}

.slider-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: background var(--transition);
    border: none;
}

.slider-dot.active {
    background: var(--primary);
}

/* 搜索模态框 */
.search-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.search-modal.open {
    opacity: 1;
    visibility: visible;
}

.search-modal-content {
    background: var(--secondary);
    padding: 48px;
    border-radius: var(--radius);
    width: 90%;
    max-width: 600px;
}

.search-modal input {
    width: 100%;
    padding: 16px 24px;
    font-size: 1.2rem;
    border-radius: 50px;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    outline: none;
    margin-bottom: 24px;
}

.search-modal input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.search-results {
    max-height: 300px;
    overflow-y: auto;
}

.search-result-item {
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
}

.search-result-item:hover {
    color: var(--primary);
}

.dark-mode .search-modal-content {
    background: #fff;
}

.dark-mode .search-modal input {
    background: rgba(0, 0, 0, 0.05);
    color: #333;
}

.dark-mode .search-modal input::placeholder {
    color: rgba(0, 0, 0, 0.4);
}

/* 响应式 - 平板 */
@media (max-width: 768px) {
    h1 {
        font-size: 2.2rem;
    }

    h2 {
        font-size: 1.8rem;
    }

    .nav-links {
        display: none;
    }

    .menu-toggle {
        display: flex;
    }

    .banner .glass {
        padding: 32px 24px;
    }

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

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

    .scroll-top {
        bottom: 24px;
        right: 24px;
        width: 48px;
        height: 48px;
        font-size: 1.4rem;
    }
}

/* 响应式 - 手机 */
@media (max-width: 480px) {
    section {
        padding: 48px 0;
    }

    .container {
        padding: 0 16px;
    }

    .banner {
        min-height: 60vh;
    }

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

/* 暗色模式修正 */
.dark-mode .glass {
    background: rgba(255, 255, 255, 0.7);
    border-color: rgba(0, 0, 0, 0.1);
}

.dark-mode .nav.scrolled {
    background: rgba(245, 245, 245, 0.95);
}

.dark-mode .footer {
    background: #e0e0e0;
}

.dark-mode .footer-bottom {
    border-color: rgba(0, 0, 0, 0.1);
}

.dark-mode .footer-col a {
    color: rgba(0, 0, 0, 0.6);
}

.dark-mode .faq-item {
    border-color: rgba(0, 0, 0, 0.1);
}

.dark-mode .stat-label {
    color: rgba(0, 0, 0, 0.6);
}

.dark-mode .banner-bg {
    background: radial-gradient(circle at 20% 50%, #e0e0e0, #f5f5f5);
}

/* 懒加载图片占位 */
img[loading=lazy] {
    background: linear-gradient(135deg, var(--secondary), var(--primary));
    border-radius: 12px;
    width: 100%;
    height: auto;
    display: block;
    margin-bottom: 16px;
    min-height: 200px;
    object-fit: cover;
}

/* 文章卡片 */
.article-card {
    padding: 24px;
    border-radius: var(--radius);
    background: var(--glass);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: var(--transition);
}

.article-card:hover {
    transform: translateY(-4px);
}

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

.article-card .date {
    font-size: 0.9rem;
    color: var(--primary);
    margin-bottom: 12px;
    display: block;
}

.article-card p {
    font-size: 1rem;
    margin-bottom: 16px;
}

.article-card .btn {
    padding: 10px 28px;
    font-size: 0.95rem;
}

/* 教程步骤 */
.howto-step {
    padding: 24px;
    margin-bottom: 16px;
    border-left: 4px solid var(--primary);
    background: var(--glass);
    border-radius: 0 var(--radius) var(--radius) 0;
}

.howto-step h4 {
    color: var(--primary);
    margin-bottom: 8px;
    font-size: 1.2rem;
}

.howto-step p {
    margin-bottom: 0;
}

/* 暗色模式更多修正 */
.dark-mode .howto-step {
    background: rgba(0, 0, 0, 0.03);
}

.dark-mode .article-card {
    background: rgba(0, 0, 0, 0.03);
}

.dark-mode .card {
    background: rgba(0, 0, 0, 0.03);
}

.dark-mode .faq-toggle {
    color: var(--accent);
}

.dark-mode h2:after {
    background: var(--accent);
}

.dark-mode .btn {
    background: linear-gradient(135deg, var(--accent), var(--primary));
}

.dark-mode .stat-number {
    color: var(--accent);
}

.dark-mode .nav-logo {
    color: var(--accent);
}

.dark-mode .nav-links a:hover,
.dark-mode .nav-links a.active {
    color: var(--accent);
}

.dark-mode .nav-links a:after {
    background: var(--accent);
}

.dark-mode .slider-dot.active {
    background: var(--accent);
}

.dark-mode .scroll-top {
    background: var(--accent);
}

.dark-mode .faq-question {
    color: #1a1a2e;
}

.dark-mode h2 {
    -webkit-text-fill-color: #1a1a2e;
    background: none;
    color: #1a1a2e;
}

.dark-mode h2:after {
    background: var(--accent);
}

.dark-mode h1 {
    -webkit-text-fill-color: #1a1a2e;
    background: none;
    color: #1a1a2e;
}

.dark-mode .article-card .date {
    color: var(--accent);
}

.dark-mode .howto-step h4 {
    color: var(--accent);
}

.dark-mode .footer-col h4 {
    color: var(--accent);
}

.dark-mode .card svg {
    fill: var(--accent);
}

.dark-mode .nav-links a {
    color: #1a1a2e;
}

.dark-mode .nav.scrolled {
    background: rgba(245, 245, 245, 0.95);
}

.dark-mode .menu-toggle span {
    background: #1a1a2e;
}

.dark-mode .mobile-menu {
    background: rgba(245, 245, 245, 0.98);
}

.dark-mode .mobile-menu a {
    color: #1a1a2e;
}

.dark-mode .search-modal-content {
    background: #fff;
}

.dark-mode .search-modal input {
    background: rgba(0, 0, 0, 0.05);
    color: #333;
}

.dark-mode .search-results .search-result-item {
    border-color: rgba(0, 0, 0, 0.1);
    color: #1a1a2e;
}

.dark-mode .search-results .search-result-item:hover {
    color: var(--accent);
}