/* Animation Keyframes */
@keyframes float {
    0%, 100% { 
        transform: translateY(0px); 
    }
    50% { 
        transform: translateY(-20px); 
    }
}

@keyframes twinkle {
    0% { 
        opacity: 0.3; 
        transform: scale(1);
    }
    50% {
        opacity: 1;
        transform: scale(1.2);
    }
    100% { 
        opacity: 0.3; 
        transform: scale(1);
    }
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 167, 38, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(255, 167, 38, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(255, 167, 38, 0);
    }
}

@keyframes slideInLeft {
    0% {
        opacity: 0;
        transform: translateX(-50px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    0% {
        opacity: 0;
        transform: translateX(50px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInUp {
    0% {
        opacity: 0;
        transform: translateY(50px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}

@keyframes scaleIn {
    0% {
        opacity: 0;
        transform: scale(0.8);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes rotateIn {
    0% {
        opacity: 0;
        transform: rotate(-180deg);
    }
    100% {
        opacity: 1;
        transform: rotate(0deg);
    }
}

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    10%, 30%, 50%, 70%, 90% {
        transform: translateX(-5px);
    }
    20%, 40%, 60%, 80% {
        transform: translateX(5px);
    }
}

@keyframes glow {
    0% {
        box-shadow: 0 0 5px rgba(255, 167, 38, 0.5);
    }
    50% {
        box-shadow: 0 0 20px rgba(255, 167, 38, 0.8), 0 0 30px rgba(255, 167, 38, 0.6);
    }
    100% {
        box-shadow: 0 0 5px rgba(255, 167, 38, 0.5);
    }
}

@keyframes typing {
    0% {
        width: 0;
    }
    100% {
        width: 100%;
    }
}

@keyframes blink {
    0%, 50% {
        opacity: 1;
    }
    51%, 100% {
        opacity: 0;
    }
}

/* Animation Classes */
.floating-animation {
    animation: float 6s ease-in-out infinite;
}

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

.pulse-animation {
    animation: pulse 2s infinite;
}

.slide-in-left {
    animation: slideInLeft 0.6s ease-out;
}

.slide-in-right {
    animation: slideInRight 0.6s ease-out;
}

.slide-in-up {
    animation: slideInUp 0.6s ease-out;
}

.fade-in {
    animation: fadeIn 0.6s ease-out;
}

.scale-in {
    animation: scaleIn 0.6s ease-out;
}

.rotate-in {
    animation: rotateIn 0.6s ease-out;
}

.bounce-in {
    animation: bounceIn 0.8s ease-out;
}

.shake-animation {
    animation: shake 0.5s ease-in-out;
}

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

/* Hover Animations */
.hover-float:hover {
    transform: translateY(-5px);
    transition: transform 0.3s ease;
}

.hover-scale:hover {
    transform: scale(1.05);
    transition: transform 0.3s ease;
}

.hover-rotate:hover {
    transform: rotate(5deg);
    transition: transform 0.3s ease;
}

.hover-glow:hover {
    box-shadow: 0 0 20px rgba(255, 167, 38, 0.6);
    transition: box-shadow 0.3s ease;
}

/* Loading Animations */
.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 167, 38, 0.3);
    border-top: 4px solid #ffa726;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.loading-dots {
    display: inline-block;
}

.loading-dots::after {
    content: '';
    animation: dots 1.5s steps(4, end) infinite;
}

@keyframes dots {
    0%, 20% {
        content: '';
    }
    40% {
        content: '.';
    }
    60% {
        content: '..';
    }
    80%, 100% {
        content: '...';
    }
}

/* Progress Bar Animation */
.progress-bar {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(135deg, #ffa726 0%, #ff6b6b 100%);
    border-radius: 2px;
    transform: translateX(-100%);
    animation: progressFill 2s ease-out forwards;
}

@keyframes progressFill {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(0);
    }
}

/* Ripple Effect */
.ripple {
    position: relative;
    overflow: hidden;
}

.ripple::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.ripple:active::before {
    width: 300px;
    height: 300px;
}

/* Typewriter Effect */
.typewriter {
    overflow: hidden;
    border-right: 2px solid #ffa726;
    white-space: nowrap;
    animation: typing 3s steps(40, end), blink 0.75s step-end infinite;
}

/* Parallax Scroll */
.parallax {
    transform: translateZ(0);
    transition: transform 0.1s ease-out;
}

/* Smooth Reveal */
.reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.6s ease;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger Animation */
.stagger-item {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.stagger-item:nth-child(1) { transition-delay: 0.1s; }
.stagger-item:nth-child(2) { transition-delay: 0.2s; }
.stagger-item:nth-child(3) { transition-delay: 0.3s; }
.stagger-item:nth-child(4) { transition-delay: 0.4s; }
.stagger-item:nth-child(5) { transition-delay: 0.5s; }
.stagger-item:nth-child(6) { transition-delay: 0.6s; }

.stagger-item.active {
    opacity: 1;
    transform: translateY(0);
}

/* Counter Animation */
.counter {
    font-variant-numeric: tabular-nums;
}

/* Morphing Background */
.morphing-bg {
    background: linear-gradient(-45deg, #0a0a0f, #1a1a2e, #16213e, #0f3460);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
}

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

/* Particle Animation */
.particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
}

.particle {
    position: absolute;
    width: 2px;
    height: 2px;
    background: #ffa726;
    border-radius: 50%;
    animation: particleFloat 10s linear infinite;
}

@keyframes particleFloat {
    0% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-10vh) rotate(360deg);
        opacity: 0;
    }
}

/* Text Animations */
.text-focus-in {
    animation: textFocusIn 1s cubic-bezier(0.550, 0.085, 0.680, 0.530) both;
}

@keyframes textFocusIn {
    0% {
        filter: blur(12px);
        opacity: 0;
    }
    100% {
        filter: blur(0px);
        opacity: 1;
    }
}

.text-shadow-pop-top {
    animation: textShadowPopTop 0.6s both;
}

@keyframes textShadowPopTop {
    0% {
        text-shadow: 0 0 #ffa726, 0 0 #ffa726, 0 0 #ffa726, 0 0 #ffa726;
        transform: translateY(0);
    }
    100% {
        text-shadow: 0 -1px #ffa726, 0 -2px #ffa726, 0 -3px #ffa726, 0 -4px #ffa726;
        transform: translateY(-4px);
    }
}

/* Button Animations */
.btn-wobble:hover {
    animation: wobble 0.8s both;
}

@keyframes wobble {
    16.65% {
        transform: translateX(8px);
    }
    33.3% {
        transform: translateX(-6px);
    }
    49.95% {
        transform: translateX(4px);
    }
    66.6% {
        transform: translateX(-2px);
    }
    83.25% {
        transform: translateX(1px);
    }
    100% {
        transform: translateX(0);
    }
}

/* Card Flip Animation */
.flip-card {
    perspective: 1000px;
}

.flip-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.6s;
    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;
}

.flip-card-back {
    transform: rotateY(180deg);
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

