/* ========== 全局基础 ========== */
body {
    background-color: #f8fafc;
    color: #2c3e50;
    font-family: 'Helvetica Neue', Helvetica, 'PingFang SC', 'Microsoft YaHei', sans-serif;
    line-height: 1.75;
    font-size: 16px;
    margin: 0;
    padding: 0;
}

/* ====== 夜间模式切换按钮 ====== */
#theme-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    font-size: 20px;
    line-height: 1;
    padding: 0;
    margin: 0;
}

/* ====== 返回顶部按钮 ====== */
#back-to-top {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    font-size: 20px;
    line-height: 1;
    padding: 0;
    margin: 0;
}

/* 确保按钮在移动端也能完美居中 */
@media (max-width: 768px) {
    #theme-toggle, #back-to-top {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }
}


a {
    color: #3498db;
    text-decoration: none;
    transition: all 0.2s ease;
}

a:hover {
    color: #2980b9;
    text-decoration: underline;
}

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

/* ========== 头部 ========== */
.header {
    text-align: center;
    padding: 20px 0 10px;
}

.site-title {
    font-size: 2em;
    font-weight: 600;
    color: #1a365d;
    margin: 0;
}

.site-description {
    color: #7f8c8d;
    font-size: 1.1em;
    margin: 8px 0 20px;
}

/* ===== 头部卡片样式 ===== */
.header-card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 30px;
    margin: 0 auto 40px;
    max-width: 800px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

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

.site-title-card {
    font-size: 2.2em;
    font-weight: 600;
    color: var(--text-color);
    margin: 0 0 10px;
    text-align: center;
}

.site-description-card {
    color: var(--text-color);
    font-size: 1.1em;
    text-align: center;
    opacity: 0.8;
    margin: 0 0 20px;
}

/* 导航菜单卡片样式 */
.nav-card {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.nav-card a {
    color: var(--text-color);
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.nav-card a:hover {
    color: var(--button-bg);
    background: rgba(52, 152, 219, 0.1);
    text-decoration: none;
}

/* 暗色模式适配 */
[data-theme="dark"] .header-card {
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

[data-theme="dark"] .nav-card a:hover {
    background: rgba(100, 181, 246, 0.2);
}


/* ========== Banner 区域（新增） ========== */
.banner {
   /* background-image: url("https://qydzz.cn/a.jpg"); */
    color: white;
    text-align: center;
    padding: 60px 20px;
    margin-bottom: 40px;
    color: var(--banner-text);
}


[data-theme="dark"] .banner {
    --banner-text: #ffffff;  /* 夜间模式文字颜色 */
}

/* 更新CSS变量定义 */
:root {
    --banner-text: #2c3e50;  /* 浅色模式文字颜色 */
}

[data-theme="dark"] {
    --banner-text: #ffffff;  /* 夜间模式文字颜色 */
}

/* Banner内部元素样式 */
.banner h2, 
.banner p {
    color: inherit;  /* 继承父级颜色 */
    margin: 0;
    padding: 0;
}


.banner h2 {
    font-size: 2.2em;
    margin: 0 0 10px;
}

.banner p {
    font-size: 1.1em;
    opacity: 0.9;
    margin: 0;
}

/* ========== 导航 ========== */
.nav {
    text-align: center;
    margin-bottom: 30px;
}

.nav a {
    margin: 0 12px;
    color: #2c3e50;
    font-weight: 500;
    text-decoration: none;
}

.nav a:hover {
    color: #3498db;
}

/* ========== 文章列表 ========== */
.post-list {
    margin-bottom: 40px;
}

.post {
    background: #ffffff;
    border-radius: 12px;
    padding: 28px;
    margin-bottom: 30px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    transition: all 0.3s ease;
    border: 1px solid #f0f0f0;
}

.post:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.post-title {
    font-size: 1.5em;
    margin: 0 0 10px 0;
}

.post-title a {
    color: #2c3e50;
    font-weight: 500;
}

.post-title a:hover {
    color: #3498db;
}

.post-meta {
    color: #7f8c8d;
    font-size: 0.9em;
    margin-bottom: 12px;
}

.post-excerpt {
    color: #34495e;
    line-height: 1.7;
    margin-bottom: 16px;
}

/* 阅读全文 按钮（新增） */
.read-more {
    display: inline-block;
    margin-top: 12px;
    color: #3498db;
    font-weight: 500;
    text-decoration: none;
    font-size: 0.95em;
}

.read-more:hover {
    color: #2980b9;
}

/* 标签已移除（按要求不再显示） */

/* ========== 文章详情页 ========== */
.article {
    background: #ffffff;
    padding: 30px;
    border-radius: 12px;
    margin-bottom: 40px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.article-title {
    font-size: 1.8em;
    color: #1a365d;
    margin: 0 0 15px 0;
}

.article-meta {
    color: #7f8c8d;
    font-size: 0.95em;
    margin-bottom: 20px;
}

.article-content {
    line-height: 1.8;
    color: #2c3e50;
}

.article-content p {
    margin-bottom: 1.2em;
}

.article-content blockquote {
    background: #f8fafc;
    border-left: 4px solid #3498db;
    margin: 20px 0;
    padding: 16px 20px;
    font-style: italic;
    color: #444;
    border-radius: 0 8px 8px 0;
}

/* ========== 侧边栏 / 页脚等（可沿用你原来的） ========== */
.sidebar {
    background: #ffffff;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    font-size: 0.95em;
}

.widget-title {
    font-size: 1.1em;
    color: #2c3e50;
    border-bottom: 1px solid #ecf0f1;
    padding-bottom: 8px;
    margin-bottom: 12px;
}

/* ===== 侧边栏整体样式 ===== */
.sidebar {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.05);
    margin-bottom: 30px;
    border: 1px solid var(--border-color);
}

/* ===== 小工具标题样式 ===== */
.widget-title {
    font-size: 1.1em;
    font-weight: 600;
    color: var(--text-color);
    padding-bottom: 10px;
    border-bottom: 2px solid var(--border-color);
    margin-bottom: 15px;
    position: relative;
}

.widget-title::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 50px;
    height: 2px;
    background: var(--button-bg);
}

/* ===== 最新文章列表 ===== */
.widget-recent-posts ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.widget-recent-posts li {
    padding: 8px 0;
    border-bottom: 1px dashed var(--border-color);
    transition: all 0.2s ease;
}

.widget-recent-posts li:last-child {
    border-bottom: none;
}

.widget-recent-posts li:hover {
    transform: translateX(5px);
}

.widget-recent-posts a {
    color: var(--text-color);
    text-decoration: none;
    display: flex;
    align-items: center;
}

.widget-recent-posts a:hover {
    color: var(--button-bg);
}

.widget-recent-posts .post-date {
    font-size: 0.8em;
    color: #7f8c8d;
    margin-left: 8px;
}

/* ===== 最近回复列表 ===== */
.widget-recent-comments ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.widget-recent-comments li {
    padding: 8px 0;
    border-bottom: 1px dashed var(--border-color);
}

.widget-recent-comments li:last-child {
    border-bottom: none;
}

.widget-recent-comments a {
    color: var(--text-color);
    text-decoration: none;
}

.widget-recent-comments a:hover {
    color: var(--button-bg);
}

.widget-recent-comments .comment-author {
    font-weight: 500;
    color: var(--button-bg);
}

/* ===== 分类列表 ===== */
.widget-category ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.widget-category li {
    background: var(--button-bg);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.9em;
    transition: all 0.2s ease;
}

.widget-category li:hover {
    background: var(--button-hover);
    transform: translateY(-2px);
}

.widget-category a {
    color: white;
    text-decoration: none;
}

/* ===== 归档列表 ===== */
.widget-archive ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.widget-archive li {
    padding: 6px 0;
    position: relative;
    padding-left: 15px;
}

.widget-archive li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--button-bg);
}

