/* 主题系统变量 - 无 !important 的干净版本 */
:root {
    /* 基础颜色变量 */
    --bg-primary: #ffffff;
    --bg-secondary: #fafbfe;
    --bg-white: #ffffff;
    --bg-surface: #f6f6f6;
    
    --text-primary: #444;
    --text-secondary: #666;
    --text-muted: #999;
    
    --border-color: #eee;
    --border-light: #dee2e6;
    
    --link-color: #3354AA;
    --code-color: #B94A48;
    
    /* 组件颜色 */
    --hover-bg: #eee;
    --comment-odd-bg: #F6F6F3;
    --comment-even-bg: #FFF;
    --comment-author-bg: #FFF9E8;
    --browsehappy-bg: #FBE3E4;
    --browsehappy-color: #8A1F11;
    
    /* 功能颜色 */
    --primary: #727cf5;
    --secondary: #6c757d;
    --success: #0acf97;
    --info: #39afd1;
    --warning: #ffbc00;
    --danger: #fa5c7c;
}

/* 夜间模式 */
[data-theme="dark"] {
    --bg-primary: #1a202c;
    --bg-secondary: #0f1a2a;
    --bg-white: #1a202c;
    --bg-surface: #1e2a3a;
    
    --text-primary: #e1e8f0;
    --text-secondary: #a0aec0;
    --text-muted: #a0aec0;
    
    --border-color: #2d3a4b;
    --border-light: #2d3a4b;
    
    --link-color: #63b3ed;
    --code-color: #feb2b2;
    
    /* 组件颜色 */
    --hover-bg: #2d3748;
    --comment-odd-bg: #2d3748;
    --comment-even-bg: #1a202c;
    --comment-author-bg: #2d3748;
    --browsehappy-bg: #742a2a;
    --browsehappy-color: #fed7d7;
}

/* 基础样式 */
body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: "Droid Serif", Georgia, "Times New Roman", "PingFang SC", "Hiragino Sans GB", "Source Han Sans CN", "WenQuanYi Micro Hei", "Microsoft Yahei", serif;
    font-size: 87.5%;
    line-height: 1.6;
    transition: background-color 0.3s ease, color 0.3s ease;
}

a {
    color: var(--link-color);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--primary);
}

/* 布局系统 - 与Bootstrap网格保持一致，确保加载前后宽度一致 */
.container-fluid {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    padding: 0 15px;
    min-height: 60px; /* 固定导航栏高度 */
    box-sizing: border-box;
}

/* 确保在Bootstrap加载前就有正确的宽度 */
@media (min-width: 576px) {
    .container-fluid {
        max-width: 540px;
    }
}

@media (min-width: 768px) {
    .container-fluid {
        max-width: 720px;
    }
}

@media (min-width: 992px) {
    .container-fluid {
        max-width: 960px;
    }
}

@media (min-width: 1200px) {
    .container-fluid {
        max-width: 1140px;
    }
}

/* 导航栏固定高度和布局 */
.navbar-custom {
    background-color: var(--bg-white);
    border-bottom: 1px solid var(--border-color);
    padding: 0.5rem 1rem;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 60px;
    height: 60px; /* 固定高度 */
    gap: 1rem;
    box-sizing: border-box;
    width: 100%; /* 确保宽度100% */
    max-width: 100%; /* 防止宽度变化 */
}

/* 页面布局 - 确保footer在底部 */
html, body {
    height: 100%;
    margin: 0;
    padding: 0;
}

.wrapper {
    min-height: 100vh;
    padding-top: 60px; /* 固定导航栏高度 */
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
}

/* 确保内容区域在导航栏下方 */
.content-page {
    flex: 1; /* 关键：让内容区域占据剩余空间 */
    min-height: auto; /* 移除固定高度限制，让内容撑开 */
    padding-top: 0; /* 移除额外的padding-top */
    margin-top: 0;
    width: 100%;
    max-width: 100%;
}

/* 导航栏内部容器固定宽度 */
.navbar-custom > .container-fluid {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    padding: 0 15px;
    height: 100%;
    min-height: 60px;
}

/* 导航栏左侧区域 */
.navbar-left {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    height: 100%;
    min-height: 40px;
}

/* 导航栏中间区域 */
.navbar-center {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    max-width: 400px;
    height: 100%;
    min-height: 40px;
}

/* 导航栏右侧区域 */
.navbar-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-shrink: 0;
    gap: 0.5rem;
    height: 100%;
    min-height: 40px;
}

.row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -15px;
}

.col-md-6 {
    flex: 0 0 50%;
    max-width: 50%;
    padding: 0 15px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .col-md-6 {
        flex: 0 0 100%;
        max-width: 100%;
    }
    
    .container-fluid {
        padding: 0 10px;
    }
}

