/* 文章详情页面专用样式 */

/* 文章详情容器 */
.article-detail-section {
    padding: 2rem 0 4rem;
    background: #ffffff;
    min-height: 100vh;
}

.article-detail-content {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    border-radius: 0;
    box-shadow: none;
    overflow: visible;
    position: relative;
}

/* 面包屑导航 */
.breadcrumb {
    padding: 0 0 1.5rem 0;
    margin-bottom: 0;
    background: transparent;
    border-radius: 0;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}

.breadcrumb a {
    color: #64748b;
    text-decoration: none;
    font-weight: 400;
    transition: color 0.3s ease;
    padding: 0.3rem 0.5rem;
    border-radius: 4px;
}

.breadcrumb a:hover {
    color: var(--primary-blue);
    background: rgba(41, 93, 252, 0.05);
}

.breadcrumb i {
    margin: 0 0.3rem;
    color: #cbd5e1;
    font-size: 0.6rem;
}

.breadcrumb span {
    color: #1e293b;
    font-weight: 500;
    padding: 0.3rem 0.5rem;
    background: rgba(41, 93, 252, 0.1);
    border-radius: 4px;
}

/* 文章头部 */
.article-header {
    padding: 2rem 0 3rem 0;
    text-align: center;
    /* background: #f8fafc; */
    border-radius: 16px;
    margin-bottom: 2rem;
    position: relative;
    /* border: 1px solid rgba(226, 232, 240, 0.5); */
	border-bottom: none;
}

.article-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 2rem;
    line-height: 1.2;
    letter-spacing: -0.02em;
    max-width: 90%;
    margin-left: auto;
    margin-right: auto;
}

.article-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-top: 0;
    background: rgba(255, 255, 255, 0.8);
    padding: 1.5rem 2rem;
    border-radius: 12px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.meta-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.author-name {
    font-weight: 700;
    color: #0f172a;
    font-size: 1rem;
}

.publish-date {
    color: #64748b;
    font-size: 0.9rem;
    font-weight: 500;
}

.article-stats {
    display: flex;
    gap: 2rem;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #475569;
    font-size: 0.9rem;
    font-weight: 600;
    padding: 0;
    background: none;
    border-radius: 0;
    border: none;
    transition: all 0.3s ease;
}

.stat-item:hover {
    color: var(--primary-blue);
    transform: translateY(-1px);
}

.stat-item i {
    color: var(--primary-blue);
    font-size: 0.8rem;
}

/* 文章内容区域 */
.article-body {
    padding: 2rem 0;
    background: transparent;
}

.article-image {
    margin-bottom: 2rem;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.article-image img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s ease;
}

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

.article-content {
    line-height: 1.8;
    color: #374151;
    font-size: 1rem;
}

.article-content h1,
.article-content h2,
.article-content h3,
.article-content h4,
.article-content h5,
.article-content h6 {
    color: #1e293b;
    font-weight: 700;
    margin: 2.5rem 0 1.5rem;
    line-height: 1.3;
}

.article-content h2 {
    font-size: 2rem;
    border-bottom: 2px solid var(--light-blue);
    padding-bottom: 0.5rem;
}

.article-content h3 {
    font-size: 1.6rem;
    color: var(--primary-blue);
}

.article-content h4 {
    font-size: 1.3rem;
}

.article-content p {
    margin-bottom: 1.5rem;
    text-align: justify;
}

.article-content ul,
.article-content ol {
    margin: 1.5rem 0;
    padding-left: 2rem;
}

.article-content li {
    margin-bottom: 0.8rem;
    line-height: 1.7;
}

.article-content blockquote {
    border-left: 4px solid var(--primary-blue);
    background: #f8fafc;
    padding: 1.5rem 2rem;
    margin: 2rem 0;
    border-radius: 0 8px 8px 0;
    font-style: italic;
    color: #475569;
}

.article-content pre {
    background: #1e293b;
    color: #e2e8f0;
    border-radius: 12px;
    padding: 2rem;
    overflow-x: auto;
    margin: 2rem 0;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.9rem;
    line-height: 1.6;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.article-content code {
    background: #f1f5f9;
    color: var(--primary-blue);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.9em;
    font-weight: 600;
}

.article-content pre code {
    background: transparent;
    color: inherit;
    padding: 0;
}

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

.article-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.article-content th,
.article-content td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
}

.article-content th {
    background: var(--light-blue);
    font-weight: 600;
    color: #1e293b;
}

.article-content tr:hover {
    background: #f8fafc;
}

/* 文章标签 */
.article-tags {
    padding: 1.5rem 2rem;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
}

