body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #fff;
    margin: 0;
    padding: 0;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-x: hidden;
}

.background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: -1;
    transition: background-image 1s ease-in-out;
}

.container {
    background-color: rgba(0, 0, 0, 0.6);
    padding: 30px;
    border-radius: 20px;
    width: 90%;
    max-width: 800px;
    box-shadow: 0 15px 35px 0 rgba(0, 0, 0, 0.5);
    text-align: center;
    backdrop-filter: blur(10px);
    animation: fadeIn 1s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

h1 {
    margin-bottom: 30px;
    font-size: 2.5em;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 30px;
    gap: 20px;
}

.search {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

#city-input {
    padding: 12px;
    border: none;
    border-radius: 25px;
    width: 250px;
    font-size: 16px;
    outline: none;
    transition: box-shadow 0.3s ease;
}

#city-input:focus {
    box-shadow: 0 0 10px rgba(52, 152, 219, 0.5);
}

button {
    padding: 12px 20px;
    border: none;
    background-color: #3498db;
    color: white;
    font-weight: bold;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 16px;
}

button:hover {
    background-color: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.unit-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
}

#unit-select {
    padding: 8px;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
    outline: none;
}

.weather-display {
    display: none;
    margin-top: 30px;
    animation: slideIn 0.5s ease-in-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.current-weather {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 30px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.weather-icon img {
    width: 120px;
    height: 120px;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

.weather-info h2 {
    margin: 0 0 10px 0;
    font-size: 2em;
}

.weather-info p {
    margin: 8px 0;
    font-size: 18px;
}

.alerts {
    background-color: rgba(255, 193, 7, 0.8);
    color: #000;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-weight: bold;
}

.forecast {
    margin-top: 30px;
}

.forecast h3 {
    margin-bottom: 20px;
    font-size: 1.5em;
}

.forecast-container {
    display: flex;
    justify-content: space-around;
    gap: 20px;
    flex-wrap: wrap;
}

.forecast-day {
    background-color: rgba(255, 255, 255, 0.1);
    padding: 15px;
    border-radius: 15px;
    text-align: center;
    min-width: 120px;
    transition: transform 0.3s ease;
}

.forecast-day:hover {
    transform: scale(1.05);
}

.forecast-day img {
    width: 50px;
    height: 50px;
}

.forecast-day p {
    margin: 5px 0;
    font-size: 14px;
}

.error {
    margin-top: 20px;
    color: #ff6b6b;
    font-weight: bold;
    background-color: rgba(255, 107, 107, 0.2);
    padding: 15px;
    border-radius: 10px;
}

@media (max-width: 768px) {
    .container {
        width: 95%;
        padding: 20px;
    }
    h1 {
        font-size: 2em;
    }
    .current-weather {
        flex-direction: column;
        gap: 20px;
    }
    .forecast-container {
        flex-direction: column;
        align-items: center;
    }
}