﻿/* css/style.css - 完整优化版样式文件 */
/* ============================================
   基础样式与变量定义
   ============================================ */
:root {
    /* 颜色系统 */
    --color-primary: #1e3a5f;
    --color-secondary: #f5f1eb;
    --color-accent: #ff6b6b;
    --color-text: #333;
    --color-text-light: #666;
    --color-border: #eaeaea;
    --color-success: #4CAF50;
    --color-warning: #ff9800;

    /* 阴影系统 */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.05);
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 6px 16px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
    --shadow-hover: 0 12px 32px rgba(0, 0, 0, 0.15);

    /* 圆角系统 */
    --radius-sm: 6px;
    --radius: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;

    /* 字体系统 */
    --font-system: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
        'Microsoft JhengHei', 'Noto Sans TC', sans-serif;

    /* 间距系统 */
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 1.5rem;
    --space-lg: 2rem;
    --space-xl: 3rem;
    --space-xxl: 4rem;

    /* 过渡动画 */
    --transition-fast: 0.2s ease;
    --transition: 0.3s ease;
    --transition-slow: 0.4s ease;
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
    /* 为固定导航栏预留空间 */
}

body {
    font-family: var(--font-system);
    line-height: 1.6;
    color: var(--color-text);
    background-color: #fff;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

p {
    margin-bottom: 1rem;
    line-height: 1.7;
}

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: var(--transition);
}


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

/* 图片优化 */
img[loading="lazy"] {
    opacity: 0;
    transition: opacity 0.3s ease;
}

img[loading="lazy"].loaded {
    opacity: 1;
}

ul,
li {
    list-style: none;
}

.line-clamp-1 {
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 1;
}

