/*
 * SPDX-FileCopyrightText: 2025 Weibo, Inc.
 *
 * SPDX-License-Identifier: Apache-2.0
 */

@import './google-sans-local.css';

@tailwind base;
@tailwind components;
@tailwind utilities;

:root {
  color-scheme: light;
  /* Wegent Light Theme - Purple Primary */
  --color-bg-base: 255 255 255;
  --color-bg-surface: 249 249 249;
  --color-bg-muted: 243 244 246;
  --color-bg-hover: 93 94 201 / 0.06;
  --color-border: 228 228 228;
  --color-border-strong: 200 200 200;
  --color-border-light: 243 244 246;
  --color-text-primary: 51 51 51;
  --color-text-secondary: 99 99 99;
  --color-text-muted: 147 147 147;
  --color-text-inverted: 255 255 255;
  --color-primary: 93 94 201;
  --color-primary-contrast: 255 255 255;
  --color-focus-ring: 93 94 201;
  --color-scrollbar-track: 228 228 228;
  --color-scrollbar-thumb: 200 200 200;
  --color-success: 34 197 94;
  --color-error: 239 68 68;
  --color-link: 93 94 201;
  --color-code-bg: 243 244 246;
  --color-popover: 255 255 255;
  --color-popover-foreground: 51 51 51;
  --color-tooltip: 51 51 51;
  --color-tooltip-foreground: 255 255 255;
  --shadow-popover: 0 12px 32px rgba(93, 94, 201, 0.12);
  --shadow-sidebar: 0 4px 30px rgba(93, 94, 201, 0.1);
  --radius: 0.5rem;
}

[data-theme='dark'] {
  color-scheme: dark;
  /* Wegent Dark Theme - Purple Primary */
  --color-bg-base: 14 15 15;
  --color-bg-surface: 26 28 28;
  --color-bg-muted: 33 36 36;
  --color-bg-hover: 118 119 218 / 0.1;
  --color-border: 42 45 45;
  --color-border-strong: 52 53 53;
  --color-border-light: 42 45 45;
  --color-text-primary: 236 236 236;
  --color-text-secondary: 212 212 212;
  --color-text-muted: 160 160 160;
  --color-text-inverted: 14 15 15;
  --color-primary: 118 119 218;
  --color-primary-contrast: 255 255 255;
  --color-focus-ring: 118 119 218;
  --color-scrollbar-track: 42 45 45;
  --color-scrollbar-thumb: 52 53 53;
  --color-success: 34 197 94;
  --color-error: 248 81 73;
  --color-link: 118 119 218;
  --color-code-bg: 13 17 23;
  --color-popover: 26 28 28;
  --color-popover-foreground: 236 236 236;
  --color-tooltip: 236 236 236;
  --color-tooltip-foreground: 14 15 15;
  --shadow-popover: 0 8px 24px rgba(0, 0, 0, 0.5);
  --shadow-sidebar: 0 4px 30px rgba(0, 0, 0, 0.3);
  --radius: 0.5rem;
}

body {
  color: rgb(var(--color-text-primary));
  background-color: rgb(var(--color-bg-base));
  background-image: linear-gradient(to bottom, transparent, rgb(var(--color-bg-base)));
  background-attachment: fixed;
  overflow-x: hidden;
  font-family:
    'Google Sans Flex',
    'Google Sans',
    -apple-system,
    BlinkMacSystemFont,
    'Segoe UI',
    Roboto,
    'Helvetica Neue',
    Arial,
    'PingFang SC',
    'Hiragino Sans GB',
    'Microsoft YaHei',
    sans-serif,
    'Apple Color Emoji',
    'Segoe UI Emoji',
    'Segoe UI Symbol',
    'Noto Color Emoji';
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* Prevent horizontal overflow globally */
* {
  box-sizing: border-box;
}

html,
body,
#__next {
  max-width: 100vw;
  overflow-x: hidden;
}

/* Ensure all text elements can truncate properly */
p,
span,
div,
h1,
h2,
h3,
h4,
h5,
h6 {
  overflow-wrap: break-word;
  word-wrap: break-word;
}

/* 100vh fallback for better mobile compatibility */
html {
  height: 100%;
}

