* {
    padding: 0;
    margin: 0;
    box-sizing: border-box;
    font-family: Verdana, Geneva, Tahoma, sans-serif;
}

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, #2b9ef6, #1903aa);
    color: #fff;
    border-radius: 20px;
    padding: 40px 35px;
    text-align: center;
}

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

.search input {
    border: 0;
    outline: 0;
    background: #ebfffc;
    color: #555;
    padding: 10px 15px;
    height: 60px;
    border-radius: 30px;
    flex: 1;
    margin-right: 16px;
    font-size: 18px;
    min-width: 0; /* Important for flex items */
}

.search button {
    border: 0;
    outline: 0;
    background: #ebfffc;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    cursor: pointer;
    flex-shrink: 0; /* Prevent button from shrinking */
}

.search button img {
    width: 16px;
    max-width: 100%;
    height: auto;
}

.weather-icon {
    width: 170px;
    margin-top: 30px;
    max-width: 100%;
}

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

.weather h2 {
    font-size: 45px;
    font-weight: 400;
    margin-top: -10px;
}

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

.col {
    display: flex;
    align-items: center;
    text-align: left;
    flex: 1;
    min-width: 120px;
}

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

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

.weather {
    display: none;
}

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

/* Media Queries for Responsiveness */
@media (max-width: 768px) {
    .card {
        padding: 30px 25px;
    }
    
    .weather h1 {
        font-size: 70px;
    }
    
    .weather h2 {
        font-size: 35px;
    }
}

@media (max-width: 480px) {
    .card {
        padding: 25px 20px;
    }
    
    .search input {
        height: 50px;
        font-size: 16px;
        padding: 8px 15px;
        margin-right: 10px;
    }
    
    .search button {
        width: 50px;
        height: 50px;
    }
    
    .search button img {
        width: 14px;
    }
    
    .weather h1 {
        font-size: 60px;
    }
    
    .weather h2 {
        font-size: 28px;
    }
    
    .humidity,
    .wind {
        font-size: 22px;
    }
    
    .details {
        padding: 0 10px;
        margin-top: 40px;
    }
    
    .col img {
        width: 40px;
    }
}

@media (max-width: 360px) {
    .search input {
        height: 45px;
        font-size: 14px;
        padding: 8px 12px;
        margin-right: 8px;
    }
    
    .search button {
        width: 45px;
        height: 45px;
    }
    
    .search button img {
        width: 12px;
    }
    
    .weather h1 {
        font-size: 50px;
    }
    
    .weather h2 {
        font-size: 22px;
    }
    
    .humidity,
    .wind {
        font-size: 18px;
    }
}