.line-clamp-2 {
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.line-clamp-3 {
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

.line-clamp-4 {
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 4;
}

/* 容器系统 */
.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px;
}

.container-wide {
    max-width: 1400px;
}

.container-narrow {
    max-width: 1000px;
}

/* 工具类 */
.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.text-left {
    text-align: left;
}

.d-flex {
    display: flex;
}

.flex-column {
    flex-direction: column;
}

.justify-center {
    justify-content: center;
}

.justify-between {
    justify-content: space-between;
}

.align-center {
    align-items: center;
}

.w-100 {
    width: 100%;
}

.mb-0 {
    margin-bottom: 0;
}

.mt-1 {
    margin-top: var(--space-xs);
}

.mb-1 {
    margin-bottom: var(--space-xs);
}

.mt-2 {
    margin-top: var(--space-sm);
}

.mb-2 {
    margin-bottom: var(--space-sm);
}

.mt-3 {
    margin-top: var(--space-md);
}

.mb-3 {
    margin-bottom: var(--space-md);
}

.mt-4 {
    margin-top: var(--space-lg);
}

.mb-4 {
    margin-bottom: var(--space-lg);
}

/* 隐藏辅助类 */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ============================================
   布局组件
   ============================================ */
/* 固定导航栏 */
.site-header {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    transition: all var(--transition);
}

.site-header.scrolled {
    background-color: rgba(255, 255, 255, 0.98);
    box-shadow: var(--shadow-md);
    padding: 0.5rem 0;
}

.site-header.scrolled .header-content {
    padding: 0.5rem 0;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    transition: padding var(--transition);
}

/* Logo样式 */
.site-logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--color-primary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* 主导航 */
.main-nav ul {
    display: flex;
    list-style: none;
    gap: 0.5rem;
}

.main-nav a {
    color: var(--color-primary);
    text-decoration: none;
    padding: 0.5rem 1.25rem;
    font-weight: 500;
    border-radius: var(--radius-xl);
    transition: all var(--transition);
    position: relative;
}

.main-nav a:hover {
    background-color: rgba(30, 58, 95, 0.08);
}

.main-nav a.active {
    background-color: rgba(30, 58, 95, 0.1);
}

.main-nav a.active::after {
    content: "";
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 3px;
    background-color: var(--color-accent);
    border-radius: var(--radius-sm);
}

/* CTA按钮 */
.cta-button {
    background-color: var(--color-accent);
    color: white;
    padding: 0.6rem 1.8rem;
    border-radius: var(--radius-xl);
    text-decoration: none;
    font-weight: 600;
    transition: all var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.cta-button:hover {
    background-color: #ff5252;
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

/* 汉堡菜单按钮 */
.hamburger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    width: 32px;
    height: 32px;
    padding: 0;
    position: relative;
    z-index: 1001;
}

.hamburger span {
    display: block;
    width: 24px;
    height: 2px;
    background-color: var(--color-primary);
    margin: 5px auto;
    transition: all var(--transition);
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* 主要内容区域 */
.main-content {
    margin-top: 5rem;
    padding-top: var(--space-lg);
}

/* 模块标题 */
.section-title {
    font-size: 2.2rem;
    color: var(--color-primary);
    margin-bottom: var(--space-lg);
    padding-bottom: 0.75rem;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background-color: var(--color-accent);
    border-radius: var(--radius-sm);
}

/* 卡片通用样式 */
.card {
    background: #fff;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all var(--transition-slow);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
}

.card-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
    transition: transform var(--transition-slow);
}

.card:hover .card-img {
    transform: scale(1.05);
}

.card-content {
    padding: var(--space-md);
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.card-tag {
    display: inline-block;
    background: rgba(255, 107, 107, 0.1);
    color: var(--color-accent);
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-xl);
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: var(--space-sm);
    align-self: flex-start;
}

.card-title {
    font-size: 1.35rem;
    line-height: 1.4;
    color: var(--color-primary);
    margin-bottom: var(--space-sm);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-desc {
    color: var(--color-text-light);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: var(--space-md);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex-grow: 1;
}

.card-meta {
    display: flex;
    justify-content: space-between;
    color: var(--color-text-light);
    font-size: 0.85rem;
    padding-top: var(--space-sm);
    border-top: 1px solid var(--color-border);
    margin-top: auto;
}

/* 阅读更多链接 */
.read-more {
    color: var(--color-accent);
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    transition: gap var(--transition);
    margin-top: auto;
}

.read-more:hover {
    gap: 0.5rem;
}

.read-more::after {
    content: "→";
    transition: transform var(--transition);
}

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

/* 面包屑导航 */
.breadcrumb {
    margin-bottom: var(--space-xl);
    padding: var(--space-md);
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: var(--radius);
    border-left: 4px solid var(--color-accent);
}

.breadcrumb ol {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    margin: 0;
    padding: 0;
    align-items: center;
}

.breadcrumb li {
    display: flex;
    align-items: center;
    font-size: 0.95rem;
}

.breadcrumb li:not(:last-child)::after {
    content: "›";
    margin: 0 12px;
    color: var(--color-text-light);
    font-size: 1.1rem;
}

.breadcrumb a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color var(--transition);
    font-weight: 500;
}

.breadcrumb a:hover {
    color: var(--color-accent);
    text-decoration: underline;
}

.breadcrumb .current {
    color: var(--color-text-light);
    font-weight: 600;
}

/* 页脚 */
.site-footer {
    background-color: var(--color-primary);
    color: #e6e9f0;
    margin-top: var(--space-xxl);
    padding: var(--space-xl) 0 var(--space-lg);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-xl);
}

.footer-col h4 {
    color: #fff;
    font-size: 1.2rem;
    margin-bottom: var(--space-lg);
    padding-bottom: 0.5rem;
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.65rem;
}

.footer-links a {
    color: #bcc5dc;
    text-decoration: none;
    transition: all var(--transition);
    display: inline-block;
}

.footer-links a:hover {
    color: #fff;
    transform: translateX(5px);
}

.subscribe-form input[type="email"] {
    width: 100%;
    padding: 0.75rem;
    border: none;
    border-radius: var(--radius-sm);
    margin-bottom: 0.75rem;
    font-family: inherit;
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
}

.subscribe-form input[type="email"]::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.subscribe-form button {
    width: 100%;
    background-color: var(--color-accent);
    color: white;
    border: none;
    padding: 0.75rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    cursor: pointer;
    transition: background-color var(--transition);
}

.subscribe-form button:hover {
    background-color: #ff5252;
}

.copyright {
    text-align: center;
    margin-top: var(--space-xl);
    padding-top: var(--space-lg);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #a0a9c7;
    font-size: 0.9rem;
}

/* 返回顶部按钮 */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: var(--color-primary);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all var(--transition);
    z-index: 999;
    box-shadow: var(--shadow-lg);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background-color: var(--color-accent);
    transform: translateY(-5px);
}

