:root {
    --bg-color: #f7f3fb; /* Çok uçuk lila/mor */
    --primary-color: #9b72cf; /* Soft ve şık bir mor */
    --primary-hover: #825db5;
    --text-color: #4a3f55;
    --card-bg: #ffffff;
    --timeline-color: #e2d5f0;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; background-color: var(--bg-color); color: var(--text-color); }

/* Header */
header { text-align: center; padding: 40px 20px; background: var(--card-bg); box-shadow: 0 4px 15px rgba(155, 114, 207, 0.08); margin-bottom: 40px; border-bottom: 3px solid var(--primary-color); }
header h1 { color: var(--primary-color); font-weight: 300; letter-spacing: 2px; }
header a { text-decoration: none; color: var(--text-color); font-size: 0.9em; margin-top: 10px; display: inline-block; transition: color 0.3s;}
header a:hover { color: var(--primary-color); }

/* Timeline & Cards (Aynı kalıyor, renkler değişkenden besleniyor) */
.timeline-container { max-width: 800px; margin: 0 auto; position: relative; padding: 0 20px; }
.timeline-container::before { content: ''; position: absolute; left: 50%; transform: translateX(-50%); width: 4px; height: 100%; background-color: var(--timeline-color); border-radius: 2px; }
.memory-card { background: var(--card-bg); border-radius: 16px; padding: 25px; margin-bottom: 40px; box-shadow: 0 10px 30px rgba(155, 114, 207, 0.05); position: relative; width: calc(50% - 30px); }
.memory-card:nth-child(odd) { margin-left: auto; }
.memory-card::before { content: ''; position: absolute; top: 30px; width: 20px; height: 20px; background: var(--primary-color); border-radius: 50%; box-shadow: 0 0 0 4px var(--bg-color); }
.memory-card:nth-child(odd)::before { left: -40px; }
.memory-card:nth-child(even)::before { right: -40px; }
.memory-date { font-size: 0.85em; color: #888; margin-bottom: 10px; font-weight: 600; }
.memory-note { line-height: 1.6; margin-bottom: 20px; }

/* CSS Kolaj & Lightbox */
.collage { display: grid; gap: 8px; border-radius: 12px; overflow: hidden; }
.collage img { width: 100%; height: 100%; object-fit: cover; cursor: pointer; transition: transform 0.3s ease; border-radius: 8px; }
.collage img:hover { transform: scale(1.03); }
.collage[data-count="1"] { grid-template-columns: 1fr; }
.collage[data-count="1"] img { max-height: 400px; }
.collage[data-count="2"] { grid-template-columns: 1fr 1fr; height: 250px;}
.collage[data-count="3"] { grid-template-columns: 1fr 1fr; grid-template-rows: 150px 150px; }
.collage[data-count="3"] img:first-child { grid-column: span 2; }
.collage[data-count="4"], .collage[data-count="more"] { grid-template-columns: 1fr 1fr; grid-auto-rows: 150px;}
.lightbox { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(30, 20, 40, 0.9); z-index: 1000; justify-content: center; align-items: center; opacity: 0; transition: opacity 0.3s; }
.lightbox.active { display: flex; opacity: 1; }
.lightbox img { max-width: 90%; max-height: 90%; border-radius: 8px; box-shadow: 0 0 20px rgba(0,0,0,0.5); }
.lightbox-close { position: absolute; top: 20px; right: 30px; color: white; font-size: 40px; cursor: pointer; }

/* Admin Panel */
.admin-container { max-width: 600px; margin: 40px auto; background: var(--card-bg); padding: 30px; border-radius: 16px; box-shadow: 0 10px 30px rgba(155, 114, 207, 0.1); }
.form-group { margin-bottom: 20px; }
.form-group label { display: block; margin-bottom: 8px; color: #666; font-size: 0.9em; }
.form-control { width: 100%; padding: 12px; border: 1px solid #ddd; border-radius: 8px; font-family: inherit; outline: none; transition: border-color 0.3s; }
.form-control:focus { border-color: var(--primary-color); }
button { width: 100%; padding: 12px; background: var(--primary-color); color: white; border: none; border-radius: 8px; font-size: 1em; cursor: pointer; transition: background 0.3s; font-weight: 600; }
button:hover { background: var(--primary-hover); }

/* Yönetim Listesi */
.admin-memory-item { border: 1px solid #eee; padding: 15px; border-radius: 8px; margin-bottom: 15px; display: flex; justify-content: space-between; align-items: center; }
.admin-memory-info { flex-grow: 1; }
.admin-memory-actions button { width: auto; padding: 8px 15px; font-size: 0.85em; margin-left: 5px; }
.btn-delete { background: #e74c3c; }
.btn-delete:hover { background: #c0392b; }
.btn-edit { background: #f39c12; }
.btn-edit:hover { background: #d68910; }
hr { border: 0; height: 1px; background: #eee; margin: 30px 0; }

/* Mobil Uyumluluk (Telefon Ekranları İçin Kesin Çözüm) */
@media (max-width: 768px) {
    .timeline-container::before {
        left: 20px; /* Zaman çizgisini sola yasla */
    }
    .memory-card {
        width: calc(100% - 40px); 
        margin-left: 40px !important; 
        padding: 20px;
    }
    .memory-card::before {
        left: -30px !important; 
        right: auto !important;
    }
    
    /* Üst üste binmeyi engelleyen yeni kolaj yapısı */
    .collage {
        display: flex !important; /* Izgara yerine esnek kutu yapısına geç */
        flex-direction: column !important; /* Fotoğrafları alt alta diz */
        gap: 12px !important; /* Aralarına temiz bir boşluk bırak */
        height: auto !important; /* Masaüstü yükseklik sınırlarını kaldır */
    }
    
    .collage img {
        width: 100% !important;
        height: auto !important; /* Orijinal oranını koruyarak küçülsün */
        max-height: 300px !important; /* Çok uzun dikey fotoğrafları dizginle */
        object-fit: cover !important;
        grid-column: auto !important; /* Masaüstü sütun ayarlarını sıfırla */
    }
}
/* Modern Bildirimler (Toast) */
#toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    padding: 15px 25px;
    border-radius: 8px;
    color: white;
    font-size: 0.95em;
    font-weight: 500;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
    animation: slideIn 0.3s ease-out forwards;
    min-width: 250px;
    pointer-events: none;
}

.toast.success { background-color: var(--primary-color); }
.toast.error { background-color: #e74c3c; }

@keyframes slideIn {
    from { transform: translateX(120%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes fadeOut {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(120%); opacity: 0; }
}

/* Mobilde bildirimlerin ekranı kaplamaması için ufak bir ayar */
@media (max-width: 768px) {
    #toast-container {
        top: 10px;
        right: 10px;
        left: 10px;
    }
    .toast { min-width: unset; width: 100%; text-align: center; }
}