/* 表单样式 */
.form-control {
    display: block;
    width: 100%;
    padding: 0.45rem 0.9rem;
    font-size: 0.875rem;
    line-height: 1.5;
    color: var(--text-secondary);
    background-color: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: 0.25rem;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-control:focus {
    color: var(--text-primary);
    background-color: var(--bg-white);
    border-color: var(--primary);
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(114, 124, 245, 0.25);
}

/* 图片样式 */
.img-thumbnail {
    padding: 0.25rem;
    background-color: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: 0.25rem;
    max-width: 100%;
    height: auto;
}

/* 背景颜色类 */
.bg-white {
    background-color: var(--bg-white);
}

/* 文本颜色类 */
.text-muted {
    color: var(--text-muted);
}

.text-secondary {
    color: var(--text-secondary);
}

/* 边框样式 */
.border {
    border: 1px solid var(--border-light);
}

/* 卡片样式 */
.card {
    background-color: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: 0.25rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

/* 按钮基础样式 */
.btn {
    display: inline-block;
    font-weight: 400;
    text-align: center;
    vertical-align: middle;
    user-select: none;
    border: 1px solid transparent;
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
    line-height: 1.5;
    border-radius: 0.25rem;
    transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out;
}

.btn-primary {
    color: #fff;
    background-color: var(--primary);
    border-color: var(--primary);
}

.btn-primary:hover {
    background-color: #5d6be0;
    border-color: #5d6be0;
}

/* 工具类 */
.d-flex {
    display: flex;
}

.justify-content-between {
    justify-content: space-between;
}

.align-items-center {
    align-items: center;
}

.mt-3 {
    margin-top: 1rem;
}

.mb-3 {
    margin-bottom: 1rem;
}

.p-3 {
    padding: 1rem;
}

/* 夜间模式切换动画 */
* {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

/* 代码块样式 */
pre, code {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 0.25rem;
    padding: 0.5rem;
    font-family: "SFMono-Regular", "Menlo", "Monaco", "Consolas", monospace;
    color: var(--code-color);
}

/* 引用块样式 */
blockquote {
    margin: 1em 1.5em;
    padding-left: 1.5em;
    border-left: 4px solid var(--border-color);
    color: var(--text-secondary);
    font-style: italic;
}

/* 页脚样式 - 固定在页面底部 */
.footer {
    background-color: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 0.5rem 0; /* 进一步减少padding */
    margin-top: auto; /* 关键：让footer自动占据剩余空间 */
    text-align: center; /* 文字居中 */
    position: static;
    width: 100%;
    font-size: 0.875rem; /* 减小字体大小 */
}

/* 导航栏样式 */
.navbar-custom {
    background-color: var(--bg-white);
    border-bottom: 1px solid var(--border-color);
    padding: 0.5rem 1rem;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 60px;
    height: auto;
    gap: 1rem;
}

/* 导航栏左侧区域 */
.navbar-left {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

/* 导航栏中间区域 */
.navbar-center {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    max-width: 400px;
}

/* 导航栏右侧区域 */
.navbar-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-shrink: 0;
    gap: 0.5rem;
}

/* 顶部菜单 */
.topbar-right-menu {
    display: flex;
    align-items: center;
    margin: 0;
    padding: 0;
    list-style: none;
    height: 100%;
}

.topbar-right-menu li {
    margin-left: 1rem;
    height: 100%;
    display: flex;
    align-items: center;
}

/* 通知列表 */
.notification-list {
    position: relative;
}

.nav-link.dropdown-toggle {
    display: flex;
    align-items: center;
    color: var(--text-secondary);
    text-decoration: none;
    padding: 0.5rem;
    border-radius: 0.25rem;
    transition: all 0.2s ease;
    height: 40px;
    min-height: 40px;
}

.nav-link.dropdown-toggle:hover {
    color: var(--primary);
    background-color: var(--hover-bg);
}

/* 夜间模式下的导航按钮样式 */
[data-theme="dark"] .nav-link.dropdown-toggle {
    color: var(--text-secondary);
    background-color: transparent;
}

[data-theme="dark"] .nav-link.dropdown-toggle:hover {
    color: var(--primary);
    background-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .account-user-name {
    color: var(--text-primary);
}

[data-theme="dark"] .account-position {
    color: var(--text-muted);
}

/* 夜间模式下的导航按钮样式 */
[data-theme="dark"] .nav-link.dropdown-toggle {
    color: var(--text-secondary);
    background-color: transparent;
}

[data-theme="dark"] .nav-link.dropdown-toggle:hover {
    color: var(--primary);
    background-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .account-user-name {
    color: var(--text-primary);
}

[data-theme="dark"] .account-position {
    color: var(--text-muted);
}

.noti-icon {
    font-size: 1.2rem;
    margin-right: 0.25rem;
}

.noti-icon-badge {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 8px;
    height: 8px;
    background-color: var(--danger);
    border-radius: 50%;
}

/* 下拉菜单 */
.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background-color: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: 0.25rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    min-width: 280px;
    z-index: 1001;
    display: none;
}

.dropdown-menu.show {
    display: block;
}

.dropdown-item {
    padding: 0.75rem 1rem;
    color: var(--text-primary);
    text-decoration: none;
    border-bottom: 1px solid var(--border-color);
    transition: background-color 0.2s ease;
}

.dropdown-item:hover {
    background-color: var(--hover-bg);
}

.dropdown-item:last-child {
    border-bottom: none;
}

.noti-title {
    background-color: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
}

.noti-title h5 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
}

/* 用户菜单 */
.account-user-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background-color: var(--primary);
    color: white;
    border-radius: 50%;
    margin-right: 0.5rem;
}

.account-user-name {
    display: block;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.875rem;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 1.2;
    margin-bottom: -2px;
}

.account-position {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.2;
    margin-top: -2px;
}

/* 搜索框 */
.app-search {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    flex: 1;
    max-width: 400px;
    margin: 0 auto;
    height: 40px;
    min-height: 40px;
}

.home-btn {
    display: inline-flex;
    align-items: center;
    padding: 8px 12px;
    border-radius: 20px;
    white-space: nowrap;
    min-width: auto;
    border: 1px solid var(--primary);
    color: var(--primary);
    background-color: transparent;
    text-decoration: none;
    transition: all 0.2s ease;
}

.home-btn:hover {
    background-color: var(--primary);
    color: white;
}

.app-search form {
    flex-shrink: 1;
    min-width: 0;
    flex: 1;
}

.app-search .input-group {
    display: flex;
    max-width: 280px;
}

.app-search .form-control {
    flex: 1;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

.app-search .input-group-append {
    display: flex;
}

.app-search .btn {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

/* 汉堡菜单按钮 */
.button-menu-mobile {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.2rem;
    padding: 0.5rem;
    border-radius: 0.25rem;
    cursor: pointer;
    transition: all 0.2s ease;
    height: 40px;
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.button-menu-mobile:hover {
    color: var(--primary);
    background-color: var(--hover-bg);
}

/* 徽章样式 */
.badge {
    display: inline-block;
    padding: 0.35rem 0.65rem;
    font-size: 0.8rem;
    font-weight: 500;
    line-height: 1.2;
    text-align: center;
    white-space: nowrap;
    vertical-align: middle;
    border-radius: 0.3rem;
    border: 1px solid transparent;
    transition: all 0.2s ease;
}

.badge-success {
    color: white;
    background-color: var(--success);
}

.badge-info {
    color: white;
    background-color: var(--info);
}

.badge-light {
    color: var(--text-secondary);
    background-color: var(--bg-surface);
}

.badge-secondary {
    color: white;
    background-color: var(--secondary);
}

/* 徽章链接样式 */
.badge a {
    color: inherit;
    text-decoration: none;
}

.badge a:hover {
    color: inherit;
    text-decoration: none;
}

/* 更多图标样式 */
.iconfont.icon-more_light {
    font-size: 1.2rem;
    color: var(--text-muted);
    transition: color 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
}

.iconfont.icon-more_light:hover {
    color: var(--primary);
    background-color: var(--hover-bg);
}

/* 下拉菜单样式 */
.dropdown-toggle.arrow-none.card-drop {
    border: none;
    background: none;
    padding: 0.25rem;
    border-radius: 0.25rem;
    transition: all 0.2s ease;
}

.dropdown-toggle.arrow-none.card-drop:hover {
    background-color: var(--hover-bg);
}

/* 徽章链接样式 */
.badge a {
    color: inherit;
    text-decoration: none;
}

.badge a:hover {
    color: inherit;
    text-decoration: none;
}

/* 更多图标样式 */
.iconfont.icon-more_light {
    font-size: 1.2rem;
    color: var(--text-muted);
    transition: color 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
}

.iconfont.icon-more_light:hover {
    color: var(--primary);
    background-color: var(--hover-bg);
}

/* 下拉菜单样式 */
.dropdown-toggle.arrow-none.card-drop {
    border: none;
    background: none;
    padding: 0.25rem;
    border-radius: 0.25rem;
    transition: all 0.2s ease;
}

.dropdown-toggle.arrow-none.card-drop:hover {
    background-color: var(--hover-bg);
}

/* 卡片样式增强 */
.card-body {
    padding: 1.5rem;
    position: relative;
}

.card-title {
    margin-bottom: 1rem;
    font-weight: 600;
}

/* 卡片头部布局修复 */
.card-body > .dropdown.float-right {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    z-index: 10;
}

.card-body > .float-right.badge {
    position: absolute;
    top: 3.5rem;
    right: 1.5rem;
    z-index: 9;
}

.card-body > .badge:not(.float-right) {
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
}

/* 隐藏空的徽章 */
.card-body > .badge:empty {
    display: none;
}

.card-body h3.mt-0 {
    margin-top: 0 !important;
    padding-right: 8rem;
    line-height: 1.2;
}

/* 版权协议样式修复 - 与app.css保持一致 */
div[style*="border: 1px dashed #ddd"] {
    border: 1px dashed #dee2e6 !important;
    padding: 20px 0 0 0 !important;
    margin: 2rem 0;
    background-color: var(--bg-white);
}

div[style*="border: 1px dashed #ddd"] .text-center.w-75.m-auto {
    width: 75% !important;
    margin: 0 auto !important;
}

div[style*="border: 1px dashed #ddd"] h4.text-dark-50 {
    color: #313a46 !important;
    opacity: 0.8;
    font-weight: 700 !important;
    margin-bottom: 1rem;
}

div[style*="border: 1px dashed #ddd"] p.text-muted {
    color: #98a6ad !important;
    margin-bottom: 1.5rem !important;
    line-height: 1.6;
}

div[style*="border: 1px dashed #ddd"] .badge.badge-primary {
    background-color: #727cf5 !important;
    color: white !important;
    padding: 0.35rem 0.65rem;
    font-size: 0.8rem;
    border-radius: 0.3rem;
    text-decoration: none;
    transition: all 0.2s ease;
}

div[style*="border: 1px dashed #ddd"] .badge.badge-primary:hover {
    background-color: #5a64d1 !important;
    transform: translateY(-1px);
}

/* 版权协议样式修复 - 与app.css保持一致 */
div[style*="border: 1px dashed #ddd"] {
    border: 1px dashed #dee2e6 !important;
    padding: 20px 0 0 0 !important;
    margin: 2rem 0;
    background-color: var(--bg-white);
}

div[style*="border: 1px dashed #ddd"] .text-center.w-75.m-auto {
    width: 75% !important;
    margin: 0 auto !important;
}

div[style*="border: 1px dashed #ddd"] h4.text-dark-50 {
    color: #313a46 !important;
    opacity: 0.8;
    font-weight: 700 !important;
    margin-bottom: 1rem;
}

div[style*="border: 1px dashed #ddd"] p.text-muted {
    color: #98a6ad !important;
    margin-bottom: 1.5rem !important;
    line-height: 1.6;
}

div[style*="border: 1px dashed #ddd"] .badge.badge-primary {
    background-color: #727cf5 !important;
    color: white !important;
    padding: 0.35rem 0.65rem;
    font-size: 0.8rem;
    border-radius: 0.3rem;
    text-decoration: none;
    transition: all 0.2s ease;
}

div[style*="border: 1px dashed #ddd"] .badge.badge-primary:hover {
    background-color: #5a64d1 !important;
    transform: translateY(-1px);
}

/* 媒体对象 */
.media {
    display: flex;
    align-items: flex-start;
}

.media-body {
    flex: 1;
}

.avatar-sm {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    object-fit: cover;
}

/* 设置工具样式 */
.setting_tool {
    position: fixed;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1000;
    width: 40px;
}

.setting_tool a {
    display: block;
    width: 40px;
    height: 40px;
    background-color: var(--primary);
    color: white;
    border-radius: 50%;
    text-align: center;
    line-height: 40px;
    margin-bottom: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
    cursor: pointer;
}

.setting_tool a:hover {
    transform: scale(1.1);
}

.setting_tool div {
    display: none;
    position: absolute;
    width: 200px;
    right: 100%;
    background: #fff;
    padding: 10px;
    box-shadow: 0 0 2px rgba(0, 0, 0, .1);
    border-radius: 8px;
}

/* 夜间模式下的主题选择器样式 */
[data-theme="dark"] .setting_tool div {
    background: #2d3748;
    box-shadow: 0 0 2px rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .setting_tool.colors div.c li.hr {
    background: rgba(255, 255, 255, 0.1);
}

/* 夜间模式下的主题选择器样式 */
[data-theme="dark"] .setting_tool div {
    background: #2d3748;
    box-shadow: 0 0 2px rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .setting_tool.colors div.c li.hr {
    background: rgba(255, 255, 255, 0.1);
}

.setting_tool.colors div.c {
    display: block;
    height: 120px;
    bottom: -64px;
    z-index: -2;
}

.setting_tool.colors div.c ul {
    text-align: center;
    padding: 4px 0;
    font-size: 12px;
    list-style: none;
    margin: 0;
}

.setting_tool.colors div.c li {
    cursor: pointer;
    margin: 5px 0;
}

.setting_tool.colors div.c li.color {
    display: inline-block;
    width: 50px;
    border-radius: 99px;
    margin: 0 2px;
    background: #fff;
    color: #3274ff;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, .1) inset;
    height: 28px;
    line-height: 28px;
    transition: all 0.3s ease;
}

.setting_tool.colors div.c li.color.active {
    box-shadow: 0 0 0 2px #3274ff;
    transform: scale(1.05);
}

.setting_tool.colors div.c li.color.sepia {
    background: #eae0be;
    color: #704214;
}

.setting_tool.colors div.c li.color.night {
    background: #393f56;
    color: #bdcadb;
}

.setting_tool.colors div.c li.color.undefined {
    background: #f0f0f0;
    color: #666;
}

.setting_tool.colors div.c li.hr {
    display: block;
    width: 100%;
    height: 1px;
    background: rgba(0, 0, 0, .06);
    margin: 8% 0 6%;
}

.setting_tool.search div.s {
    display: block;
    height: 36px;
    bottom: 36px;
    z-index: -1;
    padding: 0;
}

.setting_tool.search div.s input {
    height: 36px;
    width: 100%;
    padding: 0 10px;
    font-size: .9rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #fff;
    color: #333;
}

/* 夜间模式下的搜索框样式 */
[data-theme="dark"] .setting_tool.search div.s input {
    background-color: #2d3748;
    color: #e2e8f0;
    border-color: #4a5568;
}

[data-theme="dark"] .setting_tool.search div.s input::placeholder {
    color: #a0aec0;
}

.setting_tool.colors div.c,
.setting_tool.search div.s {
    -webkit-animation: right-show .3s;
    animation: right-show .3s;
}

@keyframes right-show {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* 文章内容区域样式 */
.content-page {
    min-height: calc(100vh - 200px);
    padding-top: 70px;
    margin-top: 0;
}

/* 卡片标题样式 */
.card-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

/* 徽章样式增强 */
.badge {
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.25rem 0.5rem;
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
}

/* 文章元信息样式 */
.text-muted.mb-2 {
    font-size: 0.9rem;
    line-height: 1.5;
}

/* 版权协议区域 */
[style*="border: 1px dashed #ddd"] {
    border-color: var(--border-color) !important;
    margin: 2rem 0;
    padding: 1.5rem 0;
    text-align: center;
    background-color: var(--bg-white);
}

.text-dark-50 {
    color: var(--text-secondary) !important;
    font-weight: 600;
}

/* 网络转载样式 */
[style*="border: 1px dashed #ddd"] a {
    font-size: 0.9rem !important;
    color: var(--text-muted) !important;
}

/* 文章统计信息 - 简洁布局 */

/* 最外层容器 */
.row.hidden-xs {
    width: 100%;
    max-width: 100%;
    background-color: var(--bg-white);
    font-family: sans-serif;
    margin: 2.25rem 0;
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    display: flex !important;
    flex-wrap: nowrap !important;
}

/* 表头行 */
.row.hidden-xs .col-md-4 h5 {
    background-color: transparent;
    color: var(--text-primary);
    font-weight: 600;
    margin: 0;
    padding: 1rem;
    text-align: center;
    font-size: 0.875rem;
    display: block;
}

/* 数据行 */
.row.hidden-xs .col-md-4 .mb-4 {
    background-color: var(--bg-white);
    margin-bottom: 0 !important;
    padding: 1rem;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
}

/* 数据行内容 */
.row.hidden-xs .col-md-4 p {
    font-size: 1rem;
    color: var(--text-primary);
    margin: 0;
    font-weight: 400;
}

/* 图标样式 */
.row.hidden-xs .col-md-4 .iconfont {
    margin-right: 0.5rem;
    font-size: 1rem;
}

/* 发布时间图标 */
.row.hidden-xs .col-md-4 .icon-time {
    color: #727cf5;
}

/* 文章阅读图标 */
.row.hidden-xs .col-md-4 .icon-hot_light {
    color: #fa5c7c;
}

/* 网友评论图标 */
.row.hidden-xs .col-md-4 .icon-huati {
    color: #0acf97;
}

/* 列布局 */
.row.hidden-xs .col-md-4 {
    flex: 1 1 33.33333% !important;
    min-width: 0 !important;
    max-width: 33.33333% !important;
    display: flex !important;
    flex-direction: column !important;
    width: 33.33333% !important;
}

.row.hidden-xs .col-md-4:not(:last-child) {
    border-right: 1px solid var(--border-color);
}

/* 缩略图布局 - 宽度1/3，文章不足时靠左排放 */
.row:has(.col-12.col-sm-6.col-md-4) {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
}

.col-12.col-sm-6.col-md-4 {
    flex: 0 0 33.33333%;
    max-width: 33.33333%;
    padding: 0 15px;
    margin-bottom: 1rem;
}

/* 文章页面布局 - 移除固定高度限制，让内容自动撑开 */
.content > .container-fluid > .row:not(.visible-lgg-block) {
    min-height: auto !important;
    height: auto !important;
    margin-bottom: 20px;
}

/* 第一排布局高度调整 */
.content > .container-fluid > .row:not(.visible-lgg-block):first-child {
    min-height: auto !important;
    height: auto !important;
}

/* 第二排布局高度调整 */
.content > .container-fluid > .row:not(.visible-lgg-block):nth-child(2) {
    min-height: auto !important;
    height: auto !important;
}

/* 强制覆盖内联样式 */
.content > .container-fluid > .row:not(.visible-lgg-block) [style*="height"] {
    height: auto !important;
    max-height: none !important;
}

/* 第一排右下1x2布局样式 */
.first-row-thumbnails {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    margin: 0 -8px;
}

.first-row-item {
    flex: 0 0 50% !important;
    max-width: 50% !important;
    padding: 0 8px;
    margin-bottom: 1rem;
}

/* 在小屏幕上保持1x2布局 */
@media (max-width: 767.98px) {
    .first-row-item {
        flex: 0 0 100% !important;
        max-width: 100% !important;
    }
}

/* 第二排1x3布局样式 */
.second-row-thumbnails {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    margin: 0 -15px;
}

.second-row-item {
    flex: 0 0 33.33333%;
    max-width: 33.33333%;
    padding: 0 15px;
    margin-bottom: 1rem;
}

/* 在小屏幕上保持1x3布局 */
@media (max-width: 767.98px) {
    .second-row-item {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

/* 图片加载失败时显示随机图片 */
img.lazy {
    position: relative;
}

img.lazy:after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: linear-gradient(45deg, #f0f0f0 25%, transparent 25%), 
                      linear-gradient(-45deg, #f0f0f0 25%, transparent 25%), 
                      linear-gradient(45deg, transparent 75%, #f0f0f0 75%), 
                      linear-gradient(-45deg, transparent 75%, #f0f0f0 75%);
    background-size: 20px 20px;
    background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
    display: none;
}

img.lazy[data-original]:not([src*="thumbnail.png"]) {
    background-color: #f8f9fa;
}

/* 图片加载失败时的备用图片 */
img.lazy[src*="thumbnail.png"] {
    background-image: url('../img/thumb/1.jpg');
    background-size: cover;
    background-position: center;
}

/* 确保图片加载失败时有备用显示 */
img.lazy:not([src]), img.lazy[src=""], img.lazy[src*="thumbnail.png"] {
    background-color: #f8f9fa;
    background-image: url('../img/thumb/1.jpg');
    background-size: cover;
    background-position: center;
}

/* 移动端响应式 */
@media (max-width: 768px) {
    .col-12.col-sm-6.col-md-4 {
        flex: 0 0 50%;
        max-width: 50%;
    }
}

@media (max-width: 576px) {
    .col-12.col-sm-6.col-md-4 {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

/* 移动端文章统计 */
.card-text.visible-xs-block {
    font-size: 0.8rem;
}

.card-text.visible-xs-block .text-nowrap {
    margin-right: 1rem;
}

/* 按钮组样式 */
.text-center .btn {
    margin: 0 0.5rem;
    padding: 0.5rem 1.5rem;
}

/* 分享区域样式 */
.collapse {
    margin-top: 1rem;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-in-out, opacity 0.3s ease-in-out;
    opacity: 0;
}

.collapse.show {
    max-height: 200px;
    opacity: 1;
}

/* 分享区域特定样式 */
#collapseExamplee {
    background-color: transparent;
    border-radius: 0;
    padding: 0;
    margin: 0.5rem 0;
    border: none;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1), 
                opacity 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

#collapseExamplee.show {
    padding: 0.25rem 0;
    max-height: 50px;
    opacity: 1;
}

#collapseExamplee .iconfont {
    margin-right: 0.3rem;
    font-size: 1rem;
}

#collapseExamplee a {
    transition: all 0.2s ease;
    display: inline-block;
    margin: 0 0.2rem;
    padding: 0.2rem;
    border-radius: 0;
    background-color: transparent;
    border: none;
}

#collapseExamplee a:hover {
    transform: translateY(-1px);
    box-shadow: none;
    background-color: transparent;
    color: var(--primary-color);
}

/* 分享区域内容样式 */
#collapseExamplee br {
    display: none;
}

#collapseExamplee i.iconfont {
    margin-right: 0.3rem;
}

/* 确保分享按钮有适当的间距 */
.text-center > .d-flex.flex-wrap.justify-content-center.align-items-center.gap-3.py-3 {
    margin-bottom: 1rem;
}

/* 上一篇/下一篇链接分散对齐样式 */
.card-body:has(a[href*="theNext"]),
.card-body.prev-next-links {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
}

/* 修复上一篇/下一篇容器宽度问题 */
.row > .col-md-12 > .card.d-block {
    width: 100%;
    max-width: 100%;
}

.row > .col-md-12 {
    width: 100%;
    max-width: 100%;
    padding: 0 15px;
}

.card-body:has(a[href*="theNext"]) a,
.card-body.prev-next-links a {
    margin: 0;
    text-decoration: none;
}

.card-body:has(a[href*="theNext"]) .btn,
.card-body.prev-next-links .btn {
    min-width: 120px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

/* 确保上一篇按钮靠左，下一篇按钮靠右 */
.card-body:has(a[href*="theNext"]) a:first-child,
.card-body.prev-next-links a:first-child {
    margin-right: auto;
}

.card-body:has(a[href*="theNext"]) a:last-child,
.card-body.prev-next-links a:last-child {
    margin-left: auto;
}

/* 评论区域样式 */
#respond-post-1 .row {
    display: flex;
    width: 100%;
    margin: 0;
    padding: 0;
}

#respond-post-1 .col-sm-4 {
    flex: 1;
    padding: 0;
    margin: 0;
    width: auto;
}

#respond-post-1 .col-sm-4:last-child {
    flex: 1.2;
}

#respond-post-1 .form-group {
    margin: 0;
    padding: 0;
    width: 100%;
}

#respond-post-1 .form-control {
    width: 100% !important;
    box-sizing: border-box;
}

#respond-post-1 .form-group {
    margin-bottom: 1rem;
    width: 100%;
    display: flex;
    flex-direction: column;
}

#respond-post-1 .form-control {
    width: 100% !important;
    box-sizing: border-box;
    flex: 1;
    min-width: 0;
}

#respond-post-1 .form-control {
    width: 100%;
}

#respond-post-1 .comment-textarea {
    width: 100%;
    margin-left: 0;
    margin-right: 0;
}

