/* ========================================
   小马哥博客 - 样式优化
   风格：深灰背景、手绘图标、不对称布局
   ======================================== */

/* 全局背景与字体 */
body {
    background-color: #f8f9fa;
    color: #333;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

/* 主内容区域 */
.res-cons {
    background: #fff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

/* ----- 1. 文章列表页优化 ----- */

/* 文章卡片增强 */
.post {
    border-bottom: 1px solid #f0f0f0;
    padding: 25px 0;
    transition: all 0.3s ease;
    position: relative;
}

.post:first-child {
    padding-top: 5px;
}

.post::before {
    content: '';
    position: absolute;
    left: -30px;
    top: 30px;
    width: 6px;
    height: 6px;
    background: #ff6b35;
    border-radius: 50%;
    opacity: 0;
    transition: all 0.3s ease;
}

.post:hover {
    background-color: #fafafa;
    padding-left: 10px;
}

.post:hover::before {
    opacity: 1;
    left: -15px;
}

/* 文章标题优化 */
.post-title {
    font-size: 1.7em;
    margin-bottom: 15px;
    line-height: 1.4;
    font-weight: 600;
}

.post-title a {
    color: #2c3e50;
    transition: color 0.2s ease;
}

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

/* 文章元信息优化 */
.post-meta {
    font-size: 0.9em;
    color: #666;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.post-meta .meta-date {
    color: #ff6b35;
    font-weight: 500;
}

.post-meta .meta-category a {
    color: #666;
    background: #f5f5f5;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.9em;
    transition: all 0.2s ease;
    border: 1px solid #e8e8e8;
}

.post-meta .meta-category a:hover {
    background: #ff6b35;
    color: #fff;
    border-color: #ff6b35;
}

/* 摘要优化 */
.post-content {
    color: #555;
    line-height: 1.8;
    font-size: 1.05em;
    margin-bottom: 15px;
    padding-top: 10px;
}

/* 阅读全文按钮优化 */
.readmore {
    margin-top: 15px;
    margin-bottom: 30px;
    text-align: right;
}

.readmore a {
    display: inline-block;
    padding: 10px 24px;
    background: transparent;
    color: #ff6b35;
    border: 2px solid #ff6b35;
    border-radius: 25px;
    font-size: 0.95em;
    font-weight: 500;
    transition: all 0.3s ease;
}

.readmore a:hover {
    background: #ff6b35;
    color: #fff;
    transform: translateX(-3px);
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.3);
}

/* ----- 2. 头部导航优化 ----- */

/* 站点标题优化 */
#logo {
    font-size: 2em;
    letter-spacing: 2px;
    transition: all 0.3s ease;
    color: #2c3e50;
}

#logo:hover {
    color: #ff6b35;
    transform: skewX(-2deg);
}

.description {
    font-size: 1.1em;
    margin-top: 12px;
    color: #7f8c8d;
    letter-spacing: 1px;
    font-style: italic;
}

/* 头部背景 */
#header {
    padding: 40px 0 20px;
    background: linear-gradient(135deg, #fff 0%, #f8f9fa 100%);
    border-bottom: 2px solid #e8e8e8;
}

#header .col-group {
    border-bottom: none;
}

#body {
    padding-top: 30px;
}

#nav-menu {
    margin: 15px 0 0;
}

/* 导航菜单优化 - 不对称设计 */
#nav-menu a {
    padding: 0 1.5em;
    font-size: 1em;
    font-weight: 500;
    position: relative;
    transition: all 0.3s ease;
    color: #555;
}

#nav-menu a::before {
    content: '•';
    position: absolute;
    left: 0;
    color: #ff6b35;
    opacity: 0;
    transition: all 0.3s ease;
    transform: scale(0);
}

#nav-menu a:hover::before {
    opacity: 1;
    transform: scale(1);
}

#nav-menu a:hover {
    color: #ff6b35;
    transform: translateX(-5px);
}

#nav-menu a.current {
    color: #ff6b35;
    background: #f5f5f5;
    padding: 8px 1.5em;
    border-radius: 8px 0 8px 8px;
}