body {
  min-height: min(100vh, 100dvh);
  /* Use the smaller of 100vh or 100dvh for better compatibility */
  box-sizing: border-box;
}

@layer utilities {
  .text-balance {
    text-wrap: balance;
  }

  /* Scrollbar gutter - reserves space for scrollbar to prevent layout shift on Windows */
  .scrollbar-gutter-stable {
    scrollbar-gutter: stable;
  }

  /* Firefox thin scrollbar */
  .scrollbar-thin {
    scrollbar-width: thin;
  }

  /* Smart height that works on both mobile and desktop */
  .smart-h-screen {
    height: min(100vh, 100dvh);
  }

  /* Touch-friendly optimizations */
  .touch-target {
    min-height: 44px;
    min-width: 44px;
  }

  /* Mobile-specific styles */
  @media (max-width: 768px) {
    .mobile-padding {
      padding-left: 1rem;
      padding-right: 1rem;
    }

    .mobile-text {
      font-size: 1rem;
      line-height: 1.5;
    }

    .mobile-button {
      min-height: 44px;
      padding: 0.75rem 1rem;
    }
  }

  /* Optimize touch interactions */
  * {
    -webkit-tap-highlight-color: transparent;
  }

  /* Improve scrolling on mobile */
  .custom-scrollbar {
    -webkit-overflow-scrolling: touch;
  }

  /* Text truncation utilities */
  .line-clamp-1 {
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .line-clamp-none {
    display: block;
    -webkit-line-clamp: unset;
    overflow: visible;
  }

  /* Hide scrollbar but keep functionality */
  .scrollbar-hide {
    -ms-overflow-style: none;
    /* IE and Edge */
    scrollbar-width: none;
    /* Firefox */
    -webkit-overflow-scrolling: touch;
    /* iOS momentum scrolling */
  }

  .scrollbar-hide::-webkit-scrollbar {
    display: none;
    /* Chrome, Safari and Opera */
  }

  /* Ensure horizontal scrolling works on mobile */
  .scrollbar-horizontal {
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
  }

  .scrollbar-horizontal::-webkit-scrollbar {
    display: none;
  }

  /* Snap scrolling for carousel effect */
  .snap-x {
    scroll-snap-type: x mandatory;
    -webkit-scroll-snap-type: x mandatory;
  }

  .snap-center {
    scroll-snap-align: center;
    -webkit-scroll-snap-align: center;
  }

  .snap-mandatory {
    scroll-snap-stop: always;
    -webkit-scroll-snap-stop: always;
  }
}

/* Remove default blue outline from Headless UI */
[data-headlessui-state~='open'] {
  outline: none !important;
  box-shadow: none !important;
}

button:focus,
button:focus,
button:focus-visible {
  outline: none !important;
  box-shadow: none !important;
}

/* Custom toast styles */
.Toastify__toast {
  background-color: rgb(var(--color-bg-surface));
  color: rgb(var(--color-text-primary));
  border: 1px solid rgb(var(--color-border));
  border-radius: 6px;
  font-size: 14px;
  min-height: 40px;
  padding: 8px 12px;
}

.Toastify__toast--success {
  color: rgb(var(--color-success));
  border-color: rgb(var(--color-border));
}

.Toastify__toast--error {
  color: rgb(var(--color-error));
  border-color: rgb(var(--color-border));
}

.Toastify__toast-body {
  padding: 0;
  margin: 0;
  display: flex;
  align-items: center;
}

.Toastify__close-button {
  color: rgb(var(--color-text-secondary));
  opacity: 0.7;
}

.Toastify__close-button:hover {
  opacity: 1;
}

.Toastify__progress-bar {
  display: none;
}

/* Animated progress bar used in AI running bubbles */
.progress-bar-animated {
  position: relative;
  overflow: hidden;
}

.progress-bar-animated::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: linear-gradient(
    120deg,
    rgba(255, 255, 255, 0),
    rgba(255, 255, 255, 0.35),
    rgba(255, 255, 255, 0)
  );
  transform: translateX(-100%);
  animation: progress-bar-sheen 1.2s ease-in-out infinite;
  pointer-events: none;
}

