/**
 * Animations Styles
 * Keyframe animations and animation classes
 * Enhanced with premium micro-interactions
 */

/* Shimmer animation for progress bars */
@keyframes shimmer {
    0% {
        background-position: 100% 0;
    }
    100% {
        background-position: -100% 0;
    }
}

/* Pulse ring animation for active steps */
@keyframes pulseRing {
    0% {
        box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.5);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(99, 102, 241, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(99, 102, 241, 0);
    }
}

.pulse-ring {
    animation: pulseRing 2s infinite;
}

/* Floating animation */
@keyframes gentleFloat {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-8px);
    }
}

.float {
    animation: gentleFloat 5s ease-in-out infinite;
}

/* Wave bars animation — 配合 transform-origin: bottom，避免在 overflow 容器内从中心缩放时整条被裁成「看不见」 */
@keyframes waveBar {
    0%, 100% {
        transform: scaleY(0.45);
    }
    50% {
        transform: scaleY(1);
    }
}

/* Scroll reveal animation */
.sr {
    opacity: 0;
    transform: translateY(32px);
    transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.sr.visible {
    opacity: 1;
    transform: translateY(0);
}

/* AI 提示区域：易于区分的渐变色边框/背景 */
.ai-hint-box {
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.15) 0%, rgba(245, 158, 11, 0.12) 50%, rgba(217, 119, 6, 0.1) 100%);
  border-color: rgba(245, 158, 11, 0.6) !important;
  box-shadow: 0 0 0 1px rgba(251, 191, 36, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}