#nav-menu a.current::before {
    display: none;
}

/* ----- 3. 文章详情页优化 ----- */

/* 文章内容优化 */
.post-content {
    font-size: 1.1em;
    line-height: 1.9;
    color: #333;
}

.post-content p {
    margin: 1.8em 0;
    text-align: justify;
}

/* 标题样式优化 */
.post-content h2 {
    font-size: 1.8em;
    margin: 2.5em 0 1.5em;
    padding-bottom: 12px;
    border-bottom: 2px solid #ff6b35;
    color: #ff6b35;
    font-weight: 600;
}

.post-content h3 {
    font-size: 1.5em;
    margin: 2.2em 0 1.2em;
    padding-bottom: 8px;
    border-bottom: 1px solid #e8e8e8;
    color: #ff6b35;
    font-weight: 500;
}

.post-content h4 {
    font-size: 1.3em;
    margin: 2em 0 1em;
    color: #2c3e50;
    font-weight: 500;
}

/* 列表优化 */
.post-content ul,
.post-content ol {
    padding: 0.5em 2em;
    margin: 1.8em 0;
}

.post-content li {
    margin: 0.6em 0;
    line-height: 1.8;
    color: #555;
}

/* 引用块优化 - 手绘风格 */
blockquote {
    background: #f8f9fa;
    border-left: 4px solid #ff6b35;
    padding: 1.2em 1.8em;
    margin: 2em 0;
    border-radius: 8px 0 8px 8px;
    color: #555;
    position: relative;
}

blockquote::before {
    content: '✎';
    position: absolute;
    top: -10px;
    right: 20px;
    font-size: 1.5em;
    color: #ff6b35;
    opacity: 0.5;
}

/* 代码块优化 */
.post-content pre {
    background: #f8f9fa;
    color: #333;
    padding: 1.5em;
    border-radius: 8px;
    overflow-x: auto;
    margin: 2em 0;
    font-size: 0.95em;
    line-height: 1.7;
    border: 1px solid #e8e8e8;
}

.post-content code {
    font-family: 'Fira Code', 'Menlo', 'Monaco', 'Consolas', monospace;
}

.post-content p code {
    background: #f5f5f5;
    color: #ff6b35;
    padding: 0.3em 0.6em;
    border-radius: 4px;
    font-size: 0.9em;
    border: 1px solid #e8e8e8;
}

/* 表格优化 */
.post-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 2em 0;
    font-size: 0.95em;
    border-radius: 8px;
    overflow: hidden;
}

.post-content th,
.post-content td {
    padding: 14px 16px;
    text-align: left;
    border: 1px solid #e8e8e8;
}

.post-content th {
    background: #f8f9fa;
    font-weight: 600;
    color: #ff6b35;
    text-transform: uppercase;
    font-size: 0.9em;
    letter-spacing: 0.5px;
}

.post-content tr:hover {
    background: #fafafa;
}

/* 图片优化 */
.post-content img {
    max-width: 100%;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    margin: 2em auto;
    border: 1px solid #e8e8e8;
}

/* 标签样式优化 */
.meta-tags ul a {
    background: #f5f5f5;
    color: #666;
    padding: 8px 14px;
    border-radius: 20px;
    font-size: 0.85em;
    transition: all 0.3s ease;
    border: 1px solid #e8e8e8;
    display: inline-flex;
    align-items: center;
}

.meta-tags ul a::before {
    content: '🏷';
    margin-right: 6px;
}

.meta-tags ul a:hover {
    background: #ff6b35;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
    border-color: #ff6b35;
}

.meta-tags ul a::after {
    display: none;
}

/* ----- 4. 分类/标签页优化 ----- */

.archive-title {
    font-size: 1em;
    color: #2c3e50;
    margin: 0 0 20px;
    padding: 0;
    font-weight: 600;
}

/* ----- 5. 分页器优化 ----- */

.page-navigator {
    margin-top: 50px;
    display: flex;
    justify-content: flex-start;
    gap: 10px;
}

