/* Advanced UI Components for Game */

/* Glassmorphism Effects */
.glass-card {
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.glass-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.glass-card:hover::before {
    left: 100%;
}

.glass-card:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.5);
    background: rgba(0, 0, 0, 0.4);
}

/* Neon Glow Effects */
.neon-button {
    background: linear-gradient(45deg, #00ffff, #ff00ff);
    border: none;
    border-radius: 50px;
    color: white;
    font-weight: bold;
    padding: 15px 40px;
    font-size: 16px;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 2px;
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.5),
                0 0 40px rgba(255, 0, 255, 0.3),
                inset 0 0 20px rgba(255, 255, 255, 0.1);
}

.neon-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.5s ease;
}

.neon-button:hover::before {
    left: 100%;
}

.neon-button:hover {
    transform: scale(1.05);
    box-shadow: 0 0 30px rgba(0, 255, 255, 0.8),
                0 0 60px rgba(255, 0, 255, 0.6),
                0 0 90px rgba(0, 255, 255, 0.4),
                inset 0 0 30px rgba(255, 255, 255, 0.2);
    animation: neonPulse 1s ease-in-out infinite;
}

@keyframes neonPulse {
    0%, 100% {
        box-shadow: 0 0 30px rgba(0, 255, 255, 0.8),
                    0 0 60px rgba(255, 0, 255, 0.6),
                    0 0 90px rgba(0, 255, 255, 0.4),
                    inset 0 0 30px rgba(255, 255, 255, 0.2);
    }
    50% {
        box-shadow: 0 0 40px rgba(0, 255, 255, 1),
                    0 0 80px rgba(255, 0, 255, 0.8),
                    0 0 120px rgba(0, 255, 255, 0.6),
                    inset 0 0 40px rgba(255, 255, 255, 0.3);
    }
}

/* Cyberpunk Style Cards */
.cyber-card {
    background: linear-gradient(135deg, rgba(0, 255, 255, 0.1), rgba(255, 0, 255, 0.1));
    border: 2px solid transparent;
    border-radius: 15px;
    padding: 20px;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.cyber-card::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #00ffff, #ff00ff, #ffff00, #00ffff);
    border-radius: 15px;
    z-index: -1;
    animation: cyberBorder 3s linear infinite;
}

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

.cyber-card:hover {
    transform: translateY(-10px) rotateX(5deg);
    box-shadow: 0 20px 40px rgba(0, 255, 255, 0.3);
}

/* Advanced Loading Screen */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease;
}

.loading-content {
    text-align: center;
    color: white;
}

.loading-spinner {
    width: 80px;
    height: 80px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

.loading-text {
    font-size: 24px;
    font-weight: bold;
    animation: pulse 1.5s ease-in-out infinite;
}

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

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

/* Modern Navigation */
.modern-nav {
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.nav-item {
    color: white;
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 10px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.nav-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.nav-item:hover::before {
    left: 100%;
}

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

/* Interactive Game Cards */
.game-card-advanced {
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.2));
    border-radius: 20px;
    padding: 20px;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    transform-style: preserve-3d;
    perspective: 1000px;
}

.game-card-advanced::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transform: rotate(45deg);
    transition: all 0.5s ease;
    opacity: 0;
}

.game-card-advanced:hover::before {
    opacity: 1;
    transform: rotate(45deg) translate(50%, 50%);
}

.game-card-advanced:hover {
    transform: translateY(-10px) rotateX(10deg) rotateY(5deg);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.3));
}

/* Particle Burst Effect */
.particle-burst {
    position: absolute;
    pointer-events: none;
    z-index: 1000;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: radial-gradient(circle, rgba(255, 255, 255, 1) 0%, rgba(255, 255, 255, 0) 70%);
    border-radius: 50%;
    animation: burst 1s ease-out forwards;
}

@keyframes burst {
    0% {
        transform: translate(0, 0) scale(1);
        opacity: 1;
    }
    100% {
        transform: translate(var(--x), var(--y)) scale(0);
        opacity: 0;
    }
}

/* Modern Modal */
.modern-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modern-modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.4));
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 30px;
    max-width: 500px;
    width: 90%;
    border: 1px solid rgba(255, 255, 255, 0.3);
    transform: scale(0.8);
    transition: all 0.3s ease;
}

.modern-modal.active .modal-content {
    transform: scale(1);
}

/* Progress Bars */
.progress-bar-modern {
    width: 100%;
    height: 30px;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 15px;
    overflow: hidden;
    position: relative;
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #00ffff, #ff00ff, #ffff00);
    background-size: 200% 100%;
    border-radius: 15px;
    animation: progressFlow 2s linear infinite;
    transition: width 0.5s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
}

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

/* Floating Action Button */
.fab {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: linear-gradient(45deg, #00ffff, #ff00ff);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(0, 255, 255, 0.5);
    transition: all 0.3s ease;
    z-index: 1000;
}

.fab:hover {
    transform: scale(1.1) rotate(90deg);
    box-shadow: 0 15px 40px rgba(0, 255, 255, 0.8);
}

/* Responsive Design */
@media (max-width: 768px) {
    .modern-nav {
        flex-direction: column;
        gap: 10px;
    }
    
    .neon-button {
        padding: 12px 30px;
        font-size: 14px;
    }
    
    .game-card-advanced {
        padding: 15px;
    }
    
    .modal-content {
        padding: 20px;
    }
}
