@keyframes animation-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(var(--pulse-color), 0.5);
  }
  70% {
    box-shadow: 0 0 0 var(--pulse-size) rgba(var(--pulse-color), 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(var(--pulse-color), 0);
  }
}

/* 电磁波扩散效果 */
.animation-pulse {
  --pulse-color: 59, 130, 246;
  --pulse-size: 8px;
  animation: animation-pulse 1.5s infinite;
}

/* Modal动画 */
@keyframes animation-move-down-in {
  0% {
    transform: translate3d(0, 100%, 0);
    transform-origin: 0 0;
    opacity: 0;
  }
  100% {
    transform: translate3d(0, 0, 0);
    transform-origin: 0 0;
    opacity: 1;
  }
}
@keyframes animation-move-down-out {
  0% {
    transform: translate3d(0, 0, 0);
    transform-origin: 0 0;
    opacity: 1;
  }
  100% {
    transform: translate3d(0, 100%, 0);
    transform-origin: 0 0;
    opacity: 0;
  }
}
.animation-move-down-enter,
.animation-move-down-appear {
  animation-name: animation-move-down-in;
  animation-fill-mode: both;
  animation-duration: 0.25s;
}
.animation-move-down-leave {
  animation-name: animation-move-down-out;
  animation-fill-mode: both;
  animation-duration: 0.25s;
}

/* 旋转动画 */
@keyframes animation-rotate {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.animation-rotate {
  transform-origin: center;
  animation: animation-rotate 0.75s linear infinite;
}

/* 定位高亮动画 */
@keyframes animation-locate-highlight {
  0% {
    background-color: transparent;
  }
  10% {
    background-color: var(--color-primary-mute);
  }
  70% {
    background-color: var(--color-primary-mute);
  }
  100% {
    background-color: transparent;
  }
}

.animation-locate-highlight {
  animation: animation-locate-highlight 2.5s ease-in-out;
}

@keyframes animation-chat-message-enter-inline {
  from {
    transform: translate3d(-6px, 14px, 0) scale(0.97);
    opacity: 0;
  }
  to {
    transform: translate3d(0, 0, 0) scale(1);
    opacity: 1;
  }
}

.animation-chat-message-enter-inline {
  transform-origin: left top;
  animation: animation-chat-message-enter-inline 280ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes animation-chat-message-enter-bubble {
  from {
    transform: translate3d(14px, 18px, 0) scale(0.93);
    opacity: 0;
  }
  to {
    transform: translate3d(0, 0, 0) scale(1);
    opacity: 1;
  }
}

.animation-chat-message-enter-bubble {
  transform-origin: right bottom;
  animation: animation-chat-message-enter-bubble 320ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes animation-chat-message-enter-assistant {
  from {
    transform: translate3d(0, 8px, 0);
    opacity: 0;
  }
  to {
    transform: translate3d(0, 0, 0);
    opacity: 1;
  }
}

.animation-chat-message-enter-assistant {
  transform-origin: left top;
  animation: animation-chat-message-enter-assistant 200ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes animation-chat-composer-dock-down {
  from {
    transform: translate3d(0, -18px, 0) scale(0.985);
    opacity: 0.98;
  }
  to {
    transform: translate3d(0, 0, 0) scale(1);
    opacity: 1;
  }
}

.animation-chat-composer-dock-down {
  transform-origin: center bottom;
  animation: animation-chat-composer-dock-down 220ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

@media (prefers-reduced-motion: reduce) {
  .animation-chat-message-enter-inline,
  .animation-chat-message-enter-bubble,
  .animation-chat-message-enter-assistant,
  .animation-chat-composer-dock-down {
    transform: none;
    animation: none;
  }
}

@keyframes animation-resource-list-reveal-focus {
  0%,
  70% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}

.animation-resource-list-reveal-focus {
  position: relative;
  overflow: hidden;
}

.animation-resource-list-reveal-focus::after {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--color-primary) 62%, transparent);
  content: '';
  pointer-events: none;
  animation: animation-resource-list-reveal-focus 1s ease-out both;
}

@media (prefers-reduced-motion: reduce) {
  .animation-resource-list-reveal-focus::after {
    opacity: 1;
    animation: none;
  }
}

/* 流光动画 */
@keyframes animation-shimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

.animation-shimmer {
  --color-shimmer-mid: var(--color-text-1);
  --color-shimmer-end: color-mix(in srgb, var(--color-text-1) 25%, transparent);
  background: linear-gradient(to left, var(--color-shimmer-end), var(--color-shimmer-mid), var(--color-shimmer-end));
  background-size: 200% 100%;
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  animation: animation-shimmer 3s linear infinite;
  will-change: background-position;
}

/* Reveal 动画 */
@keyframes animation-reveal {
  from {
    clip-path: inset(0 100% 0 0);
  }
  to {
    clip-path: inset(0 0 0 0);
  }
}

.animation-reveal {
  display: block;
  white-space: nowrap;
  animation: animation-reveal 0.5s linear both;
}

@keyframes animation-animated-reveal-text {
  0% {
    clip-path: inset(0 100% 0 0);
  }
  99% {
    clip-path: inset(0 0 0 0);
  }
  100% {
    clip-path: inset(0 0 0 0);
  }
}

.animated-reveal-text {
  color: color-mix(in srgb, var(--color-foreground-muted) 45%, var(--color-foreground));
  filter: drop-shadow(0 0 14px color-mix(in srgb, var(--color-foreground-muted) 10%, transparent));
  clip-path: inset(0 100% 0 0);
  animation: animation-animated-reveal-text 0.9s ease-out 0.12s both;
}

@media (prefers-reduced-motion: reduce) {
  .animated-reveal-text {
    filter: none;
    clip-path: inset(0 0 0 0);
    animation: none;
  }
}

@keyframes animation-migration-backup-progress-indeterminate {
  0% {
    transform: translateX(-120%);
  }
  100% {
    transform: translateX(360%);
  }
}

.animation-migration-backup-progress-indeterminate {
  animation: animation-migration-backup-progress-indeterminate 1.15s ease-in-out infinite;
}

@media (prefers-reduced-motion: reduce) {
  .animation-migration-backup-progress-indeterminate {
    transform: translateX(100%);
    animation: none;
  }
}

@keyframes animation-migration-confetti-burst {
  0% {
    transform: translate3d(0, 0, 0) rotate(0deg);
    opacity: 1;
  }
  24% {
    transform: translate3d(var(--confetti-mid-x, 0), var(--confetti-rise, -80px), 0)
      rotate(var(--confetti-rotate, 180deg));
    opacity: 1;
  }
  100% {
    transform: translate3d(var(--confetti-x, 0), var(--confetti-fall, 260px), 0)
      rotate(var(--confetti-rotate-end, 360deg));
    opacity: 0;
  }
}

.animation-migration-confetti-piece {
  position: absolute;
  top: 0;
  left: 0;
  opacity: 0;
  animation-name: animation-migration-confetti-burst;
  animation-timing-function: cubic-bezier(0.2, 0.6, 0.4, 1);
  animation-iteration-count: 1;
  animation-fill-mode: forwards;
}

@media (prefers-reduced-motion: reduce) {
  .animation-migration-confetti-piece {
    opacity: 0;
    animation: none;
  }
}
