/* Navigation Styles */

.nav-container {
    /* Default: relative for desktop, ensure gradient continuity */
    position: relative;
    width: 100%;
    height: 160px;
    /* Increased from 140px to prevent clipping */
    z-index: 1000;
    background: inherit !important;
    /* Inherit the body gradient */
    box-shadow: none !important;
    border: none !important;
    overflow: hidden;
    /* Add safe area for phone notch */
    padding-top: env(safe-area-inset-top);
}

.nav-container::before {
    /* Remove background for nav bar */
    display: none !important;
}

#container,
#canvas,
nav#navigation {
    position: relative;
    z-index: 1;
}

#container {
    width: 100vw;
    height: 160px;
    position: relative;
    overflow: hidden;
    background: transparent !important;
}

#canvas {
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 10;
    pointer-events: auto;
    width: 100vw;
    height: 160px;
    background: transparent !important;
}

nav#navigation {
    position: absolute;
    top: 80px;
    /* Center in 160px height */
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1;
    display: flex;
    flex-direction: row;
    gap: clamp(8px, 3vw, 40px);
    align-items: center;
    justify-content: center;
    width: 100vw;
    max-width: 100vw;
    min-width: 0;
    overflow: visible;
    white-space: normal;
    background: transparent !important;
}

.nav-button {
    color: #ffffff;
    font-size: clamp(12px, 3vw, 24px);
    /* Reduced from 14px-28px */
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 12px 1.5vw;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 1px;
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    font-family: 'Terminal Grotesque', Arial Black, Arial, sans-serif;
    border: none;
    background: transparent;
    position: relative;
    z-index: 100;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    -webkit-font-smoothing: antialiased;
}

.nav-button:hover,
.nav-button:focus,
.nav-button:active {
    color: #ffffff;
    text-shadow: 0 0 10px #585858, 0 0 20px #919191, 0 0 30px #686868;
    outline: none;
}

.nav-button.active {
    color: #ffffff;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.nav3d-scale {
    transform-origin: center;
    transition: transform 0.3s ease;
}

#nav3d-group.nav3d-scale {
    transform: scale(1);
    transform-origin: 50% 50%;
    width: 100vw;
    height: 120px;
    position: absolute;
    top: 0;
    left: 0;
}

/* Side Swipe Triggers */
.side-swipe-trigger {
    position: fixed;
    top: 20vh;
    width: 60px;
    height: 60vh;
    z-index: 1200;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
    display: block;
}

.side-swipe-trigger.left {
    left: 0;
    border-top-right-radius: 80px 30vh;
    border-bottom-right-radius: 80px 30vh;
    background: radial-gradient(circle at 100% 50%, rgba(74, 74, 74, 0.10) 60%, transparent 100%);
}

.side-swipe-trigger.right {
    right: 0;
    border-top-left-radius: 80px 30vh;
    border-bottom-left-radius: 80px 30vh;
    background: radial-gradient(circle at 0% 50%, rgba(74, 74, 74, 0.10) 60%, transparent 100%);
}

.side-swipe-trigger.active {
    opacity: 1;
    pointer-events: auto;
}