/* ============================================
   首页特有样式
   ============================================ */
/* 头条推荐区 */
.featured-article {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-xl);
    align-items: center;
    margin-bottom: var(--space-xxl);
}

.featured-text .card-tag {
    font-size: 1rem;
}

.featured-text h1 {
    font-size: 2.8rem;
    line-height: 1.2;
    color: var(--color-primary);
    margin: var(--space-sm) 0;
}

.featured-text p {
    font-size: 1.15rem;
    color: var(--color-text-light);
    margin-bottom: var(--space-lg);
}

.featured-img {
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-hover);
}

/* 分类探索区 */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: var(--space-lg);
    margin-bottom: var(--space-xxl);
}

.category-card {
    text-align: center;
    padding: var(--space-xl) var(--space-md);
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: none;
}

.category-icon {
    font-size: 2.5rem;
    margin-bottom: var(--space-sm);
}

.category-card h3 {
    font-size: 1.5rem;
    color: var(--color-primary);
    margin-bottom: 0.75rem;
}

.category-card p {
    color: var(--color-text-light);
    margin-bottom: var(--space-sm);
}

.category-count {
    color: var(--color-accent);
    font-weight: 700;
}

/* 最新游记区 */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: var(--space-lg);
    margin-bottom: var(--space-xxl);
}

/* 热门标签云 */
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: var(--space-xxl);
}

.tag-cloud a {
    background: #fff;
    color: var(--color-primary);
    padding: 0.5rem 1.25rem;
    border-radius: var(--radius-xl);
    text-decoration: none;
    border: 1px solid var(--color-border);
    font-size: 0.9rem;
    transition: all var(--transition);
}

.tag-cloud a:hover {
    background-color: var(--color-primary);
    color: white;
    border-color: var(--color-primary);
    transform: translateY(-2px);
}

/* ============================================
   列表页特有样式
   ============================================ */
.list-main-content {
    margin-top: 5rem;
    padding-top: var(--space-lg);
}

/* 页面标题与描述 */
.page-header {
    margin-bottom: var(--space-xl);
    text-align: center;
}

.page-header h1 {
    font-size: 2.8rem;
    color: var(--color-primary);
    margin-bottom: var(--space-sm);
    line-height: 1.2;
}

.page-description {
    font-size: 1.15rem;
    color: var(--color-text-light);
    max-width: 700px;
    margin: 0 auto var(--space-lg);
    line-height: 1.7;
}

/* 分类筛选标签 */
.category-filters {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: var(--space-xl);
    padding-bottom: var(--space-lg);
    border-bottom: 1px solid var(--color-border);
}

.filter-btn {
    padding: 0.6rem 1.5rem;
    background: none;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    cursor: pointer;
    transition: all var(--transition);
    font-family: inherit;
    font-size: 0.95rem;
    color: var(--color-text);
}

.filter-btn:hover {
    background-color: rgba(30, 58, 95, 0.05);
    border-color: var(--color-primary);
    transform: translateY(-2px);
}

.filter-btn.active {
    background-color: var(--color-primary);
    color: white;
    border-color: var(--color-primary);
}

/* 主要内容区域 - 两栏布局 */
.content-wrapper {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: var(--space-xl);
    margin-bottom: var(--space-xxl);
}

/* 文章列表网格 */
.articles-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: var(--space-lg);
    margin-bottom: var(--space-xl);
}

/* 侧边栏样式 */
.sidebar-section {
    margin-bottom: var(--space-xl);
}

.sidebar-title {
    font-size: 1.4rem;
    color: var(--color-primary);
    margin-bottom: var(--space-lg);
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--color-border);
}

/* 热门文章列表 */
.popular-list {
    list-style: none;
}

.popular-item {
    display: flex;
    margin-bottom: var(--space-md);
    padding-bottom: var(--space-md);
    border-bottom: 1px solid var(--color-border);
}

.popular-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.popular-rank {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background-color: var(--color-secondary);
    color: var(--color-primary);
    font-weight: 700;
    font-size: 0.9rem;
    border-radius: var(--radius-sm);
    margin-right: var(--space-sm);
    flex-shrink: 0;
}

.popular-item:nth-child(1) .popular-rank {
    background-color: #ffeaa7;
    color: #e17055;
}

