:root {
    --primary-color: #007bff;
    /* Aktif tarih için kullanılan vurgu rengi budur */
    --highlight-color: #FFC107; /* Canlı Altın Sarısı */
    --background-color: #f8f9fa;
    --ruler-color: #dee2e6;
    --text-color-dark: #343a40;
    --text-color-light: #6c757d;
}

body, html {
    margin: 0;
    padding: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    height: 100%;
    width: 100%;
    overflow: hidden;
}

.container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    background-color: #e9ecef;
}

#map {
    flex-grow: 1;
}

/* Zaman Tüneli Ana Konteyneri */
.timeline-container {
    height: 150px;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(8px);
    box-shadow: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    box-sizing: border-box;
    position: absolute;
    bottom: 0;
    left: 0;
    z-index: 1000;
}

/* Cetvelin kayacağı çerçeve */
.ruler-wrapper {
    flex-grow: 1;
    height: 100%;
    overflow: hidden;
    position: relative;
    /* YENİ EKLENDİ: Sürükleme imleçleri */
    cursor: grab;
    cursor: -webkit-grab;
}
/* YENİ EKLENDİ: Sürükleme anındaki imleç */
.ruler-wrapper.active-drag {
    cursor: grabbing;
    cursor: -webkit-grabbing;
}

/* Cetvelin kendisi (kayan kısım) */
#ruler {
    display: flex;
    position: absolute;
    top: 50%;
    height: 6px;
    background-color: rgba(255, 255, 255, 0.5);
    border-radius: 3px;
    transition: transform 0.5s ease-in-out;
}

/* Cetvel üzerindeki her bir olay işareti */
.tick {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 2px;
    height: 20px;
    background-color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    transition: all 0.3s ease;
}

/* İşaretin altındaki tarih/başlık */
.tick-label {
    position: absolute;
    bottom: -45px;
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
    font-size: 1em;
    font-weight: 600;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
    transition: all 0.3s ease;
}

/* Aktif olan işaretin stili */
.tick.active {
    background-color: var(--highlight-color);
    height: 40px;
    width: 4px;
    border-radius: 2px;
}
.tick.active .tick-label {
    color: var(--highlight-color);
    font-weight: 700;
    transform: translateX(-50%) scale(1.1);
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.9);
}

.nav-btn { flex-shrink: 0; width: 44px; height: 44px; border-radius: 50%; border: none; background-color: rgba(255, 255, 255, 0.7); backdrop-filter: blur(4px); font-size: 1.2em; color: #333; cursor: pointer; box-shadow: 0 2px 5px rgba(0,0,0,0.1); transition: all 0.2s ease; margin: 0 15px; }
.nav-btn:hover { background-color: var(--primary-color); color: white; }
.custom-popup .leaflet-popup-content { margin: 0; padding: 0; width: 250px !important; }
.custom-popup img { width: 100%; height: auto; border-top-left-radius: 8px; border-top-right-radius: 8px; }
.custom-popup .popup-content { padding: 12px; }
.custom-popup h4 { margin: 0 0 5px 0; color: var(--text-color-dark); }
.custom-popup p { margin: 0; font-size: 0.9em; color: var(--text-color-light); }

/* BİLGİ KARTI STİLLERİ */
.info-card-container {
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 1001; 
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}
.info-btn { width: 44px; height: 44px; border-radius: 50%; border: none; background-color: rgba(255, 255, 255, 0.8); backdrop-filter: blur(5px); font-size: 1.5em; color: var(--text-color-dark); cursor: pointer; box-shadow: 0 2px 6px rgba(0,0,0,0.2); transition: all 0.3s ease; display: flex; justify-content: center; align-items: center; }
.info-btn:hover { background-color: var(--primary-color); color: white; }
.info-card { background-color: rgba(255, 255, 255, 0.9); backdrop-filter: blur(8px); border-radius: 8px; padding: 20px; margin-top: 10px; width: 300px; box-shadow: 0 4px 10px rgba(0,0,0,0.15); font-size: 0.9em; color: var(--text-color-dark); line-height: 1.6; max-height: 0; overflow: hidden; transition: max-height 0.5s ease-out, padding 0.5s ease-out; padding-top: 0; padding-bottom: 0; }
.info-card.show { max-height: 500px; padding-top: 20px; padding-bottom: 20px; }
.info-card h4 { margin-top: 15px; margin-bottom: 5px; color: var(--primary-color); }
.info-card p { margin-bottom: 10px; }
.info-card a { color: var(--primary-color); font-weight: 600; text-decoration: none; }
.info-card a:hover { text-decoration: underline; }
/* YENİ ARAMA KUTUSU STİLLERİ */
#search-container {
    position: absolute;
    top: 20px; /* Biraz aşağı kaydırdık */
    left: 20px; /* Biraz sağa kaydırdık */
    z-index: 1002;
    width: 350px; /* Genişlettik */
    font-family: 'Poppins', sans-serif; /* Daha modern bir font */
}

