/**
 * Nano Banana WebApp - Animations Styles
 */

/* ===== EVAPORATE ANIMATION (Telegram-style) ===== */
/*
 * Анимация "схлопывания" как при удалении сообщения в Telegram:
 * - Быстрое сжатие к центру
 * - Размытие
 * - Исчезновение с эффектом "схлопывания"
 * - Длительность ~300-350ms
 */

@keyframes telegramCollapse {
  0% {
    opacity: 1;
    transform: scale(1);
    filter: blur(0);
  }
  40% {
    opacity: 0.8;
    transform: scale(0.92);
    filter: blur(1px);
  }
  100% {
    opacity: 0;
    transform: scale(0.3);
    filter: blur(6px);
  }
}

@keyframes telegramCollapseActions {
  0% {
    opacity: 1;
    transform: scale(1);
  }
  100% {
    opacity: 0;
    transform: scale(0.5);
  }
}

/* Анимация частиц (опционально, декоративный эффект) */
@keyframes particleFade {
  0% {
    opacity: 0.6;
    transform: scale(1) translate(0, 0);
  }
  100% {
    opacity: 0;
    transform: scale(0.3) translate(var(--particle-x, 0), var(--particle-y, -20px));
  }
}

.result-area.evaporating {
  /* Плавный переход высоты для схлопывания контейнера */
  overflow: hidden;
}

.result-area.evaporating .result-image {
  animation: telegramCollapse 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
  transform-origin: center center;
}

.result-area.evaporating .result-actions {
  animation: telegramCollapseActions 0.25s cubic-bezier(0.4, 0, 0.2, 1) forwards;
  transform-origin: center center;
}

.result-area.evaporated {
  display: none;
}

/* Save to Gallery Dialog удалён - используется нативный Telegram downloadFile API */

/* ===== ANIMATE BUTTON (MAGIC BUTTON) ===== */
/*
 * Кнопка "Оживить" на превью изображения
 * Позиция: правый верхний угол изображения
 * Дизайн: glassmorphism + gradient + glow
 * Анимация: пульсация + sparkles эффект
 */

/* Контейнер для позиционирования кнопки над изображением */
.result-image-container {
  position: relative;
  display: inline-block;
  width: 100%;
}

.result-image-container .result-image {
  margin-bottom: 0;
}

/* Основная кнопка "Оживить" */
.animate-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 48px;
  height: 48px;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  z-index: 10;

  /* Glassmorphism эффект */
  background: linear-gradient(
    135deg,
    rgba(138, 43, 226, 0.7) 0%,
    rgba(255, 0, 128, 0.7) 50%,
    rgba(255, 165, 0, 0.7) 100%
  );
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);

  /* Тень и свечение */
  box-shadow:
    0 4px 15px rgba(138, 43, 226, 0.4),
    0 0 30px rgba(255, 0, 128, 0.2),
    inset 0 0 20px rgba(255, 255, 255, 0.1);

  /* Анимация */
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  animation: animateBtnPulse 2s ease-in-out infinite;

  /* Flex для центрирования иконки */
  display: flex;
  align-items: center;
  justify-content: center;

  /* Предотвращаем выделение */
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

/* Иконка внутри кнопки */
.animate-btn .animate-icon {
  font-size: 22px;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
  transition: transform 0.3s ease;
}

/* Hover эффект */
.animate-btn:hover {
  transform: scale(1.15);
  box-shadow:
    0 6px 25px rgba(138, 43, 226, 0.6),
    0 0 50px rgba(255, 0, 128, 0.4),
    0 0 80px rgba(255, 165, 0, 0.3),
    inset 0 0 30px rgba(255, 255, 255, 0.2);
  animation: animateBtnGlow 0.5s ease-in-out infinite alternate;
}

.animate-btn:hover .animate-icon {
  transform: rotate(15deg) scale(1.1);
}

/* Active/pressed эффект */
.animate-btn:active {
  transform: scale(0.95);
  box-shadow:
    0 2px 10px rgba(138, 43, 226, 0.5),
    inset 0 0 10px rgba(0, 0, 0, 0.2);
}

/* Loading состояние */
.animate-btn.loading {
  pointer-events: none;
  animation: animateBtnSpin 1s linear infinite;
}

.animate-btn.loading .animate-icon {
  opacity: 0;
}

