/**
 * Telekomp Theme - Advanced Animations & Effects
 * Nowoczesne animacje i efekty wizualne
 */

/* ===== LOADING ANIMATIONS ===== */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.7;
        transform: scale(0.95);
    }
}

@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 5px rgba(241, 100, 33, 0.3);
    }
    50% {
        box-shadow: 0 0 20px rgba(241, 100, 33, 0.6), 0 0 30px rgba(241, 100, 33, 0.4);
    }
}

@keyframes ripple {
    0% {
        box-shadow: 0 0 0 0 rgba(241, 100, 33, 0.4),
                    0 0 0 10px rgba(241, 100, 33, 0.3),
                    0 0 0 20px rgba(241, 100, 33, 0.2);
    }
    100% {
        box-shadow: 0 0 0 10px rgba(241, 100, 33, 0.3),
                    0 0 0 20px rgba(241, 100, 33, 0.2),
                    0 0 0 30px rgba(241, 100, 33, 0);
    }
}

/* ===== TEXT ANIMATIONS ===== */
@keyframes typewriter {
    from {
        width: 0;
    }
    to {
        width: 100%;
    }
}

@keyframes blinkCursor {
    0%, 100% {
        border-right-color: transparent;
    }
    50% {
        border-right-color: var(--primary-color);
    }
}

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

/* ===== HOVER EFFECTS ===== */
.hover-lift {
    transition: var(--transition);
}

.hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.hover-glow {
    transition: var(--transition);
}

.hover-glow:hover {
    box-shadow: 0 8px 25px rgba(241, 100, 33, 0.4);
    filter: brightness(1.05);
}

.hover-scale {
    transition: var(--transition);
}

.hover-scale:hover {
    transform: scale(1.05);
}

/* ===== GRADIENT TEXT ===== */
.gradient-text {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    background-size: 200% auto;
    animation: gradientShift 3s ease infinite;
}

/* ===== FLOATING ELEMENTS ===== */
@keyframes floatSlow {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    25% {
        transform: translateY(-15px) rotate(2deg);
    }
    50% {
        transform: translateY(-10px) rotate(-2deg);
    }
    75% {
        transform: translateY(-20px) rotate(1deg);
    }
}

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

.float-slow {
    animation: floatSlow 6s ease-in-out infinite;
}

.float-fast {
    animation: floatFast 3s ease-in-out infinite;
}

/* ===== REVEAL ANIMATIONS ===== */
@keyframes revealFromLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes revealFromRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

@keyframes revealScale {
    from {
        opacity: 0;
        transform: scale(0.5);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* ===== BACKGROUND EFFECTS ===== */
@keyframes backgroundPulse {
    0%, 100% {
        background-size: 100% 100%;
    }
    50% {
        background-size: 110% 110%;
    }
}

@keyframes shimmerEffect {
    0% {
        background-position: -500px 0;
    }
    100% {
        background-position: 500px 0;
    }
}

.shimmer {
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.4) 50%,
        transparent 100%
    );
    background-size: 200% 100%;
    animation: shimmerEffect 2s infinite;
}

/* ===== BORDER ANIMATIONS ===== */
@keyframes borderRotate {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.animated-border {
    position: relative;
    overflow: hidden;
}

.animated-border::before {
    content: "";
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, var(--primary-color), var(--primary-light), var(--primary-color));
    background-size: 400% 400%;
    z-index: -1;
    border-radius: inherit;
    animation: gradientShift 3s ease infinite;
}

/* ===== STAGGER ANIMATIONS ===== */
.stagger-animation > * {
    opacity: 0;
    animation: fadeInUp 0.6s ease forwards;
}

.stagger-animation > *:nth-child(1) { animation-delay: 0.1s; }
.stagger-animation > *:nth-child(2) { animation-delay: 0.2s; }
.stagger-animation > *:nth-child(3) { animation-delay: 0.3s; }
.stagger-animation > *:nth-child(4) { animation-delay: 0.4s; }
.stagger-animation > *:nth-child(5) { animation-delay: 0.5s; }
.stagger-animation > *:nth-child(6) { animation-delay: 0.6s; }
.stagger-animation > *:nth-child(7) { animation-delay: 0.7s; }
.stagger-animation > *:nth-child(8) { animation-delay: 0.8s; }

/* ===== PARTICLE EFFECT ===== */
@keyframes particleFloat {
    0%, 100% {
        transform: translateY(0) translateX(0);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100vh) translateX(100px);
        opacity: 0;
    }
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--primary-color);
    border-radius: 50%;
    animation: particleFloat 10s infinite;
    opacity: 0.6;
}

.particle:nth-child(1) { left: 10%; animation-delay: 0s; }
.particle:nth-child(2) { left: 20%; animation-delay: 2s; }
.particle:nth-child(3) { left: 30%; animation-delay: 4s; }
.particle:nth-child(4) { left: 40%; animation-delay: 6s; }
.particle:nth-child(5) { left: 50%; animation-delay: 8s; }
.particle:nth-child(6) { left: 60%; animation-delay: 1s; }
.particle:nth-child(7) { left: 70%; animation-delay: 3s; }
.particle:nth-child(8) { left: 80%; animation-delay: 5s; }

/* ===== UTILITY CLASSES ===== */
.fade-in {
    animation: fadeInUp 0.8s ease;
}

.slide-in-left {
    animation: revealFromLeft 0.8s ease;
}

.slide-in-right {
    animation: revealFromRight 0.8s ease;
}

.scale-in {
    animation: revealScale 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.pulse {
    animation: pulse 2s ease-in-out infinite;
}

.glow {
    animation: glow 2s ease-in-out infinite;
}

/* ===== BUTTON EFFECTS ===== */
.btn-3d {
    position: relative;
    transform-style: preserve-3d;
    transition: var(--transition);
}

.btn-3d::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: inherit;
    border-radius: inherit;
    transform: translateZ(-8px);
    filter: brightness(0.7);
    transition: var(--transition);
}

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

.btn-3d:active {
    transform: translateZ(0);
}

/* ===== LOADING SPINNER ===== */
@keyframes spinLoader {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.loading-spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid rgba(241, 100, 33, 0.2);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spinLoader 0.8s linear infinite;
}

/* ===== SMOOTH TRANSITIONS ===== */
.transition-all {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.transition-fast {
    transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

.transition-slow {
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== GLASSMORPHISM EFFECT ===== */
.glass {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.glass-dark {
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* ===== NEON EFFECT ===== */
.neon-text {
    color: var(--white);
    text-shadow: 
        0 0 7px rgba(241, 100, 33, 0.8),
        0 0 10px rgba(241, 100, 33, 0.6),
        0 0 21px rgba(241, 100, 33, 0.4),
        0 0 42px rgba(241, 100, 33, 0.2);
    animation: neonFlicker 3s infinite alternate;
}

@keyframes neonFlicker {
    0%, 19%, 21%, 23%, 25%, 54%, 56%, 100% {
        text-shadow: 
            0 0 7px rgba(241, 100, 33, 0.8),
            0 0 10px rgba(241, 100, 33, 0.6),
            0 0 21px rgba(241, 100, 33, 0.4),
            0 0 42px rgba(241, 100, 33, 0.2);
    }
    20%, 24%, 55% {
        text-shadow: none;
    }
}

/* ===== PERFORMANCE OPTIMIZATION ===== */
.will-change-transform {
    will-change: transform;
}

.will-change-opacity {
    will-change: opacity;
}

.gpu-accelerated {
    transform: translateZ(0);
    backface-visibility: hidden;
    perspective: 1000px;
}
