/* Projects Page - Three.js Hub Styles */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}



#webgl-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 1;
}

/* Page Transition Overlay */
.page-transition-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    z-index: 9999;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.page-transition-overlay.fade-out {
    opacity: 1;
}

body.page-loading .page-transition-overlay {
    opacity: 1;
}

body.page-loaded .page-transition-overlay {
    opacity: 0;
    transition: opacity 0.6s ease;
}

/* Navigation Menu - Portal 2 Style */
.menu-container {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(calc(-50% + -700px), calc(-50%));
    z-index: 10;
    pointer-events: auto;
}

.portal-menu {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.portal-nav-item {
    position: relative;
    display: block;
    padding: 10px 0;
    text-decoration: none;
    color: rgba(255, 255, 255, 0.6);
    font-family: 'Rajdhani', sans-serif;
    font-size: 18px;
    font-weight: 400;
    letter-spacing: 4px;
    text-transform: uppercase;
    transition: all 0.3s ease;
}

.portal-nav-item:hover {
    color: rgba(255, 255, 255, 0.9);
}

.portal-nav-item.active {
    color: rgba(255, 255, 255, 1);
}

.portal-underline {
    position: absolute;
    bottom: 5px;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.8), transparent);
}

/* Loading indicator */
#loading-text {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.5);
    font-family: 'Rajdhani', sans-serif;
    font-size: 14px;
    letter-spacing: 2px;
    z-index: 5;
    pointer-events: none;
}

/* Robots Container */
#robots-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10;
}

/* Robot Containers (robot + stand together) */
.robot-container {
    position: absolute;
    width: 200px;
    height: 350px; /* Robot + stand height */
    pointer-events: auto;
}

#robot-pbody-container {
    left: 20%;
    bottom: 8%;
}

#robot-atlas-container {
    left: 70%;
    bottom: 8%;
}

/* Robot Stands */
.robot-stand {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 60px;
    object-fit: contain;
}

/* Robot Sprites */
.robot-sprite {
    position: absolute;
    bottom: 30px; /* Above the stand */
    transform: translateX(-50%);
    width: 160px; /* Zmniejszone z 200px */
    height: 224px; /* Zmniejszone z 280px */
    cursor: pointer;
    object-fit: contain;
    image-rendering: pixelated;
    transition: opacity 0.3s ease; /* Płynny cross-fade */
}

/* Atlas is smaller - 3/5 of P-Body * 1.5 */
#robot-atlas {
    width: 144px; /* 96px * 1.5 */
    height: 201px; /* 134px * 1.5 */
}

/* Robot Overlay (for cross-fade morph) */
.robot-overlay {
    opacity: 0; /* Domyślnie ukryty */
    pointer-events: none; /* Kliknięcia przechodzą do głównego obrazka */
}

/* Robot Animation (separate size control) */
.robot-sprite.animating {
    width: 500px; /* Rozmiar animacji - dostosuj tutaj */
    height: 240px; /* Rozmiar animacji - dostosuj tutaj */
    left: 50%;
    transform: translateX(-50%); /* Centrowanie */
}

/* Atlas animation is also smaller - 3/5 of P-Body * 1.5 */
#robot-atlas-overlay.animating {
    width: 450px; /* 300px * 1.5 */
    height: 216px; /* 144px * 1.5 */
}

/* P-Body specific positioning */
#robot-pbody {
    left: 60%;
}

/* Atlas specific positioning */
#robot-atlas {
    left: 40%;
}

/* Responsive sizing */
@media (max-width: 768px) {
    .robot-sprite {
        width: 150px;
        height: 210px;
    }
    
    #robot-pbody {
        left: 20%;
        bottom: 8%;
    }
    
    #robot-atlas {
        left: 70%;
        bottom: 8%;
    }
}


/* Left Wall Menu - Three.js positioned with 3D perspective */
#left-wall-menu {
    position: absolute;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 15px;
    pointer-events: none;
    transform-origin: left center;
}

.wall-menu-item {
    font-family: 'Orbitron', sans-serif;
    font-size: 18px;
    font-weight: 700;
    color: #333333;
    text-decoration: none;
    letter-spacing: 2px;
    padding: 10px 20px;
    transition: all 0.3s ease;
    pointer-events: auto;
    white-space: nowrap;
    text-align: left;
    transform-origin: left center;
}

.wall-menu-item:hover {
    color: #ffffff;
    text-shadow: 0 0 10px #ffffff;
}

.wall-menu-item.active {
    color: #ffffff;
    border: 2px solid #ffffff;
    box-shadow: 0 0 10px #ffffff;
}

@media (max-width: 480px) {
    .robot-sprite {
        width: 120px;
        height: 168px;
    }
}