.popular-item:nth-child(2) .popular-rank {
    background-color: #dfe6e9;
    color: #636e72;
}

.popular-item:nth-child(3) .popular-rank {
    background-color: #fdcb6e;
    color: #e84393;
}

.popular-content {
    flex-grow: 1;
}

.popular-content h3 {
    font-size: 1.05rem;
    line-height: 1.4;
    margin-bottom: 0.4rem;
}

.popular-content a {
    color: var(--color-text);
    text-decoration: none;
    transition: color var(--transition);
}

.popular-content a:hover {
    color: var(--color-accent);
}

.popular-meta {
    font-size: 0.85rem;
    color: var(--color-text-light);
}

/* 侧边栏标签云 */
.sidebar-tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.sidebar-tag-cloud a {
    background: #fff;
    color: var(--color-primary);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-lg);
    text-decoration: none;
    border: 1px solid var(--color-border);
    font-size: 0.85rem;
    transition: all var(--transition);
}

.sidebar-tag-cloud a:hover {
    background-color: var(--color-primary);
    color: white;
    border-color: var(--color-primary);
    transform: translateY(-2px);
}

/* 分页样式 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: var(--space-xxl);
    padding-top: var(--space-lg);
    border-top: 1px solid var(--color-border);
}

.pagination-list {
    display: flex;
    list-style: none;
    margin: 0 var(--space-sm);
}

.pagination-item {
    margin: 0 0.25rem;
}

.pagination-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: var(--radius-sm);
    background-color: #fff;
    color: var(--color-text);
    text-decoration: none;
    font-weight: 500;
    border: 1px solid var(--color-border);
    transition: all var(--transition);
}

.pagination-link:hover {
    background-color: rgba(30, 58, 95, 0.05);
    border-color: var(--color-primary);
}

.pagination-link.active {
    background-color: var(--color-primary);
    color: white;
    border-color: var(--color-primary);
}

.pagination-link.dots {
    border: none;
    background: none;
    cursor: default;
}

.pagination-link.dots:hover {
    background: none;
}

.pagination-prev,
.pagination-next {
    padding: 0.7rem 1.5rem;
    border-radius: var(--radius-sm);
    background-color: #fff;
    color: var(--color-primary);
    text-decoration: none;
    font-weight: 600;
    border: 1px solid var(--color-border);
    transition: all var(--transition);
    display: flex;
    align-items: center;
}

.pagination-prev:hover,
.pagination-next:hover {
    background-color: var(--color-primary);
    color: white;
    border-color: var(--color-primary);
    transform: translateY(-2px);
}

.pagination-prev::before {
    content: "‹";
    margin-right: 0.5rem;
}

.pagination-next::after {
    content: "›";
    margin-left: 0.5rem;
}

.pagination-prev.disabled,
.pagination-next.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination-prev.disabled:hover,
.pagination-next.disabled:hover {
    background-color: #fff;
    color: var(--color-primary);
    border-color: var(--color-border);
    transform: none;
}

/* ============================================
   详情页特有样式
   ============================================ */
.detail-main-content {
    margin-top: 5rem;
    padding-top: var(--space-lg);
}

/* 文章头部 */
.article-header {
    margin-bottom: var(--space-xl);
}

.article-category {
    display: inline-block;
    background: rgba(255, 107, 107, 0.1);
    color: var(--color-accent);
    padding: 0.35rem 1rem;
    border-radius: var(--radius-lg);
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: var(--space-md);
}

.article-title {
    font-size: 2.8rem;
    line-height: 1.2;
    color: var(--color-primary);
    margin-bottom: var(--space-sm);
}

.article-subtitle {
    font-size: 1.3rem;
    line-height: 1.5;
    color: var(--color-text-light);
    margin-bottom: var(--space-lg);
    font-weight: 400;
}

.article-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
    padding-bottom: var(--space-md);
    border-bottom: 1px solid var(--color-border);
}

.author-info {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.author-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
}

.author-details h4 {
    font-size: 1rem;
    margin-bottom: 0.2rem;
    color: var(--color-primary);
}

.author-details p {
    font-size: 0.9rem;
    color: var(--color-text-light);
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--color-text-light);
    font-size: 0.95rem;
}

.meta-icon {
    font-size: 1.1rem;
}

