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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", sans-serif;
    background: #f0f4f8;
    color: #1a202c;
    line-height: 1.6;
    transition: background 0.3s, color 0.3s;
}

a {
    color: #0056a0;
    text-decoration: none;
    transition: color 0.3s;
}

a:hover {
    text-decoration: underline;
    color: #003d80;
}

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

ul, ol {
    padding-left: 20px;
}

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

/* 导航吸顶 */
.navbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(229, 231, 235, 0.5);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: background 0.3s, border-color 0.3s;
}

.navbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.logo {
    font-size: 1.4rem;
    font-weight: 700;
    color: #0056a0;
    background: linear-gradient(135deg, #0056a0, #00a3e0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

.nav-links a {
    color: #333;
    font-weight: 500;
    position: relative;
    padding-bottom: 4px;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: #0056a0;
    transition: width 0.3s;
}

.nav-links a:hover {
    color: #0056a0;
}

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

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #333;
    transition: color 0.3s;
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
        flex-direction: column;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        position: absolute;
        top: 64px;
        left: 0;
        width: 100%;
        padding: 16px 20px;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    }

    .nav-links.active {
        display: flex;
    }

    .mobile-menu-btn {
        display: block;
    }
}

/* 返回顶部 */
.back-to-top {
    position: fixed;
    bottom: 40px;
    right: 40px;
    background: linear-gradient(135deg, #0056a0, #00a3e0);
    color: #fff;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
    border: none;
    z-index: 999;
    box-shadow: 0 4px 12px rgba(0, 86, 160, 0.3);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 20px rgba(0, 86, 160, 0.4);
}

/* Banner轮播 - 渐变背景 */
.banner {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #e8f0fe, #d4e4f7, #c0d8f0);
    height: 400px;
    transition: background 0.3s;
}

.banner-slide {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.8s;
}

.banner-slide.active {
    opacity: 1;
}

.banner-content {
    text-align: center;
    padding: 20px;
    max-width: 700px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 16px;
    padding: 40px;
}

.banner-content h2 {
    font-size: 2.2rem;
    margin-bottom: 16px;
    color: #0a2540;
    background: linear-gradient(135deg, #0a2540, #0056a0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.banner-content p {
    font-size: 1.1rem;
    color: #2d3748;
    margin-bottom: 20px;
}

.banner-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
}

.banner-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(203, 213, 224, 0.7);
    cursor: pointer;
    border: none;
    transition: all 0.3s;
}

.banner-dot.active {
    background: #0056a0;
    transform: scale(1.2);
}

.banner-dot:hover {
    background: #0056a0;
}

@media (max-width: 768px) {
    .banner {
        height: 280px;
    }

    .banner-content h2 {
        font-size: 1.6rem;
    }

    .banner-content {
        padding: 24px;
    }
}