#respond-post-1 .row.mb-2 {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
    gap: 1rem;
}

#respond-post-1 .trigger {
    margin-right: auto;
    background: none;
    border: none;
    padding: 0;
    height: auto;
    line-height: 1.5;
}

#respond-post-1 .trigger .btn {
    background: none;
    border: none;
    padding: 0;
    height: auto;
    line-height: 1.5;
    color: var(--primary);
}

#respond-post-1 .trigger .btn:hover {
    background: none;
    color: var(--primary);
    text-decoration: underline;
}

#respond-post-1 .smiliesbox {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: 0.25rem;
    padding: 0.5rem;
    margin-top: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
    min-height: 40px;
    justify-content: flex-start;
    flex-wrap: wrap;
}

#respond-post-1 .float-right {
    margin-left: auto;
    flex-shrink: 0;
    align-self: flex-end;
}

/* 修复emoji区域和提交按钮的布局 */
#respond-post-1 .col-12 {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    width: 100%;
    background: none;
    border: none;
}

#respond-post-1 .trigger {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    position: relative;
    height: 40px;
}

#respond-post-1 .trigger .btn {
    display: flex;
    align-items: center;
    height: 32px;
    line-height: 1;
    padding: 0.25rem 0.75rem;
}



#respond-post-1 .float-right {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    height: 40px;
}