.ai-hint-subtitle {
  border: 2px solid rgba(245, 158, 11, 0.65);
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.18) 0%, rgba(245, 158, 11, 0.14) 50%, rgba(217, 119, 6, 0.12) 100%) !important;
}
.ai-hint-row {
  background: linear-gradient(90deg, rgba(253, 230, 138, 0.25) 0%, rgba(254, 243, 199, 0.2) 100%) !important;
  border: 2px solid rgba(245, 158, 11, 0.5) !important;
}
.ai-hint-badge {
  border: 1px solid rgba(245, 158, 11, 0.5);
}
.ai-hint-badge-text {
  background: linear-gradient(180deg, #fef3c7 0%, #fde68a 100%);
  color: #92400e;
}
.ai-hint-badge-anim {
  background: linear-gradient(180deg, #fef9c3 0%, #fef08a 100%);
  color: #854d0e;
}

/* 预览区 AI 建议字幕框 */
.ai-hint-preview {
  background: linear-gradient(135deg, rgba(120, 53, 15, 0.95) 0%, rgba(146, 64, 14, 0.92) 50%, rgba(180, 83, 9, 0.9) 100%);
  box-shadow: 0 4px 20px rgba(245, 158, 11, 0.25);
}

/* 工具栏 Tab 切换动画 */
.tab-fade-enter-active,
.tab-fade-leave-active {
    transition: opacity 0.24s cubic-bezier(0.4, 0, 0.2, 1), transform 0.24s cubic-bezier(0.4, 0, 0.2, 1);
}
.tab-fade-enter-from {
    opacity: 0;
    transform: translateX(-8px);
}
.tab-fade-leave-to {
    opacity: 0;
    transform: translateX(8px);
}

/* View transitions */
.view-enter-active,
.view-leave-active {
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.view-enter-from {
    opacity: 0;
    transform: translateY(16px);
}

.view-leave-to {
    opacity: 0;
    transform: translateY(-16px);
}

/* 入场动画：页面/模块级 fade-in、slide-in */
@keyframes entranceFade {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes entranceSlideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    /* 必须落到 transform:none：forwards 若保留 translateY(0) 会留下 containing block，
       内层 overflow:auto 网格的溢出子孙会撑高整页滚轴（上传 step3 语种列表） */
    to {
        opacity: 1;
        transform: none;
    }
}

.entrance-fade {
    animation: entranceFade 0.4s ease-out forwards;
}

.entrance-slide-up {
    opacity: 1;
    transform: none;
    animation: entranceSlideUp 0.45s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.entrance-stagger > * {
    /* 用 both：延迟前也吃 0% keyframe。勿单独写 opacity:0 —
       否则主题里 animation:none（关 headlineGlow）会把子元素永久藏掉 */
    animation: entranceSlideUp 0.45s cubic-bezier(0.4, 0, 0.2, 1) both;
}

.entrance-stagger > *:nth-child(1) { animation-delay: 0.05s; }
.entrance-stagger > *:nth-child(2) { animation-delay: 0.12s; }
.entrance-stagger > *:nth-child(3) { animation-delay: 0.2s; }
.entrance-stagger > *:nth-child(4) { animation-delay: 0.28s; }
.entrance-stagger > *:nth-child(5) { animation-delay: 0.36s; }
.entrance-stagger > *:nth-child(6) { animation-delay: 0.44s; }

/* 无障碍：尊重用户 prefers-reduced-motion 设置 */
@media (prefers-reduced-motion: reduce) {
  .entrance-fade,
  .entrance-slide-up,
  .entrance-stagger > * {
    animation: none;
    opacity: 1;
    transform: none;
  }
}

/* Count up animation for stat cards */
@keyframes countUp {
    0% {
        opacity: 0;
        transform: translateY(12px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========================================
   Premium Micro-interactions
   ======================================== */

/* Button hover glow */
@keyframes btnGlow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(99, 102, 241, 0.3);
    }
    50% {
        box-shadow: 0 0 30px rgba(99, 102, 241, 0.5);
    }
}

.btn-glow:hover {
    animation: btnGlow 2s ease-in-out infinite;
}

/* Card lift effect */
.card-lift {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-lift:hover {
    transform: translateY(-6px) perspective(1000px) rotateX(2deg);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12), 0 0 0 1px rgba(99, 102, 241, 0.05);
}

/* Ripple effect */
@keyframes ripple {
    0% {
        transform: scale(0);
        opacity: 0.5;
    }
    100% {
        transform: scale(4);
        opacity: 0;
    }
}

.ripple-effect {
    position: relative;
    overflow: hidden;
}

.ripple-effect::after {
    content: '';
    position: absolute;
    width: 100px;
    height: 100px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: scale(0);
    pointer-events: none;
}

.ripple-effect:active::after {
    animation: ripple 0.6s ease-out;
}

/* Gradient border animation */
@keyframes gradientBorder {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.gradient-border {
    position: relative;
    background: white;
    border-radius: var(--orbvop-radius-lg);
}

.gradient-border::before {
    content: '';
    position: absolute;
    inset: -2px;
    background: linear-gradient(90deg, #6366f1, #a855f7, #ec4899, #6366f1);
    background-size: 300% 300%;
    border-radius: inherit;
    z-index: -1;
    animation: gradientBorder 4s ease infinite;
}

/* Typing cursor animation */
@keyframes blink {
    0%, 50% {
        opacity: 1;
    }
    51%, 100% {
        opacity: 0;
    }
}

.typing-cursor::after {
    content: '|';
    animation: blink 1s step-end infinite;
    color: var(--orbvop-primary);
}

/* Skeleton loading animation */
@keyframes skeleton {
    0% {
        background-position: -200px 0;
    }
    100% {
        background-position: calc(200px + 100%) 0;
    }
}

.skeleton {
    background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
    background-size: 200px 100%;
    animation: skeleton 1.5s ease-in-out infinite;
}

/* Success checkmark animation */
@keyframes checkmark {
    0% {
        stroke-dashoffset: 100;
    }
    100% {
        stroke-dashoffset: 0;
    }
}

.checkmark-animated {
    stroke-dasharray: 100;
    stroke-dashoffset: 100;
    animation: checkmark 0.5s ease-out forwards;
}

/* Shake animation for errors */
@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    10%, 30%, 50%, 70%, 90% {
        transform: translateX(-4px);
    }
    20%, 40%, 60%, 80% {
        transform: translateX(4px);
    }
}

.shake {
    animation: shake 0.5s ease-in-out;
}

/* Pop in animation */
@keyframes popIn {
    0% {
        opacity: 0;
        transform: scale(0.8);
    }
    70% {
        transform: scale(1.05);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.pop-in {
    animation: popIn 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* Slide in from right */
@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.slide-in-right {
    animation: slideInRight 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* Fade scale animation */
@keyframes fadeScale {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.fade-scale {
    animation: fadeScale 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* Progress bar shine */
@keyframes progressShine {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

.progress-shine {
    position: relative;
    overflow: hidden;
}

.progress-shine::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: progressShine 2s ease-in-out infinite;
}

/* Bounce in animation */
@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.bounce-in {
    animation: bounceIn 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* Spin animation */
@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.spin {
    animation: spin 1s linear infinite;
}

/* Pulse scale animation */
@keyframes pulseScale {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.pulse-scale {
    animation: pulseScale 2s ease-in-out infinite;
}

/* Gradient text animation */
@keyframes gradientText {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.animated-gradient-text {
    background: linear-gradient(90deg, #6366f1, #a855f7, #ec4899, #6366f1);
    background-size: 300% 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientText 4s ease infinite;
}

/* ========================================
    Print-Press (印刷机效果) animations
    ======================================== */

@keyframes pressRoll {
    0% { transform: translateX(0); }
    100% { transform: translateX(36px); }
}

@keyframes paperFeed {
    0% { transform: translateY(-18%); }
    100% { transform: translateY(118%); }
}

@keyframes paperFlicker {
    0%, 100% { opacity: 0.85; }
    50% { opacity: 1; }
}

@keyframes printLine {
    0% {
        opacity: 0;
        transform: translateY(-6px);
        filter: blur(2px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
        filter: blur(0);
    }
}

@keyframes stampPop {
    0% {
        opacity: 0;
        transform: translateY(8px) scale(0.92) rotate(-3deg);
    }
    70% {
        opacity: 1;
        transform: translateY(0) scale(1.05) rotate(0deg);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1) rotate(0deg);
    }
}

.press-roll {
    animation: pressRoll 0.65s linear infinite;
}

.paper-feed {
    animation: paperFeed 1.1s linear infinite;
}

.paper-flicker {
    animation: paperFlicker 1.6s ease-in-out infinite;
}

.print-line {
    animation: printLine 0.28s ease-out forwards;
}

.stamp-pop {
    animation: stampPop 0.35s cubic-bezier(0.2, 0.9, 0.2, 1) forwards;
}

@media (prefers-reduced-motion: reduce) {
    .press-roll,
    .paper-feed,
    .paper-flicker,
    .print-line,
    .stamp-pop {
        animation: none !important;
    }
}

/* 账户 / 注册登录主卡：显式限宽（若 Tailwind 未生成 max-w-md，避免 w-full 把卡拉到整屏宽） */
.auth-page-shell {
  display: flex;
  justify-content: center;
  width: 100%;
  max-width: 1400px;
  margin-left: auto;
  margin-right: auto;
  box-sizing: border-box;
}
.auth-page {
  width: 100%;
  max-width: min(28rem, calc(100vw - 1.5rem));
  margin-left: auto;
  margin-right: auto;
  box-sizing: border-box;
}

/* 账户 / 注册登录页：居中柔和光斑动画 */
.auth-page-bg-decor {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.auth-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(64px);
  will-change: transform, opacity;
  pointer-events: none;
}

body.app-theme-light .auth-orb {
  opacity: 0.55;
}

body:not(.app-theme-light) .auth-orb {
  opacity: 0.35;
}

.auth-orb-a {
  width: min(70vw, 360px);
  height: min(70vw, 360px);
  top: 38%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle at 30% 30%, rgba(99, 102, 241, 0.45), rgba(14, 165, 233, 0.22) 55%, transparent 70%);
  animation: authOrbA 10s ease-in-out infinite;
}

.auth-orb-b {
  width: min(50vw, 220px);
  height: min(50vw, 220px);
  top: 52%;
  left: 32%;
  background: radial-gradient(circle at 50% 50%, rgba(16, 185, 129, 0.28), transparent 65%);
  animation: authOrbB 12s ease-in-out infinite 0.8s;
}

.auth-orb-c {
  width: min(45vw, 200px);
  height: min(45vw, 200px);
  top: 48%;
  right: 28%;
  background: radial-gradient(circle at 50% 50%, rgba(167, 139, 250, 0.32), transparent 70%);
  animation: authOrbC 14s ease-in-out infinite 1.2s;
}

@keyframes authOrbA {
  0%,
  100% {
    transform: translate(-50%, -50%) scale(1) rotate(0deg);
    opacity: 0.85;
  }
  50% {
    transform: translate(-50%, -52%) scale(1.08) rotate(6deg);
    opacity: 1;
  }
}

@keyframes authOrbB {
  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }
  50% {
    transform: translate(8%, -6%) scale(1.12);
  }
}

@keyframes authOrbC {
  0%,
  100% {
    transform: translate(0, 0) scale(1) rotate(0deg);
  }
  50% {
    transform: translate(-6%, 8%) scale(1.06) rotate(-5deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .auth-orb-a,
  .auth-orb-b,
  .auth-orb-c {
    animation: none;
    filter: blur(48px);
  }
}

/* 账户内测说明：summary 去默认三角 */
details > summary.auth-flow-summary {
  list-style: none;
}
details > summary.auth-flow-summary::-webkit-details-marker {
  display: none;
}

/* 登录 / 注册 顶部分段控件 + 指示条滑动 */
.auth-mode-tabs-track {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  padding: 3px;
  border-radius: 12px;
  background: rgba(148, 163, 184, 0.22);
  border: 1px solid rgba(148, 163, 184, 0.35);
}
.dark .auth-mode-tabs-track,
html.dark .auth-mode-tabs-track,
body.app-theme-dark .auth-mode-tabs-track {
  background: rgba(30, 41, 59, 0.65);
  border-color: rgba(71, 85, 105, 0.55);
}
.auth-mode-tabs-indicator {
  position: absolute;
  top: 3px;
  bottom: 3px;
  left: 3px;
  width: calc(50% - 4.5px);
  border-radius: 9px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(248, 250, 252, 0.88));
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.12), 0 0 0 1px rgba(99, 102, 241, 0.12);
  transition: transform 0.38s cubic-bezier(0.34, 1.3, 0.64, 1), box-shadow 0.35s ease;
  z-index: 0;
  pointer-events: none;
}
body.app-theme-dark .auth-mode-tabs-indicator {
  background: linear-gradient(135deg, rgba(51, 65, 85, 0.95), rgba(30, 41, 59, 0.92));
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
.auth-mode-tabs-track[data-active='register'] .auth-mode-tabs-indicator {
  transform: translateX(calc(100% + 3px));
}
.auth-mode-tab {
  position: relative;
  z-index: 1;
  margin: 0;
  padding: 0.55rem 0.45rem;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  border: none;
  border-radius: 9px;
  background: transparent;
  color: rgb(100, 116, 139);
  transition: color 0.25s ease, transform 0.2s ease;
}
body.app-theme-dark .auth-mode-tab {
  color: rgb(148, 163, 184);
}
.auth-mode-tab--on {
  color: rgb(79, 70, 229);
}
body.app-theme-dark .auth-mode-tab--on {
  color: rgb(196, 181, 253);
}
.auth-mode-tab:active:not(:disabled) {
  transform: scale(0.97);
}

/* 账户页：SaaS 多页切换（轻滑入 + 淡出） */
.auth-swap-enter-active,
.auth-swap-leave-active {
  transition: opacity 0.28s cubic-bezier(0.4, 0, 0.2, 1), transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}
.auth-swap-enter-from {
  opacity: 0;
  transform: translateY(8px) scale(0.992);
}
.auth-swap-leave-to {
  opacity: 0;
  transform: translateY(-6px) scale(0.992);
}

.auth-screen-enter-active,
.auth-screen-leave-active {
  transition: opacity 0.3s cubic-bezier(0.33, 1, 0.68, 1), transform 0.32s cubic-bezier(0.33, 1, 0.68, 1);
}
.auth-screen-enter-from {
  opacity: 0;
  transform: translateX(14px);
}
.auth-screen-leave-to {
  opacity: 0;
  transform: translateX(-10px);
}

/* 双栏同时轻微入场，强调「两个独立框」 */
@keyframes authColIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.auth-dual-anim .auth-dual-col {
  animation: authColIn 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
  opacity: 0;
}
.auth-dual-anim .auth-dual-col:nth-child(1) { animation-delay: 0.02s; }
.auth-dual-anim .auth-dual-col:nth-child(2) { animation-delay: 0.1s; }

/* 登录/注册卡片：轻微上浮入场 */
@keyframes authPanelFloatIn {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
.auth-panel-surface.auth-panel-float-in {
  animation: authPanelFloatIn 0.44s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.auth-input-well {
  transition: border-color 0.22s ease, box-shadow 0.22s ease, background-color 0.22s ease;
  min-width: 0;
}
.auth-cta-press {
  transition: transform 0.14s ease, box-shadow 0.2s ease, opacity 0.2s ease, filter 0.2s ease;
}
.auth-cta-press:active:not(:disabled) {
  transform: scale(0.984);
  filter: brightness(0.97);
}
.auth-google-btn {
  transition: transform 0.14s ease, border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}
.auth-google-btn:hover:not(:disabled) {
  box-shadow: 0 2px 12px rgba(15, 23, 42, 0.08);
}
body.app-theme-dark .auth-google-btn:hover:not(:disabled) {
  box-shadow: 0 2px 14px rgba(0, 0, 0, 0.35);
}
.auth-google-btn:active:not(:disabled) {
  transform: scale(0.987);
}

@media (prefers-reduced-motion: reduce) {
  .auth-mode-tabs-indicator {
    transition: none;
  }
  .auth-swap-enter-active,
  .auth-swap-leave-active,
  .auth-screen-enter-active,
  .auth-screen-leave-active {
    transition: none;
  }
  .auth-swap-enter-from,
  .auth-swap-leave-to,
  .auth-screen-enter-from,
  .auth-screen-leave-to {
    transform: none;
  }
  .auth-dual-anim .auth-dual-col {
    animation: none;
    opacity: 1;
  }
  .auth-panel-surface.auth-panel-float-in {
    animation: none;
    opacity: 1;
  }
  .auth-input-well {
    transition: none;
  }
  .auth-cta-press:active:not(:disabled),
  .auth-google-btn:active:not(:disabled) {
    transform: none;
    filter: none;
  }
}

/* 账户设置页可略宽于登录卡（居中；避免壳层 1400px 下卡片贴左显得「尺寸不对」） */
.auth-page.auth-page--account {
  max-width: min(42rem, calc(100vw - 2rem));
}

/* ── Account settings (modern SaaS sections) ── */
.auth-account-hero {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  padding: 0.875rem 1rem;
  border-radius: 0.875rem;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.08), rgba(16, 185, 129, 0.06));
  border: 1px solid rgba(148, 163, 184, 0.28);
}
body.app-theme-dark .auth-account-hero,
body:not(.app-theme-light) .auth-account-hero {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.16), rgba(16, 185, 129, 0.08));
  border-color: rgba(71, 85, 105, 0.55);
}
.auth-account-hero__avatar {
  flex-shrink: 0;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.75rem;
  display: grid;
  place-items: center;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #4f46e5;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(99, 102, 241, 0.25);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
body.app-theme-dark .auth-account-hero__avatar,
body:not(.app-theme-light) .auth-account-hero__avatar {
  color: #c4b5fd;
  background: rgba(15, 23, 42, 0.65);
  border-color: rgba(139, 92, 246, 0.35);
}
.auth-account-hero__email {
  margin: 0;
  font-size: 0.9375rem;
  font-weight: 600;
  color: #0f172a;
  line-height: 1.35;
}
body.app-theme-dark .auth-account-hero__email,
body:not(.app-theme-light) .auth-account-hero__email {
  color: #f8fafc;
}
.auth-account-hero__id {
  margin: 0.2rem 0 0;
  font-size: 0.75rem;
  color: #64748b;
  line-height: 1.35;
}
body.app-theme-dark .auth-account-hero__id,
body:not(.app-theme-light) .auth-account-hero__id {
  color: #94a3b8;
}

.auth-settings {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.auth-settings__intro {
  margin-bottom: 0.25rem;
}
.auth-settings__title {
  margin: 0;
  font-size: 1rem;
  font-weight: 650;
  letter-spacing: -0.01em;
  color: #0f172a;
}
body.app-theme-dark .auth-settings__title,
body:not(.app-theme-light) .auth-settings__title {
  color: #f1f5f9;
}
.auth-settings__sub {
  margin: 0.35rem 0 0;
  font-size: 0.8125rem;
  line-height: 1.5;
  color: #64748b;
}
body.app-theme-dark .auth-settings__sub,
body:not(.app-theme-light) .auth-settings__sub {
  color: #94a3b8;
}
.auth-settings__section {
  padding: 1.15rem 0;
  border-top: 1px solid rgba(226, 232, 240, 0.95);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
body.app-theme-dark .auth-settings__section,
body:not(.app-theme-light) .auth-settings__section {
  border-top-color: rgba(51, 65, 85, 0.85);
}
.auth-settings__section:first-of-type {
  border-top: none;
  padding-top: 0.85rem;
}
.auth-settings__section-head {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}
.auth-settings__section-title {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 600;
  color: #1e293b;
}
body.app-theme-dark .auth-settings__section-title,
body:not(.app-theme-light) .auth-settings__section-title {
  color: #e2e8f0;
}
.auth-settings__hint {
  margin: 0;
  font-size: 0.75rem;
  line-height: 1.45;
  color: #64748b;
}
.auth-settings__hint--block {
  margin-top: 0.35rem;
}
body.app-theme-dark .auth-settings__hint,
body:not(.app-theme-light) .auth-settings__hint {
  color: #94a3b8;
}
.auth-settings__label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.75rem;
  font-weight: 550;
  color: #475569;
}
body.app-theme-dark .auth-settings__label,
body:not(.app-theme-light) .auth-settings__label {
  color: #94a3b8;
}
.auth-settings__row {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}
@media (min-width: 480px) {
  .auth-settings__row {
    flex-direction: row;
    align-items: stretch;
  }
  .auth-settings__row .auth-settings__input {
    flex: 1 1 auto;
  }
  .auth-settings__row .auth-settings__btn {
    flex: 0 0 auto;
    width: auto;
    min-width: 7.5rem;
    white-space: nowrap;
  }
}
.auth-settings__stack {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}
.auth-settings__stack--tight {
  gap: 0.55rem;
  margin-top: 0.55rem;
}
.auth-settings__fonts-title-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
}
.auth-settings__fonts-count {
  flex-shrink: 0;
  font-size: 0.7rem;
  font-weight: 600;
  color: #64748b;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  background: #f1f5f9;
}
body.app-theme-dark .auth-settings__fonts-count,
body:not(.app-theme-light) .auth-settings__fonts-count {
  background: rgba(51, 65, 85, 0.7);
  color: #94a3b8;
}
.auth-settings__font-drop {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.55rem;
  padding: 1.1rem 1rem;
  border-radius: 0.85rem;
  border: 1.5px dashed #cbd5e1;
  background: rgba(248, 250, 252, 0.85);
  text-align: center;
  cursor: pointer;
  transition: border-color 0.18s ease, background-color 0.18s ease, opacity 0.18s ease;
}
.auth-settings__font-drop:hover {
  border-color: #a5b4fc;
  background: rgba(238, 242, 255, 0.55);
}
.auth-settings__font-drop.is-ready {
  border-color: #818cf8;
}
.auth-settings__font-drop:not(.is-ready) {
  cursor: default;
}
.auth-settings__font-drop:not(.is-ready) .auth-settings__font-drop-text {
  opacity: 0.72;
}
.auth-settings__font-drop.is-busy {
  opacity: 0.7;
  pointer-events: none;
}
body.app-theme-dark .auth-settings__font-drop,
body:not(.app-theme-light) .auth-settings__font-drop {
  border-color: #475569;
  background: rgba(15, 23, 42, 0.45);
}
body.app-theme-dark .auth-settings__font-drop:hover,
body:not(.app-theme-light) .auth-settings__font-drop:hover {
  border-color: #818cf8;
  background: rgba(49, 46, 129, 0.22);
}
.auth-settings__font-drop-icon {
  color: #6366f1;
  display: grid;
  place-items: center;
}
.auth-settings__font-drop-text {
  font-size: 0.8125rem;
  color: #64748b;
  line-height: 1.4;
  max-width: 18rem;
}
body.app-theme-dark .auth-settings__font-drop-text,
body:not(.app-theme-light) .auth-settings__font-drop-text {
  color: #94a3b8;
}
.auth-settings__font-add-btn {
  width: auto;
  min-width: 7rem;
  margin-top: 0.15rem;
}
.auth-settings__input {
  width: 100%;
  box-sizing: border-box;
  min-width: 0;
  padding: 0.625rem 0.8rem;
  border-radius: 0.65rem;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #0f172a;
  font-size: 0.875rem;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}
.auth-settings__input:focus {
  border-color: rgba(99, 102, 241, 0.55);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}
.auth-settings__input.is-invalid {
  border-color: #fca5a5;
}
body.app-theme-dark .auth-settings__input,
body:not(.app-theme-light) .auth-settings__input {
  border-color: #475569;
  background: #020617;
  color: #f8fafc;
}
body.app-theme-dark .auth-settings__input.is-invalid,
body:not(.app-theme-light) .auth-settings__input.is-invalid {
  border-color: rgba(248, 113, 113, 0.55);
}
.auth-settings__input--otp {
  text-align: center;
  font-size: 1.25rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  letter-spacing: 0.35em;
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}
.auth-settings__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 0.625rem 0.95rem;
  border-radius: 0.65rem;
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease, opacity 0.18s ease;
}
.auth-settings__btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}
.auth-settings__btn--primary {
  background: #4f46e5;
  color: #fff;
}
.auth-settings__btn--primary:hover:not(:disabled) {
  background: #6366f1;
}
.auth-settings__btn--secondary {
  background: #f8fafc;
  border-color: #e2e8f0;
  color: #0f172a;
}
.auth-settings__btn--secondary:hover:not(:disabled) {
  background: #f1f5f9;
  border-color: #cbd5e1;
}
body.app-theme-dark .auth-settings__btn--secondary,
body:not(.app-theme-light) .auth-settings__btn--secondary {
  background: #0f172a;
  border-color: #475569;
  color: #e2e8f0;
}
body.app-theme-dark .auth-settings__btn--secondary:hover:not(:disabled),
body:not(.app-theme-light) .auth-settings__btn--secondary:hover:not(:disabled) {
  background: #1e293b;
}
.auth-settings__btn--ghost {
  background: rgba(99, 102, 241, 0.08);
  border-color: rgba(99, 102, 241, 0.28);
  color: #4338ca;
}
body.app-theme-dark .auth-settings__btn--ghost,
body:not(.app-theme-light) .auth-settings__btn--ghost {
  background: rgba(99, 102, 241, 0.14);
  border-color: rgba(139, 92, 246, 0.35);
  color: #c4b5fd;
}
.auth-settings__btn--signout {
  background: transparent;
  border-color: #e2e8f0;
  color: #64748b;
  font-weight: 550;
}
.auth-settings__btn--signout:hover:not(:disabled) {
  background: #fef2f2;
  border-color: #fecaca;
  color: #b91c1c;
}
body.app-theme-dark .auth-settings__btn--signout,
body:not(.app-theme-light) .auth-settings__btn--signout {
  border-color: #475569;
  color: #94a3b8;
}
body.app-theme-dark .auth-settings__btn--signout:hover:not(:disabled),
body:not(.app-theme-light) .auth-settings__btn--signout:hover:not(:disabled) {
  background: rgba(127, 29, 29, 0.25);
  border-color: rgba(248, 113, 113, 0.4);
  color: #fca5a5;
}
.auth-account-footer {
  padding-top: 0.85rem;
  border-top: 1px solid rgba(226, 232, 240, 0.95);
  margin-top: 0.25rem;
}
body.app-theme-dark .auth-account-footer,
body:not(.app-theme-light) .auth-account-footer {
  border-top-color: rgba(51, 65, 85, 0.85);
}
.auth-settings__details {
  margin: 0;
}
.auth-settings__details-sum {
  cursor: pointer;
  list-style: none;
  font-size: 0.75rem;
  font-weight: 550;
  color: #4f46e5;
  user-select: none;
}
.auth-settings__details-sum::-webkit-details-marker {
  display: none;
}
.auth-settings__details-sum::before {
  content: '';
  display: inline-block;
  width: 0;
  height: 0;
  margin-right: 0.35rem;
  border-left: 4px solid currentColor;
  border-top: 3px solid transparent;
  border-bottom: 3px solid transparent;
  transform: translateY(-0.5px);
  transition: transform 0.15s ease;
}
.auth-settings__details[open] > .auth-settings__details-sum::before {
  transform: rotate(90deg) translateX(1px);
}
body.app-theme-dark .auth-settings__details-sum,
body:not(.app-theme-light) .auth-settings__details-sum {
  color: #a5b4fc;
}
.auth-settings__empty {
  font-size: 0.75rem;
  color: #94a3b8;
  padding: 0.65rem 0.8rem;
  border-radius: 0.65rem;
  border: 1px dashed #cbd5e1;
  background: rgba(248, 250, 252, 0.7);
}
body.app-theme-dark .auth-settings__empty,
body:not(.app-theme-light) .auth-settings__empty {
  border-color: #475569;
  background: rgba(15, 23, 42, 0.4);
  color: #94a3b8;
}
.auth-settings__font-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}
.auth-settings__font-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.55rem 0.7rem;
  border-radius: 0.65rem;
  border: 1px solid #e2e8f0;
  background: #fff;
}
body.app-theme-dark .auth-settings__font-item,
body:not(.app-theme-light) .auth-settings__font-item {
  border-color: #334155;
  background: rgba(15, 23, 42, 0.55);
}
.auth-settings__font-meta {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}
.auth-settings__font-name {
  font-size: 0.8125rem;
  font-weight: 550;
  color: #334155;
}
body.app-theme-dark .auth-settings__font-name,
body:not(.app-theme-light) .auth-settings__font-name {
  color: #e2e8f0;
}
.auth-settings__font-psd {
  font-size: 0.7rem;
  color: #94a3b8;
}
.auth-settings__link-danger {
  flex-shrink: 0;
  background: none;
  border: none;
  padding: 0;
  font-size: 0.75rem;
  font-weight: 550;
  color: #e11d48;
  cursor: pointer;
}
.auth-settings__link-danger:hover:not(:disabled) {
  text-decoration: underline;
}
.auth-settings__link-danger:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.auth-settings__check {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  font-size: 0.75rem;
  line-height: 1.45;
  color: #475569;
  cursor: pointer;
}
body.app-theme-dark .auth-settings__check,
body:not(.app-theme-light) .auth-settings__check {
  color: #94a3b8;
}
.auth-settings__checkbox {
  margin-top: 0.15rem;
  flex-shrink: 0;
  accent-color: #6366f1;
}
.auth-settings__steps {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem;
  border-radius: 0.65rem;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  align-self: flex-start;
}
body.app-theme-dark .auth-settings__steps,
body:not(.app-theme-light) .auth-settings__steps {
  background: rgba(15, 23, 42, 0.7);
  border-color: #334155;
}
.auth-settings__step {
  padding: 0.3rem 0.55rem;
  border-radius: 0.45rem;
  font-size: 0.7rem;
  font-weight: 600;
  color: #64748b;
  opacity: 0.75;
}
.auth-settings__step.is-active {
  background: #fff;
  color: #4f46e5;
  opacity: 1;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}
body.app-theme-dark .auth-settings__step.is-active,
body:not(.app-theme-light) .auth-settings__step.is-active {
  background: #0f172a;
  color: #c4b5fd;
}
.auth-settings__step-sep {
  width: 0.75rem;
  height: 1px;
  background: #cbd5e1;
}
body.app-theme-dark .auth-settings__step-sep,
body:not(.app-theme-light) .auth-settings__step-sep {
  background: #475569;
}
.auth-settings__pw-wrap {
  position: relative;
}
.auth-settings__input--pw {
  padding-right: 2.6rem;
}
.auth-settings__pw-toggle {
  position: absolute;
  right: 0.25rem;
  top: 50%;
  transform: translateY(-50%);
  padding: 0.35rem;
  border: none;
  border-radius: 0.4rem;
  background: transparent;
  color: #64748b;
  cursor: pointer;
}
.auth-settings__pw-toggle:hover {
  background: rgba(148, 163, 184, 0.15);
  color: #0f172a;
}
body.app-theme-dark .auth-settings__pw-toggle:hover,
body:not(.app-theme-light) .auth-settings__pw-toggle:hover {
  color: #f8fafc;
}
.auth-settings__error {
  margin: 0.35rem 0 0;
  font-size: 0.75rem;
  color: #dc2626;
}
body.app-theme-dark .auth-settings__error,
body:not(.app-theme-light) .auth-settings__error {
  color: #f87171;
}
.auth-settings__notice {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.7rem 0.85rem;
  border-radius: 0.65rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  font-size: 0.75rem;
  color: #475569;
}
body.app-theme-dark .auth-settings__notice,
body:not(.app-theme-light) .auth-settings__notice {
  background: rgba(15, 23, 42, 0.55);
  border-color: #334155;
  color: #94a3b8;
}
.auth-settings__mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.875rem;
  font-weight: 550;
  color: #0f172a;
}
body.app-theme-dark .auth-settings__mono,
body:not(.app-theme-light) .auth-settings__mono {
  color: #f1f5f9;
}
.auth-settings__text-link {
  background: none;
  border: none;
  padding: 0.25rem 0;
  font-size: 0.8125rem;
  font-weight: 550;
  color: #4f46e5;
  cursor: pointer;
  align-self: flex-start;
}
.auth-settings__text-link:hover {
  text-decoration: underline;
}
body.app-theme-dark .auth-settings__text-link,
body:not(.app-theme-light) .auth-settings__text-link {
  color: #a5b4fc;
}
.auth-settings__sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ── 启动加载页 keyframes ── */
@keyframes orbvop-arc {
  to { stroke-dashoffset: -157; }
}
@keyframes orbvop-shimmer {
  0%   { background-position: 200% 50%; }
  100% { background-position: -200% 50%; }
}

/* -- Animation panel layout (2026-08 redesign) -- */
.anim-panel {
  --anim-panel-pad: 1rem;
  padding: var(--anim-panel-pad);
  gap: 0.75rem;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92) 0%, rgba(248, 250, 252, 0.96) 100%);
}

body.app-theme-dark .anim-panel,
body:not(.app-theme-light) .anim-panel {
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.92) 0%, rgba(30, 41, 59, 0.88) 100%);
}

.anim-panel__header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.28);
}

.anim-panel__title {
  margin: 0;
  font-size: 1rem;
  font-weight: 650;
  letter-spacing: -0.01em;
  color: #0f172a;
  line-height: 1.25;
}

.anim-panel__subtitle {
  margin: 0.2rem 0 0;
  font-size: 0.75rem;
  color: #64748b;
  line-height: 1.35;
}

body.app-theme-dark .anim-panel__title,
body:not(.app-theme-light) .anim-panel__title {
  color: #f1f5f9;
}

body.app-theme-dark .anim-panel__subtitle,
body:not(.app-theme-light) .anim-panel__subtitle {
  color: #94a3b8;
}

.anim-panel__ai-btn {
  flex-shrink: 0;
  padding: 0.45rem 0.9rem;
  border-radius: 0.65rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  border: none;
  box-shadow: 0 1px 2px rgba(180, 83, 9, 0.25);
  transition: filter 0.15s ease, opacity 0.15s ease, transform 0.15s ease;
}

.anim-panel__ai-btn:hover:not(:disabled) {
  filter: brightness(1.05);
  transform: translateY(-1px);
}

.anim-panel__ai-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.anim-panel__body {
  display: grid;
  grid-template-columns: minmax(240px, 300px) minmax(0, 1fr);
  gap: 0.85rem 1.1rem;
  min-height: 0;
  flex: 1 1 auto;
  overflow: hidden;
}

@media (max-width: 1023px) {
  .anim-panel__body {
    grid-template-columns: 1fr;
    overflow-y: auto;
  }
  .anim-sub-list {
    max-height: min(42vh, 360px);
  }
  .anim-panel__workspace {
    min-height: 280px;
  }
}

.anim-panel__workspace {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  min-height: 0;
  padding-left: 0.15rem;
}

.anim-active-cue {
  border-radius: 0.85rem;
  border: 1px solid rgba(99, 102, 241, 0.28);
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.08), rgba(59, 130, 246, 0.05));
  padding: 0.65rem 0.8rem;
}

.anim-active-cue.is-empty {
  border-style: dashed;
  border-color: rgba(148, 163, 184, 0.45);
  background: rgba(148, 163, 184, 0.06);
}

body.app-theme-dark .anim-active-cue,
body:not(.app-theme-light) .anim-active-cue {
  border-color: rgba(129, 140, 248, 0.35);
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.16), rgba(30, 41, 59, 0.4));
}

