/* 全局变量 */
:root {
    --primary-color: #2c5282;
    --secondary-color: #4299e1;
    --accent-color: #38a169;
    --text-primary: #2d3748;
    --text-secondary: #4a5568;
    --text-light: #718096;
    --bg-primary: #ffffff;
    --bg-secondary: #f7fafc;
    --bg-tertiary: #edf2f7;
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 15px;
}

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
    line-height: 1.7;
    color: var(--text-primary);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background-attachment: fixed;
    min-height: 100vh;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: all 0.3s ease;
}

a:hover {
    color: var(--secondary-color);
}

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

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

/* Header 样式 */
.site-header {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: all 0.3s ease;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.site-logo {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

.site-logo img {
    height: 40px;
    width: auto;
}

.site-logo-text {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* 导航菜单 */
.main-nav ul {
    display: flex;
    list-style: none;
    gap: 5px;
}

.main-nav li {
    position: relative;
}
.main-nav > ul > li:has(a[href*="/category"]) {
    writing-mode: vertical-rl;
    text-orientation: upright;
}

.main-nav a {
    display: block;
    padding: 10px 18px;
    color: var(--text-secondary);
    font-weight: 500;
    border-radius: var(--radius-sm);
    transition: all 0.3s ease;
    white-space: nowrap;
}
.main-nav a {
    display: block;
    padding: 10px 18px;
    color: var(--text-secondary);
    font-weight: 500;
    border-radius: var(--radius-sm);
    transition: all 0.3s ease;
}

.main-nav a:hover,
.main-nav .active a {
    background: var(--primary-color);
    color: #fff;
    transform: translateY(-2px);
}

/* 下拉菜单 */
.dropdown {
    position: relative;
}
.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 180px;
    background: #fff;
    box-shadow: var(--shadow-lg);
    border-radius: var(--radius-md);
    padding: 8px 0;
    z-index: 1001;
    animation: slideDown 0.3s ease;
}

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

.dropdown:hover .dropdown-menu {
    display: block;
}

.dropdown-menu li a {
    padding: 10px 20px;
    color: var(--text-secondary);
}

.dropdown-menu li a:hover {
    background: rgba(66, 153, 225, 0.1);
    color: var(--primary-color);
}

/* 搜索框 */
.search-form {
    display: flex;
    align-items: center;
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    padding: 5px 15px;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.search-form:focus-within {
    border-color: var(--secondary-color);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.1);
}

.search-form input {
    border: none;
    background: transparent;
    padding: 8px;
    outline: none;
    width: 200px;
    color: var(--text-primary);
}

.search-form button {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-light);
    padding: 5px;
    transition: color 0.3s ease;
}

.search-form button:hover {
    color: var(--primary-color);
}

/* 主内容区 */
.main-wrapper {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 30px;
    padding: 40px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

/* 文章列表 */
.articles-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
}

.article-card {
    background: #fff;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    animation: fadeInUp 0.6s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

.article-card-image {
    width: 100%;
    height: 280px;
    object-fit: cover;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.article-card-content {
    padding: 20px;
}

.article-card-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 12px;
    line-height: 1.4;
}

.article-card-title a {
    color: var(--text-primary);
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.article-card-title a:hover {
    filter: brightness(1.1);
}

.article-card-excerpt {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-card-meta {
    display: flex;
    align-items: center;
    gap: 20px;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
    font-size: 14px;
    color: var(--text-light);
}

.article-card-meta .category {
    display: inline-block;
    padding: 4px 12px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: #fff;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.article-card-meta time {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* 侧边栏 */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.widget {
    background: #fff;
    border-radius: var(--radius-lg);
    padding: 25px;
    box-shadow: var(--shadow-md);
}

.widget-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 3px solid;
    border-image: linear-gradient(135deg, var(--primary-color), var(--secondary-color)) 1;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* 热门文章列表 */
.hot-articles {
    counter-reset: article-num;
}

.hot-article-item {
    position: relative;
    padding: 12px 0 12px 35px;
    border-bottom: 1px dashed var(--border-color);
    transition: all 0.3s ease;
}

.hot-article-item:last-child {
    border-bottom: none;
}

.hot-article-item:before {
    counter-increment: article-num;
    content: counter(article-num);
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 26px;
    height: 26px;
    line-height: 26px;
    text-align: center;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    background: var(--bg-tertiary);
}

.hot-article-item:nth-child(1):before {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.hot-article-item:nth-child(2):before {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.hot-article-item:nth-child(3):before {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
}

.hot-article-item a {
    color: var(--text-secondary);
    font-weight: 500;
    display: block;
    transition: all 0.3s ease;
}

.hot-article-item a:hover {
    color: var(--primary-color);
    transform: translateX(5px);
}

/* 标签云 */
.tag-cloud-widget {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag-item {
    display: inline-block;
    padding: 6px 14px;
    background: var(--bg-secondary);
    border-radius: 20px;
    font-size: 13px;
    color: var(--text-secondary);
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.tag-item:hover {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: #fff;
    transform: scale(1.05);
    box-shadow: var(--shadow-md);
}

.tag-count {
    margin-left: 4px;
    font-size: 11px;
    opacity: 0.7;
}

/* 友情链接 */
.friend-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.friend-link-item {
    flex: 0 0 calc(50% - 5px);
    padding: 10px 15px;
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 13px;
    transition: all 0.3s ease;
}

.friend-link-item:hover {
    background: var(--primary-color);
    color: #fff;
    transform: translateY(-3px);
}

/* 分页 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 30px;
    padding: 20px 0;
}

.pagination li {
    list-style: none;
}

.pagination a,
.pagination span {
    display: block;
    min-width: 42px;
    height: 42px;
    line-height: 42px;
    text-align: center;
    border-radius: 50%;
    background: #fff;
    color: var(--text-secondary);
    font-weight: 600;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.pagination a:hover {
    background: var(--primary-color);
    color: #fff;
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.pagination .active span {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: #fff;
    box-shadow: var(--shadow-md);
}

/* Footer */
.site-footer {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: #ecf0f1;
    padding: 40px 20px;
    margin-top: 60px;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.footer-copyright {
    margin-bottom: 15px;
    color: #bdc3c7;
}

.footer-copyright a {
    color: #3498db;
    transition: color 0.3s ease;
}

.footer-copyright a:hover {
    color: #5dade2;
}

.footer-info {
    font-size: 14px;
    color: #95a5a6;
}

/* 响应式设计 */
@media (max-width: 968px) {
    .main-wrapper {
        grid-template-columns: 1fr;
    }

    .sidebar {
        order: -1;
    }

    .header-inner {
        flex-wrap: wrap;
        gap: 15px;
    }

    .main-nav ul {
        flex-wrap: wrap;
        justify-content: center;
    }

    .search-form {
        width: 100%;
    }

    .search-form input {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .article-card-image {
        height: 200px;
    }

    .article-card-content {
        padding: 20px;
    }

    .article-card-title {
        font-size: 18px;
    }

    .main-nav {
        width: 100%;
        order: 3;
    }

    .main-nav ul {
        justify-content: center;
    }
}

/* 页面加载动画 */
body {
    animation: pageLoad 0.8s ease;
}

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

/* 滚动条美化 */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}
.section-header {
    text-align: center;
    margin-bottom: 40px;
    padding: 30px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

.section-title {
    font-size: 32px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
}

.section-subtitle {
    color: var(--text-light);
    font-size: 16px;
}

/* 文章详情页面样式 */
.post-main {
    background: #fff;
    border-radius: var(--radius-lg);
    padding: 40px;
    box-shadow: var(--shadow-md);
    margin-bottom: 30px;
}

.post-title {
    font-size: 32px;
    font-weight: 800;
    line-height: 1.4;
    margin-bottom: 20px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    padding: 20px 0;
    border-bottom: 2px solid var(--border-color);
    margin-bottom: 30px;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-light);
    font-size: 14px;
}

.meta-item a {
    color: var(--primary-color);
}

.post-content {
    font-size: 16px;
    line-height: 1.9;
    color: var(--text-primary);
}

.post-content p {
    margin-bottom: 20px;
}

.post-content h2,
.post-content h3,
.post-content h4 {
    margin-top: 40px;
    margin-bottom: 20px;
    font-weight: 700;
    color: var(--text-primary);
}

.post-content h2 {
    font-size: 26px;
    border-left: 4px solid var(--primary-color);
    padding-left: 15px;
}

.post-content h3 {
    font-size: 22px;
}

.post-content img {
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    margin: 30px 0;
}

.post-content blockquote {
    border-left: 4px solid var(--secondary-color);
    padding-left: 20px;
    margin: 30px 0;
    color: var(--text-secondary);
    background: var(--bg-secondary);
    padding: 20px 30px;
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.post-content pre {
    background: #2d3748;
    color: #f7fafc;
    padding: 20px;
    border-radius: var(--radius-md);
    overflow-x: auto;
    margin: 30px 0;
}

.post-content code {
    background: var(--bg-secondary);
    padding: 2px 8px;
    border-radius: 4px;
    font-family: "Fira Code", "Consolas", monospace;
    font-size: 14px;
}

.post-content ul,
.post-content ol {
    margin: 20px 0;
    padding-left: 30px;
}

.post-content li {
    margin-bottom: 10px;
}

.post-tags {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 2px solid var(--border-color);
}

.post-tags h4 {
    margin-bottom: 15px;
    color: var(--text-secondary);
}

.post-tags a {
    display: inline-block;
    padding: 6px 16px;
    background: var(--bg-secondary);
    border-radius: 20px;
    margin: 5px;
    font-size: 14px;
    color: var(--text-secondary);
    transition: all 0.3s ease;
}

.post-tags a:hover {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: #fff;
    transform: translateY(-3px);
}

/* 相关文章 */
.related-articles {
    margin-top: 40px;
}

.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.article-card-small {
    background: #fff;
    padding: 20px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.article-card-small:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.article-card-small h4 {
    margin-bottom: 10px;
}

.article-card-small h4 a {
    color: var(--text-primary);
    font-size: 16px;
}

.article-card-small p {
    color: var(--text-light);
    font-size: 14px;
    line-height: 1.6;
}

/* 搜索页面 */
.search-page {
    background: #fff;
    border-radius: var(--radius-lg);
    padding: 40px;
    box-shadow: var(--shadow-md);
}

.search-header {
    text-align: center;
    margin-bottom: 40px;
}

.search-title {
    font-size: 28px;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.search-query {
    color: var(--text-secondary);
    font-size: 16px;
}

.no-results {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-light);
}

.no-results i {
    font-size: 64px;
    margin-bottom: 20px;
    opacity: 0.5;
}

.no-results h3 {
    font-size: 22px;
    margin-bottom: 10px;
}

/* 页面内容 */
.page-content {
    background: #fff;
    border-radius: var(--radius-lg);
    padding: 40px;
    box-shadow: var(--shadow-md);
}

.page-title {
    font-size: 32px;
    margin-bottom: 30px;
    color: var(--primary-color);
}

.page-body {
    line-height: 1.8;
    color: var(--text-primary);
}

/* 分类和标签页面 */
.tag-cloud-widget .tag-item {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.tag-cloud-widget .tag-item:hover {
    transform: scale(1.1) rotate(-2deg);
}

/* 加载动画 */
.article-card {
    animation: fadeInUp 0.6s ease both;
}

.article-card:nth-child(1) { animation-delay: 0.1s; }
.article-card:nth-child(2) { animation-delay: 0.2s; }
.article-card:nth-child(3) { animation-delay: 0.3s; }
.article-card:nth-child(4) { animation-delay: 0.4s; }
.article-card:nth-child(5) { animation-delay: 0.5s; }

/* 返回顶部按钮 */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    z-index: 999;
}

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

.back-to-top:hover {
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
    box-shadow: var(--shadow-lg);
    transform: translateY(-5px);
}

.back-to-top i {
    font-size: 24px;
}

/* 移动端菜单按钮 */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    color: var(--primary-color);
}

.mobile-menu-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background: var(--primary-color);
    margin: 5px 0;
    border-radius: 3px;
    transition: all 0.3s ease;
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

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

/* 面包屑导航 */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px 20px;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    margin-bottom: 20px;
    font-size: 14px;
}

.breadcrumb a {
    color: var(--text-secondary);
    transition: color 0.3s ease;
}

.breadcrumb a:hover {
    color: var(--primary-color);
}

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

.breadcrumb .separator {
    color: var(--text-light);
}

/* 文章目录 */
.table-of-contents {
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    padding: 20px 25px;
    margin: 30px 0;
}

.table-of-contents-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 15px;
    color: var(--text-primary);
}

.table-of-contents ul {
    list-style: none;
    padding-left: 0;
}

.table-of-contents li {
    margin-bottom: 10px;
}

.table-of-contents a {
    color: var(--text-secondary);
    display: block;
    padding: 8px 15px;
    border-radius: var(--radius-sm);
    transition: all 0.3s ease;
}

.table-of-contents a:hover {
    background: #fff;
    color: var(--primary-color);
    transform: translateX(5px);
}

.table-of-contents .toc-level-2 {
    padding-left: 20px;
}

.table-of-contents .toc-level-3 {
    padding-left: 40px;
}

/* 代码块增强 */
.highlight {
    position: relative;
    margin: 30px 0;
    border-radius: var(--radius-md);
    overflow: hidden;
}

.highlight pre {
    background: #1a202c;
    color: #e2e8f0;
    padding: 20px;
    overflow-x: auto;
    line-height: 1.6;
    font-size: 14px;
}

.highlight .code-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background: #2d3748;
    color: #a0aec0;
    font-size: 13px;
}

.highlight .copy-button {
    background: transparent;
    border: 1px solid #4a5568;
    color: #a0aec0;
    padding: 5px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.3s ease;
}

.highlight .copy-button:hover {
    background: #4a5568;
    color: #fff;
}

/* 引用块增强 */
blockquote {
    position: relative;
    padding: 20px 30px;
    margin: 30px 0;
    background: var(--bg-secondary);
    border-left: 4px solid var(--secondary-color);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    color: var(--text-secondary);
}

blockquote:before {
    content: '"';
    position: absolute;
    top: -10px;
    left: 20px;
    font-size: 60px;
    color: var(--secondary-color);
    opacity: 0.2;
    font-family: Georgia, serif;
}

blockquote p:last-child {
    margin-bottom: 0;
}

/* 表格样式 */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 30px 0;
    background: #fff;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

table thead {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: #fff;
}

table th {
    padding: 15px;
    text-align: left;
    font-weight: 600;
}

table td {
    padding: 15px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-secondary);
}

table tbody tr:hover {
    background: var(--bg-secondary);
}

table tbody tr:last-child td {
    border-bottom: none;
}

/* 提示框 */
.alert {
    padding: 15px 20px;
    margin: 20px 0;
    border-radius: var(--radius-md);
    border-left: 4px solid;
    display: flex;
    align-items: center;
    gap: 12px;
}

.alert-info {
    background: #ebf8ff;
    border-color: var(--secondary-color);
    color: #2b6cb0;
}

.alert-success {
    background: #f0fff4;
    border-color: var(--accent-color);
    color: #276749;
}

.alert-warning {
    background: #fffff0;
    border-color: #ecc94b;
    color: #975a16;
}

.alert-danger {
    background: #fff5f5;
    border-color: #fc8181;
    color: #c53030;
}

.alert i {
    font-size: 20px;
}

/* 图片说明文字 */
figcaption {
    text-align: center;
    color: var(--text-light);
    font-size: 14px;
    margin-top: 10px;
    font-style: italic;
}

/* 分隔线 */
hr {
    border: none;
    height: 2px;
    background: linear-gradient(to right, transparent, var(--border-color), transparent);
    margin: 40px 0;
}

/* 按钮通用样式 */
.btn {
    display: inline-block;
    padding: 12px 28px;
    font-size: 15px;
    font-weight: 600;
    text-align: center;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: #fff;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-outline:hover {
    background: var(--primary-color);
    color: #fff;
}

/* 卡片网格布局 */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    margin: 30px 0;
}

.card {
    background: #fff;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.card-image {
    width: 100%;
    height: 180px;
    object-fit: cover;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.card-content {
    padding: 20px;
}

.card-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.card-excerpt {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 15px;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
    font-size: 13px;
    color: var(--text-light);
}

/* 归档页面 */
.archives-list {
    list-style: none;
    padding: 0;
}

.archives-item {
    position: relative;
    padding: 15px 0 15px 30px;
    border-left: 2px solid var(--border-color);
    transition: all 0.3s ease;
}

.archives-item:before {
    content: '';
    position: absolute;
    left: -6px;
    top: 20px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--bg-tertiary);
    border: 2px solid var(--secondary-color);
    transition: all 0.3s ease;
}

.archives-item:hover:before {
    background: var(--secondary-color);
    transform: scale(1.3);
}

.archives-item:hover {
    border-left-color: var(--secondary-color);
    padding-left: 40px;
}

.archives-date {
    color: var(--text-light);
    font-size: 14px;
    margin-bottom: 5px;
}

.archives-title {
    font-size: 16px;
    color: var(--text-primary);
    transition: color 0.3s ease;
}

.archives-item:hover .archives-title {
    color: var(--primary-color);
}

/* 作者信息卡片 */
.author-card {
    background: #fff;
    border-radius: var(--radius-lg);
    padding: 30px;
    text-align: center;
    box-shadow: var(--shadow-md);
    margin-bottom: 30px;
}

.author-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    margin: 0 auto 20px;
    border: 4px solid var(--bg-secondary);
    box-shadow: var(--shadow-md);
}

.author-name {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.author-bio {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 20px;
}

.author-social {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.author-social a {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--bg-secondary);
    color: var(--text-secondary);
    transition: all 0.3s ease;
}

.author-social a:hover {
    background: var(--primary-color);
    color: #fff;
    transform: translateY(-3px);
}

/* 响应式调整 */
@media (max-width: 968px) {
    .main-wrapper {
        grid-template-columns: 1fr;
        padding: 20px 15px;
    }

    .sidebar {
        order: -1;
    }

    .post-main {
        padding: 25px;
    }

    .post-title {
        font-size: 26px;
    }
}

@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: block;
    }

    .main-nav {
        display: none;
        width: 100%;
        order: 3;
    }

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

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

    .main-nav li {
        width: 100%;
    }

    .main-nav a {
        padding: 15px 20px;
        border-bottom: 1px solid var(--border-color);
    }

    .dropdown-menu {
        position: static;
        box-shadow: none;
        padding-left: 20px;
    }

    .header-inner {
        flex-wrap: wrap;
    }

    .search-form {
        width: 100%;
        margin-top: 15px;
    }

    .article-card-image {
        height: 200px;
    }

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

    .post-content {
        font-size: 15px;
    }

    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
    }

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

/* 深色模式支持 */
@media (prefers-color-scheme: dark) {
    :root {
        --text-primary: #f7fafc;
        --text-secondary: #e2e8f0;
        --text-light: #a0aec0;
        --bg-primary: #1a202c;
        --bg-secondary: #2d3748;
        --bg-tertiary: #4a5568;
        --border-color: #4a5568;
    }

    body {
        background: linear-gradient(135deg, #1a202c 0%, #2d3748 100%);
    }

    .site-header {
        background: rgba(26, 32, 44, 0.98);
    }

    .article-card,
    .widget,
    .post-main,
    .page-content {
        background: var(--bg-primary);
    }
}

/* 打印样式 */
@media print {
    .site-header,
    .sidebar,
    .site-footer,
    .back-to-top,
    .pagination {
        display: none !important;
    }

    .main-wrapper {
        display: block;
    }

    .post-main {
        box-shadow: none;
        padding: 0;
    }

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

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

/* 动画效果增强 */
@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.widget {
    animation: slideInLeft 0.6s ease;
}

.articles-container {
    animation: slideInRight 0.6s ease;
}

/* 懒加载占位符 */
.lazy-load {
    background: linear-gradient(90deg, var(--bg-secondary) 25%, var(--bg-tertiary) 50%, var(--bg-secondary) 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* 选中文字高亮 */
::selection {
    background: var(--secondary-color);
    color: #fff;
}

::-moz-selection {
    background: var(--secondary-color);
    color: #fff;
}

/* 链接下划线动画 */
a {
    position: relative;
}

a:not(.btn):not(.tag-item):not(.category):after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--secondary-color);
    transition: width 0.3s ease;
}

a:not(.btn):not(.tag-item):not(.category):hover:after {
    width: 100%;
}
/* ... existing code ... */

.tag-count {
    margin-left: 4px;
    font-size: 11px;
    opacity: 0.7;
}

/* 标签云页面 */
.tag-cloud-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

.tag-cloud-container .section-header {
    text-align: center;
    margin-bottom: 40px;
}

.tag-cloud-content {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
}

.tag-cloud-item {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    background: var(--bg-secondary);
    border-radius: 25px;
    font-size: 14px;
   color: var(--text-secondary);
    transition: all 0.3s ease;
    border: 2px solid transparent;
    text-decoration: none;
}

.tag-cloud-item:hover {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
   color: #fff;
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.tag-cloud-item .tag-count {
    margin-left: 6px;
    font-size: 12px;
    opacity: 0.8;
    background: rgba(0, 0, 0, 0.1);
    padding: 2px 8px;
    border-radius: 10px;
}

/* 友情链接 */
.friend-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.fixed-categories {
    background: #fff;
    border-radius: var(--radius-lg);
    padding: 30px;
    box-shadow: var(--shadow-md);
   margin-top: 30px;
   display: grid;
   grid-template-columns: repeat(2, 1fr);
   gap: 30px;
}

.category-column {
   flex: 1;
}

.category-header {
  display: flex;
    justify-content: space-between;
    align-items: center;
  margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 3px solid;
    border-image: linear-gradient(135deg, var(--primary-color), var(--secondary-color)) 1;
}

.category-header h3 {
    font-size: 18px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
  margin: 0;
}
.more-link {
    color: #666;
    text-decoration: none;
    font-size: 14px;
}

.category-list {
    list-style: none;
    padding: 0;
}

.category-list li {
    margin-bottom: 12px;
    position: relative;
    padding-left: 16px;
}

.category-list li::before {
    content: "▶";
    color: #ccc;
    position: absolute;
    left: 0;
}

.category-list a {
    color: #333;
    text-decoration: none;
    font-size: 14px;
}

.category-list .date {
    color: #999;
    font-size: 12px;
    margin-left: 10px;
}