* { box-sizing: border-box; }

body { 
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Inter", Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: #1a1a1a;
    background: #fafafa;
    margin: 0;
    padding: 0;
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

header { 
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%); 
    padding: 30px 0; 
    border-bottom: 1px solid #e8e8e8;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

header h1 { 
    margin: 0; 
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.02em;
}

header h1 a { 
    text-decoration: none; 
    color: #1a1a1a;
    transition: color 0.2s ease;
}

header h1 a:hover {
    color: #4f46e5;
}

header p { 
    margin: 8px 0 0; 
    color: #6b7280;
    font-size: 15px;
    font-weight: 400;
}

main { 
    padding: 50px 0; 
    background: #ffffff;
    min-height: 60vh;
}

article { 
    margin-bottom: 48px; 
    padding: 32px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    border: 1px solid #f0f0f0;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

article:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}


article h2 { 
    margin: 0 0 12px; 
    font-size: 22px;
    font-weight: 600;
    letter-spacing: -0.01em;
    line-height: 1.3;
}

article h2 a { 
    text-decoration: none; 
    color: #1a1a1a;
    transition: color 0.2s ease;
}

article h2 a:hover { 
    color: #4f46e5; 
}

.meta { 
    font-size: 14px; 
    color: #6b7280; 
    margin-bottom: 16px;
    font-weight: 500;
}

.content { 
    line-height: 1.7;
    color: #374151;
}

.content p { 
    margin: 0 0 18px; 
}

.pagination { 
    text-align: center; 
    margin: 40px 0; 
}

.pagination a { 
    text-decoration: none; 
    color: #111; 
    margin: 0 10px;
}

footer { 
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%); 
    padding: 30px 0; 
    border-top: 1px solid #e8e8e8;
    text-align: center;
    margin-top: 60px;
}

footer p { 
    margin: 0; 
    font-size: 14px; 
    color: #6b7280;
    font-weight: 500;
}

h1, h2, h3, h4, h5, h6 { 
    font-weight: 600; 
    line-height: 1.2; 
}

a { 
    color: #111; 
}

img { 
    max-width: 100%; 
    height: auto; 
}

/* Search form */
.search-form {
    margin: 20px 0;
}

.search-form input {
    padding: 12px 16px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    width: 220px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    background: #ffffff;
}