#search-box {
    width: 100%;
    padding: 12px 18px 12px 50px; /* İkon için soldan boşluk */
    border-radius: 30px; /* Daha yuvarlak */
    border: 1px solid rgba(255, 255, 255, 0.3); /* Hafif beyaz çerçeve */
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.95), rgba(240, 240, 240, 0.9)); /* Hafif degrade */
    backdrop-filter: blur(12px); /* Daha güçlü bulanıklık */
    box-shadow: 0 6px 20px rgba(0,0,0,0.1); /* Daha belirgin gölge */
    font-size: 1.05em; /* Fontu büyüttük */
    color: #333; /* Koyu gri metin */
    outline: none;
    box-sizing: border-box;
    transition: all 0.3s ease; /* Yumuşak geçişler */
}

#search-box:focus {
    border-color: rgba(0, 123, 255, 0.5); /* Odaklandığında mavi çerçeve */
    box-shadow: 0 6px 25px rgba(0, 123, 255, 0.15); /* Mavi tonlu gölge */
    background: linear-gradient(145deg, rgba(255, 255, 255, 1), rgba(245, 245, 245, 1)); /* Daha opak */
}

#search-box::placeholder {
    color: #888; /* Daha orta gri placeholder */
}

.search-icon {
    position: absolute;
    left: 18px; /* Kutu içine konumlandırdık */
    top: 50%;
    transform: translateY(-50%);
    color: #888; /* İkon rengi */
    font-size: 1.2em; /* İkon boyutu */
    pointer-events: none; /* İkon tıklanabilir olmamalı */
    transition: color 0.3s ease;
}

#search-box:focus + .search-icon {
    color: #007bff; /* Odaklandığında ikon rengi değişsin */
}


#search-results {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(245, 245, 245, 0.95)); /* Sonuçlar için de degrade */
    backdrop-filter: blur(10px);
    border-radius: 12px; /* Köşeleri yuvarladık */
    margin-top: 10px; /* Biraz daha boşluk */
    max-height: 450px; /* Max yüksekliği artırdık */
    overflow-y: auto;
    box-shadow: 0 8px 25px rgba(0,0,0,0.12); /* Daha güçlü gölge */
    display: none;
    border: 1px solid rgba(255, 255, 255, 0.4); /* Hafif çerçeve */
    animation: fadeIn 0.3s ease-out forwards; /* Açılış animasyonu */
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.result-item {
    padding: 14px 18px; /* Padding artırıldı */
    cursor: pointer;
    border-bottom: 1px solid rgba(220, 220, 220, 0.7); /* Daha yumuşak ayırıcı */
    transition: background-color 0.2s ease, transform 0.1s ease; /* Transform da eklendi */
    display: flex; /* Flexbox ile içerik hizalama */
    flex-direction: column;
    align-items: flex-start;
}

.result-item:last-child {
    border-bottom: none;
}

.result-item:hover {
    background-color: #f1f7ff; /* Açık mavi hover */
    transform: translateX(3px); /* Hafif sağa kayma efekti */
}

.result-item h5 {
    margin: 0 0 5px 0; /* Boşluk artırıldı */
    color: #333; /* Başlık rengi */
    font-size: 1em; /* Başlık fontu */
    font-weight: 600; /* Daha kalın başlık */
}

.result-item p {
    margin: 0;
    font-size: 0.8em; /* Tarih fontu küçültüldü */
    color: #666; /* Tarih rengi */
}

/* Scrollbar stilini güzelleştirelim (Webkit tabanlı tarayıcılar için) */
#search-results::-webkit-scrollbar {
    width: 8px;
}

#search-results::-webkit-scrollbar-track {
    background: rgba(240, 240, 240, 0.7);
    border-radius: 10px;
}

#search-results::-webkit-scrollbar-thumb {
    background-color: rgba(180, 180, 180, 0.7);
    border-radius: 10px;
    border: 2px solid rgba(240, 240, 240, 0.7);
}

#search-results::-webkit-scrollbar-thumb:hover {
    background-color: rgba(150, 150, 150, 0.8);
}