/* ==========================================
   动画效果
   ========================================== */

/* 通用动画关键帧 */
@keyframes pulse {
    0% { opacity: 0.6; transform: scale(0.75); }
    50% { opacity: 1.2; transform: scale(1.05); }
    100% { opacity: 0.6; transform: scale(0.75); }
}

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

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

@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

@keyframes bounce {
    0%, 20%, 53%, 80%, 100% {
        transform: translate3d(0, 0, 0);
    }
    40%, 43% {
        transform: translate3d(0, -30px, 0);
    }
    70% {
        transform: translate3d(0, -15px, 0);
    }
    90% {
        transform: translate3d(0, -4px, 0);
    }
}

@keyframes rotateIn {
    from {
        transform: rotate(-200deg);
        opacity: 0;
    }
    to {
        transform: rotate(0);
        opacity: 1;
    }
}

@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale3d(0.3, 0.3, 0.3);
    }
    50% {
        opacity: 1;
    }
}

@keyframes slideInDown {
    from {
        transform: translate3d(0, -100%, 0);
        visibility: visible;
    }
    to {
        transform: translate3d(0, 0, 0);
    }
}

@keyframes slideOutUp {
    from {
        transform: translate3d(0, 0, 0);
    }
    to {
        visibility: hidden;
        transform: translate3d(0, -100%, 0);
    }
}

/* 星星闪烁动画 */
@keyframes starTwinkle {
    0% {
        opacity: 0.3;
        transform: scale(0.8);
    }
    50% {
        opacity: 1;
        transform: scale(1.2);
    }
    100% {
        opacity: 0.3;
        transform: scale(0.8);
    }
}

.time-mode-star {
    animation: starTwinkle 5s infinite alternate ease-in-out;
}

/* 通用动画类 */
.animate-pulse {
    animation: pulse 2s infinite;
}

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

.animate-fadeInUp {
    animation: fadeInUp 0.6s ease-out;
}

.animate-fadeOut {
    animation: fadeOut 0.3s ease-out;
}

.animate-bounce {
    animation: bounce 1s ease-in-out;
}

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

.animate-zoomIn {
    animation: zoomIn 0.6s ease-in-out;
}

.animate-slideInDown {
    animation: slideInDown 0.4s ease-out;
}

.animate-slideOutUp {
    animation: slideOutUp 0.4s ease-out;
}

/* 过渡效果 */
.transition-all {
    transition: all 0.3s ease;
}

.transition-fast {
    transition: all 0.15s ease;
}

.transition-slow {
    transition: all 0.5s ease;
}

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

.transition-opacity {
    transition: opacity 0.3s ease;
}

.transition-colors {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

/* 悬停效果 */
.hover-scale:hover {
    transform: scale(1.05);
}

.hover-scale-lg:hover {
    transform: scale(1.1);
}

.hover-lift:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.hover-glow:hover {
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
}

.hover-brightness:hover {
    filter: brightness(1.1);
}

/* 加载动画 */
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

/* 进入/退出动画 */
.enter-active, .leave-active {
    transition: all 0.3s ease;
}

.enter-from {
    opacity: 0;
    transform: translateY(30px);
}

.leave-to {
    opacity: 0;
    transform: translateY(-30px);
}

/* 模态框动画 */
.modal-enter-active {
    transition: all 0.3s ease;
}

.modal-leave-active {
    transition: all 0.3s ease;
}

.modal-enter-from {
    opacity: 0;
    transform: scale(1.1);
}

.modal-leave-to {
    opacity: 0;
    transform: scale(0.9);
}

/* 列表项动画 */
.list-enter-active, .list-leave-active {
    transition: all 0.3s ease;
}

.list-enter-from {
    opacity: 0;
    transform: translateX(-30px);
}

.list-leave-to {
    opacity: 0;
    transform: translateX(30px);
}

/* 延迟动画 */
.delay-100 {
    animation-delay: 0.1s;
}

.delay-200 {
    animation-delay: 0.2s;
}

.delay-300 {
    animation-delay: 0.3s;
}

.delay-500 {
    animation-delay: 0.5s;
}

.delay-1000 {
    animation-delay: 1s;
}

/* 动画持续时间 */
.duration-100 {
    animation-duration: 0.1s;
}

.duration-200 {
    animation-duration: 0.2s;
}

.duration-300 {
    animation-duration: 0.3s;
}

.duration-500 {
    animation-duration: 0.5s;
}

.duration-1000 {
    animation-duration: 1s;
}

/* 缓动函数 */
.ease-linear {
    animation-timing-function: linear;
}

.ease-in {
    animation-timing-function: ease-in;
}

.ease-out {
    animation-timing-function: ease-out;
}

.ease-in-out {
    animation-timing-function: ease-in-out;
}

/* 无限循环 */
.infinite {
    animation-iteration-count: infinite;
}

/* 暂停动画 */
.paused {
    animation-play-state: paused;
}

/* 反向动画 */
.reverse {
    animation-direction: reverse;
}

/* 交替动画 */
.alternate {
    animation-direction: alternate;
}