/* WebGL Enhanced Styles */
/* FASE 3 Implementation */

/* WebGL Canvas Container */
.webgl-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

/* Hero section with WebGL background */
.hero-section.webgl-enabled {
    position: relative;
    overflow: hidden;
}

.hero-content {
    position: relative;
    z-index: 2;
}

/* CSS fallback animations for non-WebGL */
.css-animated .hero-content {
    animation: heroFloat 6s ease-in-out infinite;
}

@keyframes heroFloat {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* WebGL interaction hints */
.webgl-hint {
    position: absolute;
    bottom: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.7);
    color: #f1c40f;
    padding: 10px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    z-index: 10;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 0.7;
    }
    50% {
        opacity: 1;
    }
}

/* 3D Character Cards */
.character-card-3d {
    perspective: 1000px;
    transform-style: preserve-3d;
    transition: all 0.3s ease;
}

.character-card-3d:hover {
    transform: rotateY(10deg) rotateX(-5deg) translateZ(20px);
}

.character-card-3d .card-inner {
    transform-style: preserve-3d;
    transition: transform 0.3s ease;
}

.character-card-3d:hover .card-inner {
    transform: translateZ(10px);
}

/* 3D Gallery Items */
.gallery-item-3d {
    position: relative;
    transform-style: preserve-3d;
    transition: all 0.3s ease;
}

.gallery-item-3d:hover {
    transform: rotateY(5deg) rotateX(2deg) scale(1.05);
}

.gallery-item-3d::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 77, 77, 0.1), rgba(241, 196, 15, 0.1));
    transform: translateZ(20px);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-item-3d:hover::before {
    opacity: 1;
}

/* 3D Event Cards */
.event-card-3d {
    transform-style: preserve-3d;
    transition: all 0.3s ease;
}

.event-card-3d:hover {
    transform: translateY(-5px) rotateX(-5deg) rotateY(2deg);
}

.event-card-3d .event-content {
    transform-style: preserve-3d;
}

/* 3D Navigation */
.navbar-3d {
    transform-style: preserve-3d;
    transition: all 0.3s ease;
}

.navbar-3d.scrolled {
    transform: translateZ(10px);
}

/* Parallax sections */
.parallax-section {
    position: relative;
    overflow: hidden;
}

.parallax-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 120%;
    z-index: 1;
}

.parallax-content {
    position: relative;
    z-index: 2;
}

/* 3D Floating Elements */
.floating-3d {
    position: absolute;
    transform-style: preserve-3d;
    animation: float3d 4s ease-in-out infinite;
}

@keyframes float3d {
    0%, 100% {
        transform: translateY(0px) rotateX(0deg) rotateY(0deg);
    }
    25% {
        transform: translateY(-10px) rotateX(5deg) rotateY(2deg);
    }
    50% {
        transform: translateY(-20px) rotateX(0deg) rotateY(10deg);
    }
    75% {
        transform: translateY(-10px) rotateX(-5deg) rotateY(-2deg);
    }
}

/* WebGL Performance Optimizations */
.webgl-optimized {
    will-change: transform;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    -moz-transform: translateZ(0);
    -ms-transform: translateZ(0);
    -o-transform: translateZ(0);
    -webkit-backface-visibility: hidden;
    -moz-backface-visibility: hidden;
    backface-visibility: hidden;
    -webkit-perspective: 1000;
    -moz-perspective: 1000;
    perspective: 1000;
}

/* Responsive WebGL */
@media (max-width: 768px) {
    .webgl-canvas {
        opacity: 0.7;
    }
    
    .webgl-hint {
        font-size: 0.8rem;
        padding: 8px 12px;
        bottom: 10px;
        right: 10px;
    }
}

@media (max-width: 480px) {
    .webgl-canvas {
        opacity: 0.5;
    }
    
    .webgl-hint {
        display: none;
    }
}

/* Loading states for WebGL */
.webgl-loading {
    position: relative;
}

.webgl-loading::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(10, 10, 10, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999;
}

.webgl-loading::after {
    content: 'Loading 3D Environment...';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #f1c40f;
    font-family: 'Orbitron', monospace;
    font-size: 1.2rem;
    z-index: 1000;
}

/* 3D Button Effects */
.btn-3d {
    position: relative;
    transform-style: preserve-3d;
    transition: all 0.3s ease;
}

.btn-3d::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #ff4d4d, #f1c40f);
    transform: translateZ(-5px);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.btn-3d:hover::before {
    opacity: 0.3;
}

.btn-3d:hover {
    transform: translateZ(5px);
}

/* Shadow effects */
.shadow-3d {
    box-shadow: 
        0 10px 30px rgba(255, 77, 77, 0.3),
        0 5px 15px rgba(241, 196, 15, 0.2);
    transition: all 0.3s ease;
}

.shadow-3d:hover {
    box-shadow: 
        0 15px 40px rgba(255, 77, 77, 0.4),
        0 10px 20px rgba(241, 196, 15, 0.3);
}

/* 3D Text Effects */
.text-3d {
    text-shadow: 
        0 2px 4px rgba(255, 77, 77, 0.5),
        0 4px 8px rgba(241, 196, 15, 0.3);
    transform-style: preserve-3d;
    transition: all 0.3s ease;
}

.text-3d:hover {
    text-shadow: 
        0 4px 8px rgba(255, 77, 77, 0.7),
        0 8px 16px rgba(241, 196, 15, 0.5);
    transform: translateZ(2px);
}

/* Interactive 3D Elements */
.interactive-3d {
    cursor: pointer;
    transition: all 0.3s ease;
}

.interactive-3d:hover {
    transform: scale(1.05) rotateY(5deg);
}

/* WebGL Debug Info */
.webgl-info {
    position: fixed;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.8);
    color: #f1c40f;
    padding: 10px;
    border-radius: 5px;
    font-family: monospace;
    font-size: 0.8rem;
    z-index: 10000;
}

/* Performance indicators */
.performance-indicator {
    position: fixed;
    top: 10px;
    left: 10px;
    background: rgba(0, 0, 0, 0.8);
    color: #f1c40f;
    padding: 10px;
    border-radius: 5px;
    font-family: monospace;
    font-size: 0.8rem;
    z-index: 10000;
}

/* WebGL Fallback */
.no-webgl .hero-section {
    background: linear-gradient(135deg, #0a0a0a 0%, #16213e 50%, #0f3460 100%);
    background-size: 400% 400%;
    animation: gradientShift 10s ease infinite;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}