#respond-post-1 .float-right .btn {
    margin-top: 0;
}

#respond-post-1 .smiliesbox {
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 10;
    margin-top: 0.5rem;
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: 0.25rem;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    min-height: 40px;
    justify-content: flex-start;
}

/* 评论区域样式 */
#respond-post-1 .row {
    display: flex;
    width: 100%;
    margin: 0;
    padding: 0;
}

#respond-post-1 .col-sm-4 {
    flex: 1;
    padding: 0;
    margin: 0;
    width: auto;
}

#respond-post-1 .col-sm-4:last-child {
    flex: 1.2;
}

#respond-post-1 .form-group {
    margin: 0;
    padding: 0;
    width: 100%;
}

#respond-post-1 .form-control {
    width: 100% !important;
    box-sizing: border-box;
}

#respond-post-1 .form-group {
    margin-bottom: 1rem;
    width: 100%;
    display: flex;
    flex-direction: column;
}

#respond-post-1 .form-control {
    width: 100% !important;
    box-sizing: border-box;
    flex: 1;
    min-width: 0;
}

#respond-post-1 .form-control {
    width: 100%;
}

#respond-post-1 .comment-textarea {
    width: 100%;
    margin-left: 0;
    margin-right: 0;
}

#respond-post-1 .row.mb-2 {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
    gap: 1rem;
}