.anim-active-cue__label {
  font-size: 0.625rem;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #64748b;
  margin-bottom: 0.3rem;
}

.anim-active-cue__row {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
}

.anim-active-cue__dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 999px;
  margin-top: 0.35rem;
  flex-shrink: 0;
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.08);
}

.anim-active-cue__text {
  font-size: 0.875rem;
  font-weight: 550;
  color: #0f172a;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

body.app-theme-dark .anim-active-cue__text,
body:not(.app-theme-light) .anim-active-cue__text {
  color: #f1f5f9;
}

.anim-active-cue__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.25rem;
  font-size: 0.6875rem;
  color: #64748b;
}

.anim-active-cue__applied {
  color: #4f46e5;
  font-weight: 600;
}

body.app-theme-dark .anim-active-cue__applied,
body:not(.app-theme-light) .anim-active-cue__applied {
  color: #a5b4fc;
}

.anim-active-cue__placeholder {
  font-size: 0.8125rem;
  color: #94a3b8;
  text-align: center;
  padding: 0.35rem 0;
}

.anim-sub-list__ai-badge {
  font-size: 0.625rem;
  font-weight: 650;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  color: #92400e;
  background: rgba(251, 191, 36, 0.22);
  border: 1px solid rgba(245, 158, 11, 0.35);
}