/* 文章特色图片 */
.article-hero {
    margin-bottom: var(--space-xl);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.article-hero-img {
    width: 100%;
    height: auto;
    display: block;
}

.hero-caption {
    padding: var(--space-sm);
    background-color: var(--color-secondary);
    color: var(--color-text-light);
    font-size: 0.9rem;
    text-align: center;
    font-style: italic;
}

/* 文章内容区域 */
.article-content {
    line-height: 1.8;
    font-size: 1.1rem;
    color: var(--color-text);
}

.article-content h2 {
    font-size: 1.8rem;
    color: var(--color-primary);
    margin: 2.5rem 0 1.2rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--color-border);
}

.article-content h3 {
    font-size: 1.4rem;
    color: var(--color-primary);
    margin: 2rem 0 1rem;
}

.article-content p {
    margin-bottom: 1.5rem;
}

.article-content figure {
    margin: 2.5rem 0;
    text-align: center;
}

.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.article-content figcaption {
    margin-top: 0.8rem;
    font-size: 0.95rem;
    color: var(--color-text-light);
    font-style: italic;
}

.article-content blockquote {
    border-left: 4px solid var(--color-accent);
    padding-left: 1.5rem;
    margin: 2.5rem 0;
    font-style: italic;
    color: var(--color-text-light);
    font-size: 1.15rem;
}

.article-content ul,
.article-content ol {
    margin-bottom: 1.5rem;
    padding-left: 1.8rem;
}

.article-content li {
    margin-bottom: 0.5rem;
}

/* 文章目录 */
.article-toc {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: var(--radius);
    padding: 1.8rem;
    margin: 2.5rem 0;
    border-left: 4px solid var(--color-accent);
}

.toc-title {
    font-size: 1.2rem;
    color: var(--color-primary);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.toc-title::before {
    content: "📑";
}

.toc-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.toc-list li {
    margin-bottom: 0.8rem;
    padding-left: 0.5rem;
}

.toc-list a {
    color: var(--color-text);
    text-decoration: none;
    transition: all var(--transition);
    display: block;
    padding: 0.3rem 0;
}

.toc-list a:hover {
    color: var(--color-accent);
    padding-left: 5px;
}

.toc-list a.active {
    color: var(--color-accent);
    font-weight: 600;
    padding-left: 10px;
    border-left: 3px solid var(--color-accent);
}

/* 文章标签 */
.article-tags {
    margin: var(--space-xl) 0;
    padding-top: var(--space-lg);
    border-top: 1px solid var(--color-border);
}

.tags-title {
    font-size: 1.1rem;
    color: var(--color-primary);
    margin-bottom: 1rem;
}

.tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.tag-link {
    background: #fff;
    color: var(--color-primary);
    padding: 0.5rem 1.2rem;
    border-radius: var(--radius-xl);
    text-decoration: none;
    border: 1px solid var(--color-border);
    font-size: 0.9rem;
    transition: all var(--transition);
}

.tag-link:hover {
    background-color: var(--color-primary);
    color: white;
    border-color: var(--color-primary);
    transform: translateY(-2px);
}

/* 文章信息卡片 */
.article-info-card {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: var(--radius);
    padding: 1.8rem;
    margin: 2.5rem 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

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

.info-label {
    display: block;
    font-size: 0.9rem;
    color: var(--color-text-light);
    margin-bottom: 0.5rem;
}

.info-value {
    display: block;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--color-primary);
}

/* 分享按钮 */
.article-share {
    margin: var(--space-xl) 0;
    padding: 1.8rem;
    background-color: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    text-align: center;
}

.share-title {
    font-size: 1.2rem;
    color: var(--color-primary);
    margin-bottom: 1.2rem;
}

.share-buttons {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.share-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 1.5rem;
    border-radius: var(--radius-sm);
    text-decoration: none;
    font-weight: 600;
    transition: all var(--transition);
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.95rem;
}

.share-facebook {
    background-color: #1877F2;
    color: white;
}

.share-twitter {
    background-color: #1DA1F2;
    color: white;
}

.share-line {
    background-color: #00C300;
    color: white;
}

.share-copy {
    background-color: var(--color-secondary);
    color: var(--color-primary);
}

.share-btn:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
}

.share-btn.copied {
    background-color: var(--color-success);
    color: white;
}

