.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(51, 51, 56, 0.4);
    backdrop-filter: blur(13px);
    -webkit-backdrop-filter: blur(13px);
    z-index: 1000;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding: 0.35rem 0;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.navbar.scrolled {
    background: rgba(29, 29, 32, 0.6);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    border-bottom-color: rgba(255, 171, 57, 0.2);
}

.nav-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0.7rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-color);
    font-weight: 800;
    font-size: 1.5rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    letter-spacing: -0.02em;
}

.logo:hover {
    transform: scale(1.05);
    color: var(--primary-color);
}

.logo a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

.gamepad-icon {
    width: 2.5rem;
    height: 2.5rem;
    transition: filter 0.3s ease;
}

.nav-links {
    display: flex;
    gap: 2.5rem;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    font-weight: 500;
    font-size: 1rem;
    padding: 0.5rem 0;
}

.nav-links a::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 2px;
}

.nav-links a::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 0;
    height: 0;
    background: var(--glass-bg);
    border-radius: 50%;
    transition: all 0.3s ease;
    z-index: -1;
}

.nav-links a:hover {
    color: var(--text-color);
    transform: translateY(-2px);
}

.nav-links a:hover::before {
    width: 100%;
}

.nav-links a:hover::after {
    width: 120%;
    height: 120%;
}

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 0.25rem;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 1001;
}

.menu-toggle span {
    display: block;
    width: 1.5rem;
    height: 2px;
    background-color: var(--text-color);
    transition: all 0.3s ease;
}

/* Animation for hamburger to X */
.menu-toggle.active span:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
}

@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
    }

    .nav-links {
        display: block;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: rgba(15, 15, 19, 0.95);
        backdrop-filter: blur(10px);
        padding: 0;
        z-index: 999;
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
        border-bottom-left-radius: 8px;
        border-bottom-right-radius: 8px;
        overflow: hidden;
        text-align: center;
        
        /* Animation properties */
        max-height: 0;
        opacity: 0;
        transform: translateY(-10px) scaleY(0.8);
        transform-origin: top center;
        transition: 
            max-height 0.4s cubic-bezier(0.33, 1, 0.68, 1),
            opacity 0.3s cubic-bezier(0.33, 1, 0.68, 1),
            transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
        pointer-events: none;
    }

    .nav-links.active {
        max-height: 300px;
        opacity: 1;
        transform: translateY(0) scaleY(1);
        pointer-events: all;
        padding: 10px 0;
    }
    
    .nav-links a {
        font-size: 1.1rem;
        padding: 0.7rem;
        display: block;
        text-align: center;
        margin: 0 auto;
        border-bottom: none;
    }

    .nav-links a::after {
        bottom: 0;
        left: 50%;
        transform: translateX(-50%);
        width: 0;
    }
    
    .nav-links a:hover::after {
        width: 50%;
    }
    
    .menu-toggle {
        position: relative;
        z-index: 1002;
    }
}