:root {
    --main-color: #1B3448;
    --accent-color: #d4af37;
    --text-color: #f0f0f0;
    --bg-dark: #122432;
    --white: #ffffff;
    --danger: #e74c3c;
    --success: #2ecc71;
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Segoe UI', sans-serif; }

body { background-color: var(--main-color); color: var(--text-color); display: flex; flex-direction: column; min-height: 100vh; }

/* --- HEADER GÜNCELLENDİ --- */
header { background: rgba(27, 52, 72, 0.98); padding: 15px 5%; border-bottom: 3px solid var(--accent-color); display: flex; justify-content: space-between; align-items: center; }
.logo-area a { text-decoration: none; display: flex; align-items: center; }
.logo-area img { height: 50px; margin-right: 10px; }
.logo-area span { font-size: 1.4rem; font-weight: bold; color: #fff; text-transform: uppercase; }

/* "Ana Sayfaya Dön" Butonu GÜNCELLENDİ */
.back-btn { 
    background-color: var(--accent-color); /* Altın Sarısı Zemin */
    color: var(--main-color); /* Koyu Yazı (Okunabilirlik için) */
    text-decoration: none; 
    border: 2px solid var(--accent-color); 
    padding: 10px 20px; 
    border-radius: 5px; 
    font-weight: bold;
    font-size: 0.95rem;
    transition: 0.3s;
}
.back-btn:hover { 
    background-color: transparent; 
    color: #fff; /* Üzerine gelince beyaz yazı */
    border-color: #fff;
}

.nav-btn { color: var(--accent-color); text-decoration: none; border: 1px solid var(--accent-color); padding: 8px 15px; border-radius: 5px; font-size: 0.9rem; transition: 0.3s; margin-left: 10px; }
.nav-btn:hover { background: var(--accent-color); color: var(--main-color); }
.btn-logout { border-color: var(--danger); color: var(--danger); }
.btn-logout:hover { background: var(--danger); color: #fff; }

/* --- BLOG LAYOUT --- */
.blog-container { display: flex; flex-wrap: wrap; max-width: 1200px; margin: 30px auto; padding: 20px; gap: 30px; flex: 1; }

.sidebar { flex: 1; min-width: 250px; background: rgba(0,0,0,0.2); padding: 20px; border-radius: 8px; height: fit-content; border-top: 4px solid var(--accent-color); }
.sidebar h3 { color: var(--accent-color); margin-bottom: 15px; font-size: 1.2rem; border-bottom: 1px solid rgba(255,255,255,0.1); padding-bottom: 10px; }
.post-list { list-style: none; }
.post-list li { margin-bottom: 8px; }
.post-list a { color: #ccc; text-decoration: none; display: block; padding: 10px; transition: 0.3s; background: rgba(255,255,255,0.03); border-radius: 4px; font-size: 0.95rem; }
.post-list a:hover, .post-list a.active { background: var(--accent-color); color: var(--main-color); padding-left: 15px; font-weight: bold; }

/* --- İÇERİK ALANI DÜZENLENDİ --- */
.main-content { flex: 3; min-width: 300px; background: #fff; color: #333; padding: 40px; border-radius: 8px; box-shadow: 0 5px 25px rgba(0,0,0,0.5); }
.blog-image { width: 100%; max-height: 450px; object-fit: cover; border-radius: 5px; margin-bottom: 25px; border: 1px solid #ddd; }

/* Başlık ve Tarih Ayarları */
.blog-title { 
    color: var(--main-color); 
    margin-bottom: 5px; /* Başlık ile tarih arası boşluk */
    font-size: 2.2rem; 
    line-height: 1.2; 
    display: block; /* Kesinlikle alt satıra geçmesi için */
    width: 100%;
}

.blog-date { 
    color: #888; 
    font-size: 0.9rem; 
    margin-bottom: 25px; /* Tarih ile metin arası boşluk */
    display: block; /* Alt satırda durması için */
    font-style: italic;
    border-bottom: 2px solid var(--accent-color); /* Tarihin altına çizgi */
    padding-bottom: 15px;
    width: 100%;
}

.blog-text { line-height: 1.8; font-size: 1.1rem; white-space: pre-wrap; color: #444; }

/* --- ADMIN PANELİ (Aynı Kaldı) --- */
.login-box { max-width: 400px; margin: 100px auto; background: #fff; padding: 40px; border-radius: 8px; color: #333; text-align: center; }
.admin-container { max-width: 1200px; margin: 30px auto; padding: 20px; }
.admin-form-card { background: #fff; padding: 30px; border-radius: 8px; color: #333; margin-bottom: 40px; border-top: 5px solid var(--accent-color); }
.form-title { font-size: 1.5rem; margin-bottom: 20px; color: var(--main-color); display: flex; justify-content: space-between; align-items: center; }
.form-group { margin-bottom: 20px; }
.form-group label { display: block; margin-bottom: 8px; font-weight: bold; color: #555; }
.form-group input[type="text"], .form-group input[type="file"], .form-group input[type="password"], .form-group textarea { width: 100%; padding: 12px; border: 1px solid #ddd; border-radius: 4px; font-size: 1rem; outline: none; transition: 0.3s; }
.form-group input:focus, .form-group textarea:focus { border-color: var(--accent-color); }
.btn-submit { background: var(--main-color); color: #fff; padding: 12px 25px; border: none; cursor: pointer; font-size: 1rem; border-radius: 4px; transition: 0.3s; font-weight: bold; width: 100%; }
.btn-submit:hover { background: var(--accent-color); color: var(--main-color); }
.admin-list-card { background: #fff; padding: 30px; border-radius: 8px; color: #333; }
.admin-table { width: 100%; border-collapse: collapse; margin-top: 20px; }
.admin-table th, .admin-table td { padding: 15px; border-bottom: 1px solid #eee; text-align: left; }
.admin-table th { background: #f4f4f4; color: var(--main-color); font-weight: bold; }
.thumb-img { width: 60px; height: 40px; object-fit: cover; border-radius: 3px; }
.action-btn { text-decoration: none; padding: 6px 12px; border-radius: 4px; font-size: 0.85rem; color: #fff; display: inline-block; margin-right: 5px; }
.btn-edit { background: #3498db; }
.btn-delete { background: var(--danger); }
.preview-area { margin-top: 20px; padding: 20px; border: 2px dashed #ccc; background: #f9f9f9; display: none; }

@media (max-width: 768px) {
    .blog-container { flex-direction: column; }
    .sidebar { width: 100%; }
    .admin-table thead { display: none; }
    .admin-table tr { display: block; margin-bottom: 15px; border: 1px solid #ddd; }
    .admin-table td { display: block; text-align: right; border-bottom: none; }
    .admin-table td::before { content: attr(data-label); float: left; font-weight: bold; }
}