:root {
    --primary-bg-light: #86A8E7;
    --primary-bg-dark: #181818;
    --secondary-bg: #0a0000;
    --card-bg-color: rgba(255, 255, 255, 0.1); /* Yarı şeffaf beyaz */
    --text-color: #ffffff;
    --light-text-color: rgba(255, 255, 255, 0.95);
    --border-color: rgba(255, 255, 255, 0.4);
    --shadow-color: rgba(229, 9, 9, 0.88);
    --error-color: #e74c3c;
    --detail-bg-color: rgba(0, 0, 0, 0.6); /* Detay kutuları için */
    --table-header-bg: rgba(255, 255, 255, 0.3);
    --table-row-hover: rgba(255, 255, 255, 0.2);
}

body {
    font-family: 'Montserrat', sans-serif;
    background: linear-gradient(135deg, var(--primary-bg-dark), var(--primary-bg-light), var(--secondary-bg));
    color: var(--text-color);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    overflow-x: hidden;
    padding: 20px;
    box-sizing: border-box;
    line-height: 1.6;
}

.container {
    width: 100%;
    max-width: 800px;
    box-sizing: border-box;
}

/* --- MENÜ STİLLERİ (GENEL) --- */
.menu-container {
    display: flex; /* İç elemanları yatay hizala */
    flex-wrap: nowrap; /* ! ÖNEMLİ: Elemanların kesinlikle alt satıra inmesini engeller */
    gap: 15px; /* Elemanlar arası boşluk */
    align-items: center; /* Elemanları dikeyde ortala */
    justify-content: center; /* Elemanları yatayda ortala */
    padding: 15px 20px;
    background-color: var(--card-bg-color); /* Menü arkaplan rengini tema değişkeninden al */
    border-bottom: 1px solid var(--border-color); /* Border rengini tema değişkeninden al */
    margin-bottom: 20px; /* İçerikten alttan boşluk */
    border-radius: 8px; /* Köşeleri yumuşat */
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);

    overflow-x: auto;
    -webkit-overflow-scrolling: touch; 
}

.menu-container label {
    font-weight: bold;
    color: var(--text-color); /* Label rengini beyaz yap */
    white-space: nowrap; /* Label'ın tek satırda kalmasını sağla */
    font-size: 0.9em; /* Küçük ekranlar için font boyutunu küçült */
}

.menu-container select,
.menu-container button {
    flex-shrink: 1; /* ! ÖNEMLİ: Kapsayıcı küçüldüğünde bu elemanların da küçülmesini sağlar */
    min-width: 60px; /* ! ÖNEMLİ: Çok fazla küçülmelerini engellemek için minimum genişlik */
    padding: 10px 15px;
    border: 1px solid var(--border-color); /* Border rengini tema değişkeninden al */
    border-radius: 5px;
    font-size: 0.9em; /* Mobil için font boyutunu küçült */
    box-sizing: border-box; /* Padding ve border'ı genişliğe dahil et */
    cursor: pointer;
    background-color: rgba(60, 60, 60, 1); /* Select kutusunun arka planını hafif şeffaf yap */
    color: var(--text-color); /* Select metin rengini beyaz yap */
    appearance: none; /* Varsayılan select stilini sıfırla */
    /* SVG ok ikonu rengini beyaz yap */
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="%23ffffff" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-chevron-down"><polyline points="6 9 12 15 18 9"></polyline></svg>');
    background-repeat: no-repeat;
    background-position: right 8px center; /* Ok ikonunun pozisyonunu ayarla */
    background-size: 14px; /* Ok ikonunun boyutunu küçült */
}

.menu-container select:focus,
.menu-container button:focus {
    outline: none;
    border-color: var(--primary-bg-light); /* Odaklandığında tema rengini kullan */
    box-shadow: 0 0 0 3px rgba(134, 168, 231, 0.25); /* Gölge rengini tema renginden al */
}

.menu-container button {
    background-color: var(--primary-bg-light); /* Buton arka plan rengini tema değişkeninden al */
    color: white; /* Buton metin rengi zaten beyaz */
    border: none;
    font-weight: bold;
    transition: background-color 0.3s ease;
    white-space: nowrap; /* Buton metninin tek satırda kalmasını sağlar */
}

