/* ===============================================
   PIXELFORGE AGENCY - ULTRA MODERN FEATURES
   Next-Gen Cool Enhancements
   =============================================== */

/* Neon Glow Effects */
.neon-glow {
    box-shadow: 
        0 0 5px currentColor,
        0 0 10px currentColor,
        0 0 15px currentColor,
        0 0 20px var(--primary-purple),
        0 0 35px var(--primary-purple),
        0 0 40px var(--primary-purple);
    animation: neonFlicker 2s infinite alternate;
}

@keyframes neonFlicker {
    0%, 18%, 22%, 25%, 53%, 57%, 100% {
        text-shadow: 
            0 0 4px #fff,
            0 0 11px #fff,
            0 0 19px #fff,
            0 0 40px var(--primary-purple),
            0 0 80px var(--primary-purple),
            0 0 90px var(--primary-purple),
            0 0 100px var(--primary-purple),
            0 0 150px var(--primary-purple);
    }
    20%, 24%, 55% {
        text-shadow: none;
    }
}

/* 3D Transform Effects */
.transform-3d {
    transform-style: preserve-3d;
    perspective: 1000px;
}

.card-3d {
    transform: rotateX(0deg) rotateY(0deg);
    transition: transform 0.6s;
}

.card-3d:hover {
    transform: rotateX(5deg) rotateY(10deg) translateZ(20px);
}

/* Holographic Effect */
.holographic {
    background: 
        linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.1) 50%, transparent 70%),
        linear-gradient(135deg, var(--primary-purple), var(--primary-cyan), var(--primary-pink));
    background-size: 200% 200%, 100% 100%;
    animation: holographicShift 3s ease-in-out infinite;
}

@keyframes holographicShift {
    0%, 100% { background-position: 0% 0%; }
    50% { background-position: 100% 100%; }
}

/* Morphing Shapes */
.morphing-shape {
    background: var(--gradient-primary);
    border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
    animation: morphShape 8s ease-in-out infinite;
}

@keyframes morphShape {
    0%, 100% { border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%; }
    25% { border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%; }
    50% { border-radius: 50% 60% 30% 60% / 60% 30% 70% 40%; }
    75% { border-radius: 60% 40% 30% 70% / 50% 60% 30% 60%; }
}

/* Floating Particles */
.floating-particles {
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--primary-cyan);
    border-radius: 50%;
    animation: floatUp 6s infinite linear;
    opacity: 0;
}

.particle:nth-child(odd) {
    background: var(--primary-purple);
    animation-duration: 8s;
}

.particle:nth-child(3n) {
    background: var(--primary-pink);
    animation-duration: 5s;
}

@keyframes floatUp {
    0% {
        opacity: 1;
        transform: translateY(100vh) rotate(0deg);
    }
    100% {
        opacity: 0;
        transform: translateY(-100px) rotate(360deg);
    }
}

/* Matrix Effect */
.matrix-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    pointer-events: none;
    z-index: 1;
}

.matrix-rain {
    position: absolute;
    top: -100px;
    width: 2px;
    height: 100px;
    background: linear-gradient(transparent, var(--primary-cyan), transparent);
    animation: matrixFall 3s linear infinite;
    opacity: 0.6;
}

@keyframes matrixFall {
    0% { transform: translateY(-100vh); }
    100% { transform: translateY(100vh); }
}

/* Cyberpunk Grid */
.cyber-grid {
    background-image: 
        linear-gradient(rgba(99, 102, 241, 0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(99, 102, 241, 0.1) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: gridMove 20s linear infinite;
}

@keyframes gridMove {
    0% { background-position: 0 0; }
    100% { background-position: 50px 50px; }
}

/* Energy Orbs */
.energy-orb {
    position: absolute;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--primary-purple) 0%, transparent 70%);
    animation: orbPulse 4s ease-in-out infinite;
    filter: blur(20px);
    opacity: 0.3;
}

.energy-orb:nth-child(2) {
    width: 150px;
    height: 150px;
    background: radial-gradient(circle, var(--primary-cyan) 0%, transparent 70%);
    animation-delay: 2s;
    animation-duration: 6s;
}

@keyframes orbPulse {
    0%, 100% { transform: scale(1) rotate(0deg); }
    50% { transform: scale(1.5) rotate(180deg); }
}

/* Text Reveal Animation */
.text-reveal {
    overflow: hidden;
    position: relative;
}

