body{
    margin: 0;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 50%;
    background-image: url(sunny.jpeg);
    background-repeat: no-repeat;
    background-size: cover;
    font-family: sans-serif;
    
}
*{
    padding: 0;
    margin: 0;
}

.background-image {
    background-image: url('images/sunny.jpeg');
}

figcaption {
    color: white;
    text-shadow: 3px 3px 4px rgba(0, 0, 0, 0.5); 
}

#name {
    color: Black;
    font-weight: bold;
}

#temp {
    color: white;
    text-shadow: 3px 3px 4px rgba(0, 0, 0, 0.5);
}

#unit {
    color: white;
    text-shadow: 3px 3px 4px rgba(0, 0, 0, 0.5);
}

#cloud {
    color: white;
    text-shadow: 3px 3px 4px rgba(0, 0, 0, 0.5);
}
  
@keyframes spin {
    0% {
        outline-color: #48567b; /* Red */
    }
    33% {
        outline-color: #f78a55; /* Green */
    }
    66% {
        outline-color: #b56291; /* Blue */
    }
    100% {
        outline-color: #48567b; /* Back to Red */
    }
}



main {
    width: 300px;
    height: max-content;
    min-height: 300px;
    backdrop-filter: blur(10px);
    border-radius: 30px;
    padding: 30px;
    box-sizing: border-box;
    outline: solid 5px black; /* Increased outline width for visibility */
    animation: spin 5s linear infinite; /* Adding the animation */
}

main form{
    border: 3px solid white;
    display: flex;
    border-radius: 30px;
    justify-content: space-between;
    height: 50px;
    box-shadow: 3px 3px 10px rgba(0, 0, 0, 0.3);
}

main form input, 
main form button{
    border: none;
    background-color: transparent;
    outline: none;
    padding: 10px;
    box-sizing: border-box;
}
main form i{
    opacity: 0.7;
}
main .result{
    padding-top: 20px;
    text-align: center;
}
main .result .name{
    font-weight: bold;
    font-size: large;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}
main .temperature img{
    width: 150px;
    filter: drop-shadow(0 10px 50px #555);
}
main .temperature figcaption{
    font-size: 3em;
}
main .description{
    padding: 10px 0 30px;
}
main ul{
    list-style: none;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}
main li{
    background-color: #f78a55;
    color: #fff;
    border-radius: 10px;
    padding: 20px 10px;
    background-image: linear-gradient(
        to bottom,
        transparent 50%,
        #0003 50%
    );
    font-weight: bold;
    font-size: small;
    box-shadow: 3px 3px 10px rgba(0, 0, 0, 0.3);
}
main ul li i{
    font-size: 2em;
    margin: 20px 0;
    display: block!important;
}
main li:nth-child(2){
    background-color: #b56291;
    box-shadow: 3px 3px 10px rgba(0, 0, 0, 0.3);
}
main li:nth-child(3){
    background-color: #48567b;
    box-shadow: 3px 3px 10px rgba(0, 0, 0, 0.3);
}
main.error{
    animation: errorEffect 0.3s linear 1;
}
@keyframes errorEffect{
    0%{
        transform: translate(10px, 5px)
    }
    25%{
        transform: translate(-5px, 0)
    }
    50%{
        transform: translate(8px, 2px)
    }
    75%{
        transform: translate(-2px, 5px)
    }
    100%{
        transform: translate(0, 0); 
    }
}
