/* 全局重置与基础 */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body { font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif; background: #f8fafc; color: #1e293b; line-height: 1.7; transition: background 0.3s, color 0.3s; }
body.dark { background: #0f172a; color: #e2e8f0; }
a { color: #1e40af; text-decoration: none; transition: color 0.2s; }
a:hover { color: #1d4ed8; }
img, svg { max-width: 100%; display: block; }
ul, ol { list-style: none; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* 导航吸顶 */
.navbar { position: sticky; top: 0; z-index: 1000; background: rgba(255, 255, 255, 0.85); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); box-shadow: 0 2px 8px rgba(0,0,0,0.06); transition: background 0.3s; }
body.dark .navbar { background: rgba(30, 41, 59, 0.85); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); box-shadow: 0 2px 8px rgba(0,0,0,0.3); }
.navbar-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: 10px; font-size: 1.4rem; font-weight: 700; color: #1a3a5c; }
body.dark .logo { color: #f1f5f9; }
.logo svg { width: 40px; height: 40px; }
.nav-links { display: flex; gap: 24px; align-items: center; }
.nav-links a { font-size: 0.95rem; color: #334155; font-weight: 500; position: relative; }
body.dark .nav-links a { color: #cbd5e1; }
.nav-links a::after { content: ''; position: absolute; bottom: -4px; left: 0; width: 0; height: 2px; background: #1e40af; transition: width 0.3s; }
.nav-links a:hover::after { width: 100%; }
.menu-toggle { display: none; cursor: pointer; background: none; border: none; font-size: 1.8rem; color: #1e293b; }
body.dark .menu-toggle { color: #e2e8f0; }
.mobile-menu { display: none; flex-direction: column; background: rgba(255, 255, 255, 0.95); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); padding: 16px 20px; gap: 12px; border-top: 1px solid #e2e8f0; }
body.dark .mobile-menu { background: rgba(30, 41, 59, 0.95); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-color: #334155; }
.mobile-menu a { font-size: 1rem; color: #334155; padding: 6px 0; }
body.dark .mobile-menu a { color: #cbd5e1; }
@media (max-width: 768px) {
    .nav-links { display: none; }
    .menu-toggle { display: block; }
    .mobile-menu.active { display: flex; }
}

/* 返回顶部 */
.back-to-top { position: fixed; bottom: 40px; right: 30px; width: 48px; height: 48px; background: #1e40af; color: #fff; border: none; border-radius: 50%; font-size: 1.6rem; cursor: pointer; display: none; align-items: center; justify-content: center; box-shadow: 0 4px 12px rgba(30,64,175,0.3); z-index: 999; transition: opacity 0.3s, transform 0.3s; }
.back-to-top:hover { transform: scale(1.05); }

/* 暗黑模式切换 */
.dark-toggle { background: none; border: 1px solid #cbd5e1; border-radius: 30px; padding: 4px 12px; font-size: 0.85rem; cursor: pointer; color: #334155; transition: 0.2s; }
body.dark .dark-toggle { border-color: #475569; color: #e2e8f0; }

/* Banner轮播 - 渐变背景 */
.banner { position: relative; overflow: hidden; height: 420px; background: linear-gradient(135deg, #1a3a5c 0%, #2d5a87 50%, #4a7c9e 100%); border-radius: 0 0 24px 24px; }
.banner-slide { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; opacity: 0; transition: opacity 0.8s; padding: 40px; }
.banner-slide.active { opacity: 1; }
.banner-content { text-align: center; color: #fff; max-width: 700px; }
.banner-content h1 { font-size: 2.8rem; font-weight: 700; margin-bottom: 16px; text-shadow: 0 2px 8px rgba(0,0,0,0.2); }
.banner-content p { font-size: 1.2rem; opacity: 0.9; margin-bottom: 24px; }
.banner-btn { display: inline-block; background: #f59e0b; color: #1e293b; padding: 12px 32px; border-radius: 40px; font-weight: 600; font-size: 1rem; transition: background 0.3s; }
.banner-btn:hover { background: #d97706; color: #1e293b; }
.banner-indicators { position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%); display: flex; gap: 10px; }
.banner-indicators span { width: 12px; height: 12px; border-radius: 50%; background: rgba(255,255,255,0.4); cursor: pointer; transition: background 0.3s; }
.banner-indicators span.active { background: #f59e0b; }
@media (max-width: 768px) {
    .banner { height: 300px; }
    .banner-content h1 { font-size: 2rem; }
    .banner-content p { font-size: 1rem; }
}

/* 通用标题 */
.section-title { font-size: 2rem; font-weight: 700; margin-bottom: 32px; position: relative; display: inline-block; }
.section-title::after { content: ''; display: block; width: 60px; height: 4px; background: #1e40af; border-radius: 4px; margin-top: 8px; }
body.dark .section-title::after { background: #f59e0b; }
.section-subtitle { font-size: 1rem; color: #64748b; margin-bottom: 40px; }
body.dark .section-subtitle { color: #94a3b8; }

/* 卡片网格 */
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; }

/* 圆角卡片 + 毛玻璃效果 */
.card { background: rgba(255, 255, 255, 0.7); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-radius: 16px; padding: 24px; box-shadow: 0 4px 12px rgba(0,0,0,0.04); transition: transform 0.2s, box-shadow 0.2s; border: 1px solid rgba(255, 255, 255, 0.3); }
body.dark .card { background: rgba(30, 41, 59, 0.7); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); box-shadow: 0 4px 12px rgba(0,0,0,0.2); border-color: rgba(255, 255, 255, 0.1); }
.card:hover { transform: translateY(-4px); box-shadow: 0 8px 24px rgba(0,0,0,0.08); }
.card h3 { font-size: 1.2rem; font-weight: 600; margin-bottom: 12px; }
.card p { color: #475569; font-size: 0.95rem; }
body.dark .card p { color: #94a3b8; }
.card-icon { margin-bottom: 12px; }
.card-icon svg { width: 48px; height: 48px; }

/* 文章列表 */
.article-item { border-bottom: 1px solid #e2e8f0; padding: 20px 0; }
body.dark .article-item { border-color: #334155; }
.article-item:last-child { border: none; }
.article-item h4 { font-size: 1.1rem; font-weight: 600; margin-bottom: 6px; }
.article-item .meta { font-size: 0.85rem; color: #64748b; margin-bottom: 8px; }
.article-item p { color: #475569; font-size: 0.95rem; }
body.dark .article-item p { color: #94a3b8; }
.read-more { color: #1e40af; font-weight: 500; font-size: 0.9rem; }

/* FAQ */
.faq-item { border: 1px solid #e2e8f0; border-radius: 12px; margin-bottom: 12px; overflow: hidden; transition: border-color 0.2s; background: rgba(255, 255, 255, 0.5); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
body.dark .faq-item { border-color: #334155; background: rgba(30, 41, 59, 0.5); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.faq-question { padding: 16px 20px; background: rgba(241, 245, 249, 0.8); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); font-weight: 600; cursor: pointer; display: flex; justify-content: space-between; align-items: center; transition: background 0.2s; }
body.dark .faq-question { background: rgba(30, 41, 59, 0.8); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); color: #e2e8f0; }
.faq-question:hover { background: #e2e8f0; }
body.dark .faq-question:hover { background: #334155; }
.faq-question .icon { font-size: 1.2rem; transition: transform 0.3s; }
.faq-item.open .faq-question .icon { transform: rotate(45deg); }
.faq-answer { padding: 0 20px; max-height: 0; overflow: hidden; transition: max-height 0.4s ease, padding 0.3s; background: rgba(255, 255, 255, 0.5); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
body.dark .faq-answer { background: rgba(15, 23, 42, 0.5); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.faq-item.open .faq-answer { max-height: 600px; padding: 16px 20px; }
.faq-answer p { color: #475569; font-size: 0.95rem; }
body.dark .faq-answer p { color: #94a3b8; }

/* HowTo */
.howto-step { display: flex; gap: 16px; margin-bottom: 20px; }
.step-num { width: 36px; height: 36px; background: #1e40af; color: #fff; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; flex-shrink: 0; }
body.dark .step-num { background: #f59e0b; color: #0f172a; }
.step-content h4 { font-weight: 600; margin-bottom: 4px; }

/* 数字动画 (静态显示) */
.stat-number { font-size: 2.2rem; font-weight: 700; color: #1e40af; }
body.dark .stat-number { color: #f59e0b; }

/* 页脚 */
.footer { background: linear-gradient(135deg, #1a3a5c 0%, #2d5a87 100%); color: #e2e8f0; padding: 40px 0 20px; margin-top: 60px; }
.footer a { color: #94a3b8; }
.footer a:hover { color: #f1f5f9; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 32px; }
.footer h4 { font-size: 1rem; font-weight: 600; margin-bottom: 12px; color: #f1f5f9; }
.footer ul li { margin-bottom: 8px; font-size: 0.9rem; }
.footer-bottom { border-top: 1px solid #334155; margin-top: 32px; padding-top: 20px; text-align: center; font-size: 0.85rem; color: #94a3b8; }

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

/* 站内搜索 */
.search-box { display: flex; align-items: center; gap: 8px; }
.search-box input { padding: 8px 14px; border: 1px solid #cbd5e1; border-radius: 30px; font-size: 0.9rem; outline: none; width: 180px; transition: border-color 0.2s; background: rgba(255, 255, 255, 0.8); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); color: #1e293b; }
body.dark .search-box input { background: rgba(30, 41, 59, 0.8); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border-color: #475569; color: #e2e8f0; }
.search-box input:focus { border-color: #1e40af; }
.search-box button { background: #1e40af; color: #fff; border: none; border-radius: 30px; padding: 8px 16px; cursor: pointer; font-size: 0.9rem; }
body.dark .search-box button { background: #f59e0b; color: #0f172a; }

/* 图片懒加载占位 */
.lazy-placeholder { background: #e2e8f0; min-height: 60px; border-radius: 8px; }
body.dark .lazy-placeholder { background: #334155; }

/* 其他 */
.breadcrumb { padding: 16px 0; font-size: 0.9rem; color: #64748b; }
.breadcrumb span { color: #1e293b; }
body.dark .breadcrumb span { color: #e2e8f0; }
.contact-info p { margin-bottom: 6px; }
.contact-info strong { color: #1e293b; }
body.dark .contact-info strong { color: #e2e8f0; }
hr { border: none; border-top: 1px solid #e2e8f0; margin: 40px 0; }
body.dark hr { border-color: #334155; }
.tag { display: inline-block; background: #e2e8f0; color: #334155; padding: 2px 10px; border-radius: 20px; font-size: 0.8rem; margin-right: 6px; }
body.dark .tag { background: #334155; color: #cbd5e1; }

/* 友情链接 */
.friend-links { display: flex; flex-wrap: wrap; gap: 12px; }
.friend-links a { color: #64748b; font-size: 0.9rem; }