.anim-sub-list__filters {
  display: flex;
  gap: 0.35rem;
  margin-bottom: 0.5rem;
}

.anim-sub-list__filter {
  flex: 1 1 auto;
  padding: 0.35rem 0.5rem;
  font-size: 0.6875rem;
  font-weight: 600;
  border-radius: 0.5rem;
  border: 1px solid rgba(148, 163, 184, 0.4);
  background: rgba(248, 250, 252, 0.9);
  color: #475569;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.anim-sub-list__filter.is-active {
  background: #0f172a;
  border-color: #0f172a;
  color: #fff;
}

.anim-sub-list__filter.is-active.is-ai {
  background: #d97706;
  border-color: #d97706;
  color: #fff;
}

.anim-sub-list__filter:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

body.app-theme-dark .anim-sub-list__filter,
body:not(.app-theme-light) .anim-sub-list__filter {
  background: rgba(30, 41, 59, 0.7);
  border-color: rgba(71, 85, 105, 0.8);
  color: #cbd5e1;
}

body.app-theme-dark .anim-sub-list__filter.is-active,
body:not(.app-theme-light) .anim-sub-list__filter.is-active {
  background: #e2e8f0;
  border-color: #e2e8f0;
  color: #0f172a;
}

body.app-theme-dark .anim-sub-list__filter.is-active.is-ai,
body:not(.app-theme-light) .anim-sub-list__filter.is-active.is-ai {
  background: #d97706;
  border-color: #d97706;
  color: #fff;
}

