/* Side Navigation Styles */
.side-nav {
    position: fixed;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1000;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    padding: 45px 12px 15px 12px;
    transition: all 0.3s ease;
    width: 54px;
    overflow: visible;
}

.side-nav.expanded {
    width: 120px;
}

.side-nav .nav-label {
    display: none;
}

.side-nav.expanded .nav-label {
    display: inline;
}

.side-nav-toggle {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(139, 92, 246, 0.25);
    border: none;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    color: #fff;
    cursor: pointer;
    z-index: 1100;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(139,92,246,0.15);
}

.side-nav-toggle:hover {
    background: rgba(139, 92, 246, 0.45);
    box-shadow: 0 4px 16px rgba(139,92,246,0.25);
}

.side-nav:hover {
    background: rgba(0, 0, 0, 0.8);
    border-color: rgba(255, 255, 255, 0.3);
}

.side-nav-items {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 8px 10px;
    border-radius: 12px;
    position: relative;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.nav-item.active {
    background: rgba(139, 92, 246, 0.3);
    border: 1px solid rgba(139, 92, 246, 0.5);
}

.nav-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: #8b5cf6;
    border-radius: 0 2px 2px 0;
}

.nav-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.nav-item:hover .nav-dot {
    background: rgba(255, 255, 255, 0.8);
    transform: scale(1.2);
}

.nav-item.active .nav-dot {
    background: #8b5cf6;
    box-shadow: 0 0 10px rgba(139, 92, 246, 0.5);
    transform: scale(1.3);
}

.nav-label {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
    white-space: nowrap;
    font-family: 'Cairo', sans-serif;
}

.nav-item.active .nav-label {
    color: #ffffff;
    font-weight: 600;
}

/* Progress indicator for active section */
.nav-item.active .nav-dot {
    animation: pulseActive 2s ease-in-out infinite;
}

@keyframes pulseActive {
    0%, 100% {
        box-shadow: 0 0 10px rgba(139, 92, 246, 0.5);
    }
    50% {
        box-shadow: 0 0 20px rgba(139, 92, 246, 0.8);
    }
}

/* Mobile responsive */
@media (max-width: 768px) {
    .side-nav {
        /* Full-width bottom bar */
        width: 100%;
        height: 65px;
        bottom: 0;
        left: 0;
        right: 0;
        top: auto;
        border-radius: 0;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        border-right: none;
        border-left: none;
        border-bottom: none;
        background: rgba(10, 10, 10, 0.7);
        backdrop-filter: blur(15px);
        transform: none;
        padding: 0;
    }

    .side-nav-items {
        display: flex;
        flex-direction: row;
        justify-content: space-around;
        align-items: center;
        width: 100%;
        height: 100%;
        gap: 0;
    }

    .nav-item {
        flex: 1;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 4px;
        height: 100%;
        padding: 0;
    }

    .nav-label {
        display: block !important; /* Always show labels */
        font-size: 11px;
        font-weight: 500;
    }

    .side-nav-toggle {
        display: none; /* Not needed for bottom bar */
    }

    .side-nav.minimized {
        width: 100%;
        padding: 0;
    }

    .side-nav.minimized .nav-label {
        display: block !important;
    }
}
    
    .nav-dot {
        width: 8px;
        height: 8px;
    }
    
    .nav-label {
        font-size: 10px;
    }

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Snap Scrolling - Desktop Only */
@media (min-width: 769px) {
    html {
        scroll-snap-type: y mandatory;
    }

    .hero,
    .cinematic-section,
    .app-preview-section,
    .apps-section,
    .blog-section {
        scroll-snap-align: start;
        min-height: 100vh;
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

/* Mobile - Normal scrolling */
@media (max-width: 768px) {
    html {
        scroll-snap-type: none;
    }
    
    .hero,
    .cinematic-section,
    .app-preview-section,
    .apps-section,
    .blog-section {
        scroll-snap-align: none;
        min-height: auto;
        padding: 60px 0;
    }
    
    .hero {
        min-height: 100vh;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 120px 16px 80px;
    }
}

/* Hide side nav during loading */
.loading-progress.show ~ .side-nav {
    opacity: 0;
    pointer-events: none;
}

/* Section transition effects */
.section-transition {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}

.section-transition.visible {
    opacity: 1;
    transform: translateY(0);
}