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

/* 基础样式 */
body {
    font-family: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
    background: #f8f9fa;
    color: #1a1a2e;
    line-height: 1.6;
    transition: background 0.3s, color 0.3s;
}

body.dark {
    background: #0f0f1a;
    color: #e0e0e0;
}

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

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

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

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

.dark .glass {
    background: rgba(20, 20, 40, 0.4);
    border-color: rgba(255, 255, 255, 0.1);
}

/* 渐变Banner */
.hero {
    background: linear-gradient(135deg, #ff6b35, #f7c948, #2b2d42);
    padding: 60px 0;
    text-align: center;
    color: white;
    border-radius: 0 0 40px 40px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
}

.dark .hero {
    background: linear-gradient(135deg, #1a1a2e, #16213e, #0f3460);
}

.hero h1 {
    font-size: clamp(2rem, 6vw, 3.5rem);
    font-weight: 800;
    margin-bottom: 20px;
    text-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.hero p {
    font-size: 1.2rem;
    max-width: 800px;
    margin: 0 auto 30px;
    opacity: 0.9;
}

/* 按钮 */
.btn {
    display: inline-block;
    padding: 14px 36px;
    background: white;
    color: #1a1a2e;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1.1rem;
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
    transition: all 0.3s;
    cursor: pointer;
    border: none;
}

.btn:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 12px 30px rgba(0,0,0,0.25);
}

.btn-outline {
    background: transparent;
    border: 2px solid white;
    color: white;
}

.btn-outline:hover {
    background: white;
    color: #1a1a2e;
}

/* 卡片 */
.card {
    background: white;
    border-radius: 24px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    transition: all 0.3s;
    border: 1px solid rgba(0,0,0,0.02);
}

.dark .card {
    background: #1c1c30;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

/* 面包屑 */
.breadcrumb {
    padding: 15px 0;
    font-size: 0.95rem;
    color: #666;
}

.dark .breadcrumb {
    color: #aaa;
}

.breadcrumb span {
    margin: 0 6px;
}

/* 导航 */
nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
}

.nav-links {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.nav-links a {
    font-weight: 500;
    padding: 8px 0;
    border-bottom: 2px solid transparent;
    transition: 0.3s;
}

.nav-links a:hover {
    border-bottom-color: #ff6b35;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: inherit;
}

.search-box {
    display: flex;
    gap: 6px;
}

.search-box input {
    padding: 8px 16px;
    border-radius: 50px;
    border: 1px solid #ddd;
    background: white;
    font-size: 0.9rem;
}

.dark .search-box input {
    background: #2a2a40;
    border-color: #444;
    color: white;
}

.search-box button {
    padding: 8px 16px;
    border-radius: 50px;
    border: none;
    background: #ff6b35;
    color: white;
    cursor: pointer;
}

/* section */
section {
    padding: 60px 0;
}

.section-title {
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    font-weight: 700;
    margin-bottom: 40px;
    text-align: center;
    position: relative;
}

.section-title:after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background: #ff6b35;
    margin: 12px auto 0;
    border-radius: 4px;
}

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

.flex-center {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
}

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

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

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

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

.carousel-btn {
    background: #ff6b35;
    color: white;
    border: none;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    transition: 0.3s;
}

.carousel-btn:hover {
    transform: scale(1.1);
}

/* FAQ */
.faq-item {
    border-bottom: 1px solid #ddd;
    padding: 16px 0;
    cursor: pointer;
}

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

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

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

.dark .faq-answer {
    color: #bbb;
}

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

/* footer */
footer {
    background: #1a1a2e;
    color: #ccc;
    padding: 40px 0 20px;
    margin-top: 60px;
}

.dark footer {
    background: #0a0a14;
}

footer a {
    color: #ff6b35;
}

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

/* 返回顶部 */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: #ff6b35;
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(0,0,0,0.2);
    border: none;
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s, transform 0.3s;
    pointer-events: none;
}

.back-to-top.show {
    opacity: 1;
    pointer-events: auto;
}

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

/* 暗黑切换 */
.dark-toggle {
    background: none;
    border: 2px solid #ff6b35;
    border-radius: 50px;
    padding: 6px 16px;
    font-size: 0.9rem;
    cursor: pointer;
    color: inherit;
    transition: 0.3s;
}

.dark-toggle:hover {
    background: #ff6b35;
    color: white;
}

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

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

/* 数字动画 */
.count-up {
    font-size: 2.5rem;
    font-weight: 800;
    color: #ff6b35;
}

/* svg占位 */
.svg-placeholder {
    background: #e0e0e0;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 180px;
    color: #888;
    font-size: 0.9rem;
}

.dark .svg-placeholder {
    background: #2a2a40;
    color: #aaa;
}

.article-card {
    padding: 20px;
}

.article-card h3 {
    margin-bottom: 10px;
}

.article-card .meta {
    color: #888;
    font-size: 0.85rem;
    margin-bottom: 10px;
}

.read-more {
    color: #ff6b35;
    font-weight: 600;
}

.howto-steps {
    counter-reset: step;
}

.howto-step {
    display: flex;
    gap: 16px;
    margin-bottom: 20px;
    align-items: flex-start;
}

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

/* 响应式 */
@media (max-width: 768px) {
    .nav-links {
        display: none;
        flex-direction: column;
        width: 100%;
        margin-top: 15px;
    }
    .nav-links.open {
        display: flex;
    }
    .menu-toggle {
        display: block;
    }
    .hero {
        padding: 40px 0;
    }
    section {
        padding: 40px 0;
    }
    .grid {
        grid-template-columns: 1fr;
    }
}