@supports not selector(::-webkit-scrollbar) {
    html {
        scrollbar-width: thin;
        scrollbar-color: #000 transparent;
    }
}
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: #000;
    border-radius: 4px;
}
::-webkit-scrollbar-corner {
    background: transparent;
}

.frow, .fcolumn{display:flex;}
.frow {flex-direction: row;}
.fcolumn {flex-direction: column;}

html {
    display: flex;
    height: 100%;
}
body {
    background: var(--dark);
    font-family: var(--body-font);
    color: var(--lightest);
    flex-direction: column;
    height: 100vh;
    display: flex;
}

h1 {
    line-height: 1.5em;
    font-size: 1.35em;
    font-family: var(--header-font);
    letter-spacing: 2px;
    font-weight: 600;
    color: var(--accent);
    text-transform: uppercase;
}
.headpass {
    font-weight: 600;
    font-family: var(--body-font);
    color: var(--lightest);
    
}

nav {
    width: 100%;
    height: 4em;
    display: flex;
    justify-content: center;
    align-items: center;
    flex: 0 0 auto;
}
.nav-content {
    height: 3em;
    width: 90%;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    border-bottom: 4px solid var(--lightest);
}
nav .logo {
    font-family: var(--header-font);
    font-size: 1.5em;
    font-weight: bold;
}
nav .links {
    display: flex;
    flex-direction: row;
    gap: 3.5em;
    align-items: center;
}
nav .links a:not(:last-child) {
    display: inline-flex;
    flex: 1 1 0;
    min-width: max-content; 
    text-align: center;
    white-space: nowrap;
}
nav .links a:last-child {
    flex: 0 0 auto;
    white-space: nowrap;
}
nav .links a {
    font-family: var(--body-font);
    color: var(--lightest);
    text-decoration: none;
    font-weight: 500;
    font-size: 1.2em;
    position: relative;
    padding-bottom: 4px; 
}

nav .links a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -18px;
    width: 0;
    height: 6px;
    background-color: var(--accent);
    transition: width 0.3s ease;
}

nav .links a:hover:not(:last-child) {
    color: var(--accent);
}
nav .links a:not(:last-child):hover::after {
    width: 100%;
}

.logout-btn {
    background: var(--accent);
    color: var(--lightest);
    border-radius: 1px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    padding: .3em .6em;
}

.m-menu-toggle,
.m-burger { display: none; }

@media (max-width: 700px) {

    nav {
        z-index: 950;
        background: var(--dark);
        height: auto;
        padding: 0 16px;
        box-sizing: border-box;
    }
    nav .nav-content {
        width: 100%;
        height: 3.2em;
        align-items: center;
        border-bottom-width: 3px;
    }
    nav .logo { font-size: 1.15em; position: relative; z-index: 2; }
    nav .logo h1 { line-height: 1.2em; }
    .m-burger {
        position: relative;
        z-index: 2;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 5px;
        width: 2.4em;
        height: 2.4em;
        margin-right: -0.4em;
        cursor: pointer;
    }
    .m-burger span {
        display: block;
        width: 1.5em;
        height: 3px;
        background: var(--lightest);
        transition: transform 0.2s, opacity 0.2s;
    }
    .m-menu-toggle:checked + .nav-content { border-bottom-color: var(--accent); }
    .m-menu-toggle:checked + .nav-content .m-burger span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
    .m-menu-toggle:checked + .nav-content .m-burger span:nth-child(2) { opacity: 0; }
    .m-menu-toggle:checked + .nav-content .m-burger span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

    nav .links {
        display: none;
        position: fixed;
        inset: 0;
        z-index: 1;
        flex-direction: column;
        justify-content: center;
        gap: 0.4em;
        padding: 4em 16px calc(2em + env(safe-area-inset-bottom));
        box-sizing: border-box;
        background: var(--darkest) url('../img/darknoise.svg') repeat;
        animation: m-menu-in 0.2s ease;
    }
    @keyframes m-menu-in { from { opacity: 0; } to { opacity: 1; } }
    .m-menu-toggle:checked + .nav-content .links { display: flex; }
    body:has(.m-menu-toggle:checked) { overflow: hidden; }
    nav .links a,
    nav .links a:not(:last-child) {
        display: block;
        flex: 0 0 auto;
        width: 100%;
        max-width: 18em;
        padding: 0.55em 0;
        font-family: var(--header-font);
        font-size: 2em;
        letter-spacing: 2px;
        text-transform: uppercase;
        text-align: center;
    }
    nav .links a::after { display: none; }
    nav .links a[aria-current="page"] { color: var(--accent); }
    nav .links .logout-btn {
        margin-top: 1em;
        font-family: var(--body-font);
        font-size: 1.1em;
        padding: 0.8em 0;
        justify-content: center;
        border-radius: 0;
    }
}
