body { 
    margin: 0; 
    overflow: hidden; 
    background-color: #000;
    font-family: 'Arial', sans-serif;
}

body.dragging { cursor: grabbing; }
body.cube-hover { cursor: grab; }
body.sphere-hover { cursor: pointer; }

canvas { 
    display: block; 
    background: transparent !important;
}

.debug-stats {
    position: fixed;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.8);
    color: #00ffff;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 11px;
    font-family: 'Courier New', monospace;
    border: 1px solid rgba(0, 255, 255, 0.3);
    z-index: 9999;
    backdrop-filter: blur(5px);
    min-width: 120px;
}

.debug-stats .stat-line {
    margin: 2px 0;
    display: flex;
    justify-content: space-between;
}

.debug-stats .stat-value {
    color: #ffffff;
    font-weight: bold;
}

.scene2-loader {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
}

.scene2-loader.visible {
    opacity: 1;
    animation: loaderFadeIn 0.5s ease-out;
}

.scene2-loader.hidden {
    opacity: 0;
    animation: loaderFadeOut 0.5s ease-out;
}

@keyframes loaderFadeIn {
    from { opacity: 0; transform: translate(-50%, -50%) scale(0.5); }
    to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

@keyframes loaderFadeOut {
    from { opacity: 1; transform: translate(-50%, -50%) scale(1); }
    to { opacity: 0; transform: translate(-50%, -50%) scale(0.5); }
}

.loader-ring {
    width: 80px;
    height: 80px;
    border: 4px solid rgba(68, 136, 255, 0.2);
    border-top: 4px solid #4488ff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    box-shadow: 
        0 0 20px rgba(68, 136, 255, 0.3),
        inset 0 0 20px rgba(68, 136, 255, 0.1);
}

.loader-ring::before {
    content: '';
    position: absolute;
    top: -4px;
    left: -4px;
    right: -4px;
    bottom: -4px;
    border: 2px solid transparent;
    border-top: 2px solid rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    animation: spin 0.8s linear infinite reverse;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.tooltip {
    position: absolute;
    background: rgba(0, 0, 0, 0.95);
    color: #4488ff;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: bold;
    backdrop-filter: blur(10px);
    border: 2px solid #4488ff;
    box-shadow: 0 0 20px rgba(68, 136, 255, 0.3);
    pointer-events: none;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
    transform: translate(-50%, -120%);
}

.tooltip.visible { opacity: 1; }

.tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 8px solid transparent;
    border-top-color: #4488ff;
}

.background-title {
    position: fixed;
    top: 0;
    left: 0;
    margin-top: -2%;
    margin-left: -2%;
    width: 100vw;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
    pointer-events: none;
    opacity: 1;
    transition: opacity 0.3s ease-out;
    perspective: 1000px;
}

.background-title.hidden,
.background-title.hover-hidden {
    opacity: 0;
}

.background-title-content {
    text-align: center;
    transform: perspective(1000px) rotateX(15deg) rotateY(-10deg) translateZ(-200px);
    animation: background-float 8s ease-in-out infinite alternate;
}

@keyframes background-float {
    0% {
        transform: perspective(1000px) rotateX(15deg) rotateY(-10deg) translateZ(-200px) translateY(0px);
    }
    100% {
        transform: perspective(1000px) rotateX(18deg) rotateY(-12deg) translateZ(-220px) translateY(-20px);
    }
}

.subtitle {
    font-family: 'Arial', sans-serif;
    font-size: 3.5rem;
    font-weight: 300;
    color: rgba(68, 136, 255, 0.8);
    text-shadow: 
        0 0 20px rgba(68, 136, 255, 0.6),
        0 0 40px rgba(68, 136, 255, 0.4),
        0 0 60px rgba(68, 136, 255, 0.2);
    margin-bottom: 10px;
    letter-spacing: 0.3em;
    text-transform: uppercase;
}

.subtitle-bottom {
    font-family: 'Arial', sans-serif;
    font-size: 2rem;
    font-weight: 300;
    color: rgba(68, 136, 255, 0.6);
    text-shadow: 
        0 0 15px rgba(68, 136, 255, 0.4),
        0 0 30px rgba(68, 136, 255, 0.2);
    margin-top: 20px;
    letter-spacing: 0.2em;
    margin-top: 4%;
}

.main-title {
    font-family: 'Arial', sans-serif;
    font-size: 20rem;
    font-weight: 900;
    color: rgba(255, 255, 255, 0.3);
    text-shadow: 
        0 0 30px rgba(255, 255, 255, 0.3),
        0 0 60px rgba(68, 136, 255, 0.4),
        0 0 100px rgba(68, 136, 255, 0.3),
        0 0 150px rgba(68, 136, 255, 0.2);
    line-height: 0.8;
    background: linear-gradient(
        45deg,
        rgba(68, 136, 255, 0.4) 0%,
        rgba(255, 255, 255, 0.6) 50%,
        rgba(68, 136, 255, 0.4) 100%
    );
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: title-glow 4s ease-in-out infinite alternate;
    color: rgba(255, 255, 255, 0.4);
    margin-top: 2%;
}

@keyframes title-glow {
    0% {
        text-shadow: 
            0 0 30px rgba(255, 255, 255, 0.3),
            0 0 60px rgba(68, 136, 255, 0.4),
            0 0 100px rgba(68, 136, 255, 0.3),
            0 0 150px rgba(68, 136, 255, 0.2);
    }
    100% {
        text-shadow: 
            0 0 40px rgba(255, 255, 255, 0.4),
            0 0 80px rgba(68, 136, 255, 0.5),
            0 0 120px rgba(68, 136, 255, 0.4),
            0 0 180px rgba(68, 136, 255, 0.3);
    }
}

.text3d-container {
    width: 1600px;
    height: 1200px;
    background: transparent;
    pointer-events: none;
    transform-style: preserve-3d;
}

.scene2-text-3d {
    text-align: left;
    padding: 80px;
    background: transparent;
    transform-style: preserve-3d;
}

.scene2-title-3d {
    font-family: 'Arial', sans-serif;
    font-size: 20rem;
    font-weight: 900;
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 
        0 0 60px rgba(255, 255, 255, 0.3),
        0 0 120px rgba(68, 136, 255, 0.4),
        0 0 200px rgba(68, 136, 255, 0.3);
    line-height: 0.8;
    background: linear-gradient(
        -45deg,
        rgba(68, 136, 255, 0.6) 0%,
        rgba(255, 255, 255, 0.9) 50%,
        rgba(68, 136, 255, 0.6) 100%
    );
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
    letter-spacing: 0.08em;
}

.scene2-subtitle-3d {
    font-family: 'Arial', sans-serif;
    font-size: 2.0rem;
    font-weight: 300;
    color: rgba(68, 136, 255, 0.9);
    text-shadow: 
        0 0 40px rgba(68, 136, 255, 0.6),
        0 0 80px rgba(68, 136, 255, 0.4);
    margin-bottom: 10px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.scene2-description-3d {
    font-family: 'Arial', sans-serif;
    font-size: 2.8rem;
    font-weight: 300;
    color: rgba(191, 219, 254, 0.9);
    text-shadow: 
        0 0 30px rgba(68, 136, 255, 0.4),
        0 0 60px rgba(68, 136, 255, 0.2);
    margin-bottom: 40px;
    letter-spacing: 0.1em;
    max-width: 1400px;
    line-height: 1.6;
}

.scene2-work-description-3d {
    font-family: 'inter', sans-serif;
    font-size: 2rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.8);
    text-shadow: 0 0 20px rgba(68, 136, 255, 0.3);
    margin-top: 40px;
    letter-spacing: 0.05em;
    max-width: 1200px;
    line-height: 1.8;
}

@media (max-width: 768px) {
    .subtitle {
        font-size: 2.5rem;
    }
    .main-title {
        font-size: 8rem;
    }
    .subtitle-bottom {
        font-size: 1.5rem;
    }
    
    .scene2-title-3d {
        font-size: 16rem;
    }
    .scene2-subtitle-3d {
        font-size: 4rem;
    }
    .scene2-description-3d {
        font-size: 3rem;
    }
    .scene2-work-description-3d {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .subtitle {
        font-size: 1.5rem;
    }
    .main-title {
        font-size: 5rem;
    }
    .subtitle-bottom {
        font-size: 1rem;
    }
    
    .scene2-title-3d {
        font-size: 8rem;
    }
    .scene2-subtitle-3d {
        font-size: 3rem;
    }
    .scene2-description-3d {
        font-size: 2rem;
    }
    .scene2-work-description-3d {
        font-size: 1.6rem;
    }
}


.card-link {
    display: block;
    margin-top: 15px;
    font-family: Arial, sans-serif;
    font-size: 12px;
    font-weight: 400;
    color: #00ffff;
    text-decoration: none;
    text-shadow: 
        0 0 5px rgba(0, 255, 255, 0.8),
        0 0 10px rgba(0, 255, 255, 0.6);
    text-align: center;
    transition: all 0.3s ease;
}

.card-link:hover {
    color: #ffffff;
    text-shadow: 
        0 0 8px rgba(0, 255, 255, 1),
        0 0 16px rgba(0, 255, 255, 0.8);
}



.holo-card {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 320px;
    height: 450px;
    transform-origin: center center;
    transform-style: preserve-3d;
    transform: translate(-50%, -50%) perspective(1000px);
    opacity: 0;
    pointer-events: none;
    z-index: 1000;
    padding: 5px 10px 10px 5px;
    transition: opacity 0.8s ease-out;
}

.holo-card.visible {
    opacity: 1;
    pointer-events: all;
    cursor: pointer;
    animation: cardBuildUp 0.8s ease-out forwards;
}

.holo-card.disappearing {
    animation: cardDisappearRealistic 0.8s ease-out forwards;
}

.holo-card.hovering {
}

@keyframes cardBuildUp {
    0% { 
        opacity: 0; 
        clip-path: inset(50% 0% 50% 0%); 
    }
    70% { 
        clip-path: inset(0% 0% 0% 0%); 
    }
    100% { 
        opacity: 1; 
        clip-path: inset(0% 0% 0% 0%); 
    }
}

@keyframes cardDisappearRealistic {
    0% { 
        opacity: 1; 
        clip-path: inset(0% 0% 0% 0%);
    }
    30% { 
        clip-path: inset(0% 0% 0% 0%);
    }
    100% { 
        opacity: 0; 
        clip-path: inset(50% 0% 50% 0%);
    }
}

.card-inner {
    width: 100%;
    height: 100%;
    position: relative;
    background: linear-gradient(135deg, 
        rgba(0, 140, 186, 0.3) 0%, 
        rgba(0, 188, 212, 0.4) 25%, 
        rgba(0, 172, 193, 0.3) 50%, 
        rgba(0, 229, 255, 0.4) 75%, 
        rgba(0, 191, 255, 0.3) 100%);
    border-radius: 20px;
    border: 2px solid rgba(0, 255, 255, 0.6);
    box-shadow: 
        0 0 30px rgba(0, 255, 255, 0.4),
        0 0 60px rgba(0, 188, 212, 0.3),
        0 0 100px rgba(0, 229, 255, 0.2),
        inset 0 0 30px rgba(255, 255, 255, 0.1);
    overflow: hidden;
    backdrop-filter: blur(10px);
    opacity: 0.85;
}

.center-line {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        #00ffff 20%, 
        #ffffff 50%, 
        #00ffff 80%, 
        transparent 100%);
    box-shadow: 0 0 10px #00ffff, 0 0 20px #00bcd4, 0 0 40px #00e5ff;
    animation: lineGlow 0.6s ease-in-out;
    z-index: 4;
}

@keyframes lineGlow {
    0% { opacity: 0; width: 0; left: 50%; }
    50% { opacity: 1; width: 100%; left: 0%; }
    100% { opacity: 0.7; width: 100%; left: 0%; }
}

.card-inner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-linear-gradient(
        0deg,
        transparent 0px,
        rgba(0, 255, 255, 0.05) 1px,
        transparent 2px,
        transparent 3px
    );
    animation: scanlines 1.5s linear infinite, glitch-flicker 3s ease-in-out infinite;
    pointer-events: none;
    z-index: 3;
}

