/* Navigation Bar Styles */
nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 1rem 3rem;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
    background: transparent;
    transform: translateY(-100%);
    /* Start hidden off-screen */
}

/* Shown state when scrolled */
nav.scrolled {
    background: rgba(0, 0, 0, 0.2);
    /* Very subtle dark overlay on scroll */
    backdrop-filter: blur(10px);
    transform: translateY(0);
    /* Slide into view */
}

.nav-links {
    display: flex;
    gap: 2.5rem;
    list-style: none;
    background: transparent;
    padding: 0.8rem 2rem;
    border-radius: 50px;
}

.nav-links li {
    position: relative;
}

.nav-links a {
    color: #ffffff;
    text-decoration: none;
    font-family: 'Averta', system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-weight: 400;
    font-size: 0.9rem;
    text-transform: none;
    letter-spacing: 1px;
    opacity: 1;
    transition: all 0.3s ease;
    display: block;
}

.nav-links a:hover,
.nav-links a.active {
    opacity: 1;
    color: #ce8eff;
    transform: translateY(-2px);
}

/* Active indicator dot */
.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%) scale(0);
    width: 4px;
    height: 4px;
    background-color: #ce8eff;
    border-radius: 50%;
    transition: transform 0.3s ease;
}

.nav-links a:hover::after,
.nav-links a.active::after {
    transform: translateX(-50%) scale(1);
}

/* Mobile Menu Button (Hidden by default, shown on small screens) */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
    z-index: 1001;
}

.bar {
    width: 30px;
    height: 3px;
    background-color: #fff;
    border-radius: 3px;
    transition: all 0.3s ease;
}

/* Responsive Styles */
@media (max-width: 768px) {
    nav {
        padding: 0;
    }

    /* Animated Visualizer Menu Icon */
    .menu-toggle {
        display: flex;
        flex-direction: row;
        /* Horizontal alignment for equalizer bars */
        align-items: flex-end;
        /* Align bars to bottom */
        justify-content: center;
        gap: 4px;
        /* Grid-like spacing */
        position: fixed;
        top: 25px;
        right: 25px;
        z-index: 3000;
        background: rgba(0, 0, 0, 0.2);
        /* Very subtle bg */
        padding: 10px;
        width: 50px;
        height: 50px;
        border-radius: 8px;
        /* Square with rounded corners looks more like a 'grid' container */
        border: 2px solid #ce8eff;
        /* Solid outline as requested */
        backdrop-filter: blur(5px);
        box-shadow: 0 0 10px rgba(206, 142, 255, 0.2);
    }

    .bar {
        width: 4px;
        background-color: #ce8eff;
        border-radius: 2px;
        transition: all 0.3s ease;
        animation: menuViz 1s ease-in-out infinite alternate;
    }

    /* Random heights for 'visualizer' look */
    .bar:nth-child(1) {
        height: 12px;
        animation-delay: 0s;
    }

    .bar:nth-child(2) {
        height: 20px;
        animation-delay: 0.2s;
    }

    .bar:nth-child(3) {
        height: 15px;
        animation-delay: 0.4s;
    }

    @keyframes menuViz {
        0% {
            height: 8px;
            opacity: 0.7;
        }

        100% {
            height: 22px;
            opacity: 1;
        }
    }

    .nav-links {
        position: fixed;
        top: 0;
        left: 0;
        /* Align left */
        width: 100vw;
        height: 100vh;
        /* Glassy, gradient overlay */
        background: radial-gradient(circle at top, rgba(36, 0, 70, 0.95), rgba(0, 0, 0, 0.98));
        backdrop-filter: blur(20px);
        border-left: 1px solid rgba(255, 255, 255, 0.08);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 3rem;
        transform: translateX(100%);
        transition: transform 0.4s cubic-bezier(0.77, 0, 0.175, 1);
        padding: 0;
        border-radius: 0;
        z-index: 2999;
        /* Below toggle */
    }

    /* Subtle "Menü" label at top */
    .nav-links::before {
        content: 'MENÜ';
        position: absolute;
        top: 32px;
        left: 50%;
        transform: translateX(-50%);
        font-size: 0.85rem;
        letter-spacing: 0.35em;
        text-transform: uppercase;
        color: rgba(255, 255, 255, 0.6);
    }

    .nav-links.active {
        transform: translateX(0);
    }

    /* Animated list items for more "pro" feel */
    .nav-links li {
        opacity: 0;
        transform: translateY(10px);
        animation: navItemIn 0.5s ease forwards;
    }

    .nav-links li:nth-child(1) {
        animation-delay: 0.05s;
    }

    .nav-links li:nth-child(2) {
        animation-delay: 0.1s;
    }

    .nav-links li:nth-child(3) {
        animation-delay: 0.15s;
    }

    .nav-links li:nth-child(4) {
        animation-delay: 0.2s;
    }

    .nav-links li:nth-child(5) {
        animation-delay: 0.25s;
    }

    .nav-links a {
        font-size: 1.6rem;
        color: #ffffff;
        opacity: 0.9;
        text-transform: uppercase;
        letter-spacing: 0.25em;
    }

    .nav-links a::after {
        bottom: -10px;
        width: 36px;
        height: 2px;
        border-radius: 999px;
    }

    /* Active State for Visualizer Menu (Simplifies or changes color) */
    .menu-toggle.active .bar {
        animation: none;
        background: #fff;
        height: 25px;
        /* Form a shape */
        width: 4px;
        position: absolute;
        top: 50%;
        left: 50%;
    }

    .menu-toggle.active .bar:nth-child(1) {
        transform: translate(-50%, -50%) rotate(45deg);
        height: 30px;
    }

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

    .menu-toggle.active .bar:nth-child(3) {
        transform: translate(-50%, -50%) rotate(-45deg);
        height: 30px;
    }

    @keyframes navItemIn {
        from {
            opacity: 0;
            transform: translateY(14px);
        }

        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
}