.animate-btn.loading::after {
  content: '';
  position: absolute;
  width: 24px;
  height: 24px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* Успешное состояние (после генерации видео) */
.animate-btn.success {
  background: linear-gradient(135deg, #4caf50, #8bc34a);
  animation: none;
}

/* Disabled состояние */
.animate-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  animation: none;
  transform: none;
}

/* Пульсирующая анимация */
@keyframes animateBtnPulse {
  0%, 100% {
    box-shadow:
      0 4px 15px rgba(138, 43, 226, 0.4),
      0 0 30px rgba(255, 0, 128, 0.2);
  }
  50% {
    box-shadow:
      0 4px 20px rgba(138, 43, 226, 0.6),
      0 0 40px rgba(255, 0, 128, 0.35),
      0 0 60px rgba(255, 165, 0, 0.2);
  }
}

/* Свечение при hover */
@keyframes animateBtnGlow {
  0% {
    box-shadow:
      0 6px 25px rgba(138, 43, 226, 0.6),
      0 0 50px rgba(255, 0, 128, 0.4);
  }
  100% {
    box-shadow:
      0 8px 35px rgba(255, 0, 128, 0.7),
      0 0 70px rgba(138, 43, 226, 0.5),
      0 0 100px rgba(255, 165, 0, 0.3);
  }
}

/* Вращение при загрузке */
@keyframes animateBtnSpin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* Sparkles эффект (декоративные частицы) */
.animate-btn::before {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: radial-gradient(
    circle at 30% 30%,
    rgba(255, 255, 255, 0.4) 0%,
    transparent 50%
  );
  opacity: 0.6;
  pointer-events: none;
}

/* Адаптив для маленьких экранов */
@media (max-width: 360px) {
  .animate-btn {
    width: 42px;
    height: 42px;
    top: 8px;
    right: 8px;
  }

  .animate-btn .animate-icon {
    font-size: 18px;
  }
}

/* Подсказка при наведении (tooltip) */
.animate-btn[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: -36px;
  left: 50%;
  transform: translateX(-50%);
  padding: 6px 12px;
  background: rgba(0, 0, 0, 0.85);
  color: white;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  border-radius: 6px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s ease;
  pointer-events: none;
}

.animate-btn[data-tooltip]:hover::after {
  opacity: 1;
  visibility: visible;
  bottom: -40px;
}

/* Скрываем tooltip на мобильных */
@media (hover: none) {
  .animate-btn[data-tooltip]::after {
    display: none;
  }
}

/* ===== EDIT FROM RESULT BUTTON (pencil) ===== */
/*
 * Кнопка "Редактировать" на превью результата
 * Позиция: правый верхний угол, под кнопкой "Оживить"
 */

.edit-result-btn {
  position: absolute;
  top: 68px;
  right: 12px;
  width: 48px;
  height: 48px;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  z-index: 10;

  /* Glassmorphism - синий/голубой акцент */
  background: linear-gradient(
    135deg,
    rgba(33, 150, 243, 0.75) 0%,
    rgba(0, 188, 212, 0.75) 50%,
    rgba(76, 175, 80, 0.75) 100%
  );
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);

  box-shadow:
    0 4px 15px rgba(33, 150, 243, 0.4),
    0 0 30px rgba(0, 188, 212, 0.2),
    inset 0 0 20px rgba(255, 255, 255, 0.1);

  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);

  display: flex;
  align-items: center;
  justify-content: center;

  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.edit-result-btn .edit-result-icon {
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
  transition: transform 0.3s ease;
}

.edit-result-btn .edit-result-icon svg {
  width: 22px;
  height: 22px;
  stroke: white;
}

.edit-result-btn:hover {
  transform: scale(1.15);
  box-shadow:
    0 6px 25px rgba(33, 150, 243, 0.6),
    0 0 50px rgba(0, 188, 212, 0.4),
    inset 0 0 30px rgba(255, 255, 255, 0.2);
}

.edit-result-btn:hover .edit-result-icon {
  transform: rotate(-15deg) scale(1.1);
}

.edit-result-btn:active {
  transform: scale(0.95);
  box-shadow:
    0 2px 10px rgba(33, 150, 243, 0.5),
    inset 0 0 10px rgba(0, 0, 0, 0.2);
}

/* Блик */
.edit-result-btn::before {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: radial-gradient(
    circle at 30% 30%,
    rgba(255, 255, 255, 0.4) 0%,
    transparent 50%
  );
  opacity: 0.6;
  pointer-events: none;
}

/* Tooltip */
.edit-result-btn[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: -36px;
  left: 50%;
  transform: translateX(-50%);
  padding: 6px 12px;
  background: rgba(0, 0, 0, 0.85);
  color: white;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  border-radius: 6px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s ease;
  pointer-events: none;
}

