/* 文章详情页样式 */
.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

.article-nav {
    margin-bottom: 20px;
}

.back-link {
    display: inline-flex;
    align-items: center;
    color: var(--text-color);
    text-decoration: none;
    font-size: 0.9rem;
    transition: opacity 0.2s;
}

.back-link:hover {
    opacity: 0.8;
}

.back-link svg {
    margin-right: 8px;
}

.alert {
    padding: 12px 16px;
    margin-bottom: 20px;
    border-radius: 8px;
    font-size: 0.9rem;
}

.alert-success {
    background-color: rgba(25, 135, 84, 0.15);
    color: #198754;
    border: 1px solid rgba(25, 135, 84, 0.2);
}

.alert-error {
    background-color: rgba(220, 53, 69, 0.15);
    color: #dc3545;
    border: 1px solid rgba(220, 53, 69, 0.2);
}

/* 文章详情 */
.article-detail {
    background-color: var(--card-bg);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 30px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.article-author {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.author-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 15px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.author-info h3 {
    margin: 0 0 5px 0;
    font-size: 1.1rem;
    color: var(--text-color);
}

.article-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 0.85rem;
    /* color: var(--text-muted); */
    color: darkgrey;
}

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

.meta-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    stroke: currentColor;
    fill: none;
    display: inline-block;
    vertical-align: middle;
    position: relative;
    top: 0.5px;
}

.privacy-status {
    color: var(--accent-color);
}

.article-content {
    font-size: 1.05rem;
    line-height: 1.7;
    color: var(--text-color);
    margin-bottom: 30px;
    white-space: pre-wrap;
    word-break: break-word;
}

