/* Podstawowe resetowanie i kolory Dark Mode */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #121214;
    color: #e1e1e6;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 20px;
    transition: background 0.8s ease; /* Płynna zmiana tła */
}

/* Dynamiczne tła w zależności od pogody */
body.weather-clear { background: linear-gradient(135deg, #1f1c2c, #3a2535); }
body.weather-rain { background: linear-gradient(135deg, #1a2a3a, #0f171e); }
body.weather-cloudy { background: linear-gradient(135deg, #232526, #414345); }
body.weather-snow { background: linear-gradient(135deg, #2c3e50, #34495e); }
body.weather-thunder { background: linear-gradient(135deg, #110e1a, #240b36); }

.container {
    width: 100%;
    max-width: 500px;
    background: rgba(32, 32, 36, 0.85);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

header h1 {
    text-align: center;
    margin-bottom: 20px;
    font-size: 1.8rem;
    font-weight: 400;
}

/* Szybkie przyciski miast */
.quick-cities {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.btn-city {
    flex: 1;
    background: #29292e;
    border: none;
    color: #e1e1e6;
    padding: 10px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.2s;
}

.btn-city:hover {
    background: #323238;
}

/* Wyszukiwarka */
.search-form {
    display: flex;
    gap: 8px;
    margin-bottom: 25px;
}

.search-form input {
    flex: 1;
    background: #121214;
    border: 1px solid #29292e;
    padding: 12px;
    border-radius: 8px;
    color: #fff;
    font-size: 1rem;
}

.search-form input:focus {
    outline: 1px solid #04d361;
}

.search-form button {
    background: #04d361;
    color: #000;
    border: none;
    padding: 0 16px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    transition: opacity 0.2s;
}

.search-form button:hover {
    opacity: 0.9;
}

/* Sekcja z aktualną pogodą */
.current-weather {
    text-align: center;
    margin-bottom: 30px;
}

#city-name {
    font-size: 2rem;
    margin-bottom: 5px;
}

.weather-main-info {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

#weather-icon {
    width: 64px;
    height: 64px;
}

#temperature {
    font-size: 3.5rem;
    font-weight: 300;
}

#weather-desc {
    text-transform: capitalize;
    color: #a8a8b3;
    margin-bottom: 20px;
}

/* Szczegóły (wiatr, wilgotność itp.) */
.weather-details {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    background: #121214;
    padding: 15px;
    border-radius: 12px;
}

.detail-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 0.9rem;
}

.detail-item .label {
    color: #7c7c8a;
    margin-bottom: 4px;
    font-size: 0.8rem;
}

.detail-item .value {
    font-weight: bold;
}

/* Prognoza na 3 dni */
.forecast h3 {
    font-size: 1.1rem;
    margin-bottom: 12px;
    color: #e1e1e6;
    font-weight: 500;
}

.forecast-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.forecast-day {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #29292e;
    padding: 10px 16px;
    border-radius: 8px;
}

.forecast-day .day-name {
    font-weight: 600;
    width: 90px;
}

.forecast-day img {
    width: 40px;
    height: 40px;
}

.forecast-day .forecast-temp {
    font-weight: bold;
}

/* Pomocnicze klasy (Stany aplikacji) */
.hidden { display: none !important; }

.loader, .error-msg {
    text-align: center;
    padding: 20px;
}

.error-msg { color: #f75a68; }

/* Responsywność */
@media (max-width: 400px) {
    .container { padding: 16px; }
    #temperature { font-size: 2.8rem; }
    .weather-details { grid-template-columns: 1fr; gap: 15px; }
}