/* 数字动画 */
.stats {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 30px;
    padding: 40px 0;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 16px;
    margin: 20px auto;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: #0056a0;
    background: linear-gradient(135deg, #0056a0, #00a3e0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    color: #6b7280;
    font-size: 0.95rem;
    margin-top: 4px;
}

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

h1 {
    font-size: 2rem;
    margin-bottom: 24px;
    color: #0a2540;
    background: linear-gradient(135deg, #0a2540, #0056a0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

h2 {
    font-size: 1.6rem;
    margin-bottom: 20px;
    color: #0a2540;
}

h3 {
    font-size: 1.2rem;
    margin-bottom: 12px;
    color: #1f2937;
}

h4 {
    font-size: 1rem;
    margin-bottom: 8px;
    color: #374151;
}

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.grid-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 24px;
}

@media (max-width: 768px) {
    .grid-2,
    .grid-3 {
        grid-template-columns: 1fr;
    }
}

/* 卡片 - 圆角 + 毛玻璃效果 */
.card {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    border-color: rgba(0, 86, 160, 0.2);
}

/* FAQ */
.faq-item {
    border-bottom: 1px solid rgba(229, 231, 235, 0.6);
    padding: 16px 0;
    transition: border-color 0.3s;
}

.faq-question {
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    border-radius: 8px;
    transition: background 0.3s;
}

.faq-question:hover {
    background: rgba(0, 86, 160, 0.05);
}

.faq-question::after {
    content: '▼';
    font-size: 0.8rem;
    transition: transform 0.3s;
}

.faq-question.open::after {
    transform: rotate(180deg);
}

.faq-answer {
    display: none;
    margin-top: 12px;
    color: #4b5563;
    line-height: 1.7;
    padding: 0 12px;
}

.faq-answer.open {
    display: block;
    animation: fadeIn 0.3s ease;
}

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

/* 文章列表 */
.article-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

@media (max-width: 768px) {
    .article-list {
        grid-template-columns: 1fr;
    }
}

.article-item {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s;
}

.article-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
}

.article-item time {
    color: #9ca3af;
    font-size: 0.85rem;
}

.article-item h4 {
    margin: 8px 0;
}

.read-more {
    color: #0056a0;
    font-weight: 500;
    display: inline-block;
    transition: transform 0.3s;
}

.read-more:hover {
    transform: translateX(4px);
}

/* 页脚 */
.footer {
    background: linear-gradient(135deg, #0a2540, #1a3a5c);
    color: #cbd5e0;
    padding: 40px 0;
    text-align: center;
}

.footer a {
    color: #93c5fd;
    transition: color 0.3s;
}

.footer a:hover {
    color: #fff;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
    margin-bottom: 20px;
}

.footer-links a {
    font-size: 0.9rem;
    padding: 4px 8px;
    border-radius: 4px;
    transition: background 0.3s;
}

.footer-links a:hover {
    background: rgba(255, 255, 255, 0.1);
}

.copyright {
    font-size: 0.85rem;
}

/* 滚动动画 */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s;
}

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

/* 暗黑模式 */
.dark-mode {
    background: #1a202c;
    color: #e2e8f0;
}

.dark-mode .card {
    background: rgba(45, 55, 72, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-color: rgba(255, 255, 255, 0.1);
    color: #e2e8f0;
}

.dark-mode .navbar {
    background: rgba(26, 32, 44, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom-color: rgba(45, 55, 72, 0.5);
}

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

.dark-mode .nav-links a:hover {
    color: #63b3ed;
}

.dark-mode .logo {
    background: linear-gradient(135deg, #63b3ed, #90cdf4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.dark-mode .stat-number {
    background: linear-gradient(135deg, #63b3ed, #90cdf4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.dark-mode h1,
.dark-mode h2,
.dark-mode h3 {
    color: #f7fafc;
}

.dark-mode .footer {
    background: linear-gradient(135deg, #0d1117, #1a202c);
}

.dark-mode .banner {
    background: linear-gradient(135deg, #2d3748, #1a202c);
}

.dark-mode .banner-content h2 {
    color: #f7fafc;
    background: linear-gradient(135deg, #f7fafc, #63b3ed);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.dark-mode .banner-content p {
    color: #cbd5e0;
}

.dark-mode .banner-content {
    background: rgba(0, 0, 0, 0.3);
}

.dark-mode .banner-dot {
    background: rgba(113, 128, 150, 0.5);
}

.dark-mode .banner-dot.active {
    background: #63b3ed;
}

.dark-mode .stats {
    background: rgba(45, 55, 72, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.dark-mode .stat-label {
    color: #a0aec0;
}

.dark-mode .article-item {
    background: rgba(45, 55, 72, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-color: rgba(255, 255, 255, 0.05);
}

.dark-mode .article-item time {
    color: #718096;
}

.dark-mode .faq-item {
    border-bottom-color: rgba(74, 85, 104, 0.5);
}

.dark-mode .faq-question:hover {
    background: rgba(99, 179, 237, 0.1);
}

.dark-mode .faq-answer {
    color: #a0aec0;
}

.dark-mode .theme-toggle {
    color: #e2e8f0;
    border-color: #4a5568;
}

.dark-mode .search-box {
    background: rgba(45, 55, 72, 0.8);
}

.dark-mode .search-box input {
    color: #e2e8f0;
}

.dark-mode .back-to-top {
    background: linear-gradient(135deg, #2b6cb0, #63b3ed);
}

.dark-mode .mobile-menu-btn {
    color: #e2e8f0;
}

@media (max-width: 768px) {
    .dark-mode .nav-links {
        background: rgba(26, 32, 44, 0.98);
    }
}

/* 主题切换按钮 */
.theme-toggle {
    background: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border: 1px solid rgba(203, 213, 224, 0.5);
    border-radius: 20px;
    padding: 6px 14px;
    cursor: pointer;
    font-size: 0.9rem;
    color: #333;
    transition: all 0.3s;
}

.theme-toggle:hover {
    background: rgba(0, 86, 160, 0.1);
    border-color: #0056a0;
}

/* 搜索框 */
.search-box {
    display: flex;
    align-items: center;
    background: rgba(241, 245, 249, 0.8);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border-radius: 20px;
    padding: 4px 12px;
    transition: background 0.3s;
}

.search-box input {
    border: none;
    background: transparent;
    padding: 6px 8px;
    outline: none;
    width: 120px;
    font-size: 0.9rem;
    transition: width 0.3s;
}

.search-box input:focus {
    width: 160px;
}

@media (max-width: 768px) {
    .search-box {
        display: none;
    }
}

/* 面包屑 */
.breadcrumb {
    padding: 12px 0;
    font-size: 0.9rem;
    color: #6b7280;
}

.breadcrumb a {
    color: #0056a0;
    transition: color 0.3s;
}

.breadcrumb a:hover {
    color: #003d80;
}

.breadcrumb span {
    margin: 0 6px;
}

/* 内部锚点导航 */
.anchor-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    padding: 16px 0;
}

.anchor-nav a {
    background: rgba(229, 231, 235, 0.7);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    color: #333;
    transition: all 0.3s;
}

.anchor-nav a:hover {
    background: #0056a0;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 86, 160, 0.2);
}

.dark-mode .anchor-nav a {
    background: rgba(55, 65, 81, 0.7);
    color: #e2e8f0;
}

.dark-mode .anchor-nav a:hover {
    background: #63b3ed;
    color: #1a202c;
}

/* 图片占位SVG */
.img-placeholder {
    background: rgba(229, 231, 235, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 120px;
    color: #6b7280;
    font-size: 0.9rem;
    transition: background 0.3s;
}

.dark-mode .img-placeholder {
    background: rgba(55, 65, 81, 0.6);
    color: #9ca3af;
}

.lazy {
    opacity: 0;
    transition: opacity 0.5s;
}

.lazy.loaded {
    opacity: 1;
}

/* HowTo 样式 */
[itemscope][itemtype="https://schema.org/HowTo"] {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 16px;
    padding: 32px;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.dark-mode [itemscope][itemtype="https://schema.org/HowTo"] {
    background: rgba(45, 55, 72, 0.7);
    border-color: rgba(255, 255, 255, 0.05);
}

[itemscope][itemtype="https://schema.org/HowTo"] ol {
    padding-left: 24px;
}

[itemscope][itemtype="https://schema.org/HowTo"] li {
    margin-bottom: 8px;
    line-height: 1.7;
}

/* 联系我们区域 */
#contact .grid-2 p {
    margin-bottom: 8px;
}

#contact ul {
    list-style: none;
    padding: 0;
}

#contact ul li {
    margin-bottom: 6px;
}

#contact ul li a {
    color: #0056a0;
    transition: color 0.3s;
}

#contact ul li a:hover {
    color: #003d80;
}

.dark-mode #contact ul li a {
    color: #63b3ed;
}

.dark-mode #contact ul li a:hover {
    color: #90cdf4;
}

/* 友情链接 */
#contact .grid-2 p a {
    margin: 0 4px;
}

/* 版权区链接 */
.copyright p {
    margin-bottom: 4px;
}

/* 响应式微调 */
@media (max-width: 480px) {
    .container {
        padding: 0 12px;
    }

    section {
        padding: 40px 0;
    }

    h1 {
        font-size: 1.6rem;
    }

    h2 {
        font-size: 1.3rem;
    }

    .stat-number {
        font-size: 2rem;
    }

    .anchor-nav {
        gap: 8px;
    }

    .anchor-nav a {
        font-size: 0.8rem;
        padding: 4px 12px;
    }
}