#respond-post-1 .trigger {
    margin-right: auto;
    background: none;
    border: none;
    padding: 0;
    height: auto;
    line-height: 1.5;
}

#respond-post-1 .trigger .btn {
    background: none;
    border: none;
    padding: 0;
    height: auto;
    line-height: 1.5;
    color: var(--primary);
}

#respond-post-1 .trigger .btn:hover {
    background: none;
    color: var(--primary);
    text-decoration: underline;
}

#respond-post-1 .smiliesbox {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: 0.25rem;
    padding: 0.5rem;
    margin-top: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
    min-height: 40px;
    justify-content: flex-start;
    flex-wrap: wrap;
}

#respond-post-1 .float-right {
    margin-left: auto;
    flex-shrink: 0;
    align-self: flex-end;
}

/* 修复emoji区域和提交按钮的布局 */
#respond-post-1 .col-12 {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    width: 100%;
    background: none;
    border: none;
}

#respond-post-1 .trigger {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    position: relative;
    height: 40px;
}

#respond-post-1 .trigger .btn {
    display: flex;
    align-items: center;
    height: 32px;
    line-height: 1;
    padding: 0.25rem 0.75rem;
}



#respond-post-1 .float-right {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    height: 40px;
}

#respond-post-1 .float-right .btn {
    margin-top: 0;
}

#respond-post-1 .smiliesbox {
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 10;
    margin-top: 0.5rem;
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: 0.25rem;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    min-height: 40px;
    justify-content: flex-start;
}

.collapse a {
    display: inline-block;
    margin: 0 0.5rem;
    font-size: 1.2rem;
    color: var(--text-secondary);
    transition: color 0.2s ease;
}

.collapse a:hover {
    color: var(--primary);
}

/* 模态框样式 */
.modal {
    display: none !important;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1050;
    overflow: hidden;
    outline: 0;
}

.modal.fade {
    transition: opacity 0.15s linear;
}

.modal.show {
    display: block !important;
}

.modal-dialog {
    max-width: 400px;
    margin: 1.75rem auto;
}

.modal-dialog-centered {
    display: flex;
    align-items: center;
    min-height: calc(100% - 3.5rem);
}

.modal-content {
    background-color: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
}

/* 打赏弹窗特定样式 */
#exampleModalCenter .modal-dialog {
    max-width: 350px;
}

#exampleModalCenter .modal-content {
    max-width: 350px;
    border-radius: 1rem;
}

#exampleModalCenter .modal-header {
    border-bottom: 1px solid var(--border-color);
    border-radius: 1rem 1rem 0 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 1.5rem;
    position: relative;
}

#exampleModalCenter .modal-title {
    margin: 0;
    text-align: center;
    font-size: 1.1rem;
    font-weight: 600;
    flex: 1;
}

#exampleModalCenter .modal-header .close {
    position: absolute;
    right: 0.8rem;
    top: 1.8rem;
    margin: 0;
    padding: 0;
    z-index: 1;
    width: 24px;
    height: 24px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: transparent;
    border: 1px solid var(--border-color);
    transition: all 0.2s ease;
}

#exampleModalCenter .modal-header .close:hover {
    background-color: var(--border-color);
}

#exampleModalCenter .modal-header .close span {
    font-size: 16px;
    line-height: 1;
    margin: 0;
}

#exampleModalCenter .modal-body {
    padding: 2rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

#exampleModalCenter .modal-body .text-center {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

#exampleModalCenter .modal-body .text-center img {
    margin-bottom: 1rem;
}

#exampleModalCenter .modal-body .text-center br {
    display: none;
}

#exampleModalCenter .modal-footer {
    border-top: 1px solid var(--border-color);
    border-radius: 0 0 1rem 1rem;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1rem 1.5rem;
    gap: 1rem;
}

#exampleModalCenter .modal-footer .btn {
    margin: 0;
    min-width: 100px;
    padding: 0.5rem 1.5rem;
}

/* 如果只有一个按钮时的特殊样式 */
#exampleModalCenter .modal-footer:has(> .btn:only-child) {
    justify-content: center;
}

