.navbar {
    background: rgb(41, 41, 41);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid #00ffb3;
    padding: 0.5rem 0;
    position: sticky;
    z-index: 1000;
    width: 100vw !important;
    margin-left: calc(-50vw + 50%);
    margin-right: calc(-50vw + 50%);
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    top: 0;
}


.nav-brand {
    margin-left: 20px;
    margin-top: 0;
    font-size: 1.4em;
    font-weight: bold;
    color: white;
    text-decoration: none;
    display: flex;
    align-items: center;
}


.nav-brand img {
    margin-right: 0.5rem;
}


.nav-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
    margin-right: 20px;
    order: 999;
}


.nav-container {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto;
    padding: 0 20px;
    top: 0;
}



.nav-links {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 10px;
    align-items: center;
}


.nav-links a {
    color: #d1d1d1;
    text-decoration: none;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 15px;
    transition: text-decoration 1s ease;
    white-space: nowrap;
    display: flex;
    align-items: center;
}


.nav-links a:hover,
.nav-links a.active {
    color: #00ffb7;
    text-decoration: underline;
    text-shadow: 0 0 3px #00ffb7;
    transition: 1s;
}


.hamburger {
    display: none;
    flex-direction: column;
    width: 20px;
    height: 15px;
    cursor: pointer;
    gap: 5px;
}


.line {
    height: 2px;
    width: 100%;
    background: rgb(0, 255, 187);
    border-radius: 2px;
    transition: 1s ease;
    transform-origin: center;
}


.hamburger.active .line:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}


.hamburger.active .line:nth-child(2) {
    opacity: 0;
    transform: scale(0);
}


.hamburger.active .line:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}


.theme-toggle {
    background: none;
    border: 2px solid #444;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ccc;
    transition: all 1s;
}


.nav-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
    margin-right: 20px;
    float: right;
}


.nav-container {
    flex: 1;
    display: flex;
    justify-content: flex-end;
}


.theme-toggle:hover {
    border-color: #00ffb7;
    background: rgba(0, 255, 183, 0.1);
}


.theme-toggle .sun {
    display: block;
}


.theme-toggle .moon {
    display: none;
}


body.dark .theme-toggle .sun {
    display: none;
}


body.dark .theme-toggle .moon {
    display: block;
}


@media (max-width: 1046px) {
    .hamburger {
        display: flex;
        float: right;
        margin-left: 5px;
    }


    .nav-container {
        position: fixed;
        background: var(--bg-navbar-colour);
        top: 49px;
        left: 0;
        width: 100%;
        backdrop-filter: blur(10px);
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: all 1s;
        flex-direction: column;
    }


    .nav-container.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
        background: var(--bg-navbar-colour);
    }


    .nav-links {
        flex-direction: column;
        width: 100%;
        gap: 0;
        padding: 0;
    }


    .nav-links li {
        width: 100%;
        border-bottom: 1px solid #444;
        color: white;
    }


    .nav-links a {
        display: block;
        width: 100%;
        padding: 1rem 20px;
        font-size: 15px;
        text-align: left;
        color: var(--bg-h1-colour);
    }
}


@media (max-width: 481px) {
    .hamburger {
        display: flex;
        float: right;
        margin-left: 5px;
    }


    .nav-container {
        position: fixed;
        background: var(--bg-navbar-colour);
        top: 49px;
        left: 0;
        width: 100%;
        backdrop-filter: blur(10px);
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
        flex-direction: column;
        padding: 2rem 0;
    }


    .nav-container.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
        background: var(--bg-navbar-colour);
    }


    .nav-links {
        flex-direction: column;
        width: 100%;
        gap: 0;
        padding: 0;
    }


    .nav-links li {
        width: 100%;
        border-bottom: 1px solid #444;
        color: white;
    }


    .nav-links a {
        display: block;
        width: 100%;
        padding: 1rem 20px;
        font-size: 10px;
        text-align: left;
        color: var(--bg-h1-colour);
    }
}