:root{
    --nav-background: rgba(255, 255, 255, 0.6);
    --nav-closed-background: rgba(255, 255, 255, 0.4);
}

@media (prefers-color-scheme: dark) {
    :root{
        --nav-background: rgba(0, 8, 0, 0.6);
        --nav-closed-background: rgba(0, 8, 0, 0.6);
    }
}

.nav-content.opened {
    display: flex;
    flex-direction: column-reverse;
    justify-content: space-between;
    height: 20dvh;
    background-color: var(--nav-background);
    backdrop-filter: blur(1px);
    transition: height 0.3s ease-in-out;
    overflow: hidden;
    border-radius: 0 0 15px 15px;
}

.nav-content.opened.hidden {
    height: 0;
}

.nav-close-btn {
    content: "";
    padding: 0;
    height: 0;
    border: 5px solid #98E2C6;
    border-radius: 20px;
    margin: 10px;
    transition: transform 0.05s ease, height 0.3s ease, border-color 0.5s ease;
    cursor: pointer;
}

.nav-close-btn:hover {
    border: 5px solid #ffffff;
    height: 2px;
    transform: scale(1.005);
}

.nav-content.closed {
    position: relative;
    top: 0;
    width: 100%;
    height: 38px;
    background-color: var(--nav-closed-background);
    backdrop-filter: blur(1px);
    transition: transform 0.05s ease-in-out, opacity 0.3s ease-in-out, height 0.3s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 15px;
}

.nav-content.closed.hidden {
    height: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease-in-out, height 0.3s ease-in-out, scale 0.3s ease-in-out;
}

.nav-content.closed img {
    display: none;
    filter: drop-shadow(0 0 1px #000) drop-shadow(0 0px 1px rgba(255,255,255,0.6));
}

.nav-content.closed .open-area{
    content: "";
    padding: 0;
    height: 0;
    width: 100%;
    border: 5px solid #98E2C6;
    border-radius: 20px;
    margin: 10px;
    transition: transform 0.05s ease, height 0.3s ease, border-color 0.5s ease;
    cursor: pointer;
}

.nav-content.closed .open-area:hover {
    border: 5px solid #ffffff;
    transform: scale(1.005);
}

.nav-content.opened .nav-links {
    list-style: none;
    text-decoration: none;
    display: flex;
    flex-direction: row;
    align-items: stretch;
    justify-content: space-between;
    margin: 10px 0 0 0;
    padding:0;
    flex: 1;
    gap: 5%;
}

.nav-content.opened .nav-links li {
    flex: 1;
    display: flex;
    align-items: stretch;
    justify-content: center;
    width: 100%;
}

.nav-content.opened .nav-links li > a {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: var(--color-text);
    border-radius: 5px;
    font-size: 0.9rem;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    -webkit-user-drag: none;
}

.nav-content.opened .nav-links li > a:hover {
    background-color: rgba(152, 226, 198, 0.2);
    transform: scale(105%);
    transition: transform 0.1s ease-in-out, background-color 0.3s ease-in-out;
}

.nav-content.opened .nav-links svg {
    flex: 1 1 auto;
    width: 90% !important;
    height: 90% !important;
    max-width: 100px;
    max-height: 100px;
    box-sizing: border-box;
    stroke: #98E2C6;
    filter: drop-shadow(0 0 1px #fff) drop-shadow(0 0px 1px rgba(255,255,255,0.6));
}

@media (max-width: 600px) {
    .nav-content.opened {
        height: 80dvh;
    }

    .nav-content.opened .nav-links{
        display : grid;
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: repeat(3, auto);
        gap: 10px;
        margin: 10px;
        justify-items: center;
    }

    .nav-content.opened .nav-links li {
        width: 100%;
        max-width: 200px;
    }

    .nav-content.opened .nav-links svg{
        max-width: 70px;
        max-height: 70px;
    }
}