﻿/* ========================================
    文章详细页面样式 - 完整版
   ======================================== */
* { margin: 0; padding: 0; box-sizing: border-box; }

.detail-page { 
    background: linear-gradient(135deg, #f5f0e8, #e8dcc8); 
    padding: 30px 0; 
    min-height: 80vh; 
}

.detail-container { 
    max-width: 1200px; 
    margin: 0 auto; 
    padding: 0 20px; 
}

/* 三栏布局 */
.detail-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 25px;
}

/* 文章详情 */
.detail-main {
    background: #fff;
    border-radius: 12px;
    padding: 35px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.08);
}

.detail-main h1 {
    font-size: 26px;
    color: #333;
    margin-bottom: 18px;
    line-height: 1.4;
    font-weight: 600;
}

.detail-meta {
    color: #888;
    font-size: 14px;
    margin-bottom: 25px;
    padding-bottom: 18px;
    border-bottom: 1px solid #f0f0f0;
}

.detail-meta span { 
    margin-right: 25px; 
    display: inline-block;
}

.detail-meta i { 
    color: #ff8c00; 
    margin-right: 5px; 
}

.detail-content {
    font-size: 16px;
    line-height: 1.9;
    color: #444;
    margin-bottom: 30px;
}

.detail-content p { 
    margin-bottom: 18px; 
    text-indent: 2em;
}

.detail-content img { 
    width: 100%; 
    max-width: 100%;
    height: auto; 
    border-radius: 8px; 
    display: block;
    margin: 25px auto;
    object-fit: cover;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* 电脑端统一图片宽度 */
@media (min-width: 769px) {
    .detail-content img {
        width: 80%;
        max-width: 600px;
        margin-left: auto;
        margin-right: auto;
    }
}

/* ========================================
    内容分页样式 - 美化居中版
   ======================================== */
.content-pagination {
    margin: 35px 0 25px;
    padding: 20px 0;
    border-top: 1px dashed #e0d5c8;
    border-bottom: 1px dashed #e0d5c8;
    text-align: center;
}

.content-pagination .pagination-inner {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    flex-wrap: wrap;
    justify-content: center;
}

/* 页码总数信息 */
.content-pagination .page-total {
    color: #8B4513;
    font-size: 13px;
    margin-right: 12px;
    font-weight: 500;
    background: #faf5ef;
    padding: 6px 12px;
    border-radius: 15px;
    border: 1px solid #e8dcc8;
}

/* 分页按钮（上一页/下一页） */
.content-pagination .page-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 7px 14px;
    background: #fff;
    border: 1px solid #e0d5c8;
    color: #8B4513;
    text-decoration: none;
    border-radius: 5px;
    font-size: 13px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.content-pagination .page-btn:hover {
    background: #ff8c00;
    color: #fff;
    border-color: #ff8c00;
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(255, 140, 0, 0.3);
}

.content-pagination .page-btn.disabled {
    background: #f5f0e8;
    color: #ccc;
    border-color: #e8dcc8;
    cursor: not-allowed;
    pointer-events: none;
}

/* 页码数字 */
.content-pagination .page-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    padding: 0 8px;
    background: #fff;
    border: 1px solid #e0d5c8;
    color: #666;
    text-decoration: none;
    border-radius: 5px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.content-pagination .page-num:hover {
    background: #fff8f0;
    color: #ff8c00;
    border-color: #ff8c00;
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(255, 140, 0, 0.2);
}

/* 当前页码 - 橙色高亮 */
.content-pagination .page-num.current {
    background: #ff8c00;
    color: #fff;
    border-color: #ff8c00;
    font-weight: bold;
    box-shadow: 0 3px 8px rgba(255, 140, 0, 0.3);
}

/* ========================================
    上一篇 下一篇 - 优化版
   ======================================== */
.prev-next-section {
    margin-top: 30px;
}

.prev-next-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.prev-box, .next-box {
    background: #fafafa;
    border-radius: 10px;
    padding: 20px;
    transition: all 0.3s;
    overflow: hidden;
}

.prev-box {
    border-left: 4px solid #ff8c00;
}

.next-box {
    border-right: 4px solid #ff8c00;
    text-align: right;
}

.prev-box:hover, .next-box:hover {
    background: #f5f0e8;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.pn-label {
    display: block;
    color: #ff8c00;
    font-size: 13px;
    margin-bottom: 10px;
    font-weight: bold;
}

.pn-title {
    color: #333;
    text-decoration: none;
    font-size: 15px;
    line-height: 1.6;
    display: block;
    font-weight: 500;
    /* 超过14字隐藏 */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.pn-title:hover {
    color: #ff8c00;
}

.pn-empty {
    color: #bbb;
    font-size: 14px;
    font-style: italic;
}

/* 侧边栏 */
.detail-sidebar {
    align-self: start;
}

.sidebar-box {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.06);
}

.sidebar-box h3 {
    font-size: 16px;
    color: #8B4513;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #FFD700;
    display: flex;
    align-items: center;
    gap: 8px;
}

.sidebar-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-list li {
    padding: 10px 0;
    border-bottom: 1px solid #f5f5f5;
}

.sidebar-list li:last-child { 
    border-bottom: none; 
}

.sidebar-list a {
    color: #555;
    text-decoration: none;
    font-size: 14px;
    display: block;
    line-height: 1.6;
    transition: color 0.3s;
    /* 超过14字隐藏 */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.sidebar-list a:hover { 
    color: #ff8c00; 
}

.sidebar-list .time {
    color: #aaa;
    font-size: 12px;
    margin-top: 5px;
}

/* 底部热门文章 */
.hot-section {
    background: #fff;
    border-radius: 12px;
    padding: 30px;
    margin-top: 25px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

.hot-section h2 {
    font-size: 20px;
    color: #8B4513;
    margin-bottom: 25px;
    padding-bottom: 12px;
    border-bottom: 2px solid #FFD700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.hot-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.hot-item {
    background: #fafafa;
    border-radius: 10px;
    padding: 18px;
    transition: all 0.3s;
    border: 1px solid #f0f0f0;
}

.hot-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.1);
    border-color: #ff8c00;
}

.hot-item a {
    color: #333;
    text-decoration: none;
    font-size: 14px;
    line-height: 1.6;
    display: block;
    font-weight: 500;
    /* 超过14字隐藏 */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.hot-item a:hover { 
    color: #ff8c00; 
}

.hot-item .views {
    color: #999;
    font-size: 12px;
    margin-top: 8px;
}

/* 响应式 */
@media (max-width: 768px) {
    .detail-layout { 
        grid-template-columns: 1fr; 
    }
    .detail-sidebar { 
        display: none; 
    }
    .hot-grid { 
        grid-template-columns: repeat(2, 1fr); 
    }
    .prev-next-grid {
        grid-template-columns: 1fr;
    }
    .next-box {
        text-align: left;
        border-right: none;
        border-left: 4px solid #ff8c00;
    }
    .detail-main {
        padding: 20px;
    }
    .detail-main h1 {
        font-size: 20px;
    }
    .content-pagination .pagination-inner {
        gap: 3px;
    }
    .content-pagination .page-btn {
        padding: 5px 10px;
        font-size: 12px;
    }
    .content-pagination .page-num {
        min-width: 28px;
        height: 28px;
        font-size: 12px;
    }
}