@keyframes progress-bar-sheen {
  0% {
    transform: translateX(-100%);
  }

  100% {
    transform: translateX(100%);
  }
}

/* Minimal shimmer effect for new progress bar style */
.progress-bar-shimmer {
  position: relative;
  overflow: hidden;
}

.progress-bar-shimmer::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.4) 50%,
    transparent 100%
  );
  transform: translateX(-100%);
  animation: shimmer 1.5s ease-in-out infinite;
  pointer-events: none;
}

@keyframes shimmer {
  0% {
    transform: translateX(-100%);
  }

  100% {
    transform: translateX(200%);
  }
}

/* Thinking text flow animation for active tasks */
@keyframes thinkingTextFlow {
  0% {
    color: rgb(var(--color-primary));
    opacity: 0.7;
  }

  20% {
    color: rgb(var(--color-text-primary));
    opacity: 1;
  }

  40% {
    color: rgb(var(--color-text-secondary));
    opacity: 0.9;
  }

  60% {
    color: rgb(var(--color-text-muted));
    opacity: 0.8;
  }

  80% {
    color: rgb(var(--color-primary));
    opacity: 0.9;
  }

  100% {
    color: rgb(var(--color-primary));
    opacity: 0.7;
  }
}

.thinking-text-flow {
  animation: thinkingTextFlow 2s ease-in-out infinite;
  background: linear-gradient(
    90deg,
    rgb(var(--color-primary)),
    rgb(var(--color-text-primary)),
    rgb(var(--color-primary))
  );
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation:
    thinkingTextFlow 2s ease-in-out infinite,
    thinkingGradient 3s linear infinite;
}

/* Gradient animation for flowing effect */
@keyframes thinkingGradient {
  0% {
    background-position: 0% 50%;
  }

  100% {
    background-position: 200% 50%;
  }
}

/* Dark mode specific colors for the animation */
[data-theme='dark'] .thinking-text-flow {
  background: linear-gradient(
    90deg,
    rgb(var(--color-primary)),
    rgb(var(--color-text-primary)),
    rgb(var(--color-primary))
  );
  background-size: 200% 100%;
}

/* Text-only animation for thinking text without gradient background */
.thinking-text-flow-text {
  animation: thinkingTextFlow 2s ease-in-out infinite;
}

/* Mobile Sidebar Animations */
@keyframes fade-in {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slide-down {
  from {
    opacity: 0;
    max-height: 0;
    transform: translateY(-8px);
  }

  to {
    opacity: 1;
    max-height: 500px;
    transform: translateY(0);
  }
}

.animate-fade-in {
  animation: fade-in 0.3s ease-out forwards;
  opacity: 0;
}

.animate-slide-down {
  animation: slide-down 0.2s ease-out forwards;
}

/* Ripple effect for touch feedback */
@keyframes ripple {
  0% {
    transform: scale(0);
    opacity: 0.5;
  }

  100% {
    transform: scale(2);
    opacity: 0;
  }
}

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

.ripple-effect::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 100%;
  background: rgb(var(--color-primary) / 0.3);
  border-radius: 50%;
  transform: translate(-50%, -50%) scale(0);
  pointer-events: none;
}

.ripple-effect:active::after {
  animation: ripple 0.6s ease-out;
}

/* Custom scrollbar styles are now in scrollbar.css */

/* Smooth transitions for theme switching */
* {
  transition-property: background-color, border-color, color, fill, stroke;
  transition-duration: 200ms;
  transition-timing-function: ease-in-out;
}

/* Disable transitions when switching themes to prevent flashing */
.no-transition,
.no-transition * {
  transition: none !important;
}

/* Animation delay utilities for loading dots */
.animation-delay-200 {
  animation-delay: 0.2s;
}

.animation-delay-400 {
  animation-delay: 0.4s;
}

.animation-delay-800 {
  animation-delay: 0.8s;
}

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

.animation-delay-1200 {
  animation-delay: 1.2s;
}

.animation-delay-1600 {
  animation-delay: 1.6s;
}

.animation-delay-1800 {
  animation-delay: 1.8s;
}

.animation-delay-2000 {
  animation-delay: 2s;
}