#exampleModalCenter .modal-footer:has(> .btn:only-child) .btn {
    margin: 0 auto;
}

/* 打赏和分享按钮区域居中样式 */
.text-center > .d-flex.flex-wrap.justify-content-center.align-items-center.gap-3.py-3 {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    flex-wrap: wrap !important;
    gap: 0.75rem !important;
    padding: 1rem 0 !important;
}

.text-center > .d-flex.flex-wrap.justify-content-center.align-items-center.gap-3.py-3 .btn {
    margin: 0 !important;
    min-width: 120px;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}

/* 确保按钮在同一行显示 */
@media (min-width: 576px) {
    .text-center > .d-flex.flex-wrap.justify-content-center.align-items-center.gap-3.py-3 {
        flex-wrap: nowrap !important;
    }
}

.modal-header {
    background-color: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    border-radius: 0.5rem 0.5rem 0 0;
}

.modal-title {
    color: var(--text-primary);
    font-weight: 600;
}

.modal-body {
    padding: 2rem;
}

.modal-footer {
    border-top: 1px solid var(--border-color);
    background-color: var(--bg-secondary);
}

/* 评论区域样式 */
#comments {
    margin-top: 2rem;
}

.header-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary);
}

/* 评论列表样式 */
.comment-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.comment-body {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background-color: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
}

.comment-odd {
    background-color: var(--comment-odd-bg);
}

.comment-even {
    background-color: var(--comment-even-bg);
}

/* 评论作者样式 */
.comment-body .mt-0 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.comment-body .mt-0 a {
    color: var(--text-primary);
    text-decoration: none;
}

.comment-body .mt-0 a:hover {
    color: var(--primary);
}

/* 评论内容样式 */
.comment-body p {
    margin: 0.5rem 0;
    line-height: 1.5;
    color: var(--text-secondary);
}

/* 评论元信息 */
.comment-body .text-muted.mb-0 {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.comment-body .text-muted.mb-0 .mr-1 {
    margin-right: 1rem;
}

/* 回复链接 */
.comment-reply {
    font-size: 0.8rem;
}

.comment-reply a {
    color: var(--primary);
    text-decoration: none;
}

.comment-reply a:hover {
    text-decoration: underline;
}

/* 评论表单样式 */
.respond {
    background-color: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    padding: 1.5rem;
    margin-top: 2rem;
}

.cancel-comment-reply {
    margin-bottom: 1rem;
}

.cancel-comment-reply-link {
    color: var(--danger);
    text-decoration: none;
    font-size: 0.9rem;
}

.cancel-comment-reply-link:hover {
    text-decoration: underline;
}

/* 评论文本框 */
.comment-textarea {
    width: 100%;
    min-height: 100px;
    border: 1px solid var(--border-color);
    border-radius: 0.25rem;
    padding: 0.75rem;
    font-size: 0.9rem;
    resize: vertical;
    background-color: var(--bg-white);
    color: var(--text-primary);
}

.comment-textarea:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 0.2rem rgba(114, 124, 245, 0.25);
}

/* 表情选择器 */
#smiliesbox {
    background-color: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: 0.25rem;
    padding: 0.5rem;
    max-height: 150px;
    overflow-y: auto;
}

#smiliesbox span {
    display: inline-block;
    margin: 0.25rem;
    cursor: pointer;
    transition: transform 0.2s ease;
}

#smiliesbox span:hover {
    transform: scale(1.1);
}

#smiliesbox img {
    vertical-align: middle;
}

/* 提交按钮 */
#misubmit {
    background-color: var(--primary);
    border-color: var(--primary);
    color: white;
    padding: 0.5rem 1.5rem;
    font-size: 0.9rem;
}

#misubmit:hover {
    background-color: #5d6be0;
    border-color: #5d6be0;
}

/* 页脚样式增强 */
.footer {
    background-color: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 0.5rem 0;
    margin-top: 1rem;
    color: var(--text-secondary);
}

.footer a {
    color: var(--text-secondary);
    text-decoration: none;
}

.footer a:hover {
    color: var(--primary);
}

/* 响应式设计增强 */
@media (max-width: 768px) {
    .navbar-custom {
        flex-wrap: wrap;
        min-height: auto;
        padding: 0.5rem 0;
        gap: 0.5rem;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
    }
    
    .navbar-left {
        order: 0;
        width: auto;
        margin-right: auto;
    }
    
    .navbar-center {
        order: 2;
        width: 100%;
        max-width: 100%;
        margin: 0.5rem 0;
    }
    
    .navbar-right {
        order: 1;
        width: auto;
        margin-left: auto;
    }
    
    .topbar-right-menu {
        justify-content: flex-end;
    }
    
    .app-search {
        width: 100%;
        max-width: 100%;
    }
    
    .button-menu-mobile {
        display: none;
    }
    
    .row.hidden-xs {
        display: none;
    }
    
    .card-text.visible-xs-block {
        display: block !important;
    }
    
    .content-page {
        padding-top: 80px;
    }
    
    .content-page {
        padding-top: 80px;
    }
    
    .text-center .btn {
        display: block;
        width: 100%;
        margin: 0.5rem 0;
    }
    
    .collapse a {
        margin: 0 0.25rem;
        font-size: 1rem;
    }
    
    .comment-body {
        padding: 0.75rem;
    }
    
    .respond {
        padding: 1rem;
    }
}

@media (max-width: 576px) {
    .container-fluid {
        padding: 0 10px;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .modal-body {
        padding: 1rem;
    }
    
    .footer {
        padding: 0.5rem 0;
    }
}

/* 额外的样式增强 */

/* 文章内容排版 */
.card-body p {
    line-height: 1.8;
    margin-bottom: 1.5rem;
    text-align: justify;
}

/* 代码块样式增强 */
pre {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    padding: 1rem;
    margin: 1.5rem 0;
    overflow-x: auto;
    font-size: 0.9rem;
    line-height: 1.4;
}

code {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 0.25rem;
    padding: 0.2rem 0.4rem;
    font-size: 0.85rem;
    color: var(--code-color);
}

pre code {
    background: none;
    border: none;
    padding: 0;
    border-radius: 0;
}

/* 链接样式增强 */
.card-body a {
    color: var(--link-color);
    text-decoration: underline;
    text-decoration-color: rgba(114, 124, 245, 0.3);
    transition: all 0.2s ease;
}

.card-body a:hover {
    color: var(--primary);
    text-decoration-color: var(--primary);
}

/* 图片样式增强 */
.card-body img {
    max-width: 100%;
    height: auto;
    border-radius: 0.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin: 1rem 0;
}

/* 引用块样式增强 */
blockquote {
    background-color: var(--bg-surface);
    border-left: 4px solid var(--primary);
    margin: 1.5rem 0;
    padding: 1rem 1.5rem;
    font-style: italic;
    color: var(--text-secondary);
    border-radius: 0 0.5rem 0.5rem 0;
}

/* 列表样式 */
.card-body ul, .card-body ol {
    margin: 1rem 0;
    padding-left: 2rem;
}

.card-body li {
    margin: 0.5rem 0;
    line-height: 1.6;
}

/* 表格样式 */
.card-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    background-color: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    overflow: hidden;
}

.card-body th, .card-body td {
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    text-align: left;
}

.card-body th {
    background-color: var(--bg-secondary);
    font-weight: 600;
    color: var(--text-primary);
}