.menu-container button:hover {
    background-color: #6a90e0; /* Hover rengini biraz koyult */
}


/* Mobil uyumluluk: Artık flex-direction: column kullanmıyoruz, yatayda kalacaklar. */
/* Eğer elemanlar çok sıkışırsa veya taşarsa, overflow-x: auto yatay kaydırma çubuğu çıkarır. */
@media (max-width: 768px) { /* Daha geniş mobil aralığı için ayarlayabiliriz */
    .menu-container {
        padding: 10px; /* Kenar boşluklarını azalt */
        gap: 10px; /* Elemanlar arası boşluğu azalt */
    }
    .menu-container label,
    .menu-container select,
    .menu-container button {
        font-size: 0.85em; /* Mobil cihazlarda genel font boyutunu daha da küçült */
        padding: 1px 1px; /* Padding'i azalt */
    }
    .menu-container select {
        background-position: right 6px center; /* Ok ikonunun pozisyonunu ayarla */
        background-size: 12px; /* Ok ikonunun boyutunu küçült */
    }
}


/* Mevcut ilçeler listesini gizleyebilir veya başka bir yere taşıyabilirsiniz,
   çünkü form artık seçim için ana mekanizma olacak */
.districts-container {
    margin-top: 30px; /* Üstten biraz boşluk */
    padding: 20px;
    background-color: var(--card-bg-color); /* Arka plan rengini tema değişkeninden al */
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.08);
}

.districts-container h2 {
    text-align: center;
    color: var(--text-color); /* Başlık rengini beyaz yap */
    margin-bottom: 20px;
    font-size: 1.5rem;
}

.districts-container .districts-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.districts-container .districts-list div {
    background-color: var(--detail-bg-color); /* İlçe kutularının arka planını tema değişkeninden al */
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.95rem;
    white-space: nowrap; /* Metnin tek satırda kalmasını sağlar */
}

.districts-container .districts-list a {
    text-decoration: none;
    color: var(--text-color); /* İlçe link rengini beyaz yap */
    font-weight: 500;
}

.districts-container .districts-list a:hover {
    color: var(--primary-bg-dark); /* Hover rengini tema değişkeninden al */
    text-decoration: underline;
}

@media (max-width: 480px) {
    .districts-container .districts-list {
       
        align-items: center;
    }
}

/* --- DİĞER STİLLERİNİZ (h1, .weather-container vb.) AŞAĞIDA DEVAM EDEBİLİR --- */
.weather-container, .districts-container {
    background-color: var(--card-bg-color);
    border-radius: 20px;
    padding: 5px;
    box-shadow: 0 12px 35px var(--shadow-color);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    text-align: center;
    width: 100%;
    max-width: 800px;
    margin-bottom: 30px;
    transition: all 0.3s ease-in-out;
}
.weather-container:hover, .districts-container:hover {
    box-shadow: 0 15px 45px rgba(0, 0, 0, 0.55);
}

h1, h2 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
    color: var(--text-color);
    margin-bottom: 15px;
    text-shadow: 3px 3px 8px rgba(0,0,0,0.4);
}
h1 {
    font-size: 3.2em;
    margin-bottom: 25px;
}
h2 {
    font-size: 2.4em;
    margin-top: 40px;
    margin-bottom: 30px;
    position: relative;
    padding-bottom: 12px;
}
h2::after {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: 0;
    width: 80px;
    height: 5px;
    background-color: var(--text-color);
    border-radius: 3px;
    opacity: 0.9;
}

.current-weather {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    padding-bottom: 25px;
    border-bottom: 1px solid var(--border-color);
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-left: 10px;
    padding-right: 10px;
    box-sizing: border-box;
}

.current-weather-main, .current-weather-details {
    flex-shrink: 0;
    padding: 10px 15px;
    box-sizing: border-box;
    text-align: center;
    min-width: fit-content;
}
.current-weather-main {
    display: flex;
    flex-direction: column;
    align-items: center;
}
.current-weather-details {
    display: flex;
    flex-direction: column;
    gap: 12px;
    text-align: left;
}

.current-weather-main {
    border-right: 1px solid var(--border-color);
}
@media (max-width: 480px) {
    .current-weather-main {
        border-right: none;
    }
}