/* 评论区 */
.article-comments {
    margin: var(--space-xl) 0;
}

.comments-title {
    font-size: 1.8rem;
    color: var(--color-primary);
    margin-bottom: var(--space-lg);
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--color-border);
}

.comments-count {
    color: var(--color-accent);
}

.comment-form {
    background-color: #fff;
    padding: var(--space-lg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: var(--space-xl);
}

.form-title {
    font-size: 1.3rem;
    color: var(--color-primary);
    margin-bottom: var(--space-md);
}

.form-group {
    margin-bottom: var(--space-md);
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--color-text);
    font-weight: 500;
}

.form-input,
.form-textarea {
    width: 100%;
    padding: 0.9rem 1.2rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 1rem;
    transition: border-color var(--transition);
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.1);
}

.form-textarea {
    min-height: 150px;
    resize: vertical;
}

.form-submit {
    background-color: var(--color-accent);
    color: white;
    border: none;
    padding: 0.9rem 2.5rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
}

.form-submit:hover {
    background-color: #ff5252;
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

/* 评论列表 */
.comments-list {
    margin-top: var(--space-xl);
}

.comment-item {
    background-color: #fff;
    padding: var(--space-md);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: var(--space-md);
}

.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: var(--space-sm);
}

.comment-author {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.comment-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.comment-author-info h4 {
    font-size: 1rem;
    margin-bottom: 0.2rem;
    color: var(--color-primary);
}

.comment-date {
    font-size: 0.85rem;
    color: var(--color-text-light);
}

.comment-content {
    line-height: 1.6;
    color: var(--color-text);
}

.comment-reply {
    margin-top: var(--space-sm);
    padding-top: var(--space-sm);
    border-top: 1px solid var(--color-border);
}

/* 相关文章 */
.related-articles {
    margin: var(--space-xxl) 0;
}

.related-title {
    font-size: 1.8rem;
    color: var(--color-primary);
    margin-bottom: var(--space-lg);
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--color-border);
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: var(--space-lg);
}

/* 作者信息侧边栏 */
.author-sidebar {
    text-align: center;
    padding: var(--space-md);
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: var(--space-lg);
}

.author-sidebar-img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: var(--space-md);
    border: 4px solid var(--color-secondary);
}

.author-sidebar h3 {
    font-size: 1.3rem;
    color: var(--color-primary);
    margin-bottom: 0.5rem;
}

.author-sidebar p {
    color: var(--color-text-light);
    margin-bottom: var(--space-md);
    line-height: 1.6;
}

.author-social {
    display: flex;
    justify-content: center;
    gap: var(--space-sm);
    margin-top: var(--space-sm);
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: var(--color-secondary);
    color: var(--color-primary);
    text-decoration: none;
    transition: all var(--transition);
}

.social-link:hover {
    background-color: var(--color-primary);
    color: white;
    transform: translateY(-3px);
}

/* 目录侧边栏 */
.toc-sidebar {
    position: sticky;
    top: 6rem;
    max-height: calc(100vh - 8rem);
    overflow-y: auto;
}

.toc-sidebar::-webkit-scrollbar {
    width: 4px;
}

.toc-sidebar::-webkit-scrollbar-thumb {
    background-color: var(--color-border);
    border-radius: 4px;
}

/*author*/
.author-info {
    display: flex;
    gap: 10px;
    padding: 10px;
    margin: 10px 0;
    background: #dff0f8;
    border-radius: 20px;

}

.author-info img {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid white;
    overflow: clip;
    margin: 0;
}

.author-name {
    font-size: 1.4rem;
    margin-bottom: 10px;
}

/* ============================================
   响应式设计
   ============================================ */
@media (max-width: 1200px) {
    .article-title {
        font-size: 2.4rem;
    }

    .featured-text h1 {
        font-size: 2.4rem;
    }

    .page-header h1 {
        font-size: 2.4rem;
    }
}

