/* Background Particles Animation */
.bg-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.bg-animation::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(42, 92, 113, 0.3) 0%, transparent 20%),
        radial-gradient(circle at 90% 80%, rgba(226, 194, 168, 0.2) 0%, transparent 20%),
        radial-gradient(circle at 30% 70%, rgba(255, 255, 255, 0.1) 0%, transparent 15%);
    animation: float 20s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    25% { transform: translate(10px, -20px) rotate(1deg); }
    50% { transform: translate(-15px, 10px) rotate(-1deg); }
    75% { transform: translate(5px, 15px) rotate(0.5deg); }
}

/* Floating Animation for Elements */
@keyframes floatUp {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
    100% { transform: translateY(0px); }
}

.floating {
    animation: floatUp 6s ease-in-out infinite;
}

/* Fade In Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 1s ease forwards;
}

/* Slide In Animation */
@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

.slide-left {
    animation: slideInLeft 1s ease forwards;
}

.slide-right {
    animation: slideInRight 1s ease forwards;
}

/* Pulse Animation */
@keyframes pulseGlow {
    0% {
        box-shadow: 0 0 0 0 rgba(42, 92, 113, 0.4);
    }
    70% {
        box-shadow: 0 0 0 15px rgba(42, 92, 113, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(42, 92, 113, 0);
    }
}

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

/* Spin Animation */
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.spin {
    animation: spin 20s linear infinite;
}

/* Wiggle Animation */
@keyframes wiggle {
    0%, 7% { transform: rotateZ(0); }
    15% { transform: rotateZ(-15deg); }
    20% { transform: rotateZ(10deg); }
    25% { transform: rotateZ(-10deg); }
    30% { transform: rotateZ(6deg); }
    35% { transform: rotateZ(-4deg); }
}

.wiggle {
    display: inline-block;
    animation: wiggle 5s ease-in-out infinite;
}

/* Typewriter Effect */
@keyframes typewriter {
    from { width: 0; }
    to { width: 100%; }
}

@keyframes blinkCaret {
    from, to { border-color: transparent; }
    50% { border-color: #2A5C71; }
}

.typewriter {
    overflow: hidden;
    border-right: 3px solid #2A5C71;
    white-space: nowrap;
    width: 0;
    animation: typewriter 3s steps(30) forwards, blinkCaret 0.75s step-end infinite;
}

/* Gradient Border Animation */
@keyframes borderGradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.gradient-border {
    position: relative;
    background: linear-gradient(45deg, #2A5C71, #E2C2A8, #2A5C71);
    background-size: 300% 300%;
    animation: borderGradient 3s ease infinite;
    padding: 2px;
    border-radius: 20px;
}

.gradient-border::before {
    content: '';
    position: absolute;
    inset: 2px;
    background: rgba(10, 31, 42, 0.9);
    border-radius: 18px;
    z-index: -1;
}

/* Glow Text Animation */
@keyframes glowText {
    0%, 100% { text-shadow: 0 0 5px rgba(42, 92, 113, 0.5); }
    50% { text-shadow: 0 0 20px rgba(42, 92, 113, 0.8), 0 0 30px rgba(42, 92, 113, 0.6); }
}

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

/* Loading Dots */
.loading-dots {
    display: inline-flex;
    gap: 5px;
}

.loading-dots span {
    width: 10px;
    height: 10px;
    background: #2A5C71;
    border-radius: 50%;
    animation: loading 1.4s ease-in-out infinite;
}

.loading-dots span:nth-child(1) { animation-delay: 0s; }
.loading-dots span:nth-child(2) { animation-delay: 0.2s; }
.loading-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes loading {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1); }
}

/* Ripple Effect */
@keyframes ripple {
    0% {
        transform: scale(0);
        opacity: 1;
    }
    100% {
        transform: scale(4);
        opacity: 0;
    }
}

.ripple {
    position: relative;
    overflow: hidden;
}

.ripple::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 5px;
    height: 5px;
    background: rgba(255, 255, 255, 0.5);
    opacity: 0;
    border-radius: 100%;
    transform: scale(1, 1) translate(-50%, -50%);
    transform-origin: 50% 50%;
}

.ripple:focus:not(:active)::after {
    animation: ripple 1s ease-out;
}

/* Shimmer Effect */
@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

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

/* Bounce Animation */
@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-20px); }
    60% { transform: translateY(-10px); }
}

.bounce {
    animation: bounce 2s infinite;
}

/* Jello Effect */
@keyframes jello {
    0% { transform: scale3d(1, 1, 1); }
    30% { transform: scale3d(1.25, 0.75, 1); }
    40% { transform: scale3d(0.75, 1.25, 1); }
    50% { transform: scale3d(1.15, 0.85, 1); }
    65% { transform: scale3d(0.95, 1.05, 1); }
    75% { transform: scale3d(1.05, 0.95, 1); }
    100% { transform: scale3d(1, 1, 1); }
}

.jello {
    animation: jello 1s infinite;
}

/* Heart Beat */
@keyframes heartbeat {
    0% { transform: scale(1); }
    14% { transform: scale(1.3); }
    28% { transform: scale(1); }
    42% { transform: scale(1.3); }
    70% { transform: scale(1); }
}

.heartbeat {
    animation: heartbeat 1.5s ease infinite;
}

/* Sakura Petals Animation */
.sakura-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
    overflow: hidden;
}

.sakura-petal {
    position: absolute;
    width: 25px;
    height: 25px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23FFB7C5' d='M12 2C9 8 9 14 12 20C15 14 15 8 12 2Z'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    opacity: 0.8;
}

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

@keyframes sakuraSway {
    0%, 100% {
        transform: translateX(0) rotate(0deg);
    }
    25% {
        transform: translateX(10px) rotate(5deg);
    }
    50% {
        transform: translateX(-10px) rotate(-5deg);
    }
    75% {
        transform: translateX(5px) rotate(3deg);
    }
}