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

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

.dark-mode {
    background: #121212;
    color: #e0e0e0;
}

.dark-mode .card,
.dark-mode section,
.dark-mode header,
.dark-mode footer,
.dark-mode nav {
    background: #1e1e1e;
    color: #e0e0e0;
}

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

/* 头部 */
header {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: #fff;
    padding: 10px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.2);
}

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

.logo svg {
    height: 50px;
    width: auto;
}

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

nav a {
    color: #fff;
    text-decoration: none;
    padding: 8px 12px;
    border-radius: 8px;
    transition: background 0.3s;
}

nav a:hover {
    background: rgba(255, 255, 255, 0.15);
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: #fff;
    font-size: 28px;
    cursor: pointer;
}

@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }
    nav ul {
        display: none;
        flex-direction: column;
        width: 100%;
        background: #1a1a2e;
        padding: 10px 0;
    }
    nav ul.show {
        display: flex;
    }
    nav a {
        padding: 12px;
    }
}

/* Hero 区域 - 渐变Banner+毛玻璃效果 */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 80px 0;
    text-align: center;
    border-radius: 0 0 30px 30px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 30% 50%, rgba(255,255,255,0.1) 0%, transparent 70%);
    pointer-events: none;
}

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

.hero p {
    font-size: 1.2rem;
    max-width: 800px;
    margin: 0 auto 30px;
    position: relative;
    z-index: 1;
}

.hero .btn {
    background: #ff6b35;
    color: #fff;
    padding: 14px 40px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: bold;
    display: inline-block;
    transition: transform 0.3s, box-shadow 0.3s;
    box-shadow: 0 8px 25px rgba(255, 107, 53, 0.4);
    position: relative;
    z-index: 1;
}

.hero .btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(255, 107, 53, 0.6);
}

/* 面包屑 */
.breadcrumb {
    background: #fff;
    padding: 15px 0;
    border-bottom: 1px solid #eee;
    font-size: 0.9rem;
}

.dark-mode .breadcrumb {
    background: #1e1e1e;
    border-bottom-color: #333;
}

.breadcrumb a {
    color: #667eea;
    text-decoration: none;
}

.breadcrumb span {
    color: #888;
}

/* 通用 Section */
section {
    padding: 60px 0;
}

/* 卡片 - 圆角+毛玻璃效果+悬浮动画 */
.card {
    background: #fff;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    margin-bottom: 30px;
    transition: transform 0.3s, box-shadow 0.3s;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.85);
}

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

.dark-mode .card {
    background: rgba(42, 42, 42, 0.85);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

/* 标题 */
h2 {
    font-size: 2rem;
    margin-bottom: 30px;
    color: #1a1a2e;
    position: relative;
    display: inline-block;
}

.dark-mode h2 {
    color: #e0e0e0;
}

h2::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    border-radius: 2px;
}

h3 {
    font-size: 1.4rem;
    margin: 20px 0 10px;
    color: #333;
}

.dark-mode h3 {
    color: #ccc;
}

/* 网格 */
.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;
}

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

/* Banner 轮播 */
.banner-slider {
    position: relative;
    overflow: hidden;
    border-radius: 20px;
}

.banner-slide {
    display: none;
    animation: fadeIn 0.8s;
}

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

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

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

.slide-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #ccc;
    cursor: pointer;
    transition: background 0.3s;
}

.slide-dot.active {
    background: #667eea;
}

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

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

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

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

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

/* How-to 步骤 */
.howto-step {
    background: #f0f4ff;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 15px;
}

.dark-mode .howto-step {
    background: #2a2a3a;
}

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

footer a {
    color: #aaa;
    text-decoration: none;
}

footer a:hover {
    color: #fff;
}

.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: #667eea;
    color: #fff;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
    transition: transform 0.3s;
    border: none;
    font-size: 24px;
    z-index: 999;
}

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

/* 暗黑模式切换按钮 */
.dark-mode-toggle {
    position: fixed;
    bottom: 90px;
    right: 30px;
    background: #333;
    color: #fff;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: none;
    font-size: 20px;
    z-index: 999;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}

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

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

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

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

.search-box input {
    flex: 1;
    padding: 12px 20px;
    border: 2px solid #ddd;
    border-radius: 30px;
    font-size: 1rem;
}

.dark-mode .search-box input {
    background: #333;
    border-color: #555;
    color: #fff;
}

.search-box button {
    padding: 12px 25px;
    background: #667eea;
    color: #fff;
    border: none;
    border-radius: 30px;
    cursor: pointer;
}

/* 文章卡片 */
.article-card {
    border-left: 4px solid #667eea;
    padding-left: 20px;
    margin-bottom: 20px;
}

.tag {
    background: #eef2ff;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    color: #667eea;
    display: inline-block;
    margin-right: 8px;
}

.dark-mode .tag {
    background: #2a2a3a;
}

/* 响应式 */
@media (max-width: 600px) {
    .hero h1 {
        font-size: 1.8rem;
    }
    .hero p {
        font-size: 1rem;
    }
}