@import url('https://fonts.googleapis.com/css2?family=Boldonse&family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Poppins", sans-serif;
    color: var(--text-color);
    transition: color 2s ease-in-out;
}

:root {
    --text-color: white;
}

body {
    width: 100vw;
    height: 100vh;
    background-image: url(https://i.pinimg.com/originals/11/8f/1a/118f1aaea40193b3af9214cc45475f1d.gif);
    background-repeat: no-repeat;
    background-size: cover;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 105px;
}

.container {
    width: 350px;
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.212);
    padding: 25px;
    box-shadow: 0px 0px 5px rgba(0, 0, 0, 0.459);
    transition: all 1s cubic-bezier(0.37, 0.46, 0, 1.04);
    max-height: 95px;
    position: relative;
}

.container::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    backdrop-filter: blur(20px);
    z-index: -1;
}

.searchbar input {
    position: relative;
    padding: 10px 36px;
    width: 100%;
    border-radius: 10px;
    background: none;
    border: 0;
}

.searchbar {
    position: relative;
    width: 100%;
    border: 1px solid rgba(255, 255, 255, 0.212);
    border-radius: 11px;
    z-index: 1;
}

#recent-search {
    position: absolute;
    top: 45px;
    width: 100%;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.212);
    border-radius: 10px;
}

#recent-search button img {
    width: 6%;
}

#recent-search button {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 5px 10px;
    background: none;
    border: 0;
    cursor: pointer;
}

#recent-search button:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.searchbar input:focus-visible {
    outline: 0;
}

.searchbar .search {
    position: absolute;
    top: 10px;
    left: 10px;
    width: 20px;
}

.searchbar .location {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 19px;
    cursor: pointer;
    transition: all 1s cubic-bezier(0, 0.63, 0.42, 1.39);
}

#recent-search {
    visibility: hidden;
}

.searchbar:focus-within #recent-search {
    visibility: visible;
}

.searchbar img:nth-of-type(2):hover {
    transform: scale(1.1);
}

.img-status,
.status {
    overflow: hidden;
}

.img-status img {
    margin-top: 10px;
    width: 200px;
    image-rendering: -webkit-optimize-contrast;
    filter: contrast(130%) brightness(105%) drop-shadow(1px 1px 8px #3d3d3dab);
}

.extraData img {
    width: 100%;
    object-fit: contain;
}

.humidity {
    width: 10%;
}

.windSpeed {
    width: 10%;
}

.windSpeed p {
    font-size: 12px;
}

.extraData {
    width: 100%;
    overflow: hidden;
    gap: 140px;
}

.status p {
    text-transform: capitalize;
    font-weight: 700;
}

.extraData .details {
    font-size: 14px;
    font-weight: 500;
}

.error-message {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 10px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.212);
    border-radius: 10px;
    font-size: 14px;
    position: absolute;
    top: 30px;
    background-color: rgba(255, 0, 0, 0.2);
    animation: fadeinOut 5s cubic-bezier(0.25, 1, 0.5, 1) forwards;
    text-transform: capitalize;
}

#message {
    background-color: rgba(0, 68, 255, 0.2);
}

.error-message img:first-child {
    width: 20px;
}

.error-message img {
    width: 30px;
    margin-left: 5px;
    cursor: pointer;
}

.credits {
    position: absolute;
    bottom: 20px;
    left: 20px;
    font-size: 10px;
}

@keyframes fadeinOut {
    0% {
        opacity: 0;
        transform: translateY(-40px);
    }

    30% {
        opacity: 1;
        transform: translateY(0);
    }

    70% {
        opacity: 1;
        transform: translateY(0);
    }

    100% {
        opacity: 0;
        transform: translateY(20px);
        ;
    }
}

.userLocation button {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    align-items: center;
    padding: 12px;
    background: none;
    gap: 5px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.212);
    border-radius: 50%;
    cursor: pointer;
}

.userLocation button:hover {
    background-color: rgba(255, 255, 255, 0.171);
}

.userLocation button img {
    width: 20px;
}

.tooltip {
    position: absolute;
    padding: 3px 8px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.212);
    border-radius: 10px;
    top: 30px;
    right: 70px;
    font-size: 13px;
    opacity: 0;
    transition: all 1s ease-in-out 0.5s;
}

.userLocation:hover .tooltip {
    opacity: 1;
}

.userScreenshot button {
    position: absolute;
    bottom: 15px;
    right: 15px;
    display: flex;
    align-items: center;
    padding: 12px;
    background: none;
    gap: 5px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.212);
    border-radius: 50%;
    cursor: pointer;
}

.userScreenshot button:hover {
    background-color: rgba(255, 255, 255, 0.171);
}

.userScreenshot button img {
    width: 20px;
}

.tooltip2 {
    position: absolute;
    padding: 3px 8px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.212);
    border-radius: 10px;
    bottom: 25px;
    right: 65px;
    font-size: 13px;
    opacity: 0;
    transition: all 1s ease-in-out 0.5s;
}

.userScreenshot:hover .tooltip2 {
    opacity: 1;
}

.img {
    transition: filter 2s ease-in-out;
}

.title {
    font-size: 2rem;
    font-weight: 600;
    text-align: center;
    margin-bottom: 0.3em;
    text-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
}

.subtitle {
    font-size: 1rem;
    text-align: center;
    margin-bottom: 2em;
}

@media only screen and (max-width:470px) {
    .error-message {
        width: 90%;
        font-size: 12px;
    }

    .error-message img:first-child {
        width: 15px;
    }

    .error-message img {
        width: 25px;
        margin-left: 3px;
    }

    body {
        gap: 100px;
    }

    .title {
        font-size: 1.8rem;
        margin-bottom: 0.2em;
    }
    
    .subtitle {
        font-size: 0.95rem;
    }

    .container {
        width: 330px;
    }

    .humidity h3,.windSpeed h3 {
        font-size: 13px;
    }

    .humidity p,.windSpeed p {
        font-size: 10px;
    }
}