.current-weather-main .temp {
    font-family: 'Roboto', sans-serif;
    font-size: 5.8em;
    font-weight: 300;
    margin: 5px 0 10px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    text-shadow: 3px 3px 10px rgba(0,0,0,0.5);
}
.current-weather-main .temp .icon {
    width: 110px;
    height: 110px;
    margin-right: 20px;
}
.current-weather-main .temp .icon img {
    width: 100%;
    height: 100%;
}

.current-weather-main .description {
    font-size: 1.9em;
    margin-bottom: 15px;
    font-weight: 600;
    text-transform: capitalize;
    color: var(--light-text-color);
    text-shadow: 1px 1px 4px rgba(0,0,0,0.3);
    white-space: nowrap;
}

.current-weather-details div {
    background-color: rgb(255 255 255 / 0%);
    padding: 14px 22px;
    border-radius: 15px;
    box-shadow: inset 0 0 8px rgba(0,0,0,0.15);
    font-size: 1.1em;
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
    white-space: nowrap;
}
.current-weather-details div span {
    color: var(--text-color);
    font-weight: 700;
    margin-left: 10px;
}


.forecast-table-container {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-top: 30px;
}
.forecast-table {
    width: 100%;
    border-collapse: collapse;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    min-width: 600px;
}
.forecast-table thead th {
    background-color: var(--table-header-bg);
    padding: 15px 10px;
    font-weight: 700;
    text-align: center;
    font-size: 1.1em;
    color: var(--text-color);
    text-shadow: 1px 1px 3px rgba(0,0,0,0.2);
}
.forecast-table tbody tr {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: background-color 0.3s ease;
}
.forecast-table tbody tr:last-child {
    border-bottom: none;
}
.forecast-table tbody tr:hover {
    background-color: var(--table-row-hover);
}
.forecast-table tbody td {
    padding: 12px 10px;
    text-align: center;
    font-size: 1em;
    color: var(--light-text-color);
    font-weight: 500;
    vertical-align: middle;
}
.forecast-table tbody td img {
    width: 50px;
    height: 50px;
    display: block;
    margin: 0 auto;
}
.forecast-table .day-info {
    font-weight: 600;
    color: var(--text-color);
    display: block;
    margin-bottom: 3px;
}
.forecast-table .date-text {
    font-size: 0.85em;
    opacity: 0.9;
}
.forecast-table .temp-range-table {
    font-weight: 700;
    color: var(--text-color);
    font-size: 1.1em;
    white-space: nowrap;
}
.forecast-table .temp-min-table {
    font-weight: 500;
    opacity: 0.9;
}

@media (max-width: 768px) {
    .forecast-table-container {
        overflow-x: hidden;
    }
    .forecast-table {
        min-width: unset;
    }
    .forecast-table thead {
        display: none;
    }
    .forecast-table tbody, .forecast-table tr {
        display: block;
        width: 100%;
        box-sizing: border-box;
    }
    .forecast-table tr {
        margin-bottom: 15px;
        border: 1px solid var(--border-color);
        border-radius: 10px;
        background-color: rgba(255, 255, 255, 0.1);
        box-shadow: 0 2px 10px rgba(0,0,0,0.1);
        padding: 15px;
        display: flex;
        flex-direction: row;
        justify-content: space-around;
        align-items: center;
        flex-wrap: nowrap;
        min-height: 80px;
    }
    .forecast-table td {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        padding: 0 5px;
        flex-basis: 33%;
        flex-grow: 1;
        text-align: center;
        border: none;
    }
    .forecast-table td:nth-child(1) { flex-basis: 40%; }
    .forecast-table td:nth-child(2) { flex-basis: 20%; }
    .forecast-table td:nth-child(3) { flex-basis: 30%; }


    .forecast-table td img {
        width: 45px;
        height: 45px;
        margin: 0;
    }
    .forecast-table .day-info, .forecast-table .date-text {
        font-size: 0.95em;
        margin-bottom: 0;
    }
    .forecast-table .day-info {
        white-space: nowrap;
    }
    .forecast-table .temp-range-table {
        font-size: 1.0em;
    }
}
@media (max-width: 480px) {
    .forecast-table tr {
        padding: 5px;
        gap: 5px;
    }
    .forecast-table td {
        padding: 0 1px;
    }
    .forecast-table td img {
        width: 40px;
        height: 40px;
    }
	.forecast-table tbody td {
    padding: 5px 5px;
    text-align: center;
    font-size: 1em;
    color: var(--light-text-color);
    font-weight: 500;
    vertical-align: middle;
}
	
    .forecast-table .day-info, .forecast-table .date-text {
        font-size: 0.9em;
    }
    .forecast-table .temp-range-table {
        font-size: 0.95em;
    }
}


