@import url('https://fonts.googleapis.com/css2?family=Oswald:wght@200..700&family=Poppins:wght@200;300;400;500;600;700;800;900&display=swap');

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

body {
    background-color: #222;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

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

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

.search input {
    border: 0;
    outline: 0;
    background: #ebfffc;
    padding: 15px 20px;
    height: 50px;
    border-radius: 30px;
    flex: 1;
    margin-right: 10px;
    font-size: 18px;
}

.search button {
    border: 0;
    outline: 0;
    background: #ebfffc;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search button img {
    width: 20px;
}

.error {
    color: red;
    text-align: center;
    margin-top: 10px;
    font-size: 14px;
    display: none; /* Hidden by default */
}

.weather-icon {
    width: 150px;
    margin-top: 30px;
}

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

.weather h2 {
    font-size: 35px;
    font-weight: 400;
    margin-top: -10px;
}
.details {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 40px;
    padding: 15px;
    border-radius: 10px;
    background: linear-gradient(135deg, #00feba, #5b548a);
    width: 100%;
    color: #fff;
}

.col {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    text-align: left;
    gap: 10px; 
}

.col img {
    width: 50px; 
    height: auto;
}

.text-container {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.humidity, .wind {
    font-size: 28px;
    font-weight: bold;
}

.col p {
    margin: 0;
    font-size: 18px;
    font-weight: 500;
}
.created{
    margin-top: 10px;
}
.created a{
    text-decoration: none;
    color: #222;
    
}

/* Responsive Design */
@media (max-width: 600px) {
    .card {
        width: 100%;
        padding: 30px 20px;
    }

    .search input {
        height: 45px;
        font-size: 16px;
        padding: 10px 15px;
    }

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

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

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

    .details {
        flex-direction: column;
        gap: 15px;
    }

    .col {
        justify-content: center;
    }
}
@media (max-width: 768px) {
    .details {
        flex-direction: column; 
        align-items: center;
    }
    .col {
        width: 100%;
        justify-content: flex-start; 
    }
    .col img {
        width: 40px; 
    }
    .humidity, .wind {
        font-size: 24px;
    }
    .col p {
        font-size: 16px;
    }
}

@media (max-width: 320px) {
    .search {
        flex-direction: row;
        align-items: center;
    }
    .search input {
        font-size: 14px;
        padding: 8px 15px;
        height: 45px; 
        flex: 1;
    }
    .search button {
        width: 40px; 
        height: 40px;
        border-radius: 30%;
    }
    .search button img {
        width: 14px; 
    }
    .details {
        flex-direction: column; 
        align-items: center;
        padding: 10px;
    }
    .col {
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: flex-start;
        padding: 5px 10px;
    }
    .col img {
        width: 35px; 
        height: auto;
    }
    .text-container {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        margin-left: 8px;
    }
    .humidity, .wind {
        font-size: 20px;
    }
    .col p {
        font-size: 14px;
    }
}
