* {
    padding: 0;
    margin: 0;
    box-sizing: border-box;
    font-family: "Poppins", sans-serif;
    overflow-x: hidden;
}

.wrapper {
    height: 100vh;
    width: 100vw;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.home-page {
    width: 100%;
    height: 100vh;
    position: absolute;
    display: flex;
    align-items: center;
    flex-direction: column;
    opacity: 0;
    z-index: -3;
}

.home-page p{
    font-size: 2rem;
}

.home-image {
    height: 60vh;
    object-fit: contain;
    margin-top: 50px;
}

.home-active{
    opacity: 1;
}

.error-container {
    width: 100%;
    height: 100vh;
    position: absolute;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    z-index: -3;
}

.error-image {
    height: 60vh;
    object-fit: contain;
    margin-top: -50px;
}

.error-active {
    opacity: 1;
}

/* loader section */

.loader-container {
    position: absolute;
    width: 100vw;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    z-index: -3;
}

.active-loader {
    opacity: 1;
}
.custom-loader {
    width: 70px;
    height: 70px;
    background: #000;
    border-radius: 50px;
    mask: radial-gradient(
                circle 31px at 50% calc(100% + 13px),
                #000 95%,
                #0000
            )
            top 4px left 50%,
        radial-gradient(circle 31px, #000 95%, #0000) center,
        radial-gradient(circle 31px at 50% -13px, #000 95%, #0000) bottom 4px
            left 50%,
        linear-gradient(#000 0 0);
    mask-composite: xor;
    mask-composite: exclude;
    mask-repeat: no-repeat;
    animation: cu10 1.5s infinite;
}

@keyframes cu10 {
    0% {
        -webkit-mask-size: 0 18px, 0 18px, 0 18px, auto;
    }
    16.67% {
        -webkit-mask-size: 100% 18px, 0 18px, 0 18px, auto;
    }
    33.33% {
        -webkit-mask-size: 100% 18px, 100% 18px, 0 18px, auto;
    }
    50% {
        -webkit-mask-size: 100% 18px, 100% 18px, 100% 18px, auto;
    }
    66.67% {
        -webkit-mask-size: 0 18px, 100% 18px, 100% 18px, auto;
    }
    83.33% {
        -webkit-mask-size: 0 18px, 0 18px, 100% 18px, auto;
    }
    100% {
        -webkit-mask-size: 0 18px, 0 18px, 0 18px, auto;
    }
}

.navbar {
    height: 9vh;
    width: 100%;
    display: flex;
    justify-content: space-around;
    /* align-items: center; */
    margin: 10px 0;
}

.navbar h1 {
    font-size: 2rem;
}

.search-bar {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.search-bar input {
    height: 2rem;
    width: 18rem;
    border: 1.4px solid black;
    border-radius: 3px;
    padding: 8px;
}

button {
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    border: none;
}

.fa-magnifying-glass {
    background-color: black;
    color: white;
    padding: 10px;
    border-radius: 50%;
}

.weather-data-container {
    position: relative;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 60px;
    display: none;
}

.active {
    display: block;
}

.place-desc {
    font-size: 1.4rem;
    font-weight: 200;
    text-align: center;
    margin-bottom: 10px;
    margin-top: 20px;
}

.weather-condition {
    height: 200px;
    width: 200px;
}

.bold-text{
    font-weight: 700;
}

.bold {
    font-weight: 700;
}

.img-temp-desc {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 50px;
}

.weather-temp {
    display: flex;
    flex-direction: column;
}

.weather-temp p:nth-child(1) {
    font-size: 4.5rem;
    font-weight: 600;
}

.weather-temp p:nth-child(2) {
    font-size: 1.5rem;
    color: rgb(133, 132, 132);
}

.temp-stats {
    width: 70%;
    margin: 14px auto;
    display: flex;
    justify-content: space-evenly;
    margin-top: 50px;
    align-items: center;
}

.statWeather {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

.stat {
    font-size: 1.2rem;
    text-align: center;
}

.stat-heading {
    font-size: 1rem;
}

/* Adding responsive Layout */
@media screen and (max-width: 768px) {
    .navbar {
        height: 110px;
        flex-direction: column;
    }
    .tag-name {
        padding: 0 0 0 20px;
    }
    .search-bar input {
        height: 2.4rem;
        width: 60vw;
    }
    .home-page p{
        font-size: 1.8rem;
    }
    .home-image {
        height: 60vw;
        margin-top: 60px;
    }
    .error-image{
        height: 60vw;
        margin-top: -100px;
    }
    .weather-data-container {
        gap: 50px;
    }
    .place-desc {
        font-size: 1.6rem;
        margin-bottom: 20px;
    }
    .img-temp-desc {
        gap: 0px;
        flex-direction: column;
    }
    .weather-condition {
        height: 200px;
        width: 200px;
    }
    .img-temp-desc {
        gap: 0px;
    }
    .weather-temp {
        justify-content: center;
        align-items: center;
    }
    .temp-stats {
        width: 80%;
        justify-content: space-around;
    }
}

@media screen and (max-width: 480px) {
    .navbar {
        flex-direction: column;
    }
    .search-bar input {
        height: 2.4rem;
        width: 80vw;
    }
    .home-page p{
        font-size: 1.4rem;
    }
    .home-image {
        height: 60vw;
        margin-top: 100px;
    }
    .error-image{
        height: 60vw;
        margin-top: -100px;
    }
    .weather-data-container {
        gap: 40px;
    }
    .place-desc {
        font-size: 1.6rem;
        margin-bottom: 10px;
    }
    .temp-stats {
        width: 96%;
    }
}

@media screen and (max-width: 400px) {
    .navbar {
        height: 100px;
        flex-direction: column;
    }
    .temp-stats {
        flex-direction: column;
        gap: 40px;
        margin-top: 40px;
    }
    .statWeather img {
        height: 140px;
        width: 140px;
    }
    .error-image {
        height: 95vw;
        width: 95vw;
        margin-top: -80px;
    }
}
