/* ============================================
   MODERN NAVIGATION STYLES
   ============================================ */

/* Remove old navigation on pages with modern nav */
body.modern-nav .navbar {
    display: none;
}


/* Bottom Bar Navigation */
.modern-bottom-bar {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(28, 28, 30, 0.95);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    z-index: 1000;
    box-shadow: 
        0 10px 40px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(255, 255, 255, 0.05) inset;
    animation: slideUp 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideUp {
    from {
        transform: translateX(-50%) translateY(100px);
        opacity: 0;
    }
    to {
        transform: translateX(-50%) translateY(0);
        opacity: 1;
    }
}

.bar-item {
    width: 50px;
    height: 50px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    color: rgba(255, 255, 255, 0.6);
}

.bar-item svg {
    width: 24px;
    height: 24px;
    transition: all 0.3s ease;
}

.bar-item::before {
    content: attr(data-label);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: rgba(28, 28, 30, 0.95);
    backdrop-filter: blur(20px);
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 0.875rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.bar-item:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-5px);
    color: #fff;
}

.bar-item:hover::before {
    opacity: 1;
    transform: translateX(-50%) translateY(-5px);
}

.bar-item.active {
    background: linear-gradient(135deg, #007AFF, #00D084);
    color: #fff;
}

.bar-item.active svg {
    transform: scale(1.1);
}

.bar-item.special {
    background: linear-gradient(135deg, #007AFF, #5856d6);
    color: #fff;
}

.bar-separator {
    width: 1px;
    height: 30px;
    background: rgba(255, 255, 255, 0.1);
    margin: 0 0.25rem;
}

/* Scroll Indicators */
.modern-scroll-indicator {
    position: fixed;
    right: 2rem;
    top: 50%;
    transform: translateY(-50%);
    z-index: 999;
    animation: fadeIn 1s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-50%) translateX(20px); }
    to { opacity: 1; transform: translateY(-50%) translateX(0); }
}

.indicator-dot {
    width: 8px;
    height: 8px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    margin: 1rem 0;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.indicator-dot::before {
    content: attr(data-section);
    position: absolute;
    right: 100%;
    top: 50%;
    transform: translateY(-50%);
    margin-right: 1rem;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    opacity: 0;
    transition: opacity 0.3s ease;
    white-space: nowrap;
}

.indicator-dot:hover::before {
    opacity: 1;
}

.indicator-dot.active {
    width: 40px;
    background: linear-gradient(90deg, #007AFF, #00D084);
    border-radius: 4px;
}

/* Command Palette */
.cmd-trigger {
    position: fixed;
    top: 2rem;
    right: 2rem;
    background: rgba(28, 28, 30, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0.75rem 1.25rem;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    z-index: 999;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    animation: slideDown 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideDown {
    from {
        transform: translateY(-100px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.cmd-trigger:hover {
    background: rgba(40, 40, 42, 0.95);
    transform: scale(1.02);
    border-color: rgba(255, 255, 255, 0.2);
}

.cmd-trigger kbd {
    background: rgba(255, 255, 255, 0.1);
    padding: 4px 8px;
    border-radius: 6px;
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', monospace;
    font-size: 0.875rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.cmd-palette {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.95);
    width: 90%;
    max-width: 600px;
    background: rgba(28, 28, 30, 0.98);
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 0;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 2000;
    box-shadow: 
        0 25px 50px rgba(0, 0, 0, 0.7),
        0 0 0 1px rgba(255, 255, 255, 0.1) inset;
}

.cmd-palette.active {
    opacity: 1;
    pointer-events: all;
    transform: translate(-50%, -50%) scale(1);
}

.cmd-search {
    padding: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.cmd-search input {
    width: 100%;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 1.125rem;
    outline: none;
    font-family: inherit;
}

.cmd-search input::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.cmd-results {
    max-height: 400px;
    overflow-y: auto;
    padding: 0.5rem;
}

.cmd-item {
    padding: 0.75rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: all 0.2s ease;
    color: rgba(255, 255, 255, 0.8);
}

.cmd-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    transform: translateX(4px);
}

.cmd-item svg {
    opacity: 0.6;
}

.cmd-item kbd {
    margin-left: auto;
    background: rgba(255, 255, 255, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', monospace;
    opacity: 0.5;
}

/* Lazy Loading Styles */
img.lazy-load {
    filter: blur(5px);
    transition: filter 0.5s ease;
}

img.lazy-load.loaded {
    filter: blur(0);
}

/* Parallax Container */
.parallax-container {
    overflow: hidden;
    position: relative;
}

.parallax-element {
    will-change: transform;
    transition: transform 0.1s linear;
}

/* Mobile Adjustments */
@media (max-width: 768px) {
    .modern-bottom-bar {
        bottom: 1rem;
        width: calc(100% - 2rem);
        left: 1rem;
        transform: none;
        border-radius: 16px;
        justify-content: space-around;
    }
    
    .bar-item {
        width: 45px;
        height: 45px;
    }
    
    .bar-separator {
        display: none;
    }
    
    .modern-scroll-indicator {
        display: none;
    }
    
    .cmd-trigger {
        top: 1rem;
        right: 1rem;
        padding: 0.5rem 1rem;
    }
    
    .cmd-trigger span {
        display: none;
    }
    
    .cmd-palette {
        width: 95%;
        max-width: none;
        border-radius: 16px;
    }
}

/* Dark/Light Theme Support */
body.light-theme {
    --nav-bg: rgba(255, 255, 255, 0.95);
    --nav-border: rgba(0, 0, 0, 0.1);
    --nav-text: rgba(0, 0, 0, 0.8);
    --nav-hover: rgba(0, 0, 0, 0.05);
}

body.light-theme .modern-bottom-bar,
body.light-theme .cmd-trigger,
body.light-theme .cmd-palette {
    background: var(--nav-bg);
    border-color: var(--nav-border);
    color: var(--nav-text);
}

body.light-theme .bar-item:hover,
body.light-theme .cmd-item:hover {
    background: var(--nav-hover);
}

/* Performance optimizations */
.modern-bottom-bar,
.cmd-palette,
.cmd-trigger {
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}