/* ========================================
   소라랜드 애니메이션 스타일
   ======================================== */

/* 페이드 인 애니메이션 */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    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 scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes scaleUp {
    from {
        transform: scale(0.95);
    }
    to {
        transform: scale(1);
    }
}

/* 회전 애니메이션 */
@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* 흔들림 애니메이션 */
@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    10%, 30%, 50%, 70%, 90% {
        transform: translateX(-5px);
    }
    20%, 40%, 60%, 80% {
        transform: translateX(5px);
    }
}

/* 바운스 애니메이션 */
@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        transform: scale(1);
    }
}

/* 글로우 효과 */
@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(158, 190, 181, 0.5);
    }
    50% {
        box-shadow: 0 0 40px rgba(158, 190, 181, 0.8);
    }
}

/* 플로팅 애니메이션 */
@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-15px);
    }
}

/* 깜박임 애니메이션 */
@keyframes blink {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* 애니메이션 클래스 */
.fade-in {
    animation: fadeIn 1s ease-out;
}

.fade-in-up {
    animation: fadeInUp 0.8s ease-out;
}

.fade-in-down {
    animation: fadeInDown 0.8s ease-out;
}

.fade-in-left {
    animation: fadeInLeft 0.8s ease-out;
}

.fade-in-right {
    animation: fadeInRight 0.8s ease-out;
}

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

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

/* 딜레이 클래스 */
.delay-1 {
    animation-delay: 0.2s;
    animation-fill-mode: backwards;
}

.delay-2 {
    animation-delay: 0.4s;
    animation-fill-mode: backwards;
}

.delay-3 {
    animation-delay: 0.6s;
    animation-fill-mode: backwards;
}

.delay-4 {
    animation-delay: 0.8s;
    animation-fill-mode: backwards;
}

/* 스크롤 애니메이션을 위한 초기 상태 */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.animate-on-scroll.animated {
    opacity: 1;
    transform: translateY(0);
}

/* 호버 효과 */
.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.hover-grow {
    transition: transform 0.3s ease;
}

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

/* 로딩 애니메이션 */
@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.spinner {
    border: 4px solid rgba(158, 190, 181, 0.2);
    border-top-color: #9EBEB5;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

/* 그라데이션 애니메이션 */
@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.gradient-animate {
    background-size: 200% 200%;
    animation: gradientShift 6s ease infinite;
}

/* 타이핑 효과 */
@keyframes typing {
    from {
        width: 0;
    }
    to {
        width: 100%;
    }
}

@keyframes blink-caret {
    from, to {
        border-color: transparent;
    }
    50% {
        border-color: #9EBEB5;
    }
}

/* 물결 효과 */
@keyframes ripple {
    0% {
        transform: scale(0);
        opacity: 1;
    }
    100% {
        transform: scale(4);
        opacity: 0;
    }
}

/* 하트 비트 애니메이션 */
@keyframes heartbeat {
    0%, 100% {
        transform: scale(1);
    }
    10%, 30% {
        transform: scale(0.9);
    }
    20%, 40%, 60%, 80% {
        transform: scale(1.1);
    }
    50%, 70% {
        transform: scale(1.05);
    }
}

.heartbeat {
    animation: heartbeat 1.5s ease-in-out infinite;
}

/* 나뭇잎 흔들림 효과 */
@keyframes leafSway {
    0%, 100% {
        transform: rotate(-2deg);
    }
    50% {
        transform: rotate(2deg);
    }
}

.leaf-sway {
    animation: leafSway 3s ease-in-out infinite;
    transform-origin: top center;
}

/* 성장 애니메이션 (나무가 자라는 효과) */
@keyframes grow {
    0% {
        transform: scaleY(0);
        transform-origin: bottom;
    }
    100% {
        transform: scaleY(1);
        transform-origin: bottom;
    }
}

.grow-animation {
    animation: grow 1.5s ease-out;
}

/* 빛나는 효과 */
@keyframes shine {
    0% {
        background-position: -200% center;
    }
    100% {
        background-position: 200% center;
    }
}

.shine-effect {
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.8) 50%,
        transparent 100%
    );
    background-size: 200% 100%;
    animation: shine 3s infinite;
}

/* 페이지 전환 효과 */
.page-transition {
    animation: fadeInUp 0.5s ease-out;
}

/* 모바일 터치 피드백 */
@media (hover: none) and (pointer: coarse) {
    .hover-lift:active,
    .hover-grow:active {
        transform: scale(0.98);
    }
}

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