/* detail.css - 详情页样式 */

/* 详情页布局 */
.article-layout {
    display: flex;
    gap: 30px;
    margin: 20px auto;
    max-width: 1200px;
    padding: 0 15px;
}

.article-main {
    flex: 1;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.article-sidebar {
    width: 300px;
    flex-shrink: 0;
}

/* 文章头部 */
.article-header {
    text-align: center;
    margin-bottom: 30px;
    padding: 0 20px;
}

.article-title {
    font-size: 28px;
    font-weight: bold;
    color: #8b0000;
    margin: 25px 0;
    line-height: 1.4;
}

.article-meta {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    color: #666;
    font-size: 14px;
    margin-bottom: 15px;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.article-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: #f5f5f5;
    border-radius: 20px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
    border: none;
    color: #333;
}

.action-btn:hover {
    background: #8b0000;
    color: #fff;
    transform: translateY(-2px);
}

.action-btn.liked, .action-btn.saved {
    background: #8b0000;
    color: #fff;
}

/* 特色图片 */
.featured-image {
    width: 100%;
    height: 400px;
    overflow: hidden;
    margin-bottom: 25px;
}

.featured-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.featured-image:hover img {
    transform: scale(1.02);
}

/* 文章内容 */
.article-body {
    padding: 30px;
}

.article-text {
    font-size: 16px;
    line-height: 1.8;
    margin-bottom: 30px;
    color: #333;
}

.article-text img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 15px 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.article-text p {
    margin-bottom: 20px;
    text-align: justify;
}

.article-text h2, .article-text h3 {
    color: #8b0000;
    margin: 30px 0 15px;
    font-weight: 600;
}

.article-text h2 {
    font-size: 22px;
    border-left: 4px solid #8b0000;
    padding-left: 12px;
}

.article-text h3 {
    font-size: 18px;
    padding-left: 8px;
}

.article-text blockquote {
    border-left: 4px solid #8b0000;
    padding-left: 20px;
    margin: 20px 0;
    font-style: italic;
    color: #666;
    background: #f9f9f9;
    padding: 15px 20px;
    border-radius: 0 8px 8px 0;
}

/* 文章标签 */
.article-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 25px;
    padding: 15px 0;
    border-top: 1px solid #f0f0f0;
    border-bottom: 1px solid #f0f0f0;
}

.article-tag {
    background: #f5f5f5;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 13px;
    transition: all 0.3s;
    text-decoration: none;
    color: #333;
    border: 1px solid #e0e0e0;
}

.article-tag:hover {
    background: #8b0000;
    color: #fff;
    border-color: #8b0000;
    transform: translateY(-2px);
}

/* 文章底部 */
.article-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 20px;
    border-top: 1px solid #f0f0f0;
    margin-top: 20px;
}

.article-nav {
    display: flex;
    gap: 12px;
}

.nav-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: #f5f5f5;
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.3s;
    text-decoration: none;
    color: #333;
    border: 1px solid #e0e0e0;
}

.nav-btn:hover {
    background: #8b0000;
    color: #fff;
    border-color: #8b0000;
}

.article-share {
    display: flex;
    gap: 10px;
}

.share-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f5f5;
    border-radius: 50%;
    transition: all 0.3s;
    text-decoration: none;
    color: #333;
    border: 1px solid #e0e0e0;
}

.share-btn:hover {
    background: #8b0000;
    color: #fff;
    border-color: #8b0000;
    transform: translateY(-2px);
}

/* 侧边栏组件 */
.sidebar-widget {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 25px;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.08);
    border: 1px solid #f0f0f0;
}

.widget-title {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 15px;
    color: #8b0000;
    position: relative;
    padding-bottom: 10px;
}

.widget-title:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 3px;
    background: #8b0000;
    border-radius: 2px;
}

/* 热门文章列表 */
.popular-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.popular-item {
    display: flex;
    gap: 12px;
    padding: 12px;
    border-radius: 8px;
    transition: all 0.3s;
    border: 1px solid transparent;
}