.card-inner::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        linear-gradient(90deg, transparent 0%, rgba(0, 255, 255, 0.1) 50%, transparent 100%),
        repeating-linear-gradient(0deg, transparent 0px, rgba(255, 255, 255, 0.02) 1px, transparent 2px);
    animation: digital-glitch 4s ease-in-out infinite, hologram-sweep 6s ease-in-out infinite 2s;
    pointer-events: none;
    z-index: 2;
}

@keyframes scanlines { 
    0% { transform: translateY(0px); } 
    100% { transform: translateY(3px); } 
}

@keyframes glitch-flicker {
    0%, 90%, 100% { opacity: 1; }
    91%, 94% { opacity: 0.8; }
    92%, 93% { opacity: 0.3; }
    95%, 97% { opacity: 0.9; }
    96% { opacity: 0.1; }
}

@keyframes hologram-sweep {
    0% { top: -100%; opacity: 0; }
    10% { top: -80%; opacity: 1; }
    90% { top: 80%; opacity: 1; }
    100% { top: 100%; opacity: 0; }
}

.card-content {
    position: relative;
    z-index: 1;
    padding: 16px;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    color: rgba(255, 255, 255, 0.9);
}

.card-image {
    width: 80px;
    height: 80px;
    border-radius: 15px;
    object-fit: cover;
    border: 2px solid rgba(0, 255, 255, 0.4);
    margin-bottom: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3), 0 0 10px rgba(0, 255, 255, 0.3);
    align-self: center;
    opacity: 0;
    animation: fadeIn 0.4s ease-out 0.6s forwards;
}