/* Single runner dot used while an AI message is waiting or still processing */
.streaming-wait-runner-track {
  --runner-dot-size: 0.75rem;
  --runner-text-spot-size: 1.15rem;
  --runner-y-offset: 1px;

  position: relative;
  isolation: isolate;
  display: inline-flex;
  min-height: 1.5rem;
  align-items: center;
  padding: 0 1.25rem;
  color: rgb(var(--color-text-muted));
}

.streaming-wait-runner-text-wrap {
  position: relative;
  z-index: 2;
  display: inline-block;
}

.streaming-wait-runner-text,
.streaming-wait-runner-text-mask {
  font-size: 0.875rem;
  line-height: 1.25rem;
  white-space: nowrap;
}

.streaming-wait-runner-text-mask {
  position: absolute;
  inset: 0;
  z-index: 3;
  color: transparent;
  background-image: radial-gradient(
    circle,
    rgb(var(--color-primary)) 0 38%,
    rgb(var(--color-primary) / 0.9) 48%,
    transparent 70%
  );
  background-repeat: no-repeat;
  background-size: var(--runner-text-spot-size) var(--runner-text-spot-size);
  background-position: calc(var(--runner-text-spot-size) * -1) calc(50% + var(--runner-y-offset));
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  pointer-events: none;
  will-change: background-position, opacity;
  animation: streaming-wait-runner-text-mask 5.4s linear infinite;
}

.streaming-wait-runner-dot {
  position: absolute;
  top: calc(50% + var(--runner-y-offset));
  left: 0;
  z-index: 1;
  width: var(--runner-dot-size);
  height: var(--runner-dot-size);
  border-radius: 9999px;
  background:
    radial-gradient(circle at 34% 28%, rgba(255, 255, 255, 0.72) 0 16%, transparent 24%),
    rgb(var(--color-primary));
  box-shadow:
    0 1px 5px rgb(var(--color-primary) / 0.3),
    inset -1px -1px 2px rgb(0 0 0 / 0.08);
  transform: translateY(-50%) scale(1);
  transform-origin: 50% 68%;
  opacity: 1;
  will-change: left, transform, border-radius, opacity;
  animation: streaming-wait-runner-travel 5.4s linear infinite;
}

@keyframes streaming-wait-runner-travel {
  0%,
  10% {
    left: 0;
    opacity: 1;
    border-radius: 9999px;
    transform: translateY(-50%) scale(1);
  }

  13% {
    opacity: 0;
  }

  18% {
    opacity: 0;
    border-radius: 58% 44% 50% 62% / 44% 54% 46% 56%;
    transform: translateY(-50%) scaleX(1.42) scaleY(0.78) skewX(16deg) rotate(-3deg);
  }

  23% {
    border-radius: 54% 46% 48% 60% / 46% 56% 44% 54%;
    transform: translateY(-50%) scaleX(1.24) scaleY(0.86) skewX(10deg) rotate(-2deg);
  }

  26%,
  35% {
    left: calc(100% - var(--runner-dot-size));
    opacity: 1;
    border-radius: 9999px;
    transform: translateY(-50%) scale(1);
  }

  38%,
  44% {
    border-radius: 56% 44% 54% 46% / 48% 52% 44% 56%;
    transform: translateY(-50%) translateY(-4px) scaleX(0.94) scaleY(1.08);
  }

  41%,
  47% {
    border-radius: 52% 48% 46% 54% / 58% 58% 42% 42%;
    transform: translateY(-50%) translateY(1px) scaleX(1.16) scaleY(0.84);
  }

  50% {
    left: calc(100% - var(--runner-dot-size));
    opacity: 1;
    border-radius: 9999px;
    transform: translateY(-50%) scale(1);
  }

  52% {
    opacity: 0;
  }

  56% {
    opacity: 0;
    border-radius: 44% 58% 62% 50% / 54% 44% 56% 46%;
    transform: translateY(-50%) scaleX(1.24) scaleY(0.86) skewX(-10deg) rotate(2deg);
  }

  66% {
    border-radius: 44% 58% 62% 50% / 54% 44% 56% 46%;
    transform: translateY(-50%) scaleX(1.42) scaleY(0.78) skewX(-16deg) rotate(3deg);
  }

  72%,
  100% {
    left: 0;
    opacity: 1;
    border-radius: 9999px;
    transform: translateY(-50%) scale(1);
  }
}

