/* ==========================================
   DOUOB Blog Styles
========================================== */

:root {
    --primary: #0891b2;
    --secondary: #6366f1;
    --text: #1f2937;
    --text-light: #6b7280;
    --bg: #ffffff;
    --bg-secondary: #f9fafb;
    --border: #e5e7eb;
    --radius: 12px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
}

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

/* ==========================================
   Header
========================================== */

.blog-header {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    padding: 3rem 0 2rem;
    text-align: center;
}

.blog-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    text-decoration: none;
    color: white;
    display: inline-block;
}

.blog-title:hover {
    opacity: 0.9;
}

.blog-subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 1.5rem;
}

.blog-nav {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

.blog-nav a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    transition: all 0.3s;
}

.blog-nav a:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* ==========================================
   Posts List
========================================== */

.posts-list {
    padding: 3rem 0;
}

.post-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem;
    margin-bottom: 2rem;
    transition: all 0.3s;
}

.post-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

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

.post-card-category {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.post-card-category.dev {
    background: #dbeafe;
    color: #1e40af;
}

.post-card-category.hardware {
    background: #fce7f3;
    color: #9f1239;
}

.post-card-category.life {
    background: #d1fae5;
    color: #065f46;
}

.post-card-date {
    font-size: 0.9rem;
    color: var(--text-light);
}

.post-card-title {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
}

.post-card-title a {
    color: var(--text);
    text-decoration: none;
    transition: color 0.3s;
}

.post-card-title a:hover {
    color: var(--primary);
}

.post-card-description {
    color: var(--text-light);
    margin-bottom: 1rem;
    line-height: 1.7;
}

.post-card-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.tag {
    padding: 0.25rem 0.75rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 20px;
    font-size: 0.85rem;
    color: var(--text-light);
}

/* ==========================================
   Post Article
========================================== */

.post-article {
    padding: 3rem 0;
}

.post-header {
    text-align: center;
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 2px solid var(--border);
}

.post-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    line-height: 1.3;
}

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

.post-date {
    color: var(--text-light);
    font-size: 0.95rem;
}

.post-category {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

/* ==========================================
   Markdown Content
========================================== */

.markdown-body {
    font-size: 1.05rem;
    line-height: 1.8;
}

.markdown-body h1,
.markdown-body h2,
.markdown-body h3 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.markdown-body h1 { font-size: 2rem; }
.markdown-body h2 { font-size: 1.5rem; }
.markdown-body h3 { font-size: 1.25rem; }

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

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

.markdown-body li {
    margin-bottom: 0.5rem;
}

.markdown-body code {
    background: var(--bg-secondary);
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-size: 0.9em;
    font-family: 'Courier New', monospace;
}

.markdown-body pre {
    background: #1f2937;
    padding: 1.5rem;
    border-radius: var(--radius);
    overflow-x: auto;
    margin-bottom: 1.5rem;
}

.markdown-body pre code {
    background: none;
    padding: 0;
    color: #e5e7eb;
}

.markdown-body blockquote {
    border-left: 4px solid var(--primary);
    padding-left: 1.5rem;
    margin: 1.5rem 0;
    color: var(--text-light);
    font-style: italic;
}

.markdown-body img {
    max-width: 100%;
    border-radius: var(--radius);
    margin: 1.5rem 0;
}

.markdown-body a {
    color: var(--primary);
    text-decoration: none;
}

.markdown-body a:hover {
    text-decoration: underline;
}

/* ==========================================
   Post Footer
========================================== */

.post-footer {
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 2px solid var(--border);
}

.btn-back {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s;
}

.btn-back:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* ==========================================
   Footer
========================================== */

.blog-footer {
    background: var(--bg-secondary);
    padding: 2rem 0;
    text-align: center;
    color: var(--text-light);
    margin-top: 4rem;
}

/* ==========================================
   Loading & Empty
========================================== */

.loading,
.empty {
    text-align: center;
    padding: 4rem 0;
    color: var(--text-light);
}

/* ==========================================
   Responsive
========================================== */

@media (max-width: 768px) {
    .blog-title {
        font-size: 2rem;
    }
    
    .post-card {
        padding: 1.5rem;
    }
    
    .post-title {
        font-size: 2rem;
    }
    
    .markdown-body {
        font-size: 1rem;
    }
}