/* 博客专用样式 */

/* 头部导航增强 */
.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-nav {
    display: flex;
    gap: 2rem;
}

.header-nav a {
    color: #666;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.header-nav a:hover,
.header-nav a.active {
    color: #007acc;
}

/* 博客头部区域 */
.blog-header {
    text-align: center;
    padding: 3rem 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 15px;
    margin-bottom: 3rem;
}

.blog-header h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.blog-header p {
    font-size: 1.2rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
}

/* 博客列表样式 */
.blog-list {
    max-width: 800px;
    margin: 0 auto;
}

.posts-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.post-card {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #e1e8ed;
}

.post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.post-header {
    margin-bottom: 1rem;
}

.post-title {
    margin: 0 0 1rem 0;
    font-size: 1.5rem;
    font-weight: 600;
}

.post-title a {
    color: #1a202c;
    text-decoration: none;
    transition: color 0.3s ease;
}

.post-title a:hover {
    color: #007acc;
}

.post-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 1rem;
}

.post-stats {
    display: flex;
    gap: 1rem;
}

.post-summary {
    margin-bottom: 1.5rem;
    line-height: 1.6;
    color: #4a5568;
}

.post-footer {
    text-align: right;
}

.read-more-btn {
    color: #007acc;
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    background: rgba(0, 122, 204, 0.1);
    transition: all 0.3s ease;
}

.read-more-btn:hover {
    background: #007acc;
    color: white;
}

/* 加载更多按钮 */
.load-more-container {
    text-align: center;
    margin-top: 3rem;
}

.load-more-btn {
    background: linear-gradient(45deg, #007acc, #0066aa);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.load-more-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 122, 204, 0.3);
}

.load-more-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* 博客详情页样式 */
.post-detail {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    border-radius: 15px;
    padding: 3rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    margin-bottom: 3rem;
}

.post-detail-header {
    border-bottom: 2px solid #f7fafc;
    padding-bottom: 2rem;
    margin-bottom: 3rem;
}

.post-detail .post-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1a202c;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.post-detail .post-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.post-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.like-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 25px;
    padding: 0.5rem 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.like-btn:hover {
    border-color: #007acc;
    background: rgba(0, 122, 204, 0.05);
}

.like-btn.liked {
    background: #007acc;
    border-color: #007acc;
    color: white;
}

.like-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* 文章内容样式 */
.post-content {
    line-height: 1.8;
    color: #2d3748;
    font-size: 1.1rem;
}

.post-content h1,
.post-content h2,
.post-content h3,
.post-content h4,
.post-content h5,
.post-content h6 {
    color: #1a202c;
    font-weight: 600;
    margin: 2rem 0 1rem 0;
}

.post-content h1 { font-size: 2rem; }
.post-content h2 { font-size: 1.75rem; }
.post-content h3 { font-size: 1.5rem; }
.post-content h4 { font-size: 1.25rem; }

.post-content p {
    margin-bottom: 1.5rem;
}

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

.post-content li {
    margin-bottom: 0.5rem;
}

.post-content blockquote {
    border-left: 4px solid #007acc;
    background: rgba(0, 122, 204, 0.05);
    padding: 1rem 1.5rem;
    margin: 1.5rem 0;
    border-radius: 0 8px 8px 0;
}

.post-content pre {
    background: #f7fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 1.5rem;
    margin: 1.5rem 0;
    overflow-x: auto;
    font-family: 'Courier New', monospace;
}

.post-content code {
    background: #f7fafc;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
}

.post-content pre code {
    background: none;
    padding: 0;
}

.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1.5rem 0;
}

.post-content a {
    color: #007acc;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-bottom-color 0.3s ease;
}

.post-content a:hover {
    border-bottom-color: #007acc;
}

.post-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
}

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

.post-content th {
    background: #f7fafc;
    font-weight: 600;
}

/* 文章导航 */
.post-navigation {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 2px solid #f7fafc;
}

.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #007acc;
    text-decoration: none;
    font-weight: 500;
    padding: 0.75rem 1.5rem;
    border: 2px solid #007acc;
    border-radius: 25px;
    transition: all 0.3s ease;
}

.back-btn:hover {
    background: #007acc;
    color: white;
}

/* 评论区域样式 */
.comments-section {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    border-radius: 15px;
    padding: 3rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.comments-section h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1a202c;
    margin-bottom: 2rem;
}

/* 评论表单样式 */
.comment-form {
    background: #f7fafc;
    padding: 2rem;
    border-radius: 10px;
    margin-bottom: 3rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #4a5568;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #007acc;
}

.submit-btn {
    background: #007acc;
    color: white;
    border: none;
    padding: 0.75rem 2rem;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.submit-btn:hover {
    background: #0066aa;
    transform: translateY(-2px);
}

.submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* 评论列表样式 */
.comments-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.comment-item {
    background: #f8fafc;
    padding: 1.5rem;
    border-radius: 10px;
    border-left: 4px solid #007acc;
}

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

.comment-author {
    font-weight: 600;
    color: #1a202c;
}

.comment-date {
    font-size: 0.9rem;
    color: #666;
}

.comment-content {
    color: #4a5568;
    line-height: 1.6;
}

/* 无内容提示 */
.no-posts,
.no-comments {
    text-align: center;
    padding: 3rem;
    color: #666;
    font-size: 1.1rem;
}

/* 错误信息样式 */
.error-message {
    text-align: center;
    padding: 3rem;
    background: #fed7d7;
    border: 1px solid #feb2b2;
    border-radius: 10px;
    color: #c53030;
}

.retry-btn {
    background: #c53030;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 20px;
    margin-top: 1rem;
    cursor: pointer;
    transition: background 0.3s ease;
}

.retry-btn:hover {
    background: #a0252f;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .blog-header {
        padding: 2rem 1rem;
        margin-bottom: 2rem;
    }

    .blog-header h2 {
        font-size: 2rem;
    }

    .post-detail,
    .comments-section {
        padding: 2rem 1rem;
        margin: 0 1rem;
    }

    .post-detail .post-title {
        font-size: 2rem;
    }

    .post-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .post-actions {
        width: 100%;
        justify-content: space-between;
    }

    .header-nav {
        gap: 1rem;
    }

    .comment-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
}