.widget-archive a {
    color: var(--text-color);
    text-decoration: none;
}

.widget-archive a:hover {
    color: var(--button-bg);
}

.widget-archive .archive-count {
    font-size: 0.8em;
    color: #7f8c8d;
    margin-left: 5px;
}

/* ===== 其他小工具 ===== */
.widget-other {
    padding: 15px;
    background: rgba(52, 152, 219, 0.1);
    border-radius: 8px;
    border-left: 3px solid var(--button-bg);
}

.widget-other ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.widget-other li {
    padding: 6px 0;
}

.widget-other a {
    color: var(--text-color);
    text-decoration: none;
    display: flex;
    align-items: center;
}

.widget-other a:hover {
    color: var(--button-bg);
}

.widget-other a::before {
    content: '→';
    margin-right: 8px;
    color: var(--button-bg);
    transition: all 0.2s ease;
}

.widget-other a:hover::before {
    transform: translateX(3px);
}


/* ========== 评论区 ========== */
.comments {
    background: #ffffff;
    padding: 24px;
    border-radius: 8px;
    margin-top: 40px;
}

/* ========== 分页 ========== */
.page-navigator {
    text-align: center;
    margin: 40px 0;
}

.page-navigator a {
    display: inline-block;
    padding: 8px 14px;
    margin: 0 4px;
    background: #ecf0f1;
    color: #2c3e50;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.2s;
}

.page-navigator a:hover,
.page-navigator .current {
    background: #3498db;
    color: #ffffff;
}

/* ========== 404 / 页脚等（可继续用你原来的） ========== */
.footer {
    text-align: center;
    color: #95a5a6;
    font-size: 0.9em;
    padding: 40px 0 20px;
    margin-top: 60px;
    border-top: 1px solid #ecf0f1;
}

/* 归档页面容器 */
.archive-main-container {
    display: flex;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    gap: 30px;
}

/* 主内容区 */
.archive-content {
    flex: 1;
    min-width: 0;
}

/* 侧边栏 */
.archive-sidebar {
    width: 300px;
}

/* 标题样式 */
.archive-heading {
    font-size: 1.8rem;
    color: var(--text-color);
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--border-color);
    text-align: center;
}

