* {
    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: #f5f5f5;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Header */
.site-header {
    background: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.site-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo a {
    font-size: 24px;
    font-weight: bold;
    color: #2563eb;
    text-decoration: none;
}

.main-nav ul {
    list-style: none;
    display: flex;
    gap: 25px;
}

.main-nav a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: color 0.3s;
}

.main-nav a:hover {
    color: #2563eb;
}

/* Ad Banners */
.ad-banner {
    background: #e5e7eb;
    padding: 10px 0;
    margin: 20px 0;
    text-align: center;
}

.ad-placeholder {
    background: #d1d5db;
    padding: 40px;
    display: inline-block;
    border-radius: 4px;
    color: #6b7280;
}

/* Main Content */
.site-content {
    display: flex;
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 15px;
}

.main-content {
    flex: 2;
    background: #fff;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* Sidebar */
.sidebar {
    flex: 1;
}

.widget {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.widget h3 {
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #2563eb;
    color: #2563eb;
}

.popular-posts ul {
    list-style: none;
}

.popular-posts li {
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e5e7eb;
}

.popular-posts li:last-child {
    border-bottom: none;
}

.popular-posts a {
    display: flex;
    gap: 10px;
    text-decoration: none;
    color: #333;
}

.popular-posts img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
}

.popular-posts span {
    font-weight: 500;
    font-size: 14px;
}

.popular-posts small {
    display: block;
    color: #6b7280;
    font-size: 12px;
    margin-top: 3px;
}

/* Posts List */
.posts-list {
    display: grid;
    gap: 25px;
}

.post-item {
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 25px;
}

.post-item:last-child {
    border-bottom: none;
}

.post-item h2 {
    margin-bottom: 10px;
}

.post-item h2 a {
    color: #1f2937;
    text-decoration: none;
    font-size: 20px;
    transition: color 0.3s;
}

.post-item h2 a:hover {
    color: #2563eb;
}

.post-meta {
    color: #6b7280;
    font-size: 14px;
    margin-bottom: 10px;
}

.post-excerpt {
    color: #4b5563;
    line-height: 1.6;
}

.post-thumbnail {
    margin-bottom: 15px;
}

.post-thumbnail img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: 8px;
}

/* Single Post */
.single-post h1 {
    font-size: 32px;
    margin-bottom: 15px;
    color: #1f2937;
}

.single-post .post-meta {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e5e7eb;
}

.single-post .featured-image {
    margin: 25px 0;
}

.single-post .featured-image img {
    width: 100%;
    border-radius: 8px;
}

.single-post .post-content {
    font-size: 18px;
    line-height: 1.8;
    color: #374151;
}

.single-post .post-content p {
    margin-bottom: 20px;
}

.single-post .post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 20px 0;
}

/* Footer */
.site-footer {
    background: #1f2937;
    color: #fff;
    padding: 30px 0;
    margin-top: 40px;
}

.site-footer .container {
    text-align: center;
}

.footer-links {
    margin-top: 15px;
}

.footer-links a {
    color: #9ca3af;
    text-decoration: none;
    margin: 0 10px;
    font-size: 14px;
}

.footer-links a:hover {
    color: #fff;
}

/* Responsive */
@media (max-width: 768px) {
    .site-content {
        flex-direction: column;
    }
    
    .site-header .container {
        flex-direction: column;
        gap: 15px;
    }
    
    .main-nav ul {
        flex-wrap: wrap;
        justify-content: center;
        gap: 15px;
    }
    
    .single-post h1 {
        font-size: 24px;
    }
}

/* Admin Styles */
.admin-login {
    max-width: 400px;
    margin: 100px auto;
    padding: 30px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 10px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-size: 14px;
}

.form-group textarea {
    min-height: 150px;
    resize: vertical;
}

.btn {
    display: inline-block;
    padding: 10px 20px;
    background: #2563eb;
    color: #fff;
    text-decoration: none;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s;
}

.btn:hover {
    background: #1d4ed8;
}

.btn-danger {
    background: #dc2626;
}

.btn-danger:hover {
    background: #b91c1c;
}

.admin-header {
    background: #1f2937;
    color: #fff;
    padding: 15px 0;
    margin-bottom: 30px;
}

.admin-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.admin-header a {
    color: #fff;
    text-decoration: none;
}

.admin-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 15px;
}

.posts-table {
    width: 100%;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.posts-table table {
    width: 100%;
    border-collapse: collapse;
}

.posts-table th,
.posts-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
}

.posts-table th {
    background: #f9fafb;
    font-weight: 600;
}

.posts-table tr:hover {
    background: #f9fafb;
}

.pagination {
    display: flex;
    justify-content: center;
    gap: 5px;
    margin-top: 20px;
}

.pagination a,
.pagination span {
    padding: 8px 12px;
    background: #fff;
    border: 1px solid #d1d5db;
    text-decoration: none;
    color: #333;
    border-radius: 4px;
}

.pagination a:hover {
    background: #2563eb;
    color: #fff;
    border-color: #2563eb;
}

.pagination .current {
    background: #2563eb;
    color: #fff;
    border-color: #2563eb;
}