*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
        font-family: "Inter", sans-serif;

}

body{
    background-color:  #F0F4F9;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding-top: 60px;
}

h1{
    margin-bottom: 1rem;
    color: #007BFF;
    font-weight: 700;
    font-size: 2rem;
}
.weather-container{
    width: 90%;
    max-width: 470px;
    /* margin: 100px auto 0; */
    border-radius: 20px;
    padding: 40px 35px;
    text-align: center;
    background-color:#FFFFFF;
    color: #212529;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.weather-container:hover{
    transform: translateY(-5px);
}
.search-container{
    width: 100%;
    display: flex;
    /* justify-content: space-between; */
    /* align-items: center; */
    margin-bottom: 1.5rem;
    gap: 10px;
}

.input-box{
    border: 2px solid #d6d9de;
    background-color: #fff;
    border-radius:12px;
    padding: 12px 20px;
    color: #212529;
    /* margin-right: 16px;
    height: 50px; */
    font-size: 1rem;
    flex: 1;
    transition: border 0.3s ease, transform 0.2s ease;
}

.input-box:focus{
   outline: none;
   border-color: #007BFF;
    transform: scale(1.02);
}
    
.input-box::placeholder{
    color: #665;
    font-weight: 500;
}
.search-btn{
    outline: none;
    border: none;
    background-color: #007BFF;
    height: 50px;
    width: 50px;
    border-radius: 50%;
      cursor: pointer;
    transition: background 0.3s ease,transform 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-image{
    height: 24px;
    width: 24px;
    /* filter: invert(1); */
}
.search-btn:hover{
    background-color: #0056b3;  
    transform: scale(1.05);}

.weather-img{
    height: 100px;
    margin: 20px 0;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.3));
}

.temprature{
    font-size: 3rem;
    font-weight: 700;
    margin: 10px 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.city-name{
    font-size: 1.5rem;
    font-weight: 500;
    margin-bottom: 20px;
}

.other-details{
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 20px;
    padding:20px;
    background: #F8F9FA;
    border-radius: 12px;
    backdrop-filter: blur(5px);
}

.other-details img{
    height: 45px;
}

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

.humidity, .wind-speed{
    font-size: 1.1rem;
    font-weight: 600;
    color: #212529;
}

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

.weather-info.show{
    display: block;
}
.error-msg{
    display: none;
    background: rgba(220, 53, 69, 0.1);
    border: 1px solid #dc3545;
    color: #dc3545;
    padding: 12px;
    border-radius: 10px;
    margin-bottom: 15px;
    font-weight: 500;
    animation: shake 0.5s ease-in-out;
}

.error-msg.show{
    display: block;
}

.loading{
    display: none;
    color: #007BFF;
    margin: 20px 0;
}
.loading.show{
    display: block;
}

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

@keyframes shake {
    0%{
        transform: translateX(0);
    }
    25%{
        transform: translateX(-5px);
    }
    75%{
        transform: translateX(5px);
    }
    100%{
        transform: translateX(0);
    }
}

.spinner{
    border: 3px solid rgba(0, 123, 255, 0.2);
    border-radius: 50%;
    border-top: 3px solid #007BFF;
    width: 28px;
    height: 28px;
    animation: spin 1s linear infinite;
    margin: 10px auto;
}

@keyframes spin {
    0%{
        transform: rotate(0deg);
    }
    100%{
        transform: rotate(360deg);
    }
}

@media (max-width:500px){
    .weather-container{
        margin: 20px;
        padding: 30px 25px;
    }

    .other-details{
        flex-direction: column;
        gap: 20px;
    }
    .search-container{
        gap: 8px;
    }

    .input-box{
        font-size: 0.9rem;
        padding: 10px 14px;
    }

    .search-btn{
        width: 15%;
        min-width: 45px;
        max-width: 60px;
        height: auto;
        aspect-ratio: 1/1;
    }
    .search-image{
        width: 20px;
        height: 20px;
    }
}