.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background-color: rgba(15, 15, 19, 0.8);
    backdrop-filter: blur(10px);
    z-index: 1000;
    transition: all 0.3s ease;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.navbar.scrolled {
    padding: 0.5rem 0;
    background-color: rgba(15, 15, 19, 0.95);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-color);
    font-weight: bold;
    font-size: 1.25rem;
    transition: transform 0.3s ease;
}

.logo:hover {
    transform: scale(1.05);
}

.logo a {
    text-decoration: none;
    color: inherit;
}

.gamepad-icon {
    width: 2rem;
    height: 2rem;
    color: var(--primary-color);
    filter: drop-shadow(0 0 8px rgba(147, 51, 234, 0.5));
}

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

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    font-weight: 500;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-color), var(--pink));
    transition: width 0.3s ease;
    border-radius: 2px;
}

.nav-links a:hover {
    color: var(--text-color);
}

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

.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;
    }
}