* {
    margin: 0;
    padding: 0;
    font-family: 'Poppins', 'sans-serif';
    box-sizing: border-box;
}

body {
    background: linear-gradient(135deg, #222, #333);
    color: #fff;
}

.card {
    width: 90%;
    max-width: 470px;
    background: linear-gradient(135deg, #00feba, #5b548a);
    color: #fff;
    margin: 100px auto 0;
    border-radius: 20px;
    padding: 40px 35px;
    text-align: center;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

.search {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.search input {
    border: 0;
    outline: 0;
    background: #ebfffc;
    color: #555;
    padding: 10px 25px;
    height: 60px;
    border-radius: 30px;
    flex: 1;
    margin-right: 16px;
    font-size: 18px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.search button {
    border: 0;
    outline: 0;
    background: #ebfffc;
    border-radius: 50px;
    width: 60px;
    height: 60px;
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.search button:hover {
    background: #d0f7f4;
    transition: background 0.3s ease;
}

.search button img {
    width: 16px;
}

.weather-icon {
    width: 170px;
    margin-top: 30px;
    animation: bounceIn 1s ease-in-out;
}

@keyframes bounceIn {
    0% { transform: scale(0.5); opacity: 0; }
    60% { transform: scale(1.2); opacity: 1; }
    100% { transform: scale(1); }
}

.weather h1 {
    font-size: 80px;
    font-weight: 600;
    color: #fdfdfd;
}

.weather h2 {
    font-size: 45px;
    font-weight: 300;
    margin-top: -10px;
    color: #f1f1f1;
}

.details {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    margin-top: 50px;
}

.col {
    display: flex;
    align-items: center;
    text-align: left;
    padding-right: 15px;
    border-right: 1px solid rgba(255, 255, 255, 0.2);
}

.col:last-child {
    border-right: none;
}

.col img {
    width: 40px;
    margin-right: 10px;
}

.humidity, .wind {
    font-size: 28px;
    margin-top: -6px;
}

.weather {
    display: none;
}

.error {
    text-align: left;
    margin-left: 10px;
    font-size: 20px;
    margin-top: 10px;
    display: none;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.weather {
    display: none;
    opacity: 0;
    animation: fadeIn 0.5s ease-in-out forwards;
}

.error {
    display: none;
    opacity: 0;
    animation: fadeIn 0.5s ease-in-out forwards;
}

.error p {
    color: #ff6b6b;
    font-weight: bold;
    margin-left: 10px;
}

/* Responsive Styles */
@media (max-width: 768px) {
    .card {
        width: 95%;
        padding: 30px 25px;
    }

    .weather h1 {
        font-size: 60px;
    }

    .weather h2 {
        font-size: 35px;
    }

    .details {
        flex-direction: column;
        margin-top: 30px;
    }

    .col {
        justify-content: center;
        padding-right: 0;
        border-right: none;
        margin-bottom: 15px;
    }

    .col img {
        width: 30px;
    }

    .humidity, .wind {
        font-size: 24px;
    }
}

@media (max-width: 480px) {
    .search input {
        height: 50px;
        padding: 10px 20px;
        font-size: 16px;
    }

    .search button {
        width: 50px;
        height: 50px;
    }

    .weather h1 {
        font-size: 50px;
    }

    .weather h2 {
        font-size: 30px;
    }

    .col img {
        width: 25px;
    }

    .humidity, .wind {
        font-size: 20px;
    }
}