/* ========================================
   ELEKTRIKÇI PRO - ANIMATIONS
   Scroll-triggered, electric, micro-animations
   ======================================== */

/* ---------- Fade Animations ---------- */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* ---------- Scroll Animation Classes ---------- */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1),
        transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.animate-on-scroll.animated {
    opacity: 1;
    transform: translateY(0);
}

.animate-on-scroll.from-left {
    transform: translateX(-30px);
}

.animate-on-scroll.from-left.animated {
    transform: translateX(0);
}

.animate-on-scroll.from-right {
    transform: translateX(30px);
}

.animate-on-scroll.from-right.animated {
    transform: translateX(0);
}

.animate-on-scroll.scale-up {
    transform: scale(0.9);
}

.animate-on-scroll.scale-up.animated {
    transform: scale(1);
}

/* Stagger children animations */
.stagger-children>* {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1),
        transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.stagger-children.animated>*:nth-child(1) {
    transition-delay: 0.05s;
}

.stagger-children.animated>*:nth-child(2) {
    transition-delay: 0.1s;
}

.stagger-children.animated>*:nth-child(3) {
    transition-delay: 0.15s;
}

.stagger-children.animated>*:nth-child(4) {
    transition-delay: 0.2s;
}

.stagger-children.animated>*:nth-child(5) {
    transition-delay: 0.25s;
}

.stagger-children.animated>*:nth-child(6) {
    transition-delay: 0.3s;
}

.stagger-children.animated>*:nth-child(7) {
    transition-delay: 0.35s;
}

.stagger-children.animated>*:nth-child(8) {
    transition-delay: 0.4s;
}

.stagger-children.animated>*:nth-child(9) {
    transition-delay: 0.45s;
}

.stagger-children.animated>* {
    opacity: 1;
    transform: translateY(0);
}

/* ---------- Electric Effect ---------- */
.electric-line {
    position: absolute;
    width: 2px;
    height: 100px;
    background: linear-gradient(180deg, transparent, var(--accent-blue), transparent);
    opacity: 0;
    animation: electricFlash 4s ease-in-out infinite;
}

@keyframes electricFlash {

    0%,
    90%,
    100% {
        opacity: 0;
    }

    92% {
        opacity: 0.8;
    }

    94% {
        opacity: 0.2;
    }

    96% {
        opacity: 0.9;
    }

    98% {
        opacity: 0.1;
    }
}

/* ---------- Glow Pulse ---------- */
@keyframes glowPulse {

    0%,
    100% {
        box-shadow: 0 0 5px rgba(0, 212, 255, 0.2),
            0 0 10px rgba(0, 212, 255, 0.1);
    }

    50% {
        box-shadow: 0 0 15px rgba(0, 212, 255, 0.4),
            0 0 30px rgba(0, 212, 255, 0.2);
    }
}

.glow-pulse {
    animation: glowPulse 3s ease-in-out infinite;
}

/* ---------- Floating Animation ---------- */
@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

.floating {
    animation: float 4s ease-in-out infinite;
}

/* ---------- Shimmer Effect ---------- */
@keyframes shimmer {
    0% {
        background-position: -200% center;
    }

    100% {
        background-position: 200% center;
    }
}

.shimmer {
    background: linear-gradient(90deg,
            transparent 0%,
            rgba(0, 212, 255, 0.08) 50%,
            transparent 100%);
    background-size: 200% 100%;
    animation: shimmer 3s ease-in-out infinite;
}

/* ---------- Electric Spark Particles ---------- */
.spark-container {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}

.spark {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--accent-blue);
    border-radius: 50%;
    box-shadow: 0 0 6px var(--accent-blue), 0 0 12px var(--accent-blue);
    animation: sparkFloat 6s linear infinite;
}

@keyframes sparkFloat {
    0% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 0;
    }

    10% {
        opacity: 1;
    }

    90% {
        opacity: 1;
    }

    100% {
        transform: translateY(-100px) rotate(720deg);
        opacity: 0;
    }
}

/* ---------- Counter Animation ---------- */
.counter {
    display: inline-block;
    transition: all 0.3s ease;
}

/* ---------- Typing Effect ---------- */
@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

.typing-cursor {
    display: inline-block;
    width: 3px;
    height: 1em;
    background: var(--accent-blue);
    margin-left: 2px;
    animation: blink 0.8s step-end infinite;
    vertical-align: text-bottom;
}

/* ---------- Ripple Effect for Buttons ---------- */
.btn .ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: scale(0);
    animation: rippleEffect 0.6s linear;
    pointer-events: none;
}

@keyframes rippleEffect {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* ---------- Loading Spinner ---------- */
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.spinner {
    width: 32px;
    height: 32px;
    border: 3px solid rgba(0, 212, 255, 0.2);
    border-top-color: var(--accent-blue);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* ---------- Parallax Stars Background ---------- */
.stars {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.star {
    position: absolute;
    width: 2px;
    height: 2px;
    background: white;
    border-radius: 50%;
    opacity: 0;
    animation: twinkle 5s ease-in-out infinite;
}

@keyframes twinkle {

    0%,
    100% {
        opacity: 0;
    }

    50% {
        opacity: 0.6;
    }
}

/* ---------- Slide In from Bottom (for modals/toasts) ---------- */
@keyframes slideInBottom {
    from {
        transform: translateY(100%);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* ---------- Reduced Motion ---------- */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .animate-on-scroll {
        opacity: 1;
        transform: none;
    }
}