.card-title {
    font-size: 32px;
    font-weight: bold;
    margin-bottom: 15px;
    text-align: center;
    text-shadow: 0 0 10px rgba(0, 255, 255, 0.8), 0 0 20px rgba(0, 255, 255, 0.4);
    color: #e0f8ff;
    opacity: 0;
    animation: fadeIn 0.4s ease-out 0.6s forwards, text-glitch 5s ease-in-out infinite 2s;
}

.card-description {
    font-size: 20px;
    line-height: 1.6;
    text-align: center;
    color: rgba(191, 219, 254, 0.8);
    text-shadow: 0 0 5px rgba(0, 255, 255, 0.3);
    margin-top: 20px;
    margin-bottom: 25px;
    opacity: 0;
    animation: fadeIn 0.4s ease-out 0.6s forwards;
}

@keyframes tag-glow {
    0% { box-shadow: 0 0 8px rgba(255, 255, 255, 0.3); }
    100% { box-shadow: 0 0 12px rgba(255, 255, 255, 0.6); }
}

@keyframes text-glitch {
    0%, 95%, 100% { 
        transform: translateX(0);
        text-shadow: 0 0 10px rgba(0, 255, 255, 0.8), 0 0 20px rgba(0, 255, 255, 0.4);
    }
    96% { 
        transform: translateX(2px);
        text-shadow: 2px 0 0 #ff0080, -2px 0 0 #00ffff, 0 0 10px rgba(0, 255, 255, 0.8);
    }
    97% { 
        transform: translateX(-1px);
        text-shadow: -1px 0 0 #ff0080, 1px 0 0 #00ffff, 0 0 10px rgba(0, 255, 255, 0.8);
    }
    98% { 
        transform: translateX(1px);
        text-shadow: 1px 0 0 #ff0080, -1px 0 0 #00ffff, 0 0 10px rgba(0, 255, 255, 0.8);
    }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.card-glow {
    position: absolute;
    top: -25px;
    left: -25px;
    right: -35px;
    bottom: -35px;
    background: radial-gradient(ellipse at center, 
        rgba(0, 255, 255, 0.4) 0%, 
        rgba(0, 188, 212, 0.2) 30%,
        transparent 70%);
    border-radius: 40px;
    z-index: -1;
    animation: glow-pulse 3s ease-in-out infinite alternate 1s, glow-flicker 7s ease-in-out infinite;
}

@keyframes glow-pulse {
    0% { opacity: 0.3; transform: scale(0.9); }
    100% { opacity: 0.7; transform: scale(1.15); }
}

@keyframes glow-flicker {
    0%, 92%, 100% { opacity: 0.5; }
    93%, 95% { opacity: 0.8; }
    94% { opacity: 0.2; }
    96%, 98% { opacity: 0.7; }
    97% { opacity: 0.1; }
}

.loading { 
    color: #94a3b8; 
    font-style: italic; 
}