*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Merriweather Sans', sans-serif;
}

:root {
    --colorDark1: #112D4E;
    --colorDark2: #3F72AF;
    --colorLight1: #DBE2EF;
    --colorLight2: #F9F7F7;
    overflow: hidden;
}

.wrapper {
    width: 100vw;
    height: 100vh;
    color: var(--colorLight2);
    background-image: url("./assets/wallpaperflare.com_wallpaper.jpg");
    display: flex;
    align-content: center;
    justify-content: center;
    padding: 5vh;
    background-size: cover;
    background-position: center;
    
}

.container {
    border: 2px solid rgb(255, 255, 255);
    height: 95vh;
    width: 30vw;
    border-radius: 30px;
    padding: 20px;
    background: rgba(0, 0, 0, 0.678);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

h1 {
    text-align: center;
    text-transform: uppercase;
    padding-top: 20px;
}

.tab-container {
    width: 100%;
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-top: 2rem;
}

.tab {
    cursor: pointer;
    font-size: 1rem;
    padding: 5px 8px;
}

.tab.current-tab {
    background-color: rgba(219, 226, 239, 0.5);
    border-radius: 4px;
}

.weather-container {
    margin-block: 2rem;
}

.btn {
    all: unset;
    font-size: 1rem;
    text-transform: uppercase;
    border-radius: 5px;
    background-color: var(--colorDark2);
    cursor: pointer;
    padding: 10px 30px;
    margin-bottom: 10px;
}

.sub-container {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.grant-location-container {
    display: none;
}

.grant-location-container.active {
    display: flex;
    margin-top: 20vh;
    
}

.grant-location-container img {
    margin-bottom: 2rem;
}

.grant-location-container p:first-of-type {
    font-size: 1.5rem;
    font-weight: 600;
    text-align: center;
}

.grant-location-container p:last-of-type {
    font-size: 0.85rem;
    font-weight: 500;
    margin-top: 0.75rem;
    margin-bottom: 1.75rem;
    letter-spacing: 0.75px;
    text-align: center;
}

.loading-container {
    display: none;
}

.loading-container.active {
    display: flex;
}

.loading-container p {
    text-transform: uppercase;
}

.user-info-container {
    display: none;
}

.user-info-container.active {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.name {
    display: flex;
    align-items: center;
    gap: 0 0.5rem;
    margin-top: 0rem;
}

.user-info-container p {
    font-size: 1.5rem;
    font-weight: 200;
    text-align: center;
}

.user-info-container img {
    width: 90px;
    height: 90px;
}

.name p {
    font-size: 2rem;
}

.name img {
    width: 30px;
    height: 30px;
    object-fit: contain;
}

.user-info-container p[data-temp] {
    font-size: 2.75rem;
    font-weight: 700;
}

.parameter-container {
    width: 100%;
    display: flex;
    flex-wrap: wrap; /* Allows wrapping on smaller screens */
    gap: 10px;
    justify-content: space-between; /* Adds space between items */
    align-items: center;
    margin-top: 2rem;
}

.parameter {
    flex: 1 1 calc(33.33% - 20px); /* Flexible width with space for gaps */
    max-width: 180px; /* Limits the max size */
    background-color: rgba(219, 226, 239, 0.5);
    border-radius: 20px;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.parameter img {
    width: 50px;
    height: 50px;
}

.parameter p:first-of-type {
    font-size: 1rem;
    font-weight: 600;
    text-transform: uppercase;
}

.parameter p:last-of-type {
    font-size: 1rem;
    font-weight: 200;
}

.form-container {
    display: none;
    width: 100%;
    justify-content: center;
    align-items: center;
    gap: 0 10px;
    margin-bottom: 3rem;
}

.form-container.active {
    display: flex;
}

.form-container input {
    all: unset;
    width: calc(100% - 60px);
    height: 40px;
    padding: 0 20px;
    background-color: rgba(219, 226, 239, 0.5);
    border-radius: 10px;
}

.form-container input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.form-container input:focus {
    outline: 3px solid rgba(255, 255, 255, 0.7);
}

.form-container .btn {
    padding: unset;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 100%;
    margin-bottom: 1px;
}

/* Media Queries for Responsive Design */

@media (max-width: 768px) {
    .wrapper {
        height: 94vh; /* Adjust height to content */
        padding: 10px;
      
    }

    .container {
        width: 90vw;
        height: 90vh; /* Adjust height to content */
        padding: 20px;
    }

    h1 {
        font-size: 1.5rem;
    }
    a{
        font-size: 1.5rem;
    }
    .tab-container p {
        flex-direction: column;
        gap: 1px;
        
    }

    .tab {
        font-size: 1rem;
    }
    .grant-location-container.active {
        display: flex;
        margin-top: 20vh;
        
    }

    .parameter-container {
        justify-content: center; /* Center the cards on smaller screens */
    }

    .parameter {
        display: flex;
        height: 20vh;

    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 1.25rem;
    }

    .name p {
        font-size: 1.75rem;
    }

    .user-info-container p[data-temp] {
        font-size: 2rem;
    }

    .parameter-container {
        display: flex;
        flex-direction: row; /* Stack parameters vertically */
    }

    .parameter {
        width: 20vw; /* Full width for smaller screens */
        margin-top: -1rem;
        max-width: none; /* Remove max-width restriction */

    }
}
