body {
    margin: 0;
    font-family: 'Segoe UI', Arial, sans-serif;
    background: linear-gradient(135deg, #f7fafc 0%, #e3e9f3 100%);
    min-height: 100vh;
}
.container {
    display: flex;
    max-width: 1100px;
    margin: 48px auto 0 auto;
    min-height: 80vh;
    gap: 32px; /* Sidebar ve feed arasındaki boşluk */
}
.sidebar {
    width: 240px;
    background: #fff;
    padding: 32px 20px 32px 20px;
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.06);
    border: none;
    margin-top: 0;
    height: fit-content;
}
.sidebar h2 {
    font-size: 1.25em;
    margin-bottom: 18px;
    font-weight: 700;
    color: #222;
}
.sidebar ul {
    list-style: none;
    padding: 0;
    margin-bottom: 18px;
}
.sidebar li {
    margin-bottom: 10px;
}
.sidebar a {
    color: #333;
    text-decoration: none;
    padding: 8px 12px;
    border-radius: 6px;
    display: block;
    font-size: 1.05em;
    transition: background 0.2s, color 0.2s;
}
.sidebar a.active, .sidebar a:hover {
    background: #e3e9f3;
    color: #1976d2;
}
.admin-link {
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid #eee;
}
.admin-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: #1976d2;
    color: #fff;
    text-decoration: none;
    border-radius: 8px;
    font-size: 1em;
    font-weight: 500;
    transition: background 0.2s;
    margin-top: 8px;
}
.admin-btn:hover {
    background: #1251a3;
}
.feed {
    flex: 1; /* Kalan alanı kapla */
    padding: 0 0 32px 0;
    display: flex;
    flex-direction: column;
    gap: 24px;
    align-items: center;
    margin-left: 0; /* Sol boşluğu sıfırla */
    padding-left: 0; /* Sol dolguyu sıfırla */
    /* width kaldırıldı, flex: 1 ile genişlik ayarlanacak */
}
.post-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.2s;
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
}
.post-card:hover {
    transform: translateY(-5px);
}
.post-card img {
    width: 100%;
    height: 500px;
    object-fit: cover;
}
.post-content {
    padding: 20px;
}
.post-content h2 {
    margin: 0 0 10px;
    font-size: 1.5em;
}
.post-content h2 a {
    color: #333;
    text-decoration: none;
}
.post-content h2 a:hover {
    color: #1976d2;
}
.post-meta {
    display: flex;
    gap: 15px;
    color: #666;
    font-size: 0.9em;
    margin-bottom: 10px;
}
.post-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}
.post-content p {
    color: #666;
    line-height: 1.6;
    margin-bottom: 15px;
}
.read-more {
    display: inline-block;
    color: #1976d2;
    text-decoration: none;
    font-weight: 500;
}
.read-more:hover {
    text-decoration: underline;
}

@media (max-width: 1100px) {
    .container {
        flex-direction: column;
        gap: 0;
        max-width: 100vw;
        padding: 0 0 32px 0; /* Mobil padding geri alındı */
        margin-top: 48px; /* Mobil margin-top geri alındı */
    }
    .sidebar {
        width: 100%; /* Mobil genişlik */
        margin: 0 auto 24px auto; /* Mobil margin */
        border-radius: 0 0 16px 16px; /* Mobil border-radius */
        box-shadow: 0 2px 12px rgba(0,0,0,0.04); /* Mobil box-shadow */
        /* Position, top, left, height, transition, z-index, overflow-y mobil menüye aitti, kaldırıldı */
    }
    /* .sidebar.open, .mobile-header, .container.sidebar-open stilleri mobil menüye aitti, kaldırıldı */

    .feed {
        padding: 0 0 32px 0; /* Mobil padding geri alındı */
        width: auto; /* Responsive genişlik geri alındı */
        flex-shrink: 1; /* Responsive flex-shrink geri alındı */
        /* flex-grow burada olmamalı, masaüstü stilinde */
    }
}
@media (max-width: 700px) {
    .container {
        margin: 0;
        padding: 0;
    }
    .sidebar {
        padding: 18px 8px;
        border-radius: 0;
    }
    .feed {
        gap: 24px;
        padding: 0 16px 24px 16px;
    }
    .post-card {
        width: 100%;
    }
    .post-card img {
        height: 300px; /* Orijinal 700px altı yükseklik */
    }
}

/* Detay sayfası stilleri */
.detail-container {
    max-width: 800px;
    margin: 40px auto;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
    padding: 40px;
}
.detail-container img {
    width: 90%;
    max-width: 500px;
    height: auto;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 12px;
    margin: 0 auto 32px;
    display: block;
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}
.detail-container h1 {
    margin: 0 0 20px 0;
    font-size: 2em;
    color: #333;
    text-align: center;
}
.detail-meta {
    color: #666;
    font-size: 1em;
    margin-bottom: 32px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
    text-align: center;
}
.detail-desc {
    font-size: 1.1em;
    line-height: 1.8;
    color: #444;
    margin-bottom: 32px;
    text-align: justify;
    padding: 0 20px;
}
.detail-container a {
    color: #1976d2;
    text-decoration: none;
    font-size: 1em;
    display: inline-block;
    margin-top: 20px;
    padding: 8px 16px;
    border-radius: 6px;
    background: #f5f5f5;
    transition: background 0.2s;
}
.detail-container a:hover {
    background: #e0e0e0;
    text-decoration: none;
}

/* Admin paneli özel */
.admin-header {
    margin-top: 40px;
}
.posts-table {
    margin-top: 0;
}

/* Admin paneli için */
.admin-container {
    max-width: 1200px;
    margin: 40px auto 0 auto;
    padding: 0 24px 40px 24px;
    display: block; /* Elementler alt alta gelsin */
    min-height: 0;
}

/* Admin Paneli Sidebar */
.admin-container .sidebar {
    /* flex-shrink: 0; /* Admin içindeki sidebar küçülmesin */ */
}

/* Mobil Menü Stilleri */
.mobile-header {
    display: none;
    background: #fff;
    padding: 10px 15px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    align-items: center;
    justify-content: space-between;
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 100;
}

.mobile-header h1 {
    margin: 0;
    font-size: 1.2em;
}

.mobile-header .menu-toggle {
    background: none;
    border: none;
    font-size: 1.5em;
    cursor: pointer;
    color: #333;
}

/* İsteğe bağlı: Sidebar açıkken içeriği sağa kaydırma */
.container.sidebar-open .feed {
    transform: translateX(240px);
    transition: transform 0.3s ease;
}

/* Sidebar açıkken overlay */
.container.sidebar-open::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 98;
    cursor: pointer;
}

/* Admin Paneli İçerik Alanı */
.admin-container .content {
    /* flex: 1; /* Kalan alanı kapla */ */
    padding: 0 0 32px 0; /* İhtiyaca göre boşluk */
    display: block; /* İçindeki elementler alt alta gelsin */
    flex-direction: column;
    gap: 20px; /* İçindeki elementler arası boşluk */
}