*,
::before,
::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

nav {
    z-index: 100;
    font-size: 17px;
    color: #f8fafc;
    top: 0%;
    position: fixed;
    width: 100%;
    display: flex;
    align-items: center;
    padding: 15px 25px;
    background: rgba(15, 23, 42, 0.9); /* slate-900 with opacity */
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    border-bottom: 1px solid rgba(56, 189, 248, 0.1);
}

.nav-icon {
    display: flex;
    align-items: center;
    text-decoration: none;
    margin-right: 20px;
}

.nav-icon span {
    font-family: 'Inter', sans-serif;
    font-size: 25px;
    margin-left: 10px;
    font-weight: 600;
    color: #f8fafc;
    letter-spacing: -0.02em;
}

.nav-icon img {
    width: 45px;
    height: auto;
    border-radius: 8px;
    animation: logo-load 1.2s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes logo-load {
    0% { transform: scale(0.5) rotate(-15deg); opacity: 0; }
    50% { transform: scale(1.1) rotate(5deg); opacity: 0.8; }
    100% { transform: scale(1) rotate(0deg); opacity: 1; }
}

.main-navlinks {
    font-family: 'Inter', sans-serif;
}

.hamburger {
    display: none;
}

.navlinks-container a {
    margin: 0 15px;
    font-size: 15px;
    font-weight: 500;
    text-decoration: none;
    color: #cbd5e1;
    display: inline-block;
    position: relative;
    transition: color 0.3s ease;
}

.navlinks-container a::after {
    content: "";
    display: block;
    position: absolute;
    bottom: -4px;
    width: 100%;
    height: 2px;
    transform: scaleX(0);
    transform-origin: left;
    background: #38bdf8;
    transition: transform 0.3s ease-out;
    border-radius: 2px;
}

.navlinks-container a:hover {
    color: #f8fafc;
}

.navlinks-container a:hover::after {
    transform: scaleX(1);
}

.nav-authentication {
    margin-left: auto;
}

.sign-btns a {
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 600;
    padding: 10px 18px;
    margin: 0 5px;
    border-radius: 8px;
    color: #0f172a;
    background: #38bdf8;
    border: none;
    transition: all 0.3s ease;
    cursor: pointer;
}

.sign-btns a:hover {
    background: #7dd3fc;
    box-shadow: 0 4px 12px rgba(56, 189, 248, 0.4);
    transform: translateY(-1px);
}

.sign-user {
    display: none;
}

@media (max-width: 1000px) {
    nav {
        padding: 15px 20px;
        position: relative;
    }
    .nav-icon {
        order: 2;
        margin: 0 auto;
    }
    .nav-icon span {
        font-size: 22px;
    }
    .main-navlinks {
        order: 1;
    }
    .hamburger {
        width: 24px;
        height: 20px;
        cursor: pointer;
        border: none;
        display: flex;
        background: transparent;
        align-items: center;
        position: relative;
    }
    .hamburger span {
        display: block;
        width: 100%;
        height: 2px;
        background: #f8fafc;
        position: absolute;
        pointer-events: none;
        transition: opacity 0.3s 0.15s ease-out, transform 0.3s ease-out;
        border-radius: 2px;
    }
    .hamburger span:nth-child(1) {
        transform: translateY(8px);
    }
    .hamburger span:nth-child(3) {
        transform: translateY(-8px);
    }
    .hamburger.open span:nth-child(1) {
        transform: translate(0) rotate(135deg);
    }
    .hamburger.open span:nth-child(2) {
        opacity: 0;
        transition: opacity 0s ease-out;
    }
    .hamburger.open span:nth-child(3) {
        transform: translate(0) rotate(-135deg);
    }
    .navlinks-container {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        position: absolute;
        background: #0f172a;
        top: 100%;
        left: 0;
        height: 100vh;
        padding: 20px 50px 20px 20px;
        border-right: 1px solid rgba(255,255,255,0.1);
        transform: translate(-100%);
        transition: transform 0.3s ease-out;
        box-shadow: 10px 0 15px -3px rgba(0,0,0,0.5);
    }
    .navlinks-container.open {
        transform: translate(0%);
    }
    .navlinks-container a {
        font-size: 18px;
        margin: 15px 0;
    }
    .nav-authentication {
        order: 3;
        margin-left: 0;
    }
    .sign-btns {
        display: none;
    }
    .sign-user {
        display: block;
        cursor: pointer;
        border: none;
        background: transparent;
    }
    .sign-user img {
        width: 24px;
        filter: invert(1);
    }
}

@media (max-width: 500px) {
    .nav-icon img {
        width: 35px;
    }
    .nav-icon span {
        font-size: 20px;
    }
}