.search-form input:focus {
    outline: none;
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.search-form button {
    padding: 12px 20px;
    background: #4f46e5;
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    margin-left: 8px;
    font-weight: 500;
    transition: background-color 0.2s ease, transform 0.1s ease;
}

.search-form button:hover {
    background: #4338ca;
    transform: translateY(-1px);
}

.search-form button:active {
    transform: translateY(0);
}

/* Featured images and thumbnails */
.featured-image {
    margin-bottom: 20px;
}

.thumbnail {
    float: left;
    margin: 0 20px 10px 0;
    max-width: 200px;
}

.thumbnail img {
    border-radius: 4px;
}

.read-more {
    display: inline-block;
    margin-top: 16px;
    padding: 10px 18px;
    background: #f3f4f6;
    text-decoration: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    transition: all 0.2s ease;
    border: 1px solid #e5e7eb;
}

.read-more:hover {
    background: #4f46e5;
    color: #ffffff;
    border-color: #4f46e5;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(79, 70, 229, 0.2);
}

/* Categories and tags */
.meta a {
    text-decoration: none;
    color: #666;
}

.meta a:hover {
    color: #111;
}

/* Enhanced pagination */
.pagination .page-numbers {
    display: inline-block;
    padding: 8px 12px;
    margin: 0 2px;
    text-decoration: none;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.pagination .page-numbers:hover,
.pagination .page-numbers.current {
    background: #111;
    color: #fff;
    border-color: #111;
}

.pagination ul {
    list-style: none;
    padding: 0;
    margin: 20px 0;
    text-align: center;
}

.pagination li {
    display: inline-block;
    margin: 0 2px;
}

/* Comments */
.comments {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 1px solid #eee;
}

/* No results */
.no-results {
    text-align: center;
    padding: 40px 0;
}

.no-results h2 {
    margin-bottom: 20px;
    color: #666;
}

/* Archive headers */
header h2 {
    margin: 10px 0;
    font-size: 18px;
    color: #666;
}

/* Single post styles */
.single-post h1 {
    font-size: 28px;
    margin-bottom: 15px;
}

.post-navigation {
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
    padding: 20px 0;
    margin: 30px 0;
}

.nav-previous, .nav-next {
    display: inline-block;
    width: 48%;
}

.nav-next {
    text-align: right;
    float: right;
}

.nav-previous a, .nav-next a {
    text-decoration: none;
    padding: 10px 15px;
    background: #f9f9f9;
    border-radius: 4px;
    display: block;
}

.nav-previous a:hover, .nav-next a:hover {
    background: #eee;
}

/* Archive pages */
.archive-header {
    background: #f9f9f9;
    padding: 20px;
    margin: 20px 0;
    border-radius: 4px;
}

.archive-header h2 {
    margin: 0 0 10px 0;
    font-size: 24px;
}

.archive-description {
    color: #666;
    line-height: 1.6;
}

.archive-post {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    padding-bottom: 30px;
    border-bottom: 1px solid #eee;
}

.archive-post .thumbnail {
    flex: 0 0 150px;
    margin: 0;
}

.archive-post .post-content {
    flex: 1;
}

.archive-post h3 {
    margin: 0 0 10px 0;
    font-size: 18px;
}

.archive-post h3 a {
    text-decoration: none;
    color: #111;
}

.archive-post h3 a:hover {
    color: #666;
}

/* Search results */
.search-header {
    background: #f9f9f9;
    padding: 20px;
    margin: 20px 0;
    border-radius: 4px;
    text-align: center;
}

.search-header h2 {
    margin: 0 0 10px 0;
    font-size: 22px;
}

.search-header p {
    margin: 0;
    color: #666;
}

.search-result {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
    padding-bottom: 25px;
    border-bottom: 1px solid #eee;
}

.search-result .thumbnail {
    flex: 0 0 80px;
    margin: 0;
}

.search-result .result-content {
    flex: 1;
}

.search-result h3 {
    margin: 0 0 8px 0;
    font-size: 16px;
}

.search-suggestions {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 4px;
    margin: 20px 0;
}

.search-suggestions h3 {
    margin: 0 0 15px 0;
}

.search-suggestions ul {
    margin: 0;
    padding-left: 20px;
}

/* 404 page */
.error-404 {
    text-align: center;
    padding: 40px 0;
}

.error-404 h1 {
    font-size: 48px;
    margin-bottom: 20px;
    color: #666;
}

.error-actions {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 4px;
    margin: 30px 0;
    text-align: left;
}

.error-actions h3 {
    margin: 0 0 15px 0;
}

.error-actions ul {
    margin: 0;
    padding-left: 20px;
}

.error-actions li {
    margin-bottom: 8px;
}

.recent-posts {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 4px;
    margin: 30px 0;
    text-align: left;
}

.recent-posts h3 {
    margin: 0 0 15px 0;
}

.recent-posts ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.recent-posts li {
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.recent-posts li:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.recent-posts .date {
    color: #666;
    font-size: 12px;
    margin-left: 10px;
}

/* Page content */
.page-content h1 {
    font-size: 28px;
    margin-bottom: 20px;
}

/* Responsive */
@media (max-width: 768px) {
    header {
        padding: 20px 0;
    }
    
    header h1 {
        font-size: 24px;
    }
    
    main {
        padding: 30px 0;
    }
    
    article {
        padding: 24px;
        margin-bottom: 32px;
    }
    
    article h2 {
        font-size: 20px;
    }
    
    .container {
        padding: 0 20px;
    }
}

@media (max-width: 600px) {
    .thumbnail {
        float: none;
        margin: 0 0 15px 0;
        max-width: 100%;
    }
    
    .search-form {
        display: flex;
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
    }
    
    .search-form input {
        width: 100%;
        margin: 0;
    }
    
    .search-form button {
        margin-left: 0;
        align-self: flex-start;
    }
    
    .container {
        padding: 0 16px;
    }
    
    article {
        padding: 20px;
        border-radius: 8px;
    }
    
    header {
        padding: 16px 0;
    }
    
    header h1 {
        font-size: 22px;
    }
    
    main {
        padding: 24px 0;
    }
    
    .archive-post, .search-result {
        flex-direction: column;
    }
    
    .archive-post .thumbnail, .search-result .thumbnail {
        flex: none;
        max-width: 100%;
        margin-bottom: 15px;
    }
    
    .nav-previous, .nav-next {
        width: 100%;
        margin-bottom: 10px;
    }
    
    .nav-next {
        text-align: left;
        float: none;
    }
    
    .error-404 h1 {
        font-size: 36px;
    }
}