* {
    margin: 0;
    padding: 0;
    font-family: 'Poppins', sans-serif;
    box-sizing: border-box;
}

body {
    background: #222;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.card {
    width: 100%;
    max-width: 470px;
    background: linear-gradient(135deg, #00feba, #5b548a);
    border-radius: 20px;
    padding: 40px 35px;
    text-align: center;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
    transition: background 2s ease-in-out, box-shadow 2s ease-in-out;
}

/* Weather themes */
.clear-theme {
    background: linear-gradient(135deg, #fddb92, #d1fdff);
    color: #333;
    /* Dark text for bright bg */
}

.clouds-theme {
    background: linear-gradient(135deg, #757f9a, #d7dde8);
    color: #222;
}

.rain-theme {
    background: linear-gradient(135deg, #4e54c8, #8f94fb);
    color: #fff;
}

.drizzle-theme {
    background: linear-gradient(135deg, #89f7fe, #66a6ff);
    color: #333;
}

.mist-theme {
    background: linear-gradient(135deg, #d3cce3, #e9e4f0);
    color: #222;
}

.snow-theme {
    background: linear-gradient(135deg, #e0eafc, #cfdef3);
    color: #222;
}

.search {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}

.search input {
    border: 0;
    outline: 0;
    background: #ebfffc;
    color: #555;
    padding: 10px 20px;
    height: 50px;
    border-radius: 30px;
    flex: 1;
    font-size: 16px;
    min-width: 200px;
}

.search button {
    border: 0;
    outline: 0;
    background: #ebfffc;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
}

.search button img {
    width: 20px;
}

.weather {
    display: none;
}

.weather h1 {
    font-size: 64px;
    font-weight: 500;
}

.weather h2 {
    font-size: 32px;
    font-weight: 400;
    margin-top: -10px;
}

.weather-icon {
    width: 150px;
    margin-top: 30px;
}

.details {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 10px;
    margin-top: 40px;
    flex-wrap: wrap;
    gap: 20px;
}

.col {
    display: flex;
    align-items: center;
    text-align: left;
    flex: 1 1 45%;
    gap: 10px;
}

.col img {
    width: 40px;
}

.humidity,
.wind {
    font-size: 24px;
    margin-top: -6px;
}

.error {
    text-align: left;
    font-size: 14px;
    margin-top: 10px;
    color: #ffdada;
    display: none;
}

/* Media Queries for smaller screens */
@media screen and (max-width: 480px) {
    .card {
        padding: 25px 20px;
    }

    .search input {
        height: 45px;
        font-size: 14px;
    }

    .search button {
        width: 45px;
        height: 45px;
    }

    .weather h1 {
        font-size: 48px;
    }

    .weather h2 {
        font-size: 24px;
    }

    .details {
        flex-direction: column;
        align-items: center;
    }

    .col {
        justify-content: center;
        text-align: center;
    }
}

.fade-in {
    opacity: 0;
    animation: fadeIn 2s ease-in-out forwards;
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}