.edit-result-btn[data-tooltip]:hover::after {
  opacity: 1;
  visibility: visible;
  bottom: -40px;
}

/* Адаптив */
@media (max-width: 360px) {
  .edit-result-btn {
    width: 42px;
    height: 42px;
    top: 58px;
    right: 8px;
  }

  .edit-result-btn .edit-result-icon,
  .edit-result-btn .edit-result-icon svg {
    width: 18px;
    height: 18px;
  }
}

@media (hover: none) {
  .edit-result-btn[data-tooltip]::after {
    display: none;
  }
}

/* ===== RESULT CLOSE BUTTON (X) ===== */
/*
 * Кнопка закрытия результата на превью изображения
 * Позиция: левый верхний угол изображения
 * Дизайн: glassmorphism + полупрозрачный фон
 */

.result-close-btn {
  position: absolute;
  top: 12px;
  left: 12px;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  z-index: 10;

  /* Glassmorphism эффект */
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);

  /* Тонкая граница для видимости */
  border: 1px solid rgba(255, 255, 255, 0.15);

  /* Тень */
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);

  /* Анимация */
  transition: all 0.3s var(--ease-spring),
              box-shadow 0.3s var(--ease-smooth);

  /* Flex для центрирования иконки */
  display: flex;
  align-items: center;
  justify-content: center;

  /* Предотвращаем выделение */
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;

  /* Цвет иконки */
  color: rgba(255, 255, 255, 0.8);

  /* Ripple */
  position: relative;
  overflow: hidden;
}

/* Ripple effect */
.result-close-btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle, rgba(244, 67, 54, 0.5) 0%, transparent 70%);
  transform: translate(-50%, -50%) scale(0);
  opacity: 0;
  pointer-events: none;
  border-radius: 50%;
}

.result-close-btn:active::before {
  animation: rippleEffect 0.4s ease-out;
}

.result-close-btn svg {
  width: 16px;
  height: 16px;
  transition: transform 0.3s var(--ease-spring);
}

/* Hover эффект */
.result-close-btn:hover {
  background: rgba(244, 67, 54, 0.85);
  border-color: rgba(244, 67, 54, 0.5);
  transform: scale(1.15);
  box-shadow: 0 0 20px rgba(244, 67, 54, 0.5),
              0 0 40px rgba(244, 67, 54, 0.3);
  color: white;
}

.result-close-btn:hover svg {
  transform: rotate(90deg);
}

/* Active/pressed эффект */
.result-close-btn:active {
  transform: scale(0.9);
  box-shadow: 0 0 10px rgba(244, 67, 54, 0.4);
}

/* Адаптив для маленьких экранов */
@media (max-width: 360px) {
  .result-close-btn {
    width: 32px;
    height: 32px;
    top: 8px;
    left: 8px;
  }

  .result-close-btn svg {
    width: 14px;
    height: 14px;
  }
}

/* ===== VIDEO PROGRESS BAR ===== */
/*
 * Прогресс-бар для генерации видео (анимация изображения)
 * Показывается во время работы Veo API
 */

.video-progress {
  display: none;
  flex-direction: column;
  align-items: center;
  padding: 20px;
  margin-top: 12px;
  background: linear-gradient(135deg, rgba(138, 43, 226, 0.15), rgba(255, 0, 128, 0.1));
  border-radius: var(--border-radius);
  border: 1px solid rgba(138, 43, 226, 0.3);
  animation: videoProgressPulse 2s ease-in-out infinite;
}

.video-progress.visible {
  display: flex;
}

.video-progress-icon {
  font-size: 32px;
  margin-bottom: 12px;
  animation: videoProgressIconBounce 1.5s ease-in-out infinite;
}

.video-progress-text {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 16px;
}

.video-progress-bar {
  width: 100%;
  max-width: 280px;
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  overflow: hidden;
  position: relative;
}

.video-progress-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 30%;
  background: linear-gradient(90deg, #8a2be2, #ff0080, #ffa500);
  background-size: 200% 100%;
  border-radius: 3px;
  animation: videoProgressFillMove 2s ease-in-out infinite;
}

.video-progress-hint {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 12px;
}

/* Анимации для прогресс-бара */
@keyframes videoProgressPulse {
  0%, 100% {
    box-shadow: 0 0 20px rgba(138, 43, 226, 0.2);
  }
  50% {
    box-shadow: 0 0 30px rgba(255, 0, 128, 0.3);
  }
}