.card-body tr:nth-child(even) {
    background-color: var(--bg-surface);
}

/* 分隔线样式 */
.card-body hr {
    border: none;
    height: 1px;
    background-color: var(--border-color);
    margin: 2rem 0;
}

/* 强调文本样式 */
.card-body strong {
    color: var(--text-primary);
    font-weight: 600;
}

.card-body em {
    color: var(--text-secondary);
    font-style: italic;
}

/* 小标题样式 */
.card-body h1, .card-body h2, .card-body h3, .card-body h4, .card-body h5, .card-body h6 {
    margin: 2rem 0 1rem 0;
    color: var(--text-primary);
    font-weight: 600;
    line-height: 1.3;
}

.card-body h1 {
    font-size: 2rem;
    border-bottom: 2px solid var(--primary);
    padding-bottom: 0.5rem;
}

.card-body h2 {
    font-size: 1.75rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
}

.card-body h3 {
    font-size: 1.5rem;
}

.card-body h4 {
    font-size: 1.25rem;
}

.card-body h5 {
    font-size: 1.1rem;
}

.card-body h6 {
    font-size: 1rem;
    color: var(--text-secondary);
}

/* 夜间模式优化 */
[data-theme="dark"] .card-body img {
    filter: brightness(0.9);
}

[data-theme="dark"] .card-body table {
    border-color: var(--border-color);
}

[data-theme="dark"] .card-body th {
    background-color: var(--bg-surface);
}

/* 打印样式 */
@media print {
    .navbar-custom, .footer, .setting_tool {
        display: none !important;
    }
    
    .card-body {
        background: white !important;
        color: black !important;
    }
    
    .card-body a {
        color: black !important;
        text-decoration: underline !important;
    }
}

/* Tooltip 样式修复 */

/* 文章统计信息中的tooltip对齐 */
.row.hidden-xs .col-md-4 p[data-toggle="tooltip"] {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer;
    position: relative;
}

/* 确保tooltip文字和图标对齐 */
.row.hidden-xs .col-md-4 p[data-toggle="tooltip"] .iconfont {
    margin-right: 0.5rem;
    display: inline-flex;
    align-items: center;
}

/* 增强tooltip气泡样式 */
.tooltip {
    font-family: inherit !important;
}

.tooltip-inner {
    background-color: #343a40 !important;
    color: #f1f3fa !important;
    border-radius: 0.3rem !important;
    padding: 0.5rem 1rem !important;
    font-size: 0.875rem !important;
    font-weight: 500 !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15) !important;
    max-width: 300px !important;
}

/* tooltip箭头样式 */
.tooltip .arrow::before {
    border-color: #343a40 !important;
}

/* 增强底部tooltip的向上箭头 */
.bs-tooltip-bottom .arrow::before,
.bs-tooltip-auto[x-placement^="bottom"] .arrow::before {
    border-width: 0 0.4rem 0.4rem 0.4rem !important;
    border-bottom-color: #343a40 !important;
    top: -0.4rem !important;
}

/* 增强顶部tooltip的向下箭头 */
.bs-tooltip-top .arrow::before,
.bs-tooltip-auto[x-placement^="top"] .arrow::before {
    border-width: 0.4rem 0.4rem 0 0.4rem !important;
    border-top-color: #343a40 !important;
    bottom: -0.4rem !important;
}

/* 增强左侧tooltip的向右箭头 */
.bs-tooltip-left .arrow::before,
.bs-tooltip-auto[x-placement^="left"] .arrow::before {
    border-width: 0.4rem 0 0.4rem 0.4rem !important;
    border-left-color: #343a40 !important;
    right: -0.4rem !important;
}

/* 增强右侧tooltip的向左箭头 */
.bs-tooltip-right .arrow::before,
.bs-tooltip-auto[x-placement^="right"] .arrow::before {
    border-width: 0.4rem 0.4rem 0.4rem 0 !important;
    border-right-color: #343a40 !important;
    left: -0.4rem !important;
}

/* 移动端tooltip优化 */
@media (max-width: 767px) {
    .visible-xs-block span[data-toggle="tooltip"] {
        display: inline-flex !important;
        align-items: center !important;
        margin-right: 1rem;
    }
    
    .visible-xs-block span[data-toggle="tooltip"] .iconfont {
        margin-right: 0.3rem;
    }
}

/* 额外的样式增强 */

/* 文章内容排版 */
.card-body p {
    line-height: 1.8;
    margin-bottom: 1.5rem;
    text-align: justify;
}

/* 代码块样式增强 */
pre {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    padding: 1rem;
    margin: 1.5rem 0;
    overflow-x: auto;
    font-size: 0.9rem;
    line-height: 1.4;
}

code {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 0.25rem;
    padding: 0.2rem 0.4rem;
    font-size: 0.85rem;
    color: var(--code-color);
}

pre code {
    background: none;
    border: none;
    padding: 0;
    border-radius: 0;
}

/* 链接样式增强 */
.card-body a {
    color: var(--link-color);
    text-decoration: underline;
    text-decoration-color: rgba(114, 124, 245, 0.3);
    transition: all 0.2s ease;
}

.card-body a:hover {
    color: var(--primary);
    text-decoration-color: var(--primary);
}

/* 图片样式增强 */
.card-body img {
    max-width: 100%;
    height: auto;
    border-radius: 0.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin: 1rem 0;
}

/* 引用块样式增强 */
blockquote {
    background-color: var(--bg-surface);
    border-left: 4px solid var(--primary);
    margin: 1.5rem 0;
    padding: 1rem 1.5rem;
    font-style: italic;
    color: var(--text-secondary);
    border-radius: 0 0.5rem 0.5rem 0;
}

/* 列表样式 */
.card-body ul, .card-body ol {
    margin: 1rem 0;
    padding-left: 2rem;
}

.card-body li {
    margin: 0.5rem 0;
    line-height: 1.6;
}

/* 表格样式 */
.card-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    background-color: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    overflow: hidden;
}

.card-body th, .card-body td {
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    text-align: left;
}

.card-body th {
    background-color: var(--bg-secondary);
    font-weight: 600;
    color: var(--text-primary);
}

.card-body tr:nth-child(even) {
    background-color: var(--bg-surface);
}

/* 分隔线样式 */
.card-body hr {
    border: none;
    height: 1px;
    background-color: var(--border-color);
    margin: 2rem 0;
}

/* 强调文本样式 */
.card-body strong {
    color: var(--text-primary);
    font-weight: 600;
}

.card-body em {
    color: var(--text-secondary);
    font-style: italic;
}

/* 小标题样式 */
.card-body h1, .card-body h2, .card-body h3, .card-body h4, .card-body h5, .card-body h6 {
    margin: 2rem 0 1rem 0;
    color: var(--text-primary);
    font-weight: 600;
    line-height: 1.3;
}

.card-body h1 {
    font-size: 2rem;
    border-bottom: 2px solid var(--primary);
    padding-bottom: 0.5rem;
}

.card-body h2 {
    font-size: 1.75rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
}

.card-body h3 {
    font-size: 1.5rem;
}

.card-body h4 {
    font-size: 1.25rem;
}

.card-body h5 {
    font-size: 1.1rem;
}

.card-body h6 {
    font-size: 1rem;
    color: var(--text-secondary);
}

/* 夜间模式优化 */
[data-theme="dark"] .card-body img {
    filter: brightness(0.9);
}