.page-navigator a,
.page-navigator span {
    display: inline-block;
    padding: 12px 18px;
    margin: 0;
    border: 2px solid #e8e8e8;
    border-radius: 8px;
    transition: all 0.3s ease;
    color: #666;
    background: #fff;
}

.page-navigator a:hover {
    background: #ff6b35;
    color: #fff;
    border-color: #ff6b35;
    transform: translateY(-2px);
}

.page-navigator .current a {
    background: #ff6b35;
    color: #fff;
    border-color: #ff6b35;
    font-weight: 600;
}

/* ----- 6. 底部优化 ----- */

#footer {
    padding: 3em 0;
    background: #f8f9fa;
    border-top: 2px solid #e8e8e8;
    margin-top: 60px;
}

#footer a {
    color: #ff6b35;
    transition: color 0.2s ease;
}

#footer a:hover {
    color: #ff8555;
    text-decoration: none;
}

/* ----- 7. 响应式优化 ----- */

@media (max-width: 768px) {
    .post {
        padding: 20px 0;
    }

    .post-title {
        font-size: 1.4em;
    }

    #logo {
        font-size: 1.8em;
    }

    .description {
        font-size: 0.95em;
    }

    #nav-menu {
        margin-top: 15px;
        width: 100%;
    }

    #nav-menu a {
        display: block;
        margin-bottom: 8px;
        border-bottom: 1px solid #f0f0f0;
        padding: 12px 0;
    }

    .res-cons {
        padding: 20px;
    }
}

/* ----- 8. 滚动条美化 ----- */

::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* ----- 9. 返回顶部按钮优化 ----- */

#rocket {
    opacity: 0.6;
    transition: all 0.3s ease;
    background: #ff6b35 !important;
    border-radius: 50%;
}

#rocket:hover {
    opacity: 1;
    transform: translateY(-3px);
}

/* ----- 10. 侧边栏优化 ----- */

#secondary {
    background: #fff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.widget {
    margin-bottom: 30px;
}

.widget-title {
    font-size: 1.2em;
    color: #ff6b35;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e8e8e8;
    font-weight: 600;
    position: relative;
}

.widget-title::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 50px;
    height: 2px;
    background: #ff6b35;
}

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

.widget-list li {
    margin-bottom: 10px;
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 10px;
}

.widget-list li a {
    color: #666;
    transition: all 0.2s ease;
    display: block;
}

.widget-list li a:hover {
    color: #ff6b35;
    padding-left: 8px;
}

/* 搜索框样式 */
.search-form input {
    width: 100%;
    padding: 12px 15px;
    background: #f8f9fa;
    border: 2px solid #e8e8e8;
    border-radius: 8px;
    color: #333;
    font-size: 0.95em;
    transition: all 0.3s ease;
}

.search-form input:focus {
    outline: none;
    border-color: #ff6b35;
    background: #fff;
}

.search-form input::placeholder {
    color: #999;
}

/* 分类标签样式 */
.widget-list a::before {
    content: '→';
    margin-right: 8px;
    color: #ff6b35;
    opacity: 0;
    transition: all 0.2s ease;
}

.widget-list a:hover::before {
    opacity: 1;
    margin-right: 5px;
}

/* ----- 11. 辅助类 ----- */

.clear {
    clear: both;
}

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

.mt-2 {
    margin-top: 1em;
}

.mb-2 {
    margin-bottom: 1em;
}

/* ----- 12. 下一篇文章链接样式 ----- */

.next-post {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid #e8e8e8;
    text-align: center;
}

.next-post a {
    display: inline-block;
    background: linear-gradient(135deg, #ff6b35 0%, #ff8555 100%);
    color: #fff;
    padding: 12px 28px;
    border-radius: 30px;
    font-size: 1em;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.3);
}

.next-post a:hover {
    transform: translateY(-3px) translateX(3px);
    box-shadow: 0 6px 20px rgba(255, 107, 53, 0.4);
}

.next-post a::before {
    content: '👉 ';
}