.cache-info {
    font-family: 'Roboto', sans-serif;
    font-size: 0.9em;
    margin-top: 25px;
    opacity: 0.9;
    text-align: left;
    padding: 0 10px;
    line-height: 1.5;
    color: var(--light-text-color);
    text-shadow: 0 0 2px rgba(0,0,0,0.1);
}
.error-message {
    background-color: var(--error-color);
    padding: 18px;
    border-radius: 12px;
    margin-top: 25px;
    color: white;
    font-weight: 700;
    text-shadow: 1px 1px 4px rgba(0,0,0,0.3);
    font-size: 1.1em;
}

.districts-container {
    margin-top: 30px;
}
.districts-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
    margin-top: 25px;
    text-align: left;
}
.districts-list div {
    background-color: var(--detail-bg-color); /* Tema değişkeninden al */
    padding: 12px 18px;
    border-radius: 12px;
    font-size: 1.05em;
    transition: background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: inset 0 0 5px rgba(0,0,0,0.1);
}
.districts-list div:hover {
    background-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-5px);
    box-shadow: inset 0 0 8px rgba(0,0,0,0.15);
}
.districts-list div a {
    color: var(--text-color); /* Tema değişkeninden al */
    text-decoration: none;
    display: block;
    font-weight: 600;
    text-shadow: 0 0 2px rgba(0,0,0,0.1);
}
.districts-list div a:hover {
    text-decoration: none;
}

@media (max-width: 768px) {
    h1 {
        font-size: 2.8em;
    }
    h2 {
        font-size: 2em;
    }
    .districts-list {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 10px;
    }
    .districts-list div {
        font-size: 0.95em;
    }
}

@media (max-width: 480px) {
    
    h1 {
        font-size: 1.60em;
        margin-bottom: 20px;
    }
    h2 {
        font-size: 1.8em;
        margin-top: 30px;
        margin-bottom: 25px;
    }
    .districts-list {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 8px;
    }
    .districts-list div {
        padding: 10px 12px;
    }
}
@media (max-width: 768px) {
    .current-weather-main, .current-weather-details {
        padding: 0;
    }
    @media (max-width: 480px) {
        .current-weather-main, .current-weather-details {
            padding: 0;
        }
    }
}
@media (max-width: 768px) {
    .current-weather-main .temp {
        flex-direction: column;
        gap: 2px;
    }

    .current-weather-main .temp .icon {
        width: 100px;
        height: 100px;
    }

    .current-weather-main .temp span {
        font-size: 2.2em;
    }
}

@media (max-width: 480px) {
    .current-weather-main .temp {
        gap: 0px;
    }
    .current-weather-main .temp .icon {
        width: 100px;
        height: 100px;
    }
    .current-weather-main .temp span {
        font-size: 0.5em;
    }
}
.current-weather-main .temp .icon i,
.forecast-item .icon i {
    color: #FFD700;
}
footer {
    width: 100%;
    max-width: 800px; /* Diğer container'larla uyumlu */
    background-color: var(--card-bg-color); /* Mevcut kart arka plan renginizi kullanır */
    border-radius: 20px;
    padding: 20px 30px;
    margin-top: 30px; /* Diğer konteynerlerden biraz boşluk bırakır */
    box-shadow: 0 12px 35px var(--shadow-color);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    text-align: center;
    color: var(--light-text-color);
    font-size: 0.9em;
    font-family: 'Roboto', sans-serif;
}

.footer-content p {
    margin: 5px 0;
}

.footer-content a {
    color: var(--text-color); /* Bağlantı rengi beyaz */
    text-decoration: none;
    margin: 0 8px;
    transition: color 0.3s ease;
}

