/* ======================
   기본 애니메이션
   ====================== */

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

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

/* ======================
   그라데이션 애니메이션
   ====================== */

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

/* 애니메이션 그라데이션 텍스트 */
.animated-gradient-text {
    background: linear-gradient(
        90deg,
        var(--accent-primary) 0%,
        var(--accent-secondary) 25%,
        var(--accent-tertiary) 50%,
        var(--accent-secondary) 75%,
        var(--accent-primary) 100%
    );
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 4s ease infinite;
    font-weight: 700;
}

/* 애니메이션 그라데이션 버튼 */
.animated-gradient-btn {
    background: linear-gradient(
        90deg,
        var(--accent-primary) 0%,
        var(--accent-secondary) 25%,
        var(--accent-tertiary) 50%,
        var(--accent-secondary) 75%,
        var(--accent-primary) 100%
    );
    background-size: 200% auto;
    animation: gradientShift 3s ease infinite;
    color: var(--text-inverse);
    border: none;
    font-weight: 600;
}

.animated-gradient-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

/* ======================
   펄스 애니메이션
   ====================== */

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.6;
    }
}

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

/* ======================
   글로우 애니메이션
   ====================== */

@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 5px var(--accent-primary);
    }
    50% {
        box-shadow: 0 0 20px var(--accent-primary), 0 0 30px var(--accent-secondary);
    }
}

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

/* ======================
   타이핑 인디케이터
   ====================== */

.typing-indicator {
    display: flex;
    gap: 4px;
    padding: 14px 18px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-accent);
    border-radius: 16px;
    border-bottom-left-radius: 4px;
    align-self: flex-start;
}

.typing-indicator span {
    width: 8px;
    height: 8px;
    background: var(--accent-primary);
    border-radius: 50%;
    animation: typingBounce 1.4s infinite;
}

.typing-indicator span:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-indicator span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typingBounce {
    0%, 60%, 100% {
        transform: translateY(0);
        opacity: 0.4;
    }
    30% {
        transform: translateY(-6px);
        opacity: 1;
    }
}

/* ======================
   슬라이드 애니메이션
   ====================== */

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

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

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

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

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

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

/* ======================
   호버 효과
   ====================== */

.hover-lift {
    transition: transform var(--transition-fast);
}

.hover-lift:hover {
    transform: translateY(-2px);
}

.hover-glow {
    transition: box-shadow var(--transition-fast);
}

.hover-glow:hover {
    box-shadow: var(--shadow-glow);
}

/* ======================
   스케일 애니메이션
   ====================== */

@keyframes scaleIn {
    from {
        transform: scale(0.9);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

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

/* ======================
   회전 애니메이션
   ====================== */

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.rotate {
    animation: rotate 1s linear infinite;
}

/* ======================
   셰이크 애니메이션 (에러용)
   ====================== */

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

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

/* ======================
   펄스 버튼 애니메이션 (전송 버튼용)
   ====================== */

@keyframes pulseButton {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(0, 255, 0, 0.7);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 0 0 8px rgba(0, 255, 0, 0);
        transform: scale(1.05);
    }
}

.pulse-animation {
    animation: pulseButton 1s ease-in-out infinite;
}