@keyframes videoProgressIconBounce {
  0%, 100% {
    transform: translateY(0) rotate(0deg);
  }
  25% {
    transform: translateY(-5px) rotate(-10deg);
  }
  75% {
    transform: translateY(-5px) rotate(10deg);
  }
}

@keyframes videoProgressFillMove {
  0% {
    left: -30%;
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    left: 100%;
    background-position: 0% 50%;
  }
}

/* ===== MULTI-STEP PROGRESS ===== */
/*
 * Мульти-этапный прогресс для анимации видео
 * Шаги: Подготовка → Оживление → Отправка
 */

.video-progress-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  width: 100%;
  max-width: 320px;
  margin-bottom: 20px;
}

.progress-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  transition: all 0.3s ease;
  opacity: 0.5;
  transform: scale(0.9);
}

.progress-step.active {
  opacity: 1;
  transform: scale(1);
}

.progress-step.completed {
  opacity: 0.8;
  transform: scale(0.95);
}

.progress-step .step-icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.2);
  transition: all 0.3s ease;
}

.progress-step.active .step-icon {
  background: linear-gradient(135deg, rgba(138, 43, 226, 0.5), rgba(255, 0, 128, 0.5));
  border-color: rgba(255, 0, 128, 0.6);
  box-shadow: 0 0 20px rgba(255, 0, 128, 0.4);
  animation: stepIconPulse 1.5s ease-in-out infinite;
}

.progress-step.completed .step-icon {
  background: linear-gradient(135deg, #4caf50, #8bc34a);
  border-color: #4caf50;
}

.progress-step.completed .step-icon::after {
  content: '✓';
  position: absolute;
  font-size: 14px;
}

.progress-step .step-label {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: color 0.3s ease;
}

.progress-step.active .step-label {
  color: var(--text-primary);
  font-weight: 600;
}

.progress-step.completed .step-label {
  color: #4caf50;
}

/* Линия соединения между шагами */
.progress-step-line {
  width: 40px;
  height: 2px;
  background: rgba(255, 255, 255, 0.15);
  margin: 0 6px;
  margin-bottom: 24px; /* Компенсация для label */
  position: relative;
  overflow: hidden;
  border-radius: 1px;
}

.progress-step-line::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #8a2be2, #ff0080);
  border-radius: 1px;
  transition: width 0.5s ease;
}

.progress-step-line.active::after {
  width: 100%;
  animation: lineProgress 2s linear infinite;
}

.progress-step-line.completed::after {
  width: 100%;
  background: #4caf50;
  animation: none;
}

@keyframes stepIconPulse {
  0%, 100% {
    box-shadow: 0 0 15px rgba(255, 0, 128, 0.3);
  }
  50% {
    box-shadow: 0 0 25px rgba(255, 0, 128, 0.6), 0 0 40px rgba(138, 43, 226, 0.3);
  }
}

@keyframes lineProgress {
  0% {
    background-position: 0% 50%;
  }
  100% {
    background-position: 200% 50%;
  }
}

/* ===== SAVE BUTTON ANIMATION ===== */
/*
 * Анимация появления кнопки "Сохранить" после генерации видео
 */

