body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    height: 100vh; /* Min-height yerine height yaptık */
    overflow: hidden; /* 🛑 Sayfanın kendisinin kaymasını engelledik */
    
    background-image: url('davutpasa.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    
    display: flex;
    justify-content: center;
    align-items: center;
    color: #333;
    transition: background-image 0.5s ease-in-out;
}

.main-wrapper {
    background-color: rgba(0, 0, 0, 0.4); 
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    overflow-y: auto;
}

.container {
    /* Hafif şeffaflık (0.95 yerine 0.85 yaptık ki masaüstünde de arkası hissedilsin) */
    background-color: rgba(255, 255, 255, 0.85);
    
    /* Buzlu cam efekti masaüstüne de gelsin */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);

    padding: 30px;
    border-radius: 20px; /* Köşeleri biraz daha yuvarladık */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    
    width: 100%;
    max-width: 480px; /* Genişliği ideal kart boyutunda tuttuk */
    
    /* 🛑 İŞTE SİHİRLİ KODLAR BURADA: */
    max-height: 90vh; /* Kutunun boyu ekranın %90'ını geçemesin */
    overflow-y: auto; /* Eğer içerik sığmazsa SADECE KUTU İÇİNDE kaydırma çıksın */
    
    text-align: center;
    /* Margin auto zaten flex body sayesinde ortalıyor */
}

h1 { color: #2c3e50; margin-bottom: 20px; font-size: 1.6em; }

.locate-btn {
    background-color: #2ecc71;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    margin-bottom: 20px;
    transition: background 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.locate-btn:hover { background-color: #27ae60; }

.input-group select {
    width: 100%;
    padding: 12px;
    margin-bottom: 20px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
}

.weather-card {
    background: linear-gradient(135deg, #e0f7fa 0%, #ffffff 100%);
    padding: 20px;
    border-radius: 12px;
    text-align: left;
    min-height: 120px;
    margin-bottom: 20px;
    border-left: 5px solid #00bcd4;
}

.forecast-wrapper h3 {
    text-align: left;
    margin: 10px 0;
    font-size: 1.1em;
    color: #555;
    border-bottom: 1px solid #eee;
    padding-bottom: 5px;
}

.forecast-cards {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 5px;
}

.forecast-item {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 10px 5px;
    flex: 1;
    min-width: 70px;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.forecast-day { font-size: 0.85em; font-weight: bold; color: #666; }
.forecast-temp { font-size: 1.1em; font-weight: bold; color: #e67e22; margin: 5px 0; }
.forecast-desc { font-size: 0.7em; color: #888; }
.forecast-icon { width: 40px; height: 40px; }

.error { color: #e74c3c; font-weight: bold; }

/* ... En alttaki diğer kodların altına ekle ... */

/* 📱 MOBİL CİHAZLAR İÇİN ULTRA KOMPAKT "TEK EKRAN" MODU */
@media (max-width: 768px) {

    /* 1. ARKA PLAN VE YERLEŞİM */
    body {
        background-attachment: scroll !important;
        background-position: center center !important;
        background-size: cover !important;
        display: flex;
        align-items: center;
        justify-content: center;
        overflow: hidden; /* Sayfa kaymasın */
    }

    /* 2. ANA KUTUYU SIKIŞTIRMA */
    .container {
        margin: 0 !important; /* Dış boşlukları sıfırla */
        width: 92% !important; /* Genişliği artır */
        
        /* Şeffaflık ve Blur */
        background-color: rgba(255, 255, 255, 0.75) !important;
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        
        /* İç boşlukları minimuma indiriyoruz */
        padding: 12px 10px !important;
        border-radius: 20px !important;

        /* Maksimum yükseklik verip taşmayı engelliyoruz */
        max-height: 95vh;
        overflow-y: auto; /* Çok gerekirse kutu içi kaydır */
    }

    /* 3. BAŞLIK VE BUTONLAR (KÜÇÜLTME) */
    h1 {
        font-size: 1.1em !important; /* Başlık daha küçük */
        margin: 0 0 8px 0 !important; /* Alt boşluk azaldı */
    }

    .locate-btn {
        padding: 6px 12px !important; /* Buton inceldi */
        font-size: 11px !important;
        margin-bottom: 8px !important;
    }

    .input-group select {
        padding: 6px !important;
        margin-bottom: 8px !important;
        font-size: 13px !important;
        height: 35px !important; /* Yüksekliği sabitle */
    }

    /* 4. HAVA DURUMU KARTI (En kritik yer) */
    .weather-card {
        background: rgba(255, 255, 255, 0.4) !important;
        padding: 8px 12px !important; /* Kart içi boşluk sıkılaştı */
        margin-bottom: 8px !important;
        border: 1px solid rgba(255,255,255,0.3);
        min-height: auto !important;
    }
    
    .weather-card h2 {
        font-size: 1em !important;
        margin-bottom: 2px !important;
    }

    /* Sıcaklık yazısını küçült */
    .weather-card div p[style*="font-size: 3em"] {
        font-size: 2em !important; 
        line-height: 1.1 !important;
    }

    /* ⭐ İKON AYARLARI (DÜZELTİLMİŞ) ⭐ */
    
    /* 1. Genel İkon Kuralı: Tüm ikonlar normal boyutunda ve doğal (beyaz/gri) renginde kalsın */
    .weather-card img {
        width: 50px !important;
        height: 50px !important;
        /* FİLTREYİ BURADAN KALDIRDIK! Artık bulutlar beyaz kalacak. */
    }

    /* 2. Özel Kural: SADECE 'golden-night-icon' sınıfı olan (Siyah Ay) renklensin */
    .weather-card img.golden-night-icon {
        filter: sepia(100%) saturate(1000%) hue-rotate(-20deg) brightness(1.1) !important;
        drop-shadow: 0 0 7px rgba(255, 215, 0, 0.8); /* Altın sarısı parlama */
    }

    /* Durum yazısı (Açık, Bulutlu vb.) */
    .weather-card div p[style*="text-transform"] {
        font-size: 0.9em !important;
        margin-top: 2px !important;
    }

    /* Nem ve Rüzgar bilgisi */
    .weather-card div[style*="font-size:0.9em"] {
        font-size: 0.75em !important;
        margin-top: 5px !important;
    }

    /* 5. TAHMİN KARTLARI (Maksimum Sıkıştırma) */
    .forecast-wrapper h3 {
        font-size: 0.85em !important;
        margin: 5px 0 !important;
        padding-bottom: 2px !important;
    }

    .forecast-cards {
        gap: 5px !important;
        padding-bottom: 0 !important;
    }

    .forecast-item {
        padding: 5px 2px !important;
        min-width: 50px !important;
    }
    
    .forecast-day { font-size: 0.65em !important; }
    .forecast-temp { font-size: 0.8em !important; margin: 2px 0 !important; }
    .forecast-desc { display: none !important; } /* Yer kazanmak için alttaki küçük yazıyı gizle */
    
    .forecast-icon { 
        width: 25px !important; 
        height: 25px !important;
    }

    /* 6. ALT BİLGİ (En alttaki yazı) */
    .info-box {
        margin-top: 8px !important;
        padding-top: 5px !important;
        font-size: 0.55em !important; /* Çok küçük ama okunur */
        line-height: 1.2 !important;
    }
    .info-box p { margin: 1px 0 !important; }
}