.popular-item:hover {
    background: #f9f9f9;
    border-color: #e0e0e0;
    transform: translateX(5px);
}

.popular-image {
    width: 60px;
    height: 60px;
    flex-shrink: 0;
    border-radius: 6px;
    overflow: hidden;
}

.popular-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.popular-content {
    flex: 1;
    min-width: 0;
}

.popular-title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 6px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: #333;
}

.popular-meta {
    font-size: 12px;
    color: #999;
}

/* 分类列表 */
.category-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

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

.category-list a {
    display: flex;
    justify-content: space-between;
    color: #666;
    transition: color 0.3s;
    font-size: 14px;
    text-decoration: none;
    padding: 8px 0;
}

.category-list a:hover {
    color: #8b0000;
    transform: translateX(5px);
}

.category-count {
    background: #f5f5f5;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    color: #999;
}

/* 标签云 */
.filter-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.filter-tag {
    background: #f5f5f5;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    transition: all 0.3s;
    cursor: pointer;
    text-decoration: none;
    color: #333;
    border: 1px solid #e0e0e0;
}

.filter-tag:hover, .filter-tag.active {
    background: #8b0000;
    color: #fff;
    border-color: #8b0000;
    transform: translateY(-2px);
}

/* 响应式设计 */
@media (max-width: 992px) {
    .article-layout {
        flex-direction: column;
        gap: 20px;
    }
    
    .article-sidebar {
        width: 100%;
    }
    
    .article-main, .sidebar-widget {
        margin: 0 10px;
    }
}

@media (max-width: 768px) {
    .article-layout {
        margin: 10px 0;
        padding: 0 10px;
    }
    
    .article-header {
        margin-bottom: 20px;
        padding: 0 15px;
    }
    
    .article-title {
        font-size: 22px;
        margin: 20px 0 15px;
    }
    
    .article-meta {
        gap: 15px;
        font-size: 13px;
    }
    
    .article-actions {
        gap: 10px;
        margin-top: 15px;
    }
    
    .action-btn {
        padding: 6px 12px;
        font-size: 13px;
    }
    
    .featured-image {
        height: 250px;
        margin-bottom: 20px;
    }
    
    .article-body {
        padding: 20px;
    }
    
    .article-text {
        font-size: 15px;
        line-height: 1.7;
        margin-bottom: 25px;
    }
    
    .article-text p {
        margin-bottom: 15px;
    }
    
    .article-text h2, .article-text h3 {
        margin: 25px 0 12px;
    }
    
    .article-text h2 {
        font-size: 19px;
    }
    
    .article-text h3 {
        font-size: 16px;
    }
    
    .article-text blockquote {
        padding-left: 15px;
        margin: 15px 0;
        padding: 12px 15px;
    }
    
    .article-tags {
        gap: 8px;
        margin-bottom: 20px;
    }
    
    .article-footer {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
        padding-top: 15px;
    }
    
    .article-nav {
        width: 100%;
        justify-content: space-between;
    }
    
    .nav-btn {
        flex: 1;
        justify-content: center;
        text-align: center;
    }
    
    .article-share {
        width: 100%;
        justify-content: center;
    }
    
    /* 移动端侧边栏优化 */
    .sidebar-widget {
        padding: 15px;
        margin-bottom: 20px;
    }
    
    .popular-item {
        gap: 10px;
    }
    
    .popular-image {
        width: 50px;
        height: 50px;
    }
    
    .popular-title {
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .article-title {
        font-size: 20px;
    }
    
    .article-meta {
        flex-direction: column;
        gap: 8px;
    }
    
    .featured-image {
        height: 200px;
    }
    
    .article-body {
        padding: 15px;
    }
    
    .article-text {
        font-size: 14px;
    }
    
    .article-actions {
        flex-wrap: wrap;
        justify-content: center;
    }
}