/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.header {
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: #2563eb;
    text-decoration: none;
}

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

.nav-link {
    text-decoration: none;
    color: #64748b;
    font-weight: 500;
    transition: color 0.2s;
}

.nav-link:hover {
    color: #2563eb;
}

/* Main Content */
.main {
    padding: 2rem 0;
    min-height: calc(100vh - 140px);
}

/* Articles Section */
.articles-section {
    background: #fff;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.section-title {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: #1e293b;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 0.5rem;
}

/* Article Cards */
.article-card {
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
    background: #fff;
}

.article-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.article-image {
    width: 100%;
    height: 250px;
    overflow: hidden;
}

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

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

.article-content {
    padding: 1.5rem;
}

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

.author-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.author-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.author-details {
    display: flex;
    flex-direction: column;
}

.author-name {
    font-weight: 600;
    color: #1e293b;
    font-size: 0.9rem;
}

.article-date {
    font-size: 0.8rem;
    color: #64748b;
}

.article-title {
    margin-bottom: 0.75rem;
}

.article-title a {
    text-decoration: none;
    color: #1e293b;
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1.4;
    transition: color 0.2s;
}

.article-title a:hover {
    color: #2563eb;
}

.article-snippet {
    color: #64748b;
    margin-bottom: 1rem;
    line-height: 1.6;
}

.article-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid #e2e8f0;
}

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

.stat {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.85rem;
    color: #64748b;
}

.stat i {
    font-size: 0.8rem;
}

.share-btn {
    background: #f1f5f9;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.85rem;
    color: #475569;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.share-btn:hover {
    background: #2563eb;
    color: #fff;
}

/* Post Content */
.post-content {
    background: #fff;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.breadcrumb {
    font-size: 0.9rem;
    color: #64748b;
    margin-bottom: 1rem;
}

.breadcrumb a {
    color: #2563eb;
    text-decoration: none;
}

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

.post-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e2e8f0;
}

.post-meta .author-avatar {
    width: 50px;
    height: 50px;
}

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

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

.post-body {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #374151;
}

.post-body .lead {
    font-size: 1.25rem;
    font-weight: 500;
    color: #1e293b;
    margin-bottom: 2rem;
}

.post-image {
    margin: 2rem 0;
    border-radius: 12px;
    overflow: hidden;
    text-align: center;
}

.post-image img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}

.post-body h2 {
    font-size: 1.75rem;
    font-weight: 600;
    color: #1e293b;
    margin: 2rem 0 1rem 0;
}

.post-body h3 {
    font-size: 1.4rem;
    font-weight: 600;
    color: #1e293b;
    margin: 1.5rem 0 0.75rem 0;
}

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

.post-body blockquote {
    border-left: 4px solid #2563eb;
    padding-left: 1.5rem;
    margin: 2rem 0;
    font-style: italic;
    font-size: 1.15rem;
    color: #475569;
    background: #f8fafc;
    padding: 1.5rem;
    border-radius: 0 8px 8px 0;
}

.post-footer {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #e2e8f0;
}

.post-actions {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.action-btn {
    background: #f1f5f9;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-size: 0.9rem;
    color: #475569;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.action-btn:hover {
    background: #e2e8f0;
}

.action-btn.liked {
    background: #fee2e2;
    color: #dc2626;
}

/* Comments Section */
.comments-section {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #e2e8f0;
}

.comments-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.comments-title {
    font-size: 1.5rem;
    color: #1e293b;
}

.add-comment-btn {
    background: #2563eb;
    color: #fff;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.add-comment-btn:hover {
    background: #1d4ed8;
}

/* Comments List */
.comments-list {
    margin-top: 2rem;
}

.comment {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #f1f5f9;
}

.comment:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.comment-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.comment-content {
    flex: 1;
}

.comment-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.comment-author {
    font-weight: 600;
    color: #1e293b;
    font-size: 0.9rem;
}

.comment-date {
    font-size: 0.8rem;
    color: #64748b;
}

.comment-text {
    margin-bottom: 0.75rem;
    line-height: 1.6;
    color: #374151;
}

.comment-actions {
    display: flex;
    gap: 1rem;
}

.comment-action {
    background: none;
    border: none;
    color: #64748b;
    font-size: 0.8rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    transition: color 0.2s;
    padding: 0.25rem 0;
}

.comment-action:hover {
    color: #2563eb;
}

/* Comment Replies */
.comment-replies {
    margin-top: 1rem;
    padding-left: 1rem;
    border-left: 2px solid #e2e8f0;
}

.comment.reply {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #f8fafc;
}

.comment.reply:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.comment.reply .comment-avatar {
    width: 35px;
    height: 35px;
}

.comment.reply .comment-author {
    font-size: 0.85rem;
}

.comment.reply .comment-date {
    font-size: 0.75rem;
}

.comment.reply .comment-text {
    font-size: 0.9rem;
}

.load-more-btn {
    background: #f1f5f9;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-size: 0.9rem;
    color: #475569;
    cursor: pointer;
    transition: all 0.2s;
    width: 100%;
    margin-top: 1rem;
}

.load-more-btn:hover {
    background: #e2e8f0;
}

/* Footer */
.footer {
    background: #1e293b;
    color: #94a3b8;
    text-align: center;
    padding: 2rem 0;
    margin-top: 3rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    .header-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .nav {
        gap: 1rem;
    }
    
    .articles-section,
    .post-content {
        padding: 1rem;
    }
    
    .post-title {
        font-size: 2rem;
    }
    
    .post-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .article-footer {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
    
    .post-actions {
        flex-wrap: wrap;
    }
    
    .comments-header {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
    
    .add-comment-btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .post-title {
        font-size: 1.5rem;
    }
    
    .article-title a {
        font-size: 1.1rem;
    }
    
    .post-body {
        font-size: 1rem;
    }
    
    .post-body .lead {
        font-size: 1.1rem;
    }
    
    .post-body h2 {
        font-size: 1.4rem;
    }
    
    .post-body h3 {
        font-size: 1.2rem;
    }
    
    .article-image {
        height: 200px;
    }
}

/* Mobile Responsive for Comments */
@media (max-width: 768px) {
    .comment {
        gap: 0.75rem;
    }
    
    .comment-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }
    
    .comment-replies {
        padding-left: 0.5rem;
    }
    
    .comments-header {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
    
    .add-comment-btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .comment-avatar {
        width: 35px;
        height: 35px;
    }
    
    .comment.reply .comment-avatar {
        width: 30px;
        height: 30px;
    }
    
    .comment-actions {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
}