.lofi-nav {
    width: 100%;
    padding: 1rem 3rem;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    background-color: #ffffff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
    will-change: padding, background-color, box-shadow;
    transition: padding 0.4s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.4s ease, background-color 0.4s ease;
}

.nav-links {
    display: none;
    gap: 2rem;
    align-items: center;
}

.nav-logo {
    display: none;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #f0f0f0;
    transition: transform 0.3s ease;
}

.nav-logo:hover {
    transform: scale(1.1);
}

.mobile-logo {
    display: block;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #f0f0f0;
}

.nav-links a {
    text-decoration: none;
    color: #4a4a4a;
    font-family: 'Roboto', sans-serif;
    font-weight: 300;
    font-size: var(--fs-btn);
    text-transform: uppercase;
    letter-spacing: 2px;
    transition: opacity 0.3s ease, text-shadow 0.3s ease;
    position: relative;
}

.nav-links a:hover {
    opacity: 1;
    color: #2c3e50;
    text-shadow: 0 0 8px rgba(238, 192, 200, 0.8);
}

.nav-links a.active {
    font-weight: bold;
    color: #2c3e50;
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 0;
    background-color: #eec0c8;
    transition: width 0.3s ease;
}

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

.hamburger {
    display: none;
    cursor: pointer;
}

.hamburger span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: #4a4a4a;
    margin: 5px 0;
    transition: all 0.3s ease;
}

/* Audio Control */
.audio-control {
    width: 60px;
    height: 30px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 1rem;
    position: relative;
}

#audio-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    pointer-events: none;
    z-index: 2;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background:
        radial-gradient(circle closest-side, #90CAF9 38%, #ffffff 39%, #ffffff 46%, transparent 47%),
        conic-gradient(from -30deg, rgba(244, 143, 177, 0.4) 0deg 120deg, rgba(165, 214, 167, 0.4) 120deg 240deg, rgba(206, 147, 216, 0.4) 240deg 360deg);
}

#audio-icon svg {
    display: block;
    margin-left: 2px;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.2));
    position: relative;
    z-index: 3;
}

@media (hover: hover) {
    .audio-control:hover #audio-icon {
        transform: translate(-50%, -50%) scale(1.1) rotate(360deg);
        box-shadow: 0 6px 15px rgba(0, 0, 0, 0.25);
    }
}

#audio-icon.playing {
    background: none !important;
    opacity: 0.5;
    box-shadow: none;
}

#audio-icon.playing svg {
    margin-left: 0;
}

#audio-visualizer {
    width: 100%;
    height: 100%;
}

/* Desktop Styles */
@media (min-width: 1151px) {
    .nav-links {
        display: flex;
    }

    .nav-logo {
        display: block;
    }

    .mobile-logo {
        display: none;
    }

    .lofi-nav.scrolled {
        padding: 0.75rem 3rem;
        /* Slightly larger padding for subtle shrink */
        background-color: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
        /* Softer shadow */
    }

    .lofi-nav.scrolled .nav-logo {
        width: 48px;
        height: 48px;
        border-radius: 10px;
    }

    .lofi-nav.scrolled .nav-links a {
        font-size: var(--fs-small);
    }

    .lofi-nav.scrolled .nav-links {
        gap: 1.25rem;
    }

    .lofi-nav.scrolled .hamburger span {
        height: 2.5px;
    }
}

/* Mobile Styles */
@media (max-width: 1150px) {
    .lofi-nav {
        padding: 1.5rem;
        justify-content: center;
        position: relative;
        background-color: #FCE4EC;
    }

    .mobile-logo {
        display: block;
        width: 50px;
        height: 50px;
        border-radius: 50%;
        object-fit: cover;
        border: 2px solid #f0f0f0;
    }

    .nav-logo {
        display: none;
    }

    .hamburger {
        display: none !important;
    }

    .nav-links {
        display: none !important;
    }

    .audio-control {
        display: flex !important;
        position: fixed;
        top: 105px;
        bottom: auto;
        /* Anchored to top right */
        right: 20px;
        z-index: 2000;
        background: transparent;
        backdrop-filter: none;
        padding: 0;
        border-radius: 0;
        box-shadow: none;
        transform: scale(0.8);
    }

    /* Touch Targets */
    .nav-links a {
        min-height: 48px;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        padding: 1rem;
    }
}