/* 文章详情页样式 */

.article-page {
    padding: 100px 0 60px;
    background: var(--gray-lighter);
    min-height: 100vh;
}

/* 面包屑 */
.breadcrumb {
    padding: 16px 0;
    font-size: 14px;
    color: var(--gray);
}

.breadcrumb a {
    color: var(--gray);
    text-decoration: none;
    transition: var(--transition);
}

.breadcrumb a:hover {
    color: var(--primary);
}

.breadcrumb span {
    margin: 0 8px;
}

/* 文章布局 */
.article-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 32px;
}

@media (max-width: 1024px) {
    .article-layout {
        grid-template-columns: 1fr;
    }
    
    .article-sidebar {
        display: none;
    }
}

/* 文章主体 */
.article-content {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.article-header {
    padding: 32px 40px 24px;
    border-bottom: 1px solid var(--gray-lighter);
}

.article-tags {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.tag {
    padding: 4px 12px;
    background: var(--primary);
    color: white;
    font-size: 12px;
    border-radius: 4px;
}

.article-header h1 {
    font-size: 28px;
    font-weight: 700;
    color: var(--dark);
    line-height: 1.5;
    margin-bottom: 16px;
}

.article-meta {
    display: flex;
    gap: 20px;
    font-size: 14px;
    color: var(--gray);
}

.article-cover {
    width: 100%;
    max-height: 400px;
    overflow: hidden;
    background: linear-gradient(135deg, #DBEAFE 0%, #BFDBFE 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.article-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.article-body {
    padding: 32px 40px;
    font-size: 16px;
    line-height: 1.8;
    color: var(--dark-light);
}

.article-body h2 {
    font-size: 22px;
    font-weight: 700;
    color: var(--dark);
    margin: 32px 0 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--primary);
}

.article-body h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--dark);
    margin: 24px 0 12px;
}

.article-body p {
    margin-bottom: 16px;
}

.article-body ul,
.article-body ol {
    margin: 16px 0;
    padding-left: 24px;
}

.article-body li {
    margin-bottom: 8px;
}

.article-body strong {
    color: var(--primary);
    font-weight: 600;
}

.article-body blockquote {
    background: var(--gray-lighter);
    padding: 20px 24px;
    border-left: 4px solid var(--primary);
    margin: 24px 0;
    border-radius: 0 8px 8px 0;
}

.article-body blockquote p {
    margin-bottom: 8px;
    color: var(--dark-light);
}

.article-cta {
    background: linear-gradient(135deg, #EFF6FF 0%, #DBEAFE 100%);
    padding: 24px;
    border-radius: 12px;
    margin-top: 32px;
    text-align: center;
}

.article-cta h3 {
    margin-bottom: 12px;
    color: var(--primary);
}

.article-cta p {
    margin-bottom: 16px;
}

/* 文章底部 */
.article-footer {
    padding: 24px 40px;
    border-top: 1px solid var(--gray-lighter);
}

.share-section {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--gray-lighter);
}

.share-btn {
    padding: 8px 16px;
    background: var(--gray-lighter);
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: var(--transition);
}

.share-btn:hover {
    background: var(--primary);
    color: white;
}

.like-section {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.like-btn {
    padding: 10px 24px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: var(--transition);
}

.like-btn:hover {
    background: var(--primary-dark);
    transform: scale(1.05);
}

.like-count {
    color: var(--gray);
    font-size: 14px;
}

.prev-next {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
}

.prev-article,
.next-article {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
}

.prev-article:hover,
.next-article:hover {
    text-decoration: underline;
}

/* 侧边栏 */
.article-sidebar {
    position: sticky;
    top: 100px;
    height: fit-content;
}

.sidebar-widget {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-sm);
}

.sidebar-widget h3 {
    font-size: 16px;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--primary);
}

.recommended-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.recommended-list li {
    padding: 12px 0;
    border-bottom: 1px solid var(--gray-lighter);
}

.recommended-list li:last-child {
    border-bottom: none;
}

.recommended-list a {
    color: var(--dark-light);
    text-decoration: none;
    font-size: 14px;
    line-height: 1.5;
    transition: var(--transition);
}

.recommended-list a:hover {
    color: var(--primary);
    padding-left: 4px;
}

.tool-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.tool-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--gray-lighter);
    border-radius: 8px;
    text-decoration: none;
    color: var(--dark);
    font-size: 14px;
    transition: var(--transition);
}

.tool-item:hover {
    background: var(--primary);
    color: white;
    transform: translateX(4px);
}

.tool-icon {
    font-size: 20px;
}

.qr-widget .qr-code {
    text-align: center;
}

.qr-code img {
    width: 150px;
    height: 150px;
    background: var(--gray-lighter);
    border-radius: 8px;
    margin-bottom: 12px;
}

.qr-code p {
    font-size: 13px;
    color: var(--gray);
    line-height: 1.5;
}

/* 响应式 */
@media (max-width: 768px) {
    .article-header,
    .article-body,
    .article-footer {
        padding-left: 20px;
        padding-right: 20px;
    }
    
    .article-header h1 {
        font-size: 22px;
    }
    
    .article-meta {
        flex-wrap: wrap;
        gap: 12px;
    }
}

/* ==================== 
   评论区 
   ==================== */
.comments-section {
    background: var(--bg-secondary);
    padding: 60px 0;
}

.comments-wrapper {
    max-width: 800px;
    margin: 0 auto;
}

.comments-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 20px;
}

.comment-count {
    font-size: 14px;
    font-weight: 400;
    color: var(--gray);
}

.comment-form {
    background: var(--white);
    padding: 24px;
    border-radius: var(--radius-lg);
    margin-bottom: 32px;
    box-shadow: var(--shadow);
}

.comment-textarea {
    width: 100%;
    min-height: 100px;
    padding: 14px 18px;
    border: 2px solid var(--gray-lighter);
    border-radius: var(--radius);
    font-size: 15px;
    font-family: inherit;
    resize: vertical;
    margin-bottom: 16px;
    transition: var(--transition);
}

.comment-textarea:focus {
    outline: none;
    border-color: var(--primary);
}

.comments-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.comment-item {
    display: flex;
    gap: 16px;
    padding: 20px;
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.comment-avatar {
    width: 44px;
    height: 44px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 18px;
    flex-shrink: 0;
}

.comment-content {
    flex: 1;
}

.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.comment-author {
    font-weight: 600;
    color: var(--dark);
}

.comment-date {
    font-size: 13px;
    color: var(--gray);
}

.comment-content p {
    color: var(--dark-light);
    line-height: 1.7;
    margin-bottom: 12px;
}

.comment-reply {
    background: none;
    border: none;
    color: var(--primary);
    font-size: 13px;
    cursor: pointer;
    padding: 0;
}

.comment-reply:hover {
    text-decoration: underline;
}

@media (max-width: 640px) {
    .comment-item {
        flex-direction: column;
        gap: 12px;
    }
    
    .comment-avatar {
        width: 36px;
        height: 36px;
        font-size: 14px;
    }
}