.anim-sub-list__scroll {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding-right: 0.65rem;
  border-right: 1px solid rgba(148, 163, 184, 0.25);
}

@media (max-width: 1023px) {
  .anim-sub-list__scroll {
    border-right: none;
    border-bottom: 1px solid rgba(148, 163, 184, 0.25);
    padding-right: 0.25rem;
    padding-bottom: 0.5rem;
  }
}

.anim-sub-list__empty {
  padding: 1.25rem 0.75rem;
  text-align: center;
  font-size: 0.8125rem;
  color: #94a3b8;
}

.anim-cue-card {
  display: flex;
  align-items: stretch;
  gap: 0.55rem;
  width: 100%;
  text-align: left;
  padding: 0.55rem 0.6rem;
  border-radius: 0.7rem;
  border: 1px solid rgba(226, 232, 240, 0.95);
  background: rgba(255, 255, 255, 0.78);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.anim-cue-card:hover {
  border-color: rgba(148, 163, 184, 0.7);
  background: #fff;
}

.anim-cue-card.is-selected {
  border-color: rgba(99, 102, 241, 0.65);
  background: rgba(99, 102, 241, 0.08);
  box-shadow: 0 0 0 1px rgba(99, 102, 241, 0.18);
}

.anim-cue-card.has-ai:not(.is-selected) {
  border-color: rgba(245, 158, 11, 0.35);
  background: rgba(255, 251, 235, 0.65);
}

.anim-cue-card.has-ai.is-selected {
  border-color: rgba(245, 158, 11, 0.7);
  background: rgba(255, 251, 235, 0.9);
  box-shadow: 0 0 0 1px rgba(245, 158, 11, 0.2);
}

body.app-theme-dark .anim-cue-card,
body:not(.app-theme-light) .anim-cue-card {
  background: rgba(30, 41, 59, 0.55);
  border-color: rgba(71, 85, 105, 0.7);
}

body.app-theme-dark .anim-cue-card.is-selected,
body:not(.app-theme-light) .anim-cue-card.is-selected {
  background: rgba(99, 102, 241, 0.18);
  border-color: rgba(129, 140, 248, 0.55);
}

.anim-cue-card__accent {
  width: 3px;
  border-radius: 999px;
  flex-shrink: 0;
  align-self: stretch;
  min-height: 2.5rem;
}

.anim-cue-card__body {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.anim-cue-card__text {
  font-size: 0.75rem;
  font-weight: 550;
  color: #1e293b;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

body.app-theme-dark .anim-cue-card__text,
body:not(.app-theme-light) .anim-cue-card__text {
  color: #e2e8f0;
}

.anim-cue-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.55rem;
  font-size: 0.625rem;
  color: #64748b;
}

.anim-cue-card__time {
  font-variant-numeric: tabular-nums;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.anim-cue-card__anim {
  font-size: 0.625rem;
  font-weight: 600;
  color: #94a3b8;
}

.anim-cue-card__anim.is-set {
  color: #4f46e5;
}

.anim-cue-card__anim.is-ai {
  color: #b45309;
}

body.app-theme-dark .anim-cue-card__anim.is-set,
body:not(.app-theme-light) .anim-cue-card__anim.is-set {
  color: #a5b4fc;
}

body.app-theme-dark .anim-cue-card__anim.is-ai,
body:not(.app-theme-light) .anim-cue-card__anim.is-ai {
  color: #fbbf24;
}

.anim-preset-picker {
  min-height: 0;
}

.anim-preset-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.45rem;
  align-content: start;
}

@media (min-width: 1280px) {
  .anim-preset-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 639px) {
  .anim-preset-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.anim-preset-tile.animation-preset {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  min-height: 3.1rem;
  padding: 0.5rem 0.55rem;
  text-align: left;
  border-radius: 0.7rem;
  border: 1px solid rgba(226, 232, 240, 0.95);
  background: rgba(255, 255, 255, 0.85);
  color: inherit;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.anim-preset-tile.animation-preset:hover:not(:disabled) {
  border-color: rgba(99, 102, 241, 0.45);
  background: rgba(99, 102, 241, 0.06);
  transform: translateY(-1px);
}

.anim-preset-tile.animation-preset.is-selected,
.anim-preset-tile.animation-preset.active {
  border-color: rgba(99, 102, 241, 0.7);
  background: rgba(99, 102, 241, 0.1);
  box-shadow: 0 0 0 1px rgba(99, 102, 241, 0.2);
}

.anim-preset-tile.animation-preset.is-applied:not(.is-selected) {
  border-color: rgba(16, 185, 129, 0.45);
  background: rgba(16, 185, 129, 0.07);
}

.anim-preset-tile.animation-preset:disabled {
  opacity: 0.55;
  cursor: wait;
  transform: none;
}

body.app-theme-dark .anim-preset-tile.animation-preset,
body:not(.app-theme-light) .anim-preset-tile.animation-preset {
  background: rgba(30, 41, 59, 0.65);
  border-color: rgba(71, 85, 105, 0.8);
}

body.app-theme-dark .anim-preset-tile.animation-preset.is-selected,
body.app-theme-dark .anim-preset-tile.animation-preset.active,
body:not(.app-theme-light) .anim-preset-tile.animation-preset.is-selected,
body:not(.app-theme-light) .anim-preset-tile.animation-preset.active {
  background: rgba(99, 102, 241, 0.22);
  border-color: rgba(129, 140, 248, 0.65);
}

.anim-preset-tile__icon.animation-preset-icon {
  width: 1.85rem;
  height: 1.85rem;
  border-radius: 0.5rem;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
  line-height: 1;
  color: var(--preset-color, #64748b);
  background: color-mix(in srgb, var(--preset-color, #94a3b8) 16%, transparent);
}

.anim-preset-tile__meta {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.anim-preset-tile__name {
  font-size: 0.75rem;
  font-weight: 650;
  color: #0f172a;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.anim-preset-tile__desc {
  font-size: 0.625rem;
  color: #64748b;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

body.app-theme-dark .anim-preset-tile__name,
body:not(.app-theme-light) .anim-preset-tile__name {
  color: #f1f5f9;
}

body.app-theme-dark .anim-preset-tile__desc,
body:not(.app-theme-light) .anim-preset-tile__desc {
  color: #94a3b8;
}

.anim-preset-tile.preset-none { --preset-color: #94a3b8; }
.anim-preset-tile.preset-fade { --preset-color: #3b82f6; }
.anim-preset-tile.preset-slide { --preset-color: #06b6d4; }
.anim-preset-tile.preset-typewriter { --preset-color: #8b5cf6; }
.anim-preset-tile.preset-scale { --preset-color: #10b981; }
.anim-preset-tile.preset-bounce { --preset-color: #f59e0b; }
.anim-preset-tile.preset-glow { --preset-color: #f43f5e; }
.anim-preset-tile.preset-shake { --preset-color: #ec4899; }
.anim-preset-tile.preset-wave { --preset-color: #14b8a6; }
.anim-preset-tile.preset-color { --preset-color: #6366f1; }
.anim-preset-tile.preset-highlight { --preset-color: #f97316; }
.anim-preset-tile.preset-blur_in { --preset-color: #0ea5e9; }

/* Animation panel — live preset preview (right column bottom) */
.anim-preview-block {
  margin-top: 0.15rem;
  padding-top: 0.55rem;
  border-top: 1px solid rgba(148, 163, 184, 0.28);
}

.anim-preview-block__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.4rem;
}

.anim-preview-block__label {
  font-size: 0.625rem;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #64748b;
}

.anim-preview-block__replay {
  font-size: 0.6875rem;
  font-weight: 600;
  padding: 0.2rem 0.55rem;
  border-radius: 0.45rem;
  border: 1px solid rgba(148, 163, 184, 0.4);
  background: rgba(148, 163, 184, 0.12);
  color: #475569;
  cursor: pointer;
}

.anim-preview-block__replay:hover:not(:disabled) {
  border-color: rgba(99, 102, 241, 0.45);
  color: #4338ca;
}

.anim-preview-block__replay:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

body.app-theme-dark .anim-preview-block__replay,
body:not(.app-theme-light) .anim-preview-block__replay {
  color: #cbd5e1;
  background: rgba(51, 65, 85, 0.55);
  border-color: rgba(148, 163, 184, 0.35);
}

.anim-preview-block__stage {
  min-height: 4.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1rem;
  overflow: hidden;
}

.anim-preview-sample {
  display: inline-block;
  max-width: 100%;
  text-align: center;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.35;
  color: #f8fafc;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

.anim-preview-block__hint {
  margin: 0.35rem 0 0;
  font-size: 0.65rem;
  line-height: 1.35;
  color: #94a3b8;
}