@keyframes streaming-wait-runner-text-mask {
  0%,
  10% {
    opacity: 0;
    background-position: calc(var(--runner-text-spot-size) * -1) calc(50% + var(--runner-y-offset));
  }

  13% {
    opacity: 1;
  }

  26% {
    opacity: 1;
    background-position: calc(100% + var(--runner-text-spot-size))
      calc(50% + var(--runner-y-offset));
  }

  30%,
  50% {
    opacity: 0;
    background-position: calc(100% + var(--runner-text-spot-size))
      calc(50% + var(--runner-y-offset));
  }

  52% {
    opacity: 1;
    background-position: calc(100% + var(--runner-text-spot-size))
      calc(50% + var(--runner-y-offset));
  }

  72% {
    opacity: 1;
    background-position: calc(var(--runner-text-spot-size) * -1) calc(50% + var(--runner-y-offset));
  }

  76%,
  100% {
    opacity: 0;
    background-position: calc(var(--runner-text-spot-size) * -1) calc(50% + var(--runner-y-offset));
  }
}

@media (prefers-reduced-motion: reduce) {
  .streaming-wait-runner-dot,
  .streaming-wait-runner-text-mask {
    animation: none;
  }
}

/* Pulse animation for unread task notification dots */
@keyframes pulse-dot {
  0%,
  100% {
    transform: scale(1);
    opacity: 1;
  }

  50% {
    transform: scale(1.2);
    opacity: 0.8;
  }
}

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

/* Repository and Team Selector - Hide arrow by default, show on hover */
.repository-selector .ant-select-arrow {
  opacity: 0;
  transition: opacity 0.2s ease-in-out;
}

.repository-selector:hover .ant-select-arrow {
  opacity: 1;
}

/* Keep arrow visible when dropdown is open */
.repository-selector.ant-select-open .ant-select-arrow {
  opacity: 1;
}

/* Driver.js Onboarding Tour Custom Styles */
.driver-popover {
  background-color: rgb(var(--color-bg-surface)) !important;
  color: rgb(var(--color-text-primary)) !important;
  border: 1px solid rgb(var(--color-border)) !important;
  border-radius: 12px !important;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.12) !important;
  max-width: 320px !important;
}

[data-theme='dark'] .driver-popover {
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4) !important;
}

.driver-popover-title {
  font-size: 16px !important;
  font-weight: 600 !important;
  color: rgb(var(--color-text-primary)) !important;
  margin-bottom: 8px !important;
}

.driver-popover-description {
  font-size: 14px !important;
  color: rgb(var(--color-text-secondary)) !important;
  line-height: 1.6 !important;
}

.driver-popover-progress-text {
  font-size: 12px !important;
  color: rgb(var(--color-text-muted)) !important;
}

.driver-popover-navigation-btns {
  gap: 8px !important;
}

.driver-popover-prev-btn,
.driver-popover-next-btn {
  background-color: rgb(var(--color-primary)) !important;
  color: rgb(var(--color-primary-contrast)) !important;
  border: none !important;
  border-radius: 8px !important;
  padding: 8px 16px !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
}

.driver-popover-prev-btn:hover,
.driver-popover-next-btn:hover {
  opacity: 0.9 !important;
}

.driver-popover-prev-btn {
  background-color: rgb(var(--color-bg-muted)) !important;
  color: rgb(var(--color-text-primary)) !important;
}

.driver-popover-prev-btn:hover {
  background-color: rgb(var(--color-bg-hover)) !important;
}

/* Close button (X) in top right - style as Skip button */
.driver-popover-close-btn {
  background-color: transparent !important;
  color: rgb(var(--color-text-muted)) !important;
  border: none !important;
  font-size: 12px !important;
  cursor: pointer !important;
  position: absolute !important;
  top: 12px !important;
  right: 12px !important;
  padding: 4px 8px !important;
  border-radius: 4px !important;
  transition: all 0.2s ease !important;
}

.driver-popover-close-btn:hover {
  background-color: rgb(var(--color-bg-hover)) !important;
  color: rgb(var(--color-text-primary)) !important;
}