[data-theme="dark"] .card-body table {
    border-color: var(--border-color);
}

[data-theme="dark"] .card-body th {
    background-color: var(--bg-surface);
}

/* 打印样式 */
@media print {
    .navbar-custom, .footer, .setting_tool {
        display: none !important;
    }
    
    .card-body {
        background: white !important;
        color: black !important;
    }
    
    .card-body a {
        color: black !important;
        text-decoration: underline !important;
    }
}

/* Tooltip 样式修复 */

/* 文章统计信息中的tooltip对齐 */
.row.hidden-xs .col-md-4 p[data-toggle="tooltip"] {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer;
    position: relative;
}

/* 确保tooltip文字和图标对齐 */
.row.hidden-xs .col-md-4 p[data-toggle="tooltip"] .iconfont {
    margin-right: 0.5rem;
    display: inline-flex;
    align-items: center;
}

/* 增强tooltip气泡样式 */
.tooltip {
    font-family: inherit !important;
}

.tooltip-inner {
    background-color: #343a40 !important;
    color: #f1f3fa !important;
    border-radius: 0.3rem !important;
    padding: 0.5rem 1rem !important;
    font-size: 0.875rem !important;
    font-weight: 500 !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15) !important;
    max-width: 300px !important;
}

/* tooltip箭头样式 */
.tooltip .arrow::before {
    border-color: #343a40 !important;
}

/* 增强底部tooltip的向上箭头 */
.bs-tooltip-bottom .arrow::before,
.bs-tooltip-auto[x-placement^="bottom"] .arrow::before {
    border-width: 0 0.4rem 0.4rem 0.4rem !important;
    border-bottom-color: #343a40 !important;
    top: -0.4rem !important;
}

/* 增强顶部tooltip的向下箭头 */
.bs-tooltip-top .arrow::before,
.bs-tooltip-auto[x-placement^="top"] .arrow::before {
    border-width: 0.4rem 0.4rem 0 0.4rem !important;
    border-top-color: #343a40 !important;
    bottom: -0.4rem !important;
}

/* 增强左侧tooltip的向右箭头 */
.bs-tooltip-left .arrow::before,
.bs-tooltip-auto[x-placement^="left"] .arrow::before {
    border-width: 0.4rem 0 0.4rem 0.4rem !important;
    border-left-color: #343a40 !important;
    right: -0.4rem !important;
}

/* 增强右侧tooltip的向左箭头 */
.bs-tooltip-right .arrow::before,
.bs-tooltip-auto[x-placement^="right"] .arrow::before {
    border-width: 0.4rem 0.4rem 0.4rem 0 !important;
    border-right-color: #343a40 !important;
    left: -0.4rem !important;
}

/* 移动端tooltip优化 */
@media (max-width: 767px) {
    .visible-xs-block span[data-toggle="tooltip"] {
        display: inline-flex !important;
        align-items: center !important;
        margin-right: 1rem;
    }
    
    .visible-xs-block span[data-toggle="tooltip"] .iconfont {
        margin-right: 0.3rem;
    }
}
/* 修复主页布局系统 */
.content-page {
    margin: 0 250px !important;
    max-width: calc(100% - 500px);
    width: 100%;
    padding-top: 70px;
}

/* 主页布局容器 */
.homepage-container {
    width: 100%;
}

/* 三列布局容器 */
.homepage-layout {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
}

/* 第一列 - 文章轮播 */
.homepage-column-1 {
    flex: 0 0 50%;
    max-width: 50%;
}

/* 第二列 - 右侧内容 */
.homepage-column-2 {
    flex: 0 0 50%;
    max-width: 50%;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* 置顶区域 */
.sticky-section {
    flex: 0 0 50%;
    min-height: 140px;
}

/* 分类缩略图区域 */
.category-thumbnails {
    flex: 0 0 50%;
    min-height: 140px;
}

/* 第三列 - 1x3文章布局 */
.homepage-column-3 {
    flex: 0 0 100%;
    max-width: 100%;
    margin-top: 20px;
}

/* 轮播图样式 */
.carousel-container {
    height: 300px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.carousel-container .carousel-inner,
.carousel-container .carousel-item {
    height: 100%;
}

.carousel-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 置顶文章样式 */
.sticky-article {
    height: 140px;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.sticky-article img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sticky-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
    padding: 15px;
    color: white;
}

.sticky-overlay .title {
    color: white;
    font-weight: 600;
    font-size: 1.1rem;
    margin: 0;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

/* 分类缩略图网格 */
.category-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    height: 140px;
}

.category-item {
    border-radius: 6px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.category-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.category-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.6));
    padding: 8px;
    color: white;
}

.category-overlay .title {
    color: white;
    font-size: 0.9rem;
    margin: 0;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
    font-weight: 500;
}

/* 1x3文章布局 */
.articles-1x3 {
    display: flex;
    gap: 15px;
    justify-content: flex-start;
    flex-wrap: wrap;
}

.article-item {
    flex: 0 0 calc(33.333% - 10px);
    max-width: calc(33.333% - 10px);
    margin-bottom: 0;
}

/* 文章数量不足时的对齐 */
.articles-1x3:not(:has(.article-item:nth-child(3))) {
    justify-content: flex-start;
}

/* 卡片样式优化 */
.article-card {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
}

.article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.article-card img {
    height: 160px;
    object-fit: cover;
}

.article-card .card-body {
    padding: 15px;
}

.article-card .card-title {
    font-size: 1rem;
    line-height: 1.4;
    margin-bottom: 8px;
}

.article-card .card-title a {
    color: var(--text-primary);
    text-decoration: none;
}

.article-card .card-title a:hover {
    color: var(--primary);
}

.article-card .card-text {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 10px;
}

.article-card .card-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* 分页样式 */
.fenyeh {
    margin-top: 30px;
    padding: 0 250px;
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .content-page {
        margin: 0 150px !important;
        max-width: calc(100% - 300px);
    }
    .fenyeh {
        padding: 0 150px;
    }
}

@media (max-width: 992px) {
    .content-page {
        margin: 0 50px !important;
        max-width: calc(100% - 100px);
    }
    
    .fenyeh {
        padding: 0 50px;
    }
    
    .homepage-layout {
        flex-direction: column;
    }
    
    .homepage-column-1,
    .homepage-column-2 {
        flex: 0 0 100%;
        max-width: 100%;
    }
    
    .article-item {
        flex: 0 0 calc(50% - 10px);
        max-width: calc(50% - 10px);
    }
}

@media (max-width: 768px) {
    .content-page {
        margin: 0 20px !important;
        max-width: calc(100% - 40px);
    }
    
    .fenyeh {
        padding: 0 20px;
    }
    
    .category-grid {
        grid-template-columns: 1fr;
        height: auto;
    }
    
    .category-item {
        height: 100px;
    }
    
    .article-item {
        flex: 0 0 100%;
        max-width: 100%;
    }
    
    .articles-1x3 {
        gap: 10px;
    }
}

@media (max-width: 576px) {
    .content-page {
        margin: 0 10px !important;
        max-width: calc(100% - 20px);
    }
    
    .fenyeh {
        padding: 0 10px;
    }
    
    .carousel-container {
        height: 200px;
    }
    
    .sticky-article {
        height: 120px;
    }
}

/* 工具类补充 */
.h-100 { height: 100%; }
.w-100 { width: 100%; }
.overflow-hidden { overflow: hidden; }
.position-relative { position: relative; }