.result-actions .save-btn {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.result-actions.hidden {
  display: none !important;
}

.result-actions .save-btn.animate-appear {
  animation: saveButtonAppear 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes saveButtonAppear {
  0% {
    opacity: 0;
    transform: scale(0.3) translateY(20px);
  }
  50% {
    opacity: 1;
    transform: scale(1.1) translateY(-5px);
  }
  70% {
    transform: scale(0.95) translateY(2px);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* Эффект свечения после появления */
.result-actions .save-btn.animate-appear::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: inherit;
  background: linear-gradient(135deg, #8a2be2, #ff0080, #ffa500);
  opacity: 0;
  z-index: -1;
  animation: saveButtonGlow 0.6s 0.3s ease-out forwards;
}

@keyframes saveButtonGlow {
  0% {
    opacity: 0.8;
    filter: blur(8px);
  }
  100% {
    opacity: 0;
    filter: blur(15px);
  }
}

/* ===== BATCH ANIMATE PROGRESS ===== */
/*
 * Прогресс-бар для batch анимации нескольких изображений
 */

.batch-animate-progress {
  display: none;
  margin: 16px 0;
}

.batch-animate-progress.visible {
  display: flex;
}

.batch-animate-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  margin-bottom: 12px;
}

.batch-animate-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.batch-animate-counter {
  font-size: 14px;
  font-weight: 700;
  color: #ff0080;
  background: rgba(255, 0, 128, 0.15);
  padding: 4px 10px;
  border-radius: 12px;
}

/* Кнопка "Оживить все" со спецэффектом */
.animate-batch-btn {
  background: linear-gradient(135deg, rgba(138, 43, 226, 0.8), rgba(255, 0, 128, 0.8)) !important;
  border: 1px solid rgba(255, 0, 128, 0.4) !important;
  position: relative;
  overflow: hidden;
}

.animate-batch-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  0% {
    left: -100%;
  }
  100% {
    left: 100%;
  }
}

.animate-batch-btn:hover {
  box-shadow: 0 0 20px rgba(255, 0, 128, 0.4), 0 0 40px rgba(138, 43, 226, 0.3);
}

.animate-batch-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.animate-batch-btn:disabled::before {
  animation: none;
}

/* Анимация появления видео в batch результатах */
.batch-result-item.video-ready {
  animation: batchVideoReady 0.5s ease-out;
}

@keyframes batchVideoReady {
  0% {
    transform: scale(0.9);
    opacity: 0.5;
    box-shadow: 0 0 0 rgba(138, 43, 226, 0);
  }
  50% {
    transform: scale(1.05);
    box-shadow: 0 0 30px rgba(138, 43, 226, 0.5);
  }
  100% {
    transform: scale(1);
    opacity: 1;
    box-shadow: 0 0 0 rgba(138, 43, 226, 0);
  }
}

/* Индикатор что изображение оживляется */
.batch-result-item.animating {
  position: relative;
}

.batch-result-item.animating::after {
  content: '✨';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 32px;
  animation: pulse 1s ease-in-out infinite;
  text-shadow: 0 0 20px rgba(255, 255, 255, 0.8);
}

.batch-result-item.animating img {
  opacity: 0.5;
  filter: blur(2px);
}

/* ===== VIDEO READY CELEBRATE BANNER ===== */
.video-ready-banner {
  position: fixed;
  top: calc(env(safe-area-inset-top, 0px) + 14px);
  left: 50%;
  transform: translateX(-50%) translateY(-160%);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 22px 14px 18px;
  min-width: 260px;
  max-width: calc(100vw - 24px);
  border-radius: 22px;
  background:
    linear-gradient(135deg, #7c3aed 0%, #ec4899 45%, #f59e0b 100%);
  box-shadow:
    0 18px 44px rgba(124, 58, 237, 0.45),
    0 0 24px rgba(236, 72, 153, 0.35),
    inset 0 0 0 1px rgba(255, 255, 255, 0.25);
  color: #ffffff;
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 0.35s ease,
    transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  overflow: hidden;
  cursor: pointer;
}

.video-ready-banner.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
  animation: banner-shake-in 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.video-ready-banner.hiding {
  opacity: 0;
  transform: translateX(-50%) translateY(-160%);
}

@keyframes banner-shake-in {
  0%   { transform: translateX(-50%) translateY(-160%) scale(0.92); }
  55%  { transform: translateX(-50%) translateY(6px) scale(1.03); }
  75%  { transform: translateX(-50%) translateY(-2px) scale(1); }
  100% { transform: translateX(-50%) translateY(0) scale(1); }
}

.video-ready-icon {
  font-size: 30px;
  line-height: 1;
  animation: banner-bounce 0.9s cubic-bezier(0.68, -0.55, 0.27, 1.55);
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.25));
}

@keyframes banner-bounce {
  0%   { transform: scale(0) rotate(-20deg); }
  60%  { transform: scale(1.35) rotate(8deg); }
  80%  { transform: scale(0.92) rotate(-4deg); }
  100% { transform: scale(1) rotate(0deg); }
}

.video-ready-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}

.video-ready-title {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.2px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.video-ready-sub {
  font-size: 11px;
  opacity: 0.92;
}

.video-ready-sparkle {
  font-size: 20px;
  animation: banner-sparkle 1.4s ease-in-out infinite;
  filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.6));
}

@keyframes banner-sparkle {
  0%, 100% { transform: rotate(-12deg) scale(1); }
  50%      { transform: rotate(20deg) scale(1.3); }
}

.video-ready-glow {
  position: absolute;
  inset: -50%;
  background: radial-gradient(
    circle at 30% 30%,
    rgba(255, 255, 255, 0.4) 0%,
    transparent 45%
  );
  pointer-events: none;
  animation: banner-glow-rotate 4s linear infinite;
}

@keyframes banner-glow-rotate {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