@media (max-width: 992px) {
    .content-wrapper {
        grid-template-columns: 1fr;
        gap: var(--space-lg);
    }

    .featured-article {
        grid-template-columns: 1fr;
    }

    .footer-content {
        grid-template-columns: repeat(2, 1fr);
    }

    .toc-sidebar {
        position: static;
        max-height: none;
    }

    .article-info-card {
        grid-template-columns: repeat(2, 1fr);
    }

    .hamburger {
        display: block;
    }

    .main-nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background-color: white;
        padding: 80px 20px 20px;
        box-shadow: var(--shadow-lg);
        transition: right var(--transition);
        z-index: 1000;
        display: none;
    }

    .main-nav.active {
        right: 0;
        display: block;
    }

    .main-nav ul {
        flex-direction: column;
        gap: 0;
    }

    .main-nav a {
        display: block;
        padding: 0.75rem 1rem;
        border-radius: 0;
        border-bottom: 1px solid var(--color-border);
    }

    .main-nav a.active::after {
        display: none;
    }

    .main-nav a.active {
        background-color: rgba(30, 58, 95, 0.05);
        border-left: 4px solid var(--color-accent);
    }

    .nav-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.5);
        z-index: 999;
    }

    .nav-overlay.active {
        display: block;
    }
}

@media (max-width: 768px) {
    .author-info {
        flex-direction: column;
        align-items: center;
    }

    .author-name {
        text-align: center;
    }

    .site-header {
        position: relative;
    }

    .header-content {
        padding: 5px 0;
    }

    .main-content {
        margin-top: 0;
    }

    .site-logo {
        font-size: 1.2rem;
    }

    .content-wrapper {
        display: block;
    }

    .articles-grid {
        grid-template-columns: 1fr;
    }

    .articles-list {
        grid-template-columns: 1fr;
    }

    .related-grid {
        grid-template-columns: 1fr;
    }

    .article-title {
        font-size: 2rem;
    }

    .featured-text h1 {
        font-size: 2rem;
    }

    .page-header h1 {
        font-size: 2rem;
    }

    .article-subtitle {
        font-size: 1.1rem;
    }

    .page-description {
        font-size: 1rem;
    }

    .detail-main-content ,.list-main-content{
        margin-top: 0;
        padding-top: 10px;
    }



    .article-header {
        margin-bottom: 10px;
    }

    .article-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-sm);
        margin-bottom: 10px;
        padding-bottom: 0;
    }


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

    .article-content h3 {
        font-size: 1.3rem;
    }

    .share-buttons {
        flex-direction: column;
        align-items: stretch;
    }

    .info-value {
        font-size: 16px;
    }

    .category-filters {
        justify-content: flex-start;
        overflow-x: auto;
        padding-bottom: 1rem;
        margin-bottom: var(--space-lg);
    }

    .pagination-list {
        display: none;
    }

    .pagination-wrapper {
        overflow: hidden;
    }

    .pagination {
        display: block;
        overflow: hidden;
        margin-top: 0;
        padding-bottom: var(--space-lg);
    }

    .pagination li {
        float: left;
        margin: 10px 5px 0 0;
        height: 42px;
    }

    .pagination-prev,
    .pagination-next {
        height: 42px;
    }

    .footer-content {
        grid-template-columns: 1fr;
    }

    .section-title {
        font-size: 1.8rem;
    }

}

@media (max-width: 480px) {
    .breadcrumb {
        padding: var(--space-sm);
        margin-bottom: 1rem;
    }

    .breadcrumb li {
        font-size: 0.85rem;
    }

    .article-title {
        font-size: 24px;
    }

    .featured-text h1 {
        font-size: 1.8rem;
    }

    .page-header h1 {
        font-size: 1.8rem;
    }

    .filter-btn {
        padding: 0.5rem 1.2rem;
        font-size: 0.9rem;
    }

    .comment-form {
        padding: var(--space-md);
    }

    .card-title {
        font-size: 1.2rem;
    }

    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 44px;
        height: 44px;
        font-size: 1rem;
    }
}

/* 打印样式 */
@media print {

    .site-header,
    .main-nav,
    .cta-button,
    .article-share,
    .comment-form,
    .site-footer,
    .back-to-top {
        display: none !important;
    }

    .main-content {
        margin-top: 0;
    }

    body {
        color: #000;
        background: #fff;
    }

    a {
        color: #000;
        text-decoration: underline;
    }

    .article-content img {
        max-width: 100% !important;
        page-break-inside: avoid;
    }

    .article-content h2,
    .article-content h3 {
        page-break-after: avoid;
    }

    .article-content p,
    .article-content li {
        page-break-inside: avoid;
    }
}