.text-reveal::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient-primary);
    transform: translateX(-100%);
    animation: revealText 2s ease-out forwards;
}

@keyframes revealText {
    0% { transform: translateX(-100%); }
    50% { transform: translateX(0%); }
    100% { transform: translateX(100%); }
}

/* Glitch Effects */
.glitch {
    position: relative;
    color: var(--text-primary);
    font-size: 4rem;
    font-weight: bold;
    animation: glitch 1s linear infinite;
}

.glitch::before,
.glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.glitch::before {
    animation: glitchTop 1s linear infinite;
    clip-path: polygon(0 0, 100% 0, 100% 35%, 0 35%);
    -webkit-clip-path: polygon(0 0, 100% 0, 100% 35%, 0 35%);
}

.glitch::after {
    animation: glitchBottom 1.5s linear infinite;
    clip-path: polygon(0 65%, 100% 65%, 100% 100%, 0 100%);
    -webkit-clip-path: polygon(0 65%, 100% 65%, 100% 100%, 0 100%);
}

@keyframes glitch {
    2%, 64% { transform: translate(2px, 0) skew(0deg); }
    4%, 60% { transform: translate(-2px, 0) skew(0deg); }
    62% { transform: translate(0, 0) skew(5deg); }
}

@keyframes glitchTop {
    2%, 64% { transform: translate(2px, -2px); }
    4%, 60% { transform: translate(-2px, 2px); }
    62% { transform: translate(13px, -1px) skew(-13deg); }
}

@keyframes glitchBottom {
    2%, 64% { transform: translate(-2px, 0); }
    4%, 60% { transform: translate(-2px, 0); }
    62% { transform: translate(-22px, 5px) skew(21deg); }
}

/* Liquid Button Effect */
.liquid-btn {
    position: relative;
    background: transparent;
    border: 2px solid var(--primary-purple);
    border-radius: 50px;
    padding: 15px 30px;
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 600;
    overflow: hidden;
    transition: color 0.3s;
}

.liquid-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--gradient-primary);
    transition: left 0.7s;
    z-index: -1;
}

.liquid-btn:hover::before {
    left: 0;
}

.liquid-btn:hover {
    color: white;
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.4);
}

/* Magnetic Effect */
.magnetic {
    transition: transform 0.3s ease;
}

.magnetic:hover {
    transform: scale(1.05) rotateZ(2deg);
}

/* Parallax Layers */
.parallax-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.parallax-layer--back {
    transform: translateZ(-300px) scale(4);
}

.parallax-layer--base {
    transform: translateZ(0);
}

.parallax-layer--front {
    transform: translateZ(300px);
}

/* Interactive Elements */
.interactive-card {
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.interactive-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 100%);
    transform: scale(0);
    transition: transform 0.6s ease;
    pointer-events: none;
}

.interactive-card:hover::before {
    transform: scale(2);
}

/* Responsive Magic */
@media (max-width: 768px) {
    .glitch {
        font-size: 2.5rem;
    }
    
    .energy-orb {
        width: 100px;
        height: 100px;
    }
    
    .energy-orb:nth-child(2) {
        width: 80px;
        height: 80px;
    }
    
    .particle {
        width: 3px;
        height: 3px;
    }
}

@media (max-width: 480px) {
    .glitch {
        font-size: 2rem;
    }
    
    .liquid-btn {
        padding: 12px 24px;
        font-size: 14px;
    }
    
    .energy-orb,
    .energy-orb:nth-child(2) {
        display: none; /* Hide on very small screens for performance */
    }
}

/* Performance Optimizations */
.will-change-transform {
    will-change: transform;
}

.will-change-opacity {
    will-change: opacity;
}

.gpu-layer {
    transform: translateZ(0);
    backface-visibility: hidden;
    perspective: 1000px;
}

/* Cool Animations for Entry */
.fade-in-up {
    animation: fadeInUp 1s ease-out forwards;
    opacity: 0;
    transform: translateY(30px);
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.slide-in-left {
    animation: slideInLeft 0.8s ease-out forwards;
    transform: translateX(-100px);
}

@keyframes slideInLeft {
    to {
        transform: translateX(0);
    }
}

.scale-in {
    animation: scaleIn 0.6s ease-out forwards;
    transform: scale(0);
}

@keyframes scaleIn {
    to {
        transform: scale(1);
    }
}