/* blog_detail.css - 博客详情页专用样式 */

/* 博客详情容器 */
.blog-detail {
    max-width: 900px;
    margin: 0 auto;
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    padding: 40px;
    position: relative;
}

/* 博客头部 */
.blog-header {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f1f3f4;
    text-align: left;
}

.blog-detail-title {
    font-size: 2.5rem;
    margin-bottom: 15px;
    color: #2c3e50;
    font-weight: 700;
    line-height: 1.3;
    text-align: left;
}

.blog-author {
    color: #6c757d;
    font-size: 1.1rem;
    margin: 0;
    text-align: left;
}

/* 博客内容 */
.blog-content {
    line-height: 1.8;
    font-size: 1.1rem;
    color: #444;
    margin-bottom: 30px;
    text-align: left;
}

/* 改善博客内容的排版 */
.blog-content p {
    margin-bottom: 1.5rem;
    text-align: left;
}

.blog-content h1,
.blog-content h2,
.blog-content h3,
.blog-content h4,
.blog-content h5,
.blog-content h6 {
    margin: 2rem 0 1rem 0;
    color: #2c3e50;
    font-weight: 600;
    text-align: left;
}

.blog-content h1 {
    font-size: 1.8rem;
    border-bottom: 2px solid #667eea;
    padding-bottom: 0.5rem;
}

.blog-content h2 {
    font-size: 1.6rem;
    border-left: 4px solid #667eea;
    padding-left: 1rem;
}

.blog-content ul,
.blog-content ol {
    margin: 1rem 0;
    padding-left: 2rem;
    text-align: left;
}

.blog-content li {
    margin-bottom: 0.5rem;
}

.blog-content blockquote {
    border-left: 4px solid #667eea;
    background: #f8f9fa;
    padding: 1rem 1.5rem;
    margin: 1.5rem 0;
    font-style: italic;
    text-align: left;
}

.blog-content code {
    background: #f1f3f4;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
}

.blog-content pre {
    background: #2d3748;
    color: #e2e8f0;
    padding: 1.5rem;
    border-radius: 8px;
    overflow-x: auto;
    margin: 1.5rem 0;
    text-align: left;
}

.blog-content pre code {
    background: none;
    padding: 0;
    color: inherit;
}

/* 博客操作区域 */
.blog-actions {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    padding: 20px 0;
    margin: 30px 0;
    border-top: 1px solid #e9ecef;
    border-bottom: 1px solid #e9ecef;
}

.like-btn {
    background: linear-gradient(135deg, #667eea, #764ba2);
    border: none;
    border-radius: 25px;
    padding: 10px 20px;
    color: white;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.like-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.like-btn.liked {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
}

/* 评论区域 */
.comments-section {
    margin-top: 40px;
}

.comments-header {
    font-size: 1.8rem;
    margin-bottom: 25px;
    color: #2c3e50;
    font-weight: 600;
    text-align: left;
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 10px;
}

/* 评论表单 */
.comment-form {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 12px;
    margin-bottom: 30px;
    border-left: 4px solid #667eea;
}

.comment-form textarea {
    width: 100%;
    height: 120px;
    padding: 15px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    resize: vertical;
    font-family: inherit;
    font-size: 1rem;
    margin-bottom: 15px;
    background: white;
    transition: all 0.3s ease;
    text-align: left;
}

.comment-form textarea:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    outline: none;
}

.comment-form button {
    background: linear-gradient(135deg, #667eea, #764ba2);
    border: none;
    border-radius: 25px;
    padding: 12px 30px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.comment-form button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

/* 评论列表 */
.comment-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.comment-item {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    border-left: 4px solid #28a745;
}

.comment-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f1f3f4;
}

.comment-author {
    font-weight: 600;
    color: #2c3e50;
    font-size: 1.1rem;
}

.comment-date {
    color: #6c757d;
    font-size: 0.9rem;
}

.comment-content {
    line-height: 1.6;
    color: #444;
    white-space: pre-wrap;
    text-align: left;
}

/* 登录提示 */
.comments-section p {
    text-align: center;
    padding: 20px;
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 8px;
    color: #856404;
    margin-bottom: 30px;
}

.comments-section a {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
}

.comments-section a:hover {
    text-decoration: underline;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .blog-detail {
        padding: 25px 20px;
        margin: 10px;
    }

    .blog-detail-title {
        font-size: 2rem;
    }

    .blog-content {
        font-size: 1rem;
    }

    .comment-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .comment-item {
        padding: 20px;
    }
}