:root {
    --primary-color: #2980b9;      /* 中深蓝 - 比天蓝深，比深蓝浅 */
    --secondary-color: #3a8fc7;    /* 浅中蓝 - 强调色 */
    --accent-color: #1f6da0;       /* 深蓝 - 点缀色 */
    --text-color: #2c3e50;
    --text-light: #7f8c8d;
    --bg-light: #f5f7fa;
    --bg-white: #ffffff;
}

/* 导航栏 */
.bg-primary {
    background: linear-gradient(135deg, #2980b9 0%, #3a8fc7 100%) !important;
    box-shadow: 0 2px 8px rgba(41, 128, 185, 0.2);
}

/* 卡片头部 */
.card-header.bg-primary {
    background: linear-gradient(135deg, #2980b9 0%, #3a8fc7 100%) !important;
}

/* 按钮 */
.btn-primary {
    background-color: #2980b9 !important;
    border-color: #2980b9 !important;
    border-radius: 25px;
}

.btn-primary:hover {
    background-color: #1f6da0 !important;
    border-color: #1f6da0 !important;
}

/* 链接 */
a:not(.btn):not(.nav-link) {
    color: #2980b9;
}

a:not(.btn):not(.nav-link):hover {
    color: #1f6da0;
}

/* 分页 */
.pagination .page-link {
    color: #2980b9 !important;
}

.pagination .active .page-link {
    background-color: #2980b9 !important;
    border-color: #2980b9 !important;
}

/* 导航栏文字样式 - 确保白色可见 */
.navbar-dark .navbar-brand {
    color: #ffffff !important;
    font-weight: bold;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.navbar-dark .navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.95) !important;
    font-weight: 500;
}

.navbar-dark .navbar-nav .nav-link:hover {
    color: #ffffff !important;
    background-color: rgba(255, 255, 255, 0.15);
    border-radius: 8px;
}

/* 按钮样式 - 如果导航栏有按钮 */
.navbar .btn {
    color: white !important;
    border-color: rgba(255, 255, 255, 0.5) !important;
}

.navbar .btn:hover {
    background-color: rgba(255, 255, 255, 0.2) !important;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
}

.navbar-brand {
    font-weight: bold;
    font-size: 1.5rem;
}

/* ========== 首页文章卡片 - 桌面端 ========== */
.post-card {
    transition: transform 0.2s;
    border: none;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

/* 首页文章标题 - 桌面端 */
.post-card .card-title {
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 12px;
}

.post-card .card-title a {
    color: var(--primary-color);
    text-decoration: none;
}

.post-card .card-title a:hover {
    color: var(--secondary-color);
}

/* ========== 文章详情页 ========== */
/* 详情页主标题 */
article.card .card-title {
    font-size: 28px;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--secondary-color);
}

/* 文章内容样式 */
.post-content {
    font-size: 1rem;
    line-height: 1.8;
}

/* 文章内容中的标题 */
.post-content h1 {
    font-size: 20px;
    font-weight: 600;
    margin: 28px 0 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e0e0e0;
}

.post-content h2 {
    font-size: 18px;
    font-weight: 600;
    margin: 24px 0 12px;
    padding-left: 12px;
    border-left: 4px solid var(--secondary-color);
}

.post-content h3 {
    font-size: 15px;
    font-weight: 600;
    margin: 20px 0 10px;
}

.post-content h4 {
    font-size: 13px;
    font-weight: 600;
    margin: 16px 0 8px;
}

.post-content p {
    margin-bottom: 16px;
}

/* 浅色代码块样式 */
.post-content pre {
    background: #f5f5f5;  /* 浅灰色背景 */
    color: #333333;        /* 深色文字 */
    padding: 15px;
    border-radius: 8px;
    overflow-x: auto;
    font-size: 14px;
    border: 1px solid #e0e0e0;
}

.post-content code {
    background: #f0f0f0;
    color: #d14;
    padding: 2px 5px;
    border-radius: 4px;
}

.post-content pre code {
    background: transparent;
    color: inherit;
    padding: 0;
}

/* 表格样式 */
.post-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

.post-content th,
.post-content td {
    border: 1px solid #ddd;
    padding: 8px 12px;
    text-align: left;
}

.post-content th {
    background: var(--secondary-color);
    color: white;
}

.post-content tr:nth-child(even) {
    background: #f8f9fa;
}

/* 引用块样式 */
.post-content blockquote {
    margin: 20px 0;
    padding: 10px 20px;
    background: #f8f9fa;
    border-left: 4px solid var(--secondary-color);
    color: #555;
}

/* ========== 侧边栏 ========== */
.sidebar .card {
    border: none;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.sidebar .card-header {
    font-weight: bold;
    font-size: 16px;
}

/* ========== 页脚 ========== */
footer {
    margin-top: 3rem;
}

/* ========== 分页 ========== */
.pagination .page-link {
    color: var(--secondary-color);
}

.pagination .active .page-link {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
}

/* ========== 响应式 - 移动端 ========== */
@media (max-width: 768px) {
    /* 首页文章标题 - 移动端 */
    .post-card .card-title {
        font-size: 18px;
    }

    /* 详情页主标题 - 移动端 */
    article.card .card-title {
        font-size: 22px;
    }

    /* 文章内容标题 - 移动端 */
    .post-content h1 {
        font-size: 20px;
    }

    .post-content h2 {
        font-size: 18px;
    }

    .post-content h3 {
        font-size: 16px;
    }

    /* 文章内容字体 - 移动端 */
    .post-content {
        font-size: 15px;
    }
}


/* 强制首页文章标题样式 - 放在文件最后 */
.post-card .card-title,
.post-card .card-title a {
    font-size: 22px !important;
    font-weight: 600 !important;
}

.post-card .card-title {
    margin-bottom: 12px !important;
}

.post-card .card-title a {
    color: var(--primary-color) !important;
    text-decoration: none !important;
}

.post-card .card-title a:hover {
    color: var(--secondary-color) !important;
}

/* ========== 文章详情页标题样式 ========== */

/* 文章详情页主标题 */
article.card .card-title {
    font-size: 22px !important;
    font-weight: 600 !important;
    color: var(--primary-color) !important;
    margin-bottom: 16px !important;
    padding-bottom: 12px !important;
    border-bottom: 2px solid var(--secondary-color) !important;
}

/* 移动端适配 */
@media (max-width: 768px) {
    article.card .card-title {
        font-size: 22px !important;
        padding-bottom: 8px !important;
    }
}

/* ========== 统一按钮样式 - 与博客风格匹配 ========== */

/* 所有按钮的基础样式 */
.btn {
    border-radius: 25px !important;
    padding: 8px 24px !important;
    font-weight: 500 !important;
    transition: all 0.3s ease !important;
    font-size: 14px !important;
}

/* 主要按钮（提交评论等） */
.btn-primary {
    background-color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
    color: white !important;
}

.btn-primary:hover {
    background-color: var(--secondary-color) !important;
    border-color: var(--secondary-color) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 12px rgba(41, 128, 185, 0.3) !important;
}

/* 轮廓按钮（阅读更多） */
.btn-outline-primary {
    color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
    background-color: transparent !important;
}

.btn-outline-primary:hover {
    background-color: var(--primary-color) !important;
    color: white !important;
    transform: translateX(5px) !important;
    box-shadow: 0 4px 12px rgba(41, 128, 185, 0.2) !important;
}

/* 次要按钮（上一篇/下一篇） */
.btn-outline-secondary {
    border-radius: 25px !important;
    padding: 8px 20px !important;
    transition: all 0.3s ease !important;
}

.btn-outline-secondary:hover {
    transform: translateY(-2px) !important;
    background-color: var(--secondary-color) !important;
    border-color: var(--secondary-color) !important;
    color: white !important;
}

/* 按钮点击效果 */
.btn:active {
    transform: translateY(0px) !important;
}