/* Hide default X, show "Skip" text */
.driver-popover-close-btn::before {
  content: attr(data-skip-text);
}

.driver-popover-arrow {
  border-color: rgb(var(--color-bg-surface)) !important;
}

.driver-popover-arrow-side-left {
  border-right-color: rgb(var(--color-bg-surface)) !important;
}

.driver-popover-arrow-side-right {
  border-left-color: rgb(var(--color-bg-surface)) !important;
}

.driver-popover-arrow-side-top {
  border-bottom-color: rgb(var(--color-bg-surface)) !important;
}

.driver-popover-arrow-side-bottom {
  border-top-color: rgb(var(--color-bg-surface)) !important;
}

/* Badge scroll container - use default browser scrollbar */

/* KaTeX and Markdown styles are now in @/styles/markdown.css */

/* Pet Widget Animations */
@keyframes pet-idle {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-4px);
  }
}

@keyframes pet-busy {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-3px);
  }
}

@keyframes pet-evolve {
  0% {
    transform: scale(1);
    filter: brightness(1);
  }

  25% {
    transform: scale(1.2);
    filter: brightness(1.5);
  }

  50% {
    transform: scale(0.8);
    filter: brightness(2);
  }

  75% {
    transform: scale(1.3);
    filter: brightness(1.5);
  }

  100% {
    transform: scale(1);
    filter: brightness(1);
  }
}

@keyframes pet-gain-exp {
  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.1);
  }
}

@keyframes exp-float {
  0% {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }

  100% {
    opacity: 0;
    transform: translateX(-50%) translateY(-30px);
  }
}

@keyframes spin-slow {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

.animate-pet-idle {
  animation: pet-idle 3s ease-in-out infinite;
}

.animate-pet-busy {
  animation: pet-busy 1s ease-in-out infinite;
}

.animate-pet-evolve {
  animation: pet-evolve 1.5s ease-in-out;
}

.animate-pet-gain-exp {
  animation: pet-gain-exp 0.5s ease-in-out;
}

.animate-exp-float {
  animation: exp-float 1.5s ease-out forwards;
}

.animate-spin-slow {
  animation: spin-slow 4s linear infinite;
}

/* Pet thinking bubble animation */
@keyframes thinking-dot {
  0%,
  100% {
    transform: translateY(0);
    opacity: 0.4;
  }

  50% {
    transform: translateY(-4px);
    opacity: 1;
  }
}

.animate-thinking-dot {
  animation: thinking-dot 1s ease-in-out infinite;
  animation-fill-mode: both;
}

/* Pet feature appearance animations */
@keyframes feature-fade-in {
  0% {
    opacity: 0;
    transform: scale(0.8);
  }

  50% {
    opacity: 0.7;
    transform: scale(1.1);
  }

  100% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes feature-grow {
  0% {
    opacity: 0;
    transform: scale(0);
  }

  60% {
    opacity: 0.8;
    transform: scale(1.2);
  }

  100% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes feature-sparkle {
  0%,
  100% {
    opacity: 1;
    filter: brightness(1);
  }

  50% {
    opacity: 0.8;
    filter: brightness(1.3);
  }
}

.animate-feature-fade-in {
  animation: feature-fade-in 0.8s ease-out;
}

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

.animate-feature-sparkle {
  animation: feature-sparkle 2s ease-in-out infinite;
}

/* Experience milestone celebration animation */
@keyframes experience-milestone {
  0% {
    transform: scale(1);
    filter: brightness(1) drop-shadow(0 0 0 transparent);
  }

  25% {
    transform: scale(1.15);
    filter: brightness(1.4) drop-shadow(0 0 8px rgba(59, 130, 246, 0.6));
  }

  50% {
    transform: scale(1.05);
    filter: brightness(1.6) drop-shadow(0 0 12px rgba(59, 130, 246, 0.8));
  }

  75% {
    transform: scale(1.1);
    filter: brightness(1.3) drop-shadow(0 0 6px rgba(59, 130, 246, 0.4));
  }

  100% {
    transform: scale(1);
    filter: brightness(1) drop-shadow(0 0 0 transparent);
  }
}

.animate-experience-milestone {
  animation: experience-milestone 1.2s ease-in-out;
}