/* 文章卡片 */
.archive-post-card {
    background: var(--card-bg);
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}

.archive-post-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

/* 文章标题 */
.post-title {
    font-size: 1.4rem;
    margin: 0 0 10px 0;
}

.post-title a {
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.2s;
}

.post-title a:hover {
    color: #3498db;
}

/* 文章元信息 */
.post-meta {
    display: flex;
    gap: 15px;
    color: #7f8c8d;
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.post-meta a {
    color: inherit;
    text-decoration: none;
}

.post-meta a:hover {
    text-decoration: underline;
}

/* 摘要部分 */
.post-excerpt {
    color: var(--text-color);
    line-height: 1.7;
    margin-bottom: 10px;
}

.read-more {
    display: inline-block;
    margin-top: 10px;
    color: #3498db;
    font-weight: 500;
    text-decoration: none;
}

.read-more:hover {
    text-decoration: underline;
}

/* 空状态 */
.archive-empty {
    text-align: center;
    padding: 50px 0;
}

.archive-empty h2 {
    color: var(--text-color);
    margin-bottom: 15px;
}

.archive-empty p {
    color: #7f8c8d;
}

/* 分页 */
.archive-pagination {
    margin-top: 40px;
    text-align: center;
}

/* 暗色模式适配 */
[data-theme="dark"] .archive-post-card {
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

[data-theme="dark"] .archive-post-card:hover {
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

[data-theme="dark"] .archive-heading {
    border-bottom-color: #404040;
}
/* 基础布局 - 移动端优先 */
.archive-container {
    width: 100%;
    max-width: 100%;
    padding: 15px;
    box-sizing: border-box;
}

/* 移动端布局 (默认) */
.archive-content {
    width: 100%;
    margin-bottom: 30px;
}

.archive-sidebar {
    width: 100%;
    padding: 15px;
    background: var(--card-bg);
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

/* 平板及以上设备 (768px+) */
@media (min-width: 768px) {
    .archive-container {
        display: flex;
        gap: 30px;
        padding: 20px;
    }
    
    .archive-content {
        flex: 1;
        min-width: 0;
        margin-bottom: 0;
    }
    
    .archive-sidebar {
        width: 300px;
    }
}

/* 归档文章卡片移动端优化 */
.archive-post-card {
    padding: 18px;
    margin-bottom: 20px;
}

.archive-post-card:hover {
    transform: none; /* 移动端移除悬停效果 */
}

.post-title {
    font-size: 1.2rem; /* 移动端适当减小字号 */
}

.post-meta {
    flex-wrap: wrap; /* 小屏幕下换行显示 */
    gap: 8px;
}

/* 侧边栏小工具移动端优化 */
.widget {
    margin-bottom: 20px;
    padding: 15px;
}

.widget-title {
    font-size: 1.1rem;
}

/* 分页导航优化 */
.archive-pagination {
    padding: 10px 0;
}

.archive-pagination a,
.archive-pagination span {
    padding: 8px 12px;
    margin: 0 5px;
    font-size: 0.9rem;
}

/* 夜间模式适配 */
[data-theme="dark"] .archive-sidebar {
    background: var(--card-bg-dark);
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

/* 文章卡片 */
.post-card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
}

.post-title {
    font-size: 1.8rem;
    color: var(--text-color);
    margin-bottom: 15px;
}

.post-meta {
    display: flex;
    gap: 15px;
    color: #7f8c8d;
    font-size: 0.9rem;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.post-content {
    line-height: 1.8;
    color: var(--text-color);
}

.post-tags {
    margin-top: 20px;
}

/* 评论卡片 */
.comment-card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.comment-title {
    font-size: 1.4rem;
    margin-bottom: 20px;
    color: var(--text-color);
}

.comment-item {
    padding: 15px 0;
    border-bottom: 1px solid var(--border-color);
}

.comment-author {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.comment-avatar img {
    border-radius: 50%;
}

.comment-name {
    font-weight: 600;
    color: var(--text-color);
}

.comment-time {
    color: #7f8c8d;
    font-size: 0.85rem;
}

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

/* 评论表单 */
.comment-form-card {
    margin-top: 30px;
}

.comment-form-title {
    font-size: 1.2rem;
    margin-bottom: 20px;
    color: var(--text-color);
}

.form-group {
    margin-bottom: 15px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: var(--input-bg);
    color: var(--text-color);
}

.comment-submit {
    background: #3498db;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.comment-submit:hover {
    background: #2980b9;
}

/* 暗色模式适配 */
[data-theme="dark"] .post-card,
[data-theme="dark"] .comment-card {
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

[data-theme="dark"] .form-group input,
[data-theme="dark"] .form-group textarea {
    background: #2d2d2d;
    border-color: #404040;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .post-card,
    .comment-card {
        padding: 20px;
        border-radius: 8px;
    }
    
    .post-title {
        font-size: 1.5rem;
    }
    
    .comment-item {
        padding: 12px 0;
    }
}

