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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f4f4f9;
    color: #222;
    line-height: 1.7;
    transition: background 0.3s, color 0.3s;
}

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

a {
    color: #1a73e8;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

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

/* 头部导航 */
header {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: white;
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    backdrop-filter: blur(10px);
}

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

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    background: linear-gradient(45deg, #f7971e, #ffd200);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo svg {
    width: 40px;
    height: 40px;
}

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

nav ul li a {
    color: white;
    font-weight: 500;
    padding: 8px 12px;
    border-radius: 8px;
    transition: background 0.3s;
}

nav ul li a:hover {
    background: rgba(255,255,255,0.15);
    text-decoration: none;
}

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

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

.search-box input {
    padding: 8px 12px;
    border-radius: 20px;
    border: none;
    outline: none;
    width: 180px;
}

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

.dark-toggle {
    background: none;
    border: 1px solid #fff;
    color: white;
    padding: 6px 14px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9rem;
}

/* 面包屑 */
.breadcrumb {
    background: #e8e8f0;
    padding: 12px 0;
    font-size: 0.95rem;
}

.breadcrumb a {
    color: #555;
}

.breadcrumb span {
    color: #999;
}

body.dark-mode .breadcrumb {
    background: #2a2a3e;
}

body.dark-mode .breadcrumb a {
    color: #bbb;
}

body.dark-mode .breadcrumb span {
    color: #888;
}

/* Hero 区域 */
.hero {
    background: linear-gradient(135deg, #0f0c29, #302b63, #24243e);
    color: white;
    text-align: center;
    padding: 100px 20px;
    position: relative;
    overflow: hidden;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 20px;
    text-shadow: 0 4px 10px rgba(0,0,0,0.5);
}

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

.hero .btn {
    background: linear-gradient(45deg, #f7971e, #ffd200);
    color: #1a1a2e;
    padding: 14px 40px;
    border-radius: 50px;
    font-weight: bold;
    font-size: 1.1rem;
    display: inline-block;
    transition: transform 0.3s;
}

.hero .btn:hover {
    transform: scale(1.05);
}

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

.section-title {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 40px;
    position: relative;
}

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

/* 卡片 */
.card {
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    transition: transform 0.3s, box-shadow 0.3s;
    backdrop-filter: blur(5px);
}

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

body.dark-mode .card {
    background: #1e1e2e;
    box-shadow: 0 10px 30px rgba(0,0,0,0.4);
}

body.dark-mode .card:hover {
    box-shadow: 0 20px 40px rgba(0,0,0,0.6);
}

/* 网格布局 */
.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: 30px;
}

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

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

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

.banner-slide img {
    width: 100%;
    height: auto;
    border-radius: 20px;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* 数字计数器 */
.counter {
    font-size: 2.5rem;
    font-weight: 700;
    color: #ff6b35;
}

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

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

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

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

.faq-item.active .faq-answer {
    max-height: 500px;
}

/* 页脚 */
.footer {
    background: #1a1a2e;
    color: #aaa;
    padding: 40px 20px;
    text-align: center;
}

.footer a {
    color: #ccc;
}

.footer .icp {
    margin-top: 20px;
    font-size: 0.9rem;
}

/* 返回顶部 */
.back-to-top {
    position: fixed;
    bottom: 40px;
    right: 40px;
    background: #ff6b35;
    color: white;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 1.5rem;
    cursor: pointer;
    display: none;
    z-index: 999;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.back-to-top.show {
    display: block;
}

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

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

/* 图片懒加载占位 */
img[loading="lazy"] {
    background: #e0e0e0;
}

body.dark-mode img[loading="lazy"] {
    background: #333;
}

/* 文章卡片 */
.article-card {
    border-bottom: 1px solid #eee;
    padding: 20px 0;
}

body.dark-mode .article-card {
    border-bottom-color: #444;
}

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

.article-card .date {
    color: #888;
    font-size: 0.9rem;
}

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

/* HowTo 步骤 */
.howto-step {
    margin: 20px 0;
    padding-left: 20px;
    border-left: 4px solid #ff6b35;
}

/* 团队成员 */
.team-member {
    text-align: center;
}

.team-member img {
    border-radius: 50%;
    width: 120px;
    height: 120px;
    object-fit: cover;
    margin-bottom: 15px;
}

/* 合作伙伴链接 */
.partner-links a {
    margin: 0 10px;
}

/* 二维码 */
.qr-code svg {
    width: 120px;
    height: 120px;
    margin: 10px;
}

/* 订阅 */
.newsletter {
    background: #f0f0f8;
    padding: 40px;
    border-radius: 20px;
    text-align: center;
}

body.dark-mode .newsletter {
    background: #2a2a3e;
}

.newsletter input {
    padding: 12px 20px;
    border-radius: 30px;
    border: 1px solid #ccc;
    width: 300px;
    max-width: 90%;
}

body.dark-mode .newsletter input {
    border-color: #555;
    background: #333;
    color: #eee;
}

.newsletter button {
    background: #ff6b35;
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 30px;
    margin-left: 10px;
    cursor: pointer;
}

/* 响应式 */
@media (max-width: 768px) {
    nav ul {
        display: none;
        flex-direction: column;
        width: 100%;
        background: #1a1a2e;
        padding: 20px;
    }
    nav ul.open {
        display: flex;
    }
    .menu-toggle {
        display: block;
    }
    .hero h1 {
        font-size: 2rem;
    }
    .header-inner {
        flex-wrap: wrap;
    }
    .search-box input {
        width: 120px;
    }
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 44px;
        height: 44px;
        font-size: 1.2rem;
    }
    .newsletter button {
        margin-left: 0;
        margin-top: 10px;
    }
    .newsletter {
        padding: 20px;
    }
}

/* 暗色模式下的额外调整 */
body.dark-mode .hero {
    background: linear-gradient(135deg, #0a0a1a, #1a1a3e, #0f0f2e);
}

body.dark-mode .section-title::after {
    background: #ff8c42;
}

body.dark-mode .counter {
    color: #ff8c42;
}

body.dark-mode .howto-step {
    border-left-color: #ff8c42;
}

body.dark-mode .article-card .read-more {
    color: #ff8c42;
}

body.dark-mode .search-box input {
    background: #333;
    color: #eee;
    border: 1px solid #555;
}

body.dark-mode .search-box button {
    background: #ff8c42;
}

body.dark-mode .back-to-top {
    background: #ff8c42;
}

body.dark-mode .dark-toggle {
    border-color: #aaa;
    color: #eee;
}

body.dark-mode .newsletter button {
    background: #ff8c42;
}

body.dark-mode .hero .btn {
    background: linear-gradient(45deg, #f7971e, #ffd200);
    color: #1a1a2e;
}