.article-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--border-color);
    padding-top: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.article-stats {
    display: flex;
    align-items: center;
    gap: 16px;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.action-buttons {
    display: flex;
    align-items: center;
    gap: 10px;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: none;
    padding: 8px 12px;
    border-radius: 8px;
    color: var(--text-color);
    font-size: 0.9rem;
    cursor: pointer;
    transition: background-color 0.2s;
}

.action-btn:hover {
    background-color: var(--btn-hover);
}

.like-btn {
    color: var(--text-muted);
}

.like-btn:hover {
    color: var(--accent-color);
}

.like-btn:hover svg {
    stroke: var(--accent-color);
}

.like-btn.liked {
    color: #e91e63; /* 使用红色 */
}

.like-btn.liked svg {
    fill: #e91e63; /* 使用红色填充 */
    stroke: #e91e63; /* 使用红色描边 */
}

.like-btn:disabled {
    cursor: default;
    opacity: 0.8;
}

.share-btn:hover {
    color: var(--accent-color);
}

.share-btn:hover svg {
    stroke: var(--accent-color);
}

/* 评论区样式 */
.comments-section {
    margin-top: 40px;
}

.section-title {
    font-size: 1.3rem;
    margin-bottom: 20px;
    color: var(--text-color);
    position: relative;
    padding-bottom: 10px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background-color: var(--accent-color);
    border-radius: 3px;
}

.comment-form-container, 
.reply-form-container {
    width: 100%;
    max-width: 100%;
    padding: 0;
    margin-bottom: 30px;
    box-sizing: border-box;
}

.comment-form textarea, 
.reply-form textarea {
    width: 100%;
    box-sizing: border-box;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background-color: var(--input-bg);
    color: var(--text-color);
    font-size: 0.95rem;
    min-height: 100px;
    resize: vertical;
    transition: border-color 0.2s;
}

.comment-form textarea:focus, 
.reply-form textarea:focus {
    border-color: var(--accent-color);
    outline: none;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 12px;
    gap: 10px;
}

.btn {
    padding: 8px 16px;
    border-radius: 8px;
    border: none;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background-color 0.2s;
}

.btn-primary {
    background-color: var(--btn-bg);
    color: var(--text-color);
}

.btn-primary:hover {
    background-color: var(--accent-hover);
}

.btn-text {
    background: none;
    color: var(--text-muted);
}

.btn-text:hover {
    background-color: var(--btn-hover);
    color: var(--text-color);
}

.login-prompt {
    text-align: center;
    padding: 20px;
    background-color: var(--card-bg);
    border-radius: 8px;
    margin-bottom: 30px;
    color: var(--text-muted);
}

.login-prompt a {
    color: var(--accent-color);
    text-decoration: none;
}

.login-prompt a:hover {
    text-decoration: underline;
}

.comments-list {
    margin-top: 20px;
}

.comment-item {
    display: flex;
    margin-bottom: 25px;
    gap: 15px;
}

.comment-avatar img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.comment-content {
    flex: 1;
}

.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.comment-author {
    font-weight: 500;
    color: var(--text-color);
}

.comment-date {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.comment-text {
    color: var(--text-color);
    line-height: 1.5;
    margin-bottom: 10px;
    white-space: pre-wrap;
    word-break: break-word;
}

.comment-actions {
    display: flex;
    gap: 15px;
    margin-bottom: 10px;
}

.reply-btn {
    border: none;
    background: none;
    padding: 0;
    color: var(--text-muted);
    font-size: 0.85rem;
    cursor: pointer;
    transition: color 0.2s;
}

.reply-btn:hover {
    color: var(--accent-color);
}

.replies-list {
    margin-top: 15px;
    margin-left: 15px;
    border-left: 2px solid var(--border-color);
    padding-left: 15px;
}

.reply-item {
    display: flex;
    margin-bottom: 15px;
    gap: 12px;
}

.reply-item:last-child {
    margin-bottom: 0;
}

.no-comments {
    text-align: center;
    padding: 30px 0;
    color: var(--text-muted);
}

/* 分页 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 30px;
    gap: 5px;
}

.page-link {
    display: inline-block;
    padding: 5px 10px;
    background-color: var(--card-bg);
    color: var(--text-color);
    border-radius: 4px;
    text-decoration: none;
    transition: background-color 0.2s;
}

.page-link:hover {
    background-color: var(--btn-hover);
}

.page-link.active {
    background-color: var(--accent-color);
    color: white;
}

.page-ellipsis {
    color: var(--text-muted);
    padding: 5px;
}

/* 响应式调整 */
@media (max-width: 600px) {
    .article-detail {
        padding: 16px;
    }
    
    .article-author {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .author-avatar {
        margin-bottom: 10px;
    }
    
    .article-actions {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .article-stats {
        width: 100%;
        margin-bottom: 10px;
    }
    
    .action-buttons {
        width: 100%;
        justify-content: space-between;
    }
    
    .comment-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .comment-date {
        margin-top: 3px;
    }
    
    .comment-avatar img {
        width: 35px;
        height: 35px;
    }
}

/* 电脑端优化样式 */
@media (min-width: 768px) {
    /* 主容器优化 */
    .container {
        max-width: 900px;
        padding: 40px 30px;
        margin: 0 auto;
    }
    
    /* 文章详情卡片优化 */
    .article-detail {
        padding: 40px;
        border-radius: 12px;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
        margin-bottom: 30px;
    }
    
    /* 作者信息区域优化 */
    .article-author {
        margin-bottom: 30px;
        padding-bottom: 25px;
        border-bottom: 2px solid var(--border-color);
    }
    
    .author-avatar {
        width: 60px;
        height: 60px;
    }
    
    .author-info h3 {
        font-size: 1.3rem;
        margin-bottom: 8px;
    }
    
    .article-meta {
        gap: 20px;
    }
    
    .meta-item {
        font-size: 0.95rem;
    }
    
    /* 文章内容优化 */
    .article-content {
        font-size: 1.1rem;
        line-height: 1.8;
        margin-bottom: 40px;
        max-width: none;
    }
    
    /* 文章操作区域优化 */
    .article-actions {
        padding-top: 30px;
        margin-top: 30px;
    }
    
    .action-btn {
        padding: 10px 20px;
        font-size: 0.95rem;
    }
    
    /* 评论区域优化 */
    .comments-section {
        margin-top: 40px;
    }
    
    .comments-section h3 {
        font-size: 1.4rem;
        margin-bottom: 25px;
    }
    
    .comment-form-container {
        margin-bottom: 35px;
    }
    
    .comment-form textarea {
        min-height: 120px;
        font-size: 1rem;
        padding: 15px 20px;
    }
    
    .comment-item {
        padding: 25px 0;
        margin-bottom: 20px;
    }
    
    .comment-header {
        margin-bottom: 8px;
        gap: 12px;
    }
    
    .comment-author {
        min-width: 0;
    }
    
    .comment-date {
        margin-left: auto;
        font-size: 0.85rem;
    }
    
    .comment-content {
        font-size: 1rem;
        line-height: 1.7;
        margin-bottom: 15px;
    }
    
    /* 图片展示优化 */
    .article-images {
        margin: 35px 0;
    }
    
    .article-image-single {
        border-radius: 12px;
        max-height: 500px;
    }
    
    .article-image-grid {
        border-radius: 8px;
        height: 250px;
    }
    
    .article-image-small {
        height: 200px;
    }
    
    /* 相关文章优化 */
    .related-articles {
        margin-top: 50px;
        padding-top: 40px;
        border-top: 2px solid var(--border-color);
    }
    
    .related-articles h3 {
        font-size: 1.3rem;
        margin-bottom: 25px;
    }
    
    .related-article-item {
        padding: 20px;
        border-radius: 10px;
        margin-bottom: 15px;
        transition: all 0.3s ease;
    }
    
    .related-article-item:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 25px rgba(0, 0, 0, 0.1);
    }
}

/* 超大屏幕优化 */
@media (min-width: 1200px) {
    .container {
        max-width: 1000px;
        padding: 50px 40px;
    }
    
    .article-detail {
        padding: 50px;
    }
    
    .article-content {
        font-size: 1.15rem;
        line-height: 1.9;
    }
}