* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    font-family: 'Arial', sans-serif;
    background-image: url('https://th.bing.com/th/id/R.3c4b078af7284e4f772eb1daea326199?rik=9vLOUyA9%2fjVqyg&riu=http%3a%2f%2fi.kinja-img.com%2fgawker-media%2fimage%2fupload%2ft_original%2fis9l7titozic2s3xpqjk.gif&ehk=PYzKzzE3pOb5ET%2bIARtlj%2bxm1CU3BiYfbEPWsSUZnG8%3d&risl=1&pid=ImgRaw&r=0'); 
    background-size: cover; 
    background-position: center center;  
    background-repeat: no-repeat;  
    background-attachment: fixed;  


}
body {
    display: flex;
    justify-content: center;  
    align-items: center;     
    height: 100vh;            
}

.container {
    background-color: rgba(51, 51, 51, 0.8); /* Adjust opacity by changing the last value (0.8) */
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    text-align: center;
    width: 350px;
    transition: all 0.3s ease;
}
h1 {
    color: #fff;
    font-size: 28px;
    margin-bottom: 25px;
    letter-spacing: 1px;
}

.input-section {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 20px;
}

#cityInput {
    width: 65%;
    padding: 10px;
    border-radius: 8px;
    border: none;
    outline: none;
    font-size: 16px;
    margin-right: 10px;
}

button {
    padding: 10px 15px;
    border-radius: 8px;
    border: none;
    background-color: #3347ff;
    color: #fff;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s;
}

button:hover {
    background-color: #293df2;
}

.weather-data {
    margin-top: 20px;
}

.weather-data h2 {
    font-size: 22px;
    margin-bottom: 15px;
    color: #f1f1f1;
}

.weather-data p {
    margin: 8px 0;
    font-size: 16px;
    color: #dcdcdc;
}

.weather-data img {
    width: 80px;
    margin-bottom: 15px;
}

.error {
    color: #ff4d4d;
    font-size: 18px;
    margin-top: 20px;
    background-color: #4c4c4c;
    padding: 10px;
    border-radius: 8px;
}

.container:hover {
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.6);
}

/* Footer styling */
footer {
    background: rgb(39, 39, 42);
    color: #fff;
    text-align: center;
    padding: 1rem;
    width: 100%;
    position: fixed;
    bottom: 0;
}

/* Responsive styling */
@media (max-width: 768px) {
    .container {
        width: 90%;  
    }

    h1 {
        font-size: 24px;  
    }

    #cityInput {
        width: 70%;  
    }

    button {
        padding: 8px 12px;
        font-size: 14px; 
    }

    .weather-data h2 {
        font-size: 20px;
    }

    .weather-data img {
        width: 60px;  /* Reduce icon size */
    }
}

@media (max-width: 480px) {
    .container {
        width: 100%;  
        padding: 20px; 
    }

    h1 {
        font-size: 22px; 

    #cityInput {
        width: 60%;  
    }

    button {
        padding: 8px 10px;
        font-size: 12px; 
    }

    .weather-data h2 {
        font-size: 18px;
    }

    .weather-data img {
        width: 50px;  
    }

    .error {
        font-size: 16px; 
    }

    footer {
        padding: 0.8rem;  
    }
}
}