.footer-content a:hover {
    color: var(--primary-bg-light); /* Hover rengi tema değişkeninden al */
    text-decoration: underline;
}

/* Mobil uyumluluk için */
@media (max-width: 768px) {
    footer {
        padding: 15px 20px;
        font-size: 0.85em;
    }
    .footer-content p {
        margin: 8px 0;
    }
}
/* style.css dosyanıza eklenecek YENİ CSS */

.weather-tags-container {
    margin-top: 5px;
    margin-bottom: 5px;
    padding: 15px 20px;
    
    /* Flexbox kapsayıcı */
    display: flex;
    flex-wrap: wrap; /* Öğeler sığmazsa alt satıra geçsin */
    align-items: center; /* Öğeleri dikeyde ortala */
    justify-content: center; /* Öğeleri yatayda ortala */

    font-size: 0.95em;
    color: #444;
    
    background-color: transparent; 
    border: none; 
    box-shadow: none; 
}

.weather-tags-container strong {
    color: #2c3e50;           
    margin-right: 15px;       
    font-weight: 600;         
    flex-shrink: 0; /* Başlığın küçülmesini engelle */
    /* display ve vertical-align artık flex kapsayıcı tarafından yönetildiği için burada gereksiz */
}

.weather-tags-list {
    /* Flexbox kapsayıcı */
    display: flex;
    flex-wrap: wrap; /* Etiketler sığmazsa alt satıra geçsin */
    justify-content: center; /* Etiketleri yatayda ortala */
    align-items: center; /* Etiketleri dikeyde ortala */
    flex-grow: 1; /* Mevcut alanı doldurmaya çalış */
    /* max-width artık flex tarafından daha iyi yönetilebilir */
    text-align: center; /* Etiketler kendi içinde merkezlensin (mobil için önemli) */
}

.weather-tag-item {
    display: inline-block; /* Flex öğeleri varsayılan olarak inline-block gibi davranır ama bu tanımı koruyalım */
    background-color: rgba(44, 62, 80, 0.55); 
    border: 1px solid rgba(44, 62, 80, 0.15); 
    border-radius: 20px;     
    padding: 3px 6px;       
    margin: 5px;             
    color: #ffffffb8;          
    font-size: 0.85em;       
    font-weight: 800;        
    white-space: nowrap;     
    transition: all 0.3s ease; 
    cursor: default;         
}

.weather-tag-item:hover {
    background-color: rgba(44, 62, 80, 0.15); 
    border-color: rgba(44, 62, 80, 0.25);     
    transform: translateY(-1px);              
}

/* Mobil cihazlar için responsive ayarlar */
@media (max-width: 768px) {
    .weather-tags-container {
        flex-direction: column; /* Küçük ekranlarda başlık ve etiket listesini alt alta al */
        align-items: center; /* Öğeleri ortala */
        margin-top: 20px;
        margin-bottom: 25px;
        padding: 10px 15px;
        font-size: 0.9em;
    }
    .weather-tags-container strong {
        margin-right: 0;
        margin-bottom: 10px; /* Başlık ile etiketler arasına boşluk */
    }
    .weather-tags-list {
        justify-content: center; /* Etiketleri merkezde tut */
        max-width: 100%; 
    }
    .weather-tag-item {
        font-size: 0.8em;
        padding: 5px 10px;
        margin: 4px;
    }
}

/* Çok küçük ekranlar için */
@media (max-width: 480px) {
    .weather-tags-container {
        font-size: 0.85em;
        padding: 8px 10px;
        margin-top: 15px;
        margin-bottom: 20px;
    }
    .weather-tag-item {
        font-size: 0.75em;
        padding: 4px 8px;
        margin: 3px;
    }
}


 .horizontal-city-links {
        display: flex;
        flex-wrap: wrap;
        gap: 12px;
        list-style: none;
        padding: 0;
        margin: 0;
    }

    .horizontal-city-links li {
        margin: 0;
    }

    .horizontal-city-links a {
        color: white;
        font-weight: bold;
        text-decoration: none;
        display: inline-block;
    }

    .horizontal-city-links a:hover {
        text-decoration: underline;
    }

