/* =========================================
   1. GRUNDLAGEN & LAYOUT
   ========================================= */
* {
    box-sizing: border-box; 
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #74ebd5 0%, #9face6 100%);
    min-height: 100vh;
    margin: 0;
    padding: 20px 10px; 
    display: flex;
    flex-direction: column;
    align-items: center; 
    color: white; 
}

/* =========================================
   2. SUCHE & INPUTS
   ========================================= */
.search-container {
    display: flex;
    flex-direction: column; 
    align-items: center;    
    gap: 15px;              
    width: 100%;
    max-width: 600px; 
    margin-bottom: 20px;    
}

#city-input {
    padding: 12px 20px;
    border-radius: 30px;
    border: none;
    outline: none;
    width: 100%;
    max-width: 300px;
    font-size: 1rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    text-align: center;
}

#city-input:focus {
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.5);
}

button {
    background: #4A90E2;
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.4);
    padding: 10px 25px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 0.9rem;
    backdrop-filter: blur(5px);
    transition: background 0.3s;
}

button:hover {
    background: #357ABD;
    transform: translateY(-2px);
}

/* =========================================
   3. HAUPT WETTER KARTE (GLAS-OPTIK)
   ========================================= */
#weather-card {
    width: 95%;
    max-width: 450px; 
    background: rgba(255, 255, 255, 0.15); 
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    
    border-radius: 20px;
    padding: 25px 15px; 
    display: flex;
    flex-direction: column;
    align-items: center;    
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.25);
    margin-bottom: 50px; 
    overflow: hidden; 
}

#city-name {
    margin: 0;
    font-size: 2rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

#weather-icon {
    width: 120px;
    filter: drop-shadow(0 5px 15px rgba(0,0,0,0.2));
}

.temp-display {
    font-size: 3.5rem;
    font-weight: bold;
    margin: 0;
    text-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

#description {
    font-size: 1.2rem;
    text-transform: capitalize;
    margin-bottom: 10px;
    opacity: 0.9;
}

.humidity-badge {
    background: rgba(0, 0, 0, 0.3);
    padding: 5px 15px;
    border-radius: 15px;
    font-size: 0.9rem;
    margin-bottom: 15px;
}

/* =========================================
   4. WIND DETAILS
   ========================================= */
.wind-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-top: 10px;
    padding: 10px 20px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 15px;
    width: 100%;
}

.wind-icon-container {
    width: 35px;
    height: 35px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

#wind-arrow {
    font-size: 1.2rem;
    display: inline-block;
    transition: transform 1s ease-in-out; 
}

/* =========================================
   5. FORECAST SCROLLER (HORIZONTAL)
   ========================================= */
.forecast-menu {
    width: 100%;
    margin-top: 20px;
}

#forecast-btn {
    width: 100%;
    background: #4A90E2;
    border: none;
    font-weight: bold;
    box-shadow: 0 4px 10px rgba(255, 154, 158, 0.4);
}
#forecast-btn:hover {
    background: #357ABD;
}

.forecast-scroller {
    display: flex;
    flex-direction: row;
    overflow-x: auto;
    gap: 12px;
    width: 100%;
    padding: 10px 5px;
    justify-content: flex-start;
    
    scrollbar-width: thin; 
    scrollbar-color: rgba(255,255,255,0.5) transparent;
}

.forecast-scroller::-webkit-scrollbar {
    height: 4px; 
}
.forecast-scroller::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 10px;
}
.forecast-scroller::-webkit-scrollbar-track {
    background: transparent;
}

/* =========================================
   6. FORECAST KARTEN (DETAILS & DAILY)
   ========================================= */
   

.daily-card {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 15px;
    padding: 10px;
    min-width: 90px;
    text-align: center;
    cursor: pointer;
    transition: transform 0.2s, background 0.3s;
    border: 1px solid rgba(255,255,255,0.1);
    flex-shrink: 0; 
}
.daily-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.4);
}

.forecast-card {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 15px;
    padding: 15px 10px;
    min-width: 100px;
    text-align: center;
    color: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.fc-time {
    font-weight: bold;
    font-size: 0.9rem;
    margin-bottom: 5px;
    opacity: 0.8;
}

.fc-temp {
    font-size: 1.2rem;
    font-weight: bold;
    margin: 5px 0;
}

.details {
    margin-top: 20px;
    font-size: 0.8rem;
    opacity: 0.6;
}

/* =========================================
   7. FEHLERMELDUNG
   ========================================= */
#error-message {
    background: #ff6b6b;
    color: white;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 20px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(255, 107, 107, 0.3);
    max-width: 500px;
    width: 90%;
}

/* =========================================
   8. DESKTOP OPTIMIERUNG (Breiter & Ohne Scrollen)
   ========================================= */

@media (min-width: 800px) {

    /* 1. Karte deutlich breiter machen */
    #weather-card {
        max-width: 850px; /* Viel mehr Platz */
        padding: 40px;    /* Luftiger */
    }

    /* 2. Scroll-Container anpassen: Zentriert und kein Scrollen */
    .forecast-scroller {
        justify-content: center; /* Alles in die Mitte */
        overflow-x: hidden;      /* Scrollbalken ausblenden */
        flex-wrap: wrap;         /* Falls es doch mal zu viele sind, umbrechen statt scrollen */
    }

    /* 3. Tages-Karten etwas größer und schicker */
    .daily-card {
        min-width: 110px;        /* Etwas breiter als auf dem Handy */
        flex: 1;                 /* Verteilt den Platz gleichmäßig auf alle 5 Tage */
        max-width: 150px;        /* Aber nicht riesig werden */
    }

    /* 4. Detail-Karten (unten) auch anpassen */
    .forecast-card {
        min-width: 100px;
        flex: 0 1 auto;          /* Sollen nicht den ganzen Platz füllen, sondern kompakt bleiben */
    }

    /* Optional: Schriftgrößen auf Desktop etwas anpassen */
    .temp-display {
        font-size: 4.5rem;
    }
}