/* ===============================================
   MODERN ANIMATIONS & COOL EFFECTS
   =============================================== */

/* Smooth Scroll Behavior */
html {
    scroll-behavior: smooth;
}

/* ===============================================
   FADE-IN ANIMATIONS ON SCROLL
   =============================================== */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

.fade-in-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in-left.visible {
    opacity: 1;
    transform: translateX(0);
}

.fade-in-right {
    opacity: 0;
    transform: translateX(50px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in-right.visible {
    opacity: 1;
    transform: translateX(0);
}

.scale-in {
    opacity: 0;
    transform: scale(0.8);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.scale-in.visible {
    opacity: 1;
    transform: scale(1);
}

/* ===============================================
   CARD HOVER EFFECTS
   =============================================== */
.card-enhanced {
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.card-enhanced::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    transition: left 0.5s;
}

.card-enhanced:hover::before {
    left: 100%;
}

.card-enhanced:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

/* ===============================================
   GRADIENT BACKGROUNDS
   =============================================== */
.gradient-bg-1 {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.gradient-bg-2 {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.gradient-bg-3 {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.gradient-bg-4 {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
}

.gradient-bg-5 {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
}

.gradient-text {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ===============================================
   FLOATING ANIMATION
   =============================================== */
@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
}

.floating {
    animation: float 3s ease-in-out infinite;
}

/* ===============================================
   PULSE ANIMATION
   =============================================== */
@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.pulse {
    animation: pulse 2s ease-in-out infinite;
}

/* ===============================================
   SHINE EFFECT
   =============================================== */
@keyframes shine {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

.shine-effect {
    position: relative;
    overflow: hidden;
}

.shine-effect::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: shine 3s infinite;
}

/* ===============================================
   GLASSMORPHISM EFFECT
   =============================================== */
.glass-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.dark-mode .glass-card {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* ===============================================
   GRADIENT BORDERS
   =============================================== */
.gradient-border {
    position: relative;
    border: 2px solid transparent;
    background-clip: padding-box;
}

.gradient-border::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(135deg, #667eea, #764ba2, #f093fb, #f5576c);
    border-radius: inherit;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s;
}

.gradient-border:hover::before {
    opacity: 1;
}

/* ===============================================
   ANIMATED COUNTER
   =============================================== */
.counter {
    font-size: 3rem;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ===============================================
   LOADING SPINNER
   =============================================== */
@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(79, 70, 229, 0.1);
    border-top: 4px solid #4F46E5;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* ===============================================
   PARALLAX EFFECT
   =============================================== */
.parallax {
    position: relative;
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

/* ===============================================
   HOVER GLOW EFFECT
   =============================================== */
.glow-on-hover {
    transition: all 0.3s ease;
}

.glow-on-hover:hover {
    box-shadow: 0 0 20px rgba(79, 70, 229, 0.5),
                0 0 40px rgba(79, 70, 229, 0.3),
                0 0 60px rgba(79, 70, 229, 0.2);
}

/* ===============================================
   TYPING ANIMATION
   =============================================== */
@keyframes typing {
    from {
        width: 0;
    }
    to {
        width: 100%;
    }
}

@keyframes blink {
    50% {
        border-color: transparent;
    }
}

.typing-text {
    overflow: hidden;
    border-right: 3px solid #4F46E5;
    white-space: nowrap;
    animation: typing 3.5s steps(40, end), blink 0.75s step-end infinite;
}

/* ===============================================
   MORPHING SHAPES
   =============================================== */
@keyframes morph {
    0%, 100% {
        border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
    }
    50% {
        border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%;
    }
}

.morphing-shape {
    animation: morph 8s ease-in-out infinite;
}

/* ===============================================
   BUTTON RIPPLE EFFECT
   =============================================== */
.ripple {
    position: relative;
    overflow: hidden;
}

.ripple::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.ripple:active::after {
    width: 300px;
    height: 300px;
}

/* ===============================================
   GRADIENT ANIMATION
   =============================================== */
@keyframes gradient-shift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.animated-gradient {
    background: linear-gradient(-45deg, #667eea, #764ba2, #f093fb, #f5576c);
    background-size: 400% 400%;
    animation: gradient-shift 15s ease infinite;
}

/* ===============================================
   3D CARD FLIP
   =============================================== */
.flip-card {
    perspective: 1000px;
}

.flip-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.8s;
    transform-style: preserve-3d;
}

.flip-card:hover .flip-card-inner {
    transform: rotateY(180deg);
}

.flip-card-front,
.flip-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 15px;
}

.flip-card-back {
    transform: rotateY(180deg);
}

/* ===============================================
   WAVE ANIMATION
   =============================================== */
@keyframes wave {
    0%, 100% {
        transform: translateX(0);
    }
    50% {
        transform: translateX(-25%);
    }
}

.wave-animation {
    animation: wave 10s linear infinite;
}

/* ===============================================
   STAGGER ANIMATION
   =============================================== */
.stagger-item {
    opacity: 0;
    transform: translateY(30px);
    animation: stagger-in 0.6s ease-out forwards;
}

@keyframes stagger-in {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.stagger-item:nth-child(1) { animation-delay: 0.1s; }
.stagger-item:nth-child(2) { animation-delay: 0.2s; }
.stagger-item:nth-child(3) { animation-delay: 0.3s; }
.stagger-item:nth-child(4) { animation-delay: 0.4s; }
.stagger-item:nth-child(5) { animation-delay: 0.5s; }
.stagger-item:nth-child(6) { animation-delay: 0.6s; }

/* ===============================================
   NEON GLOW TEXT
   =============================================== */
.neon-text {
    color: #fff;
    text-shadow: 
        0 0 10px #4F46E5,
        0 0 20px #4F46E5,
        0 0 30px #4F46E5,
        0 0 40px #4F46E5;
    animation: neon-flicker 1.5s infinite alternate;
}

@keyframes neon-flicker {
    0%, 100% {
        text-shadow: 
            0 0 10px #4F46E5,
            0 0 20px #4F46E5,
            0 0 30px #4F46E5,
            0 0 40px #4F46E5;
    }
    50% {
        text-shadow: 
            0 0 5px #4F46E5,
            0 0 10px #4F46E5,
            0 0 15px #4F46E5,
            0 0 20px #4F46E5;
    }
}

/* ===============================================
   RESPONSIVE ADJUSTMENTS
   =============================================== */
@media (max-width: 768px) {
    .fade-in-left,
    .fade-in-right {
        transform: translateY(30px);
    }
    
    .fade-in-left.visible,
    .fade-in-right.visible {
        transform: translateY(0);
    }
    
    .counter {
        font-size: 2rem;
    }
    
    .card-enhanced:hover {
        transform: translateY(-5px);
    }
}