.tag-label {
    color: #64748b;
    font-weight: 600;
    margin-right: 0.5rem;
}

.tag {
    display: inline-block;
    background: var(--gradient-primary);
    color: white;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
}

/* 文章操作按钮 */
.article-actions {
    padding: 2rem;
    background: white;
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 1.5rem;
    border: 2px solid var(--primary-blue);
    background: white;
    color: var(--primary-blue);
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.action-btn:hover {
    background: var(--primary-blue);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(41, 93, 252, 0.3);
}

.action-btn.liked,
.action-btn.bookmarked {
    background: var(--primary-blue);
    color: white;
}

.action-btn i {
    font-size: 0.9rem;
}

/* 相关文章 */
.related-articles {
    padding: 2rem;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
}

.related-articles h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 1.5rem;
    text-align: center;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.related-article {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.related-article:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.related-image {
    height: 160px;
    overflow: hidden;
}

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

.related-article:hover .related-image img {
    transform: scale(1.05);
}

.related-content {
    padding: 1.5rem;
}

.related-content h4 {
    margin-bottom: 0.8rem;
}

.related-content h4 a {
    color: #1e293b;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    line-height: 1.4;
    transition: color 0.3s ease;
}

.related-content h4 a:hover {
    color: var(--primary-blue);
}

.related-date {
    color: #64748b;
    font-size: 0.9rem;
}

/* 错误消息 */
.error-message {
    text-align: center;
    padding: 4rem 2rem;
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.error-message h2 {
    color: #ef4444;
    font-size: 2rem;
    margin-bottom: 1rem;
}

.error-message p {
    color: #64748b;
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .article-detail-content {
        margin: 0 1rem;
        border-radius: 0;
    }
    
    .breadcrumb {
        padding: 0 0 1rem 0;
        font-size: 0.85rem;
    }
    
    .article-header {
        padding: 1.5rem 1rem 2rem 1rem;
        margin-bottom: 1.5rem;
        border-radius: 12px;
    }
    
    .article-title {
        font-size: 1.8rem;
        line-height: 1.4;
        max-width: 100%;
    }
    
    .article-meta {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem 1.5rem;
    }
    
    .meta-info {
        justify-content: center;
        gap: 0.8rem;
    }
    
    .article-stats {
        justify-content: center;
        gap: 1rem;
    }
    
    .stat-item {
        padding: 0;
        font-size: 0.85rem;
    }
    
    .article-body {
        padding: 1.5rem 0;
    }
    
    .article-content {
        font-size: 0.95rem;
    }
    
    .article-content h2 {
        font-size: 1.5rem;
    }
    
    .article-content h3 {
        font-size: 1.2rem;
    }
    
    .article-tags,
    .article-actions,
    .related-articles {
        padding: 1.5rem 0;
    }
    
    .action-btn {
        padding: 0.7rem 1.2rem;
        font-size: 0.9rem;
    }
    
    .related-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .article-detail-section {
        padding: 1rem 0 2rem;
    }
    
    .article-detail-content {
        margin: 0 0.5rem;
        border-radius: 0;
    }
    
    .breadcrumb {
        padding: 0 0 0.8rem 0;
        font-size: 0.8rem;
    }
    
    .article-header {
        padding: 1.2rem 0.8rem 1.5rem 0.8rem;
        margin-bottom: 1rem;
        border-radius: 8px;
    }
    
    .article-title {
        font-size: 1.5rem;
        line-height: 1.4;
        max-width: 100%;
        margin-bottom: 1.2rem;
    }
    
    .article-meta {
        padding: 1rem 0.8rem;
        border-radius: 6px;
        gap: 1rem;
    }
    
    .article-stats {
        gap: 0.8rem;
    }
    
    .stat-item {
        padding: 0.3rem 0.6rem;
        font-size: 0.8rem;
    }
    
    .article-body {
        padding: 1rem 0;
    }
    
    .article-content {
        font-size: 0.9rem;
    }
    
    .article-content h2 {
        font-size: 1.3rem;
    }
    
    .article-content h3 {
        font-size: 1.1rem;
    }
    
    .article-tags,
    .article-actions,
    .related-articles {
        padding: 1rem 0;
    }
    
    .action-btn {
        padding: 0.6rem 1rem;
        font-size: 0.85rem;
    }
}

/* 动画效果 */
.article-detail-content {
    animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 滚动条样式 */
.article-content::-webkit-scrollbar {
    width: 6px;
}

.article-content::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 3px;
}

.article-content::-webkit-scrollbar-thumb {
    background: var(--primary-blue);
    border-radius: 3px;
}

.article-content::-webkit-scrollbar-thumb:hover {
    background: var(--dark-blue);
}
