* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    line-height: 1.6;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: #333;
    background-color: #fafafa;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header & Navigation */
.site-header {
    background-color: #2c3e50;
    color: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.site-nav-inner {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 20px;
    flex-wrap: wrap;
}

.site-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: white;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.site-logo {
    height: 50px;
    width: auto;
    max-width: 150px;
    object-fit: contain;
}

.site-title:hover {
    color: #3498db;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

.nav-links a {
    color: white;
    text-decoration: none;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: #3498db;
}

/* Main Content */
main {
    min-height: calc(100vh - 300px);
    padding: 2rem 0;
}

/* Posts List */
.posts-list {
    display: grid;
    gap: 2rem;
}

.post-card {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.post-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.post-card h2 {
    margin: 0 0 0.5rem 0;
}

.post-card a {
    color: #2c3e50;
    text-decoration: none;
}

.post-card a:hover {
    color: #3498db;
}

.post-card .excerpt {
    color: #666;
    margin: 1rem 0;
}

.post-meta {
    font-size: 0.9rem;
    color: #999;
}

/* Individual Post */
.post {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.post-header {
    border-bottom: 2px solid #ecf0f1;
    padding-bottom: 1.5rem;
    margin-bottom: 1.5rem;
}

.post-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.post-meta {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
    font-size: 0.95rem;
    color: #999;
}

.post-content {
    font-size: 1.05rem;
    line-height: 1.8;
    margin-bottom: 2rem;
}

.post-content h2 {
    margin: 1.5rem 0 1rem 0;
    font-size: 1.8rem;
    color: #2c3e50;
}

.post-content h3 {
    margin: 1.2rem 0 0.8rem 0;
    font-size: 1.3rem;
    color: #34495e;
}

.post-content p {
    margin-bottom: 1rem;
    text-align: justify;
}

.post-content ul,
.post-content ol {
    margin: 1rem 0 1rem 2rem;
}

.post-content li {
    margin-bottom: 0.5rem;
}

.post-footer {
    border-top: 2px solid #ecf0f1;
    padding-top: 1rem;
}

.post-tags {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.post-tags a {
    display: inline-block;
    background-color: #ecf0f1;
    color: #2c3e50;
    padding: 0.4rem 0.8rem;
    border-radius: 4px;
    text-decoration: none;
    transition: background-color 0.3s;
}

.post-tags a:hover {
    background-color: #3498db;
    color: white;
}

/* Ad Container */
.ad-container {
    background: white;
    padding: 1rem;
    border-radius: 8px;
    margin: 2rem 0;
    text-align: center;
    min-height: 250px;
}

/* Related Posts */
.related-posts {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    margin-top: 2rem;
}

.related-posts h2 {
    margin-bottom: 1.5rem;
    color: #2c3e50;
}

.related-posts-list {
    list-style: none;
}

.related-posts-list li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #ecf0f1;
}

.related-posts-list li:last-child {
    border-bottom: none;
}

.related-posts-list a {
    color: #3498db;
    text-decoration: none;
    transition: color 0.3s;
}

.related-posts-list a:hover {
    color: #2c3e50;
    text-decoration: underline;
}

/* Footer */
.site-footer {
    background-color: #2c3e50;
    color: white;
    padding: 3rem 20px 1rem;
    margin-top: 3rem;
}

.footer-content {
    max-width: 900px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    margin-bottom: 1rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: #ecf0f1;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-section a:hover {
    color: #3498db;
}

.footer-bottom {
    max-width: 900px;
    margin: 0 auto;
    border-top: 1px solid #34495e;
    padding-top: 1rem;
    text-align: center;
    color: #bdc3c7;
    font-size: 0.9rem;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin: 2rem 0;
    flex-wrap: wrap;
}

.pagination a,
.pagination span {
    padding: 0.5rem 1rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-decoration: none;
    color: #2c3e50;
    transition: all 0.3s;
}

.pagination a:hover {
    background-color: #3498db;
    color: white;
    border-color: #3498db;
}

.pagination .active {
    background-color: #3498db;
    color: white;
    border-color: #3498db;
}

/* Responsive */
@media (max-width: 768px) {
    .post-title {
        font-size: 1.8rem;
    }
    
    .nav-links {
        gap: 1rem;
    }
    
    .site-nav-inner {
        flex-direction: column;
        gap: 1rem;
    }
    
    .post-content h2 {
        font-size: 1.5rem;
    }
    
    .post-meta {
        flex-direction: column;
        gap: 0.5rem;
    }
}

/* Blockquote */
.post-content blockquote {
    border-left: 4px solid #3498db;
    padding-left: 1rem;
    margin: 1rem 0;
    color: #666;
    font-style: italic;
}

/* Code blocks */
.post-content code {
    background-color: #f4f4f4;
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
}

.post-content pre {
    background-color: #2c3e50;
    color: #ecf0f1;
    padding: 1rem;
    border-radius: 4px;
    overflow-x: auto;
    margin: 1rem 0;
}

.post-content pre code {
    background: none;
    color: #ecf0f1;
    padding: 0;
}

/* Images */
.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    margin: 1rem 0;
}
