/* ========================================
   NAVIGATION COMPONENT
   Floating navigation between worlds
   ======================================== */

/* Fixed Navigation */
.nav-fixed {
    position: fixed;
    top: var(--space-lg);
    left: 50%;
    transform: translateX(-50%);
    z-index: var(--z-nav);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm);
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-full);
    opacity: 0;
    transform: translateX(-50%) translateY(-20px);
    transition: opacity 0.3s, transform 0.3s;
}

.nav-fixed.visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.nav-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    color: var(--text-secondary);
    font-size: var(--text-lg);
    transition: var(--transition-fast);
    position: relative;
}

.nav-link::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: -30px;
    left: 50%;
    transform: translateX(-50%);
    padding: var(--space-xs) var(--space-sm);
    background: var(--bg-primary);
    border: 1px solid var(--primary);
    border-radius: var(--radius-sm);
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    color: var(--primary);
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
}

.nav-link:hover::before {
    opacity: 1;
}

.nav-link:hover {
    color: var(--primary);
    background: rgba(var(--primary-rgb), 0.1);
}

.nav-link.active {
    color: var(--bg-primary);
    background: var(--primary);
    box-shadow: var(--shadow-glow-sm);
}

/* Divider */
.nav-divider {
    width: 1px;
    height: 24px;
    background: rgba(255, 255, 255, 0.2);
}

/* Sound toggle */
.nav-sound {
    font-size: var(--text-sm);
}

.nav-sound.muted {
    color: var(--text-muted);
}

/* Mobile Bottom Navigation */
@media (max-width: 768px) {
    .nav-fixed {
        top: auto;
        bottom: var(--space-lg);
        padding: var(--space-xs);
    }

    .nav-link {
        width: 36px;
        height: 36px;
        font-size: var(--text-base);
    }

    .nav-link::before {
        display: none;
    }
}

/* ========== FLOATING TERMINAL ========== */
.floating-terminal {
    position: fixed;
    bottom: var(--space-xl);
    right: var(--space-xl);
    z-index: var(--z-terminal);
}

/* Terminal toggle button */
.terminal-toggle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--gradient-primary);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--text-2xl);
    cursor: none;
    box-shadow: var(--shadow-glow-md);
    transition: var(--transition-base);
}

.terminal-toggle:hover {
    transform: scale(1.1);
    box-shadow: var(--shadow-glow-lg);
}

.terminal-toggle.active {
    background: var(--secondary);
}

/* Terminal window */
.terminal-floating-window {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 400px;
    max-height: 500px;
    background: var(--bg-secondary);
    border: 1px solid var(--primary);
    border-radius: var(--radius-lg);
    overflow: hidden;
    opacity: 0;
    transform: translateY(20px) scale(0.95);
    pointer-events: none;
    transition: var(--transition-base);
    box-shadow: var(--shadow-glow-md);
}

.terminal-floating-window.open {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.terminal-floating-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-sm) var(--space-md);
    background: var(--bg-primary);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.terminal-floating-title {
    font-family: var(--font-mono);
    font-size: var(--text-sm);
    color: var(--primary);
}

.terminal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: var(--text-lg);
    cursor: none;
    transition: color 0.2s;
}

.terminal-close:hover {
    color: var(--text-primary);
}

.terminal-floating-body {
    height: 350px;
    overflow-y: auto;
    padding: var(--space-md);
    font-family: var(--font-mono);
    font-size: var(--text-xs);
}

.terminal-floating-input {
    display: flex;
    padding: var(--space-sm) var(--space-md);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background: var(--bg-primary);
}

.terminal-floating-input input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    font-family: var(--font-mono);
    font-size: var(--text-sm);
    color: var(--primary);
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .floating-terminal {
        bottom: 80px;
        right: var(--space-md);
    }

    .terminal-toggle {
        width: 50px;
        height: 50px;
        font-size: var(--text-xl);
    }

    .terminal-floating-window {
        width: calc(100vw - 2 * var(--space-md));
        right: calc(-50vw + 50% + var(--space-md));
    }
}

/* ========== PROGRESS INDICATOR ========== */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    z-index: var(--z-nav);
}

.scroll-progress-bar {
    height: 100%;
    background: var(--gradient-primary);
    width: 0%;
    transition: width 0.1s;
    box-shadow: var(--shadow-glow-sm);
}

/* World indicator dots */
.world-indicator {
    position: fixed;
    right: var(--space-lg);
    top: 50%;
    transform: translateY(-50%);
    z-index: var(--z-nav);
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.world-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid transparent;
    transition: var(--transition-fast);
    cursor: none;
}

.world-dot:hover {
    background: rgba(var(--primary-rgb), 0.3);
    border-color: var(--primary);
}

.world-dot.active {
    background: var(--primary);
    border-color: var(--primary);
    box-shadow: var(--shadow-glow-sm);
}

@media (max-width: 768px) {
    .world-indicator {
        display: none;
    }
}