/* ==================== 全局重置 & 基础布局 ==================== */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

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

html,
body {
  width: 100%;
  height: 100%;
  font-family: 'Segoe UI', 'Noto Sans SC', -apple-system, BlinkMacSystemFont,
    sans-serif;
  overflow: hidden;
  background-color: #fcfcfc;
  background-image: url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGNpcmNsZSBjeD0iMiIgY3k9IjIiIHI9IjEiIGZpbGw9IiNlM2UzZTMiLz48L3N2Zz4=');
  background-repeat: repeat;
  background-size: 8px 8px;
  transition: background-color 0.3s, background-image 0.3s;
}

body.dark-mode {
  background-color: #1a1a1a;
  background-image: url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGNpcmNsZSBjeD0iMiIgY3k9IjIiIHI9IjEiIGZpbGw9IiMzMzMzMzMiLz48L3N2Zz4=');
}

#app {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
}

/* ==================== 通用输入框样式系统 ==================== */

/* 基础输入框样式 - 用于input元素内部 */
.base-input {
  width: 100%;
  height: 100%;
  background: transparent;
  border: none;
  font-family: 'Segoe UI', sans-serif;
  font-weight: 600;
  font-size: 16px;
  line-height: 24px;
  color: #333333;
  text-align: center;
  outline: none;
}

/* 隐藏数字输入框箭头 */
.base-input::-webkit-outer-spin-button,
.base-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  margin: 0;
}

.base-input[type="number"] {
  -webkit-appearance: textfield;
  -moz-appearance: textfield;
  appearance: textfield;
}

body.dark-mode .base-input {
  color: #cccccc;
}

.base-input:disabled {
  color: #D3D3D3;
}

body.dark-mode .base-input:disabled {
  color: #666666;
}

/* 输入框容器通用样式 */
.input-wrapper {
  box-sizing: border-box;
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  padding: 0 16px;
  gap: 4px;
  min-width: 50px;
  background: #F3F3F3;
  border: 2px solid #F3F3F3;
  border-radius: 12px;
  flex: none;
  flex-grow: 0;
}

.input-wrapper:hover {
  background: #FCFCFC;
  border: 2px solid #333333;
}

.input-wrapper:focus-within {
  background: #FFFFFF;
  border: 2px solid #333333;
}

body.dark-mode .input-wrapper {
  background: #3a3a3a;
  border: 2px solid #3a3a3a;
}

body.dark-mode .input-wrapper:hover {
  background: #454545;
  border: 2px solid #999999;
}

body.dark-mode .input-wrapper:focus-within {
  background: #3a3a3a;
  border: 2px solid #999999;
}

/* 尺寸修饰符 */
.input-wrapper--sm {
  height: 32px;
  border-radius: 8px;
}

.input-wrapper--md {
  height: 40px;
}

.input-wrapper--lg {
  height: 44px;
}

/* 边框修饰符 */
.input-wrapper--thin {
  border-width: 1px;
}

.input-wrapper--thin:hover,
.input-wrapper--thin:focus-within {
  border-width: 1px;
}

/* 单位标签样式 */
.input-unit {
  font-family: 'Segoe UI', sans-serif;
  font-weight: 600;
  font-size: 16px;
  line-height: 24px;
  color: #333333;
  margin: 0;
  flex-shrink: 0;
}

body.dark-mode .input-unit {
  color: #cccccc;
}

/* 单位标签 - 提示文字样式 */
.input-unit--hint {
  font-size: 11px;
  font-weight: 400;
  color: #999999;
}

body.dark-mode .input-unit--hint {
  color: #666666;
}

/* 多行输入框容器 */
.input-wrapper--textarea {
  width: 100%;
  height: auto;
  padding: 8px 12px;
  align-items: flex-start;
}

.input-wrapper--textarea-lg {
  min-height: 160px;
}

/* 多行输入框元素 */
.textarea-input {
  text-align: left;
  resize: none;
}

.textarea-input--sm {
  height: 60px;
}

.textarea-input--lg {
  height: 144px;
  overflow-y: auto;
  /* 隐藏滚动条 */
  scrollbar-width: none;
  /* Firefox */
  -ms-overflow-style: none;
  /* IE 10+ */
}

.textarea-input--lg::-webkit-scrollbar {
  display: none;
  /* Chrome, Safari, Edge */
}

/* ==================== 顶部导航栏 ==================== */

.header-logo {
  height: 24px;
  width: auto;
  margin-right: 12px;
  content: url('../img/logo.png');
  transition: all 0.2s ease;
}

.header-logo:hover {
  content: url('../img/logo_hover.png');
}

body.dark-mode .header-logo {
  content: url('../img/logo_dark.png');
}

body.dark-mode .header-logo:hover {
  content: url('../img/logo_hover.png');
}

.header-navbar {
  width: 100%;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  position: absolute;
  z-index: 100;
  transition: background-color 0.3s, border-color 0.3s, transform 0.3s ease, opacity 0.3s ease;
}

.nav-link {
  font-family: 'Noto Sans SC', sans-serif;
  font-weight: 400;
  font-size: 12px;
  line-height: 1.2;
  color: #409eff;
  text-decoration: none;
  cursor: pointer;
  transition: opacity 0.3s;
  flex-shrink: 0;
}

.nav-link:hover {
  opacity: 0.7;
  text-decoration: underline;
}

body.dark-mode .nav-link {
  color: #66b1ff;
}

.avatar-link {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;

  flex-shrink: 0;
}

.avatar-icon {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
  transition: opacity 0.3s;
}

.avatar-link:hover .avatar-icon {
  opacity: 0.7;
}

body.dark-mode .header-navbar {
  background-color: none;
  border-bottom-color: none;
}

.header-navbar-title {
  font-family: 'Noto Sans SC', sans-serif;
  font-weight: 500;
  font-size: 12px;
  line-height: 1.2;
  color: #2c3e50;
  transition: color 0.3s;
  flex: 1;
  text-align: center;
}

body.dark-mode .header-navbar-title {
  color: #e0e0e0;
}

.theme-toggle {
  width: 24px;
  height: 24px;
  border: none;
  background: none;
  cursor: pointer;
  outline: none;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.3s;
  flex-shrink: 0;
}

.theme-toggle:hover {
  opacity: 0.7;
}

.theme-toggle svg {
  width: 20px;
  height: 20px;
  fill: #2c3e50;
  transition: fill 0.3s;
}

body.dark-mode .theme-toggle svg {
  fill: #e0e0e0;
}

/* Tooltip 气泡 */
.tooltip {
  position: relative;
  display: inline-block;
}

.tooltip .tooltip-text {
  visibility: hidden;
  position: absolute;
  bottom: 125%;
  left: 50%;
  transform: translateX(-50%);
  background-color: #ffffff;
  border: 1px solid #e6e6e6;
  border-radius: 8px;
  padding: 8px;
  font-family: 'Segoe UI', sans-serif;
  font-weight: 400;
  font-size: 12px;
  line-height: 1.33;
  color: #818181;
  white-space: nowrap;
  box-shadow: 0px 6px 10px 0px rgba(51, 51, 51, 0.2);
  z-index: 1000;
  opacity: 0;
  transition: opacity 0.2s, visibility 0.2s;
}

/* 主题切换按钮的 tooltip 在下方 */
.theme-toggle .tooltip-text {
  bottom: auto;
  top: 125%;
}

body.dark-mode .tooltip .tooltip-text {
  background-color: #2a2a2a;
  border-color: #404040;
  color: #999999;
  box-shadow: 0px 6px 10px 0px rgba(0, 0, 0, 0.5);
}

.tooltip .tooltip-text::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  margin-left: -5px;
  border-width: 5px;
  border-style: solid;
  border-color: #ffffff transparent transparent transparent;
}

/* 主题切换按钮的箭头在上方 */
.theme-toggle .tooltip-text::after {
  top: auto;
  bottom: 100%;
  border-color: transparent transparent #ffffff transparent;
}

body.dark-mode .tooltip .tooltip-text::after {
  border-color: #2a2a2a transparent transparent transparent;
}

body.dark-mode .theme-toggle .tooltip-text::after {
  border-color: transparent transparent #2a2a2a transparent;
}

/* ===== 库加载进度条 ===== */
.library-loading-indicator {
  position: fixed;
  top: 36px;
  /* 在header-navbar下方 */
  left: 16px;
  z-index: 999;
  animation: slideDown 0.3s ease;
}

.library-loading-indicator .loading-text {
  font-size: 14px;
  line-height: 19px;
  color: #818181;
  font-weight: 400;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }

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

body.dark-mode .library-loading-indicator .loading-text {
  color: #999999;
}

.tooltip:hover .tooltip-text {
  visibility: visible;
  opacity: 1;
}

/* Help 图标 */
.help-button {
  width: 40px;
  height: 40px;
  border: none;
  cursor: pointer;
  outline: none;
  position: fixed;
  right: 8px;
  bottom: 8px;
  z-index: 1000;
  background: none;
  /* 使用雪碧图 - 原始80x80，通过background-size缩小50%到40x40显示 */
  background-image: url('../img/controls-sprite.png');
  background-size: 400px 360px;
  background-position: 0px 0px;
  background-repeat: no-repeat;
  transition: opacity 0.2s;
}

.help-button:hover {
  background-position: -40px 0px;
}

body.dark-mode .help-button {
  background-position: -80px 0px;
}

body.dark-mode .help-button:hover {
  background-position: -120px 0px;
}

.help-button:hover .help-popup {
  visibility: visible;
  opacity: 1;
}

.help-popup {
  visibility: hidden;
  opacity: 0;
  position: fixed;
  bottom: 48px;
  right: 10px;
  width: 360px;
  max-height: 88vh;
  background: #FFFFFF;
  border: 1px solid #e6e6e6;
  box-shadow: 0px 2px 8px rgba(51, 51, 51, 0.2);
  border-radius: 16px;
  padding: 24px;
  overflow-y: auto;
  z-index: 2000;
  transition: opacity 0.2s, visibility 0.2s;
  font-family: 'Segoe UI', 'Noto Sans SC', sans-serif;
  font-size: 13px;
  line-height: 2;
  color: #5b5b5b;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.help-popup ul {
  list-style: none;
  padding-left: 0;
  margin: 0;
}

.help-popup li {
  margin-bottom: 8px;
}

.help-popup::-webkit-scrollbar {
  display: none;
}

body.dark-mode .help-popup {
  background: #2a2a2a;
  border-color: #404040;
  color: #999999;
  box-shadow: 0px 2px 8px rgba(0, 0, 0, 0.5);
}

/* ====================  主页面容器 ==================== */

.main-page {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  position: relative;
}

/* 播放区域 */
/* 播放区域 - 主容器
 * 结构：占据除顶栏外的所有空间，使用 Flexbox 布局
 * 布局控制：
 *   - align-items: flex-start → 子元素从顶部开始排列，不自动垂直居中
 *   - justify-content: center → 子元素水平居中
 *   - padding-bottom: 190px → 为底部的 .footer-bar 留出空间，确保拖拽虚线边界不超出屏幕
 * 位置控制：子元素 .viewer-container 的垂直位置由 JS 的 offsetY 控制（通过 transform: translateY）
 */
.viewer-area {
  flex: 1;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  position: relative;
}

/* 全屏拖拽覆盖层（默认隐藏，拖拽时显示） */
.drop-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  /* 默认不阻挡点击 */
  transition: opacity 0.2s ease;
}

.drop-overlay.show {
  opacity: 1;
  pointer-events: auto;
  /* 显示时可接收拖拽事件 */
}

/* 鎷栨嫿鎻愮ず */
.drop-hint {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  outline: 4px dashed #333333;
  outline-offset: -80px;
  border-radius: 100px;
  width: 100%;
  height: 100%;
  /* margin: 60px 24px 24px 24px; */
  justify-content: center;
  box-sizing: border-box;
}

.drop-hint-text {
  font-size: 40px;
  font-weight: 500;
  color: #333333;
}

/* 暗黑模式 */
body.dark-mode .drop-overlay {
  background-color: rgba(0, 0, 0, 0.7);
}

body.dark-mode .drop-hint {
  outline: 4px dashed #F5F5F5;
}

body.dark-mode .drop-hint-text {
  color: #F5F5F5;
}

/* 播放器容器
 * 结构：包裹文件名 + 播放器画布，大小由 JS 动态设置为原始尺寸（如 1080x1920）
 * 缩放机制：
 *   - transform-origin: top center → 缩放原点在顶部中心，缩放时视觉顶部保持在y=0处
 *   - transform: translate + scale → 由 JS 动态设置，translate 控制位置，scale 控制缩放
 * 关键设计：
 *   - 使用 top center 而非 center center，避免缩放后视觉顶部位置偏移导致内容显示偏下
 *   - width/height 为原始尺寸，缩放通过 transform: scale() 实现，保证布局计算正确
 */
.viewer-container {
  position: relative;
  transform-origin: top center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
}

/* 播放器上方文件名 */
/* 播放器上方文件名
 * 位置：绝对定位于 .viewer-container 的顶部上方（bottom: 100%）
 * 缩放补偿：父容器缩放时，文件名通过 JS 设置反向 scale 保持字体大小不变
 * 显示控制：最大宽度跟随播放器宽度，超出部分显示省略号
 */
.viewer-filename {
  position: absolute;
  bottom: 100%;
  left: 0;
  margin-bottom: 8px;

  font-family: 'Segoe UI', sans-serif;
  font-weight: 400;
  font-size: 12px;
  line-height: 19px;
  color: #818181;

  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;

  transition: color 0.3s;
}

body.dark-mode .viewer-filename {
  color: #999999;
}

/* 播放器画布
 * 结构：填充父容器的 100% 宽高，内部由 SVGA/Lottie/MP4 播放器创建 canvas 元素
 * 布局：Flexbox 居中对齐，确保 canvas 在画布内居中显示
 */
.viewer-canvas {
  width: 100%;
  height: 100%;
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.viewer-canvas canvas {
  transition: background-color 0.3s;
  position: relative !important;
  top: 0 !important;
  left: 0 !important;
  transform: none !important;
  margin: 0 !important;
  /* 启用高质量图像渲染，减少锯齿 */
  image-rendering: -webkit-optimize-contrast;
  image-rendering: smooth;
  -ms-interpolation-mode: bicubic;
}

/* 绌虹姸鎬佽鐩栧眰 */
.empty-state-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  margin-bottom: 240px;
}

.empty-state-icon {
  width: 400px;
  height: 88px;
  margin-bottom: 0;
}

.empty-state-icon svg,
.empty-state-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.empty-state-slogan {
  font-family: 'Segoe UI', sans-serif;
  font-weight: 400;
  font-size: 14px;
  line-height: 1.5;
  color: #999999;
  text-align: center;
  margin-bottom: 32px;
}

.empty-state-text {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  pointer-events: auto;
  margin-bottom: 20px;
}

.empty-state-title {
  font-family: 'Segoe UI', sans-serif;
  font-weight: 400;
  font-size: 24px;
  line-height: 1.6;
  color: #5b5b5b;
  text-align: center;
}

.empty-state-subtitle {
  font-family: 'Segoe UI', sans-serif;
  font-weight: 400;
  font-size: 14px;
  line-height: 1.33;
  color: #818181;
  text-align: center;
}

body.dark-mode .empty-state-slogan {
  color: #666666;
}

body.dark-mode .empty-state-subtitle {
  color: #999999;
}

body.dark-mode .empty-state-title {
  color: #CCCCCC;
}

/* ==================== 搴曢儴娴眰 ==================== */

.footer-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 190px;
  display: flex;
  flex-direction: row;
  align-items: stretch;
  justify-content: center;
  padding: 10px;
  gap: 10px;
  transition: background-color 0.3s, height 0.3s ease;
}

/* 骞垮憡浣?*/
.ad-slot {
  display: none;
  width: 240px;
  height: 134px;
  background-color: #b1b1b1;
  border-radius: 4px;
  flex-shrink: 0;
}

/* 底部主控制区容器 */
.footer-main-wrapper {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

/* 右上角清空按钮区域*/
.footer-top-actions {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  position: absolute;
  right: 0;
  bottom: 168px;
  /* 添加全面的过渡动画：位置（300ms）、透明度（200ms） */
  transition: bottom 0.3s ease, opacity 0.2s ease, visibility 0.2s;
}

/* 沉浸模式下调整footer-top-actions位置和居中 */
.footer-main-wrapper-immersive .footer-top-actions {
  bottom: 60px;
}

/* 娌夋蹈妯″紡涓嬫ā寮忓悕绉板眳涓樉绀?*/
.footer-top-actions-immersive {
  left: 50%;
  right: auto;
  transform: translateX(-50%);
}

/* 妯″紡鍚嶇О瀹瑰櫒 */
.mode-name-box {
  display: flex;
  align-items: center;
  height: 28px;
  padding: 0 12px;
  background: #ffffff;
  border: 1px solid #F3F3F3;
  border-radius: 8px;
  /* 娌夋蹈妯″紡涓嬫贰鍑哄姩鐢?*/
  opacity: 1;
  transition: opacity 1s ease;
}

/* 娌夋蹈妯″紡涓?s鍚庢贰鍑?*/
.mode-name-box.fade-out {
  opacity: 0;
  pointer-events: none;
}

body.dark-mode .mode-name-box {
  background: #2a2a2a;
  border-color: #404040;
}

/* 妯″紡鍚嶇О鏍囩 */
.mode-name-label {
  font-family: 'Segoe UI', sans-serif;
  font-weight: 400;
  font-size: 14px;
  line-height: 28px;
  color: #333333;
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.dark-mode .mode-name-label {
  color: #e0e0e0;
}

/* 清空画布按钮（右上角） */
.clear-canvas-btn {
  box-sizing: border-box;
  display: block;
  padding: 0;
  width: 28px;
  height: 28px;
  background-color: #ffffff7d;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  outline: none;
  transition: background-color 0.15s;
  position: relative;
  overflow: hidden;
  /* 使用雪碧图 - close图标，原始80x80通过background-size缩小50%显示 */
  background-image: url('../img/controls-sprite.png');
  background-size: 410px 376px;
  background-position: -326px -166px;
  /* -320*0.5 - 6 = -326, -320*0.5 - 6 = -166 */
  background-repeat: no-repeat;
}

.clear-canvas-btn .btn-icon-close {
  display: none;
}

.clear-canvas-btn:hover {
  background-color: #FF8888;
}

.clear-canvas-btn:active {
  background-color: #FF5252;
}

/* 暗黑模式 */
body.dark-mode .clear-canvas-btn {
  background-color: #4040407d;
  background-position: -366px -166px;
  /* -360*0.5 - 6 = -366 */
}

body.dark-mode .clear-canvas-btn .sprite-close {
  display: none;
}

body.dark-mode .clear-canvas-btn:hover {
  background-color: #FF8888;
  background-position: -326px -166px;
  /* hover时用回黑色图标（因为背景变红了） */
}

body.dark-mode .clear-canvas-btn:hover .sprite-close {
  display: none;
}

body.dark-mode .clear-canvas-btn:active {
  background-color: #FF5252;
  background-position: -326px -166px;
}

body.dark-mode .clear-canvas-btn:active .sprite-close {
  display: none;
}

/* 底部主控制区 */
.footer-main {
  flex: 0 1 auto;
  min-width: 1000px;
  max-width: fit-content;
  height: 170px;
  background-color: #ffffff;
  border: 1px solid #e6e6e6;
  border-radius: 16px;
  box-shadow: 0px 10px 32px 0px rgba(51, 51, 51, 0.2);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
  bottom: 0px;
  /* 添加全面的过渡动画：宽度、高度、位置（300ms） */
  transition: background-color 0.3s, border-color 0.3s, box-shadow 0.3s,
    min-width 0.3s ease, max-width 0.3s ease,
    height 0.3s ease, bottom 0.3s ease;
}

/* 空状态：宽度300px，居中*/
.footer-main.footer-main-empty {
  min-width: 240px;
  max-width: 600px;
  justify-content: center;
  align-items: center;
  height: 100px;
  position: relative;
  bottom: 160px;
  /* 空白页特殊样式：深色背景和描边 */
  background-color: #333333;
  border-color: #333333;
  cursor: pointer;
}

/* 空白页状态下的文字颜色覆盖 */
.footer-main.footer-main-empty .footer-empty-tip-sub {
  color: #fcfcfc;
}

.footer-main.footer-main-empty .click-upload-text {
  color: #fcfcfc;
}

.footer-main.footer-main-empty .click-upload-text:hover {
  color: #ffffff;
}

/* 空状态样式*/
.footer-empty-tip {
  display: flex;
  align-items: center;
  justify-content: center;
}

.footer-empty-tip-sub {
  font-weight: 700;
  font-size: 20px;
  line-height: 27px;
  text-align: center;
  color: #333333;
}

body.dark-mode .footer-empty-tip-sub {
  color: #E6E6E6;
}

.click-upload-text {
  color: #333333;
  cursor: pointer;
  margin-top: 8px;
  font-size: 20px;
  font-weight: 700;
}

.click-upload-text:hover {
  color: #000000;
  text-decoration: underline;
}

body.dark-mode .click-upload-text {
  color: #f5f5f5;
}

body.dark-mode .click-upload-text:hover {
  color: #FFFFFF;
}

body.dark-mode .footer-main {
  background-color: #2a2a2a;
  border-color: #404040;
  box-shadow: 0px 10px 32px 0px rgba(0, 0, 0, 0.5);
}

/* 底部内容布局容器 */
.footer-content {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  justify-content: space-between;
  transition: opacity 0.2s ease;
}

/* 第一行：模块切换 + 清空按钮 */
.footer-row-tabs {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  height: auto;
}

.footer-tabs {
  display: flex;
  flex-direction: row;
  gap: 16px;
}

.footer-actions {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
}

/* 底部浮层中的大按钮不使用flex:1，宽度自适应 */
.footer-actions .btn-large-primary,
.footer-actions .btn-large-secondary {
  flex: none;
  width: auto;
}

.tab-btn {
  height: 28px;
  padding: 0 8px;
  border-radius: 8px;
  border: 1px solid #f3f3f3;
  background-color: #ffffff;
  font-family: 'Segoe UI', sans-serif;
  font-weight: 400;
  font-size: 16px;
  line-height: 1.33;
  color: #333333;
  cursor: pointer;
  outline: none;
  transition: all 0.2s;
}

body.dark-mode .tab-btn {
  border-color: #404040;
  background-color: #1a1a1a;
  color: #e0e0e0;
}

.tab-btn:hover {
  background-color: #fcfcfc;
  border-color: #e6e6e6;
}

body.dark-mode .tab-btn:hover {
  background-color: #333333;
  border-color: #555555;
}

.tab-btn.is-active {
  background-color: #5b5b5b;
  border-color: #5b5b5b;
  color: #ffffff;
}

body.dark-mode .tab-btn.is-active {
  background-color: #666666;
  border-color: #666666;
}

.tab-btn.is-active:hover {
  border-color: #333333;
}

.tab-btn.is-active:active {
  background-color: #333333;
}

.close-btn {
  width: 28px;
  height: 28px;
  border: none;
  background-color: transparent;
  cursor: pointer;
  outline: none;
  position: relative;
}

.close-btn::before,
.close-btn::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 14px;
  height: 2px;
  background-color: #d3d3d3;
  transition: background-color 0.2s;
}

.close-btn::before {
  transform: translate(-50%, -50%) rotate(45deg);
}

.close-btn::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.close-btn:hover::before,
.close-btn:hover::after {
  background-color: #5b5b5b;
}

.close-btn:active::before,
.close-btn:active::after {
  background-color: #333333;
}

/* 第二行：文件信息 */
.footer-row-info {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 16px;
  min-height: 22px;
}

.info-item {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0;
}

.info-item-label {
  font-family: 'Segoe UI', sans-serif;
  font-style: normal;
  font-weight: 400;
  font-size: 14px;
  line-height: 22px;
  color: #818181;
  flex-shrink: 0;
  transition: color 0.3s;
}

body.dark-mode .info-item-label {
  color: #999999;
}

.info-item-value {
  font-family: 'Segoe UI', sans-serif;
  font-style: normal;
  font-weight: 600;
  font-size: 14px;
  line-height: 22px;
  color: #333333;
  transition: color 0.3s;
}

body.dark-mode .info-item-value {
  color: #e0e0e0;
}

/* 第三行：控制区域 */
.footer-row-controls {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.controls-left {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 12px;
}

.controls-center {
  flex: 1;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: right;
  gap: 8px;
}

.controls-right {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 6px;
}

/* 颜色选择按钮 */
.color-btn {
  width: 28px;
  height: 28px;
  border-radius: 16px;
  border: 1px solid #e6e6e6;
  cursor: pointer;
  outline: none;
  transition: border-color 0.2s;
}

.color-btn:hover {
  border-color: #5b5b5b;
}

.color-btn.is-active {
  border-color: #333333;
  border-width: 3px;
}

/* 播放/暂停按钮 */
.play-btn {
  width: 28px;
  height: 28px;
  border-radius: 4px;
  border: none;
  background-color: transparent;
  /* 使用雪碧图 - 原始80x80，通过background-size缩小50%显示 */
  background-image: url('../img/controls-sprite.png');
  background-size: 400px 360px;
  background-position: -160px 0px;
  background-repeat: no-repeat;
  cursor: pointer;
  outline: none;
}

.play-btn:hover {
  background-position: -200px 0px;
}

.play-btn:active {
  background-position: -240px 0px;
}

/* 播放中状态（暂停按钮） */
.play-btn.is-playing {
  background-position: 0px -40px;
}

.play-btn.is-playing:hover {
  background-position: -40px -40px;
}

.play-btn.is-playing:active {
  background-position: -80px -40px;
}

/* 暗黑模式 */
body.dark-mode .play-btn {
  background-position: -280px 0px;
}

body.dark-mode .play-btn:hover {
  background-position: -320px 0px;
}

body.dark-mode .play-btn:active {
  background-position: -360px 0px;
}

body.dark-mode .play-btn.is-playing {
  background-position: -120px -40px;
}

body.dark-mode .play-btn.is-playing:hover {
  background-position: -160px -40px;
}

body.dark-mode .play-btn.is-playing:active {
  background-position: -200px -40px;
}

/* 静音按钮 */
.mute-btn {
  width: 28px;
  height: 28px;
  border-radius: 4px;
  border: none;
  background-color: transparent;
  /* 使用雪碧图 - 原始80x80，通过background-size缩小50%显示 */
  background-image: url('../img/controls-sprite.png');
  background-size: 400px 360px;
  background-position: -240px -40px;
  background-repeat: no-repeat;
  cursor: pointer;
  outline: none;
  margin-left: 4px;
}

.mute-btn:hover {
  background-position: -280px -40px;
}

.mute-btn:active {
  background-position: -320px -40px;
}

/* 闈欓煶鐘舵€侊紙宸插紑鍚潤闊筹級 */
.mute-btn.is-muted {
  background-position: -360px -40px;
}

.mute-btn.is-muted:hover {
  background-position: 0px -80px;
}

.mute-btn.is-muted:active {
  background-position: -40px -80px;
}

/* 禁用状态（无音频） */
.mute-btn.is-disabled {
  background-position: -80px -80px;
  cursor: not-allowed;
  pointer-events: none;
}

/* 禁用状态不响应hover和active */
.mute-btn.is-disabled:hover,
.mute-btn.is-disabled:active {
  background-position: -80px -80px;
}

/* 暗黑模式 */
body.dark-mode .mute-btn {
  background-position: -120px -80px;
}

body.dark-mode .mute-btn:hover {
  background-position: -160px -80px;
}

body.dark-mode .mute-btn:active {
  background-position: -200px -80px;
}

body.dark-mode .mute-btn.is-muted {
  background-position: -240px -80px;
}

body.dark-mode .mute-btn.is-muted:hover {
  background-position: -280px -80px;
}

body.dark-mode .mute-btn.is-muted:active {
  background-position: -320px -80px;
}

body.dark-mode .mute-btn.is-disabled {
  background-position: -360px -80px;
}

/* 暗黑模式禁用状态不响应hover和active */
body.dark-mode .mute-btn.is-disabled:hover,
body.dark-mode .mute-btn.is-disabled:active {
  background-position: -360px -80px;
}

/* 进度条 */
.progress-bar {
  width: 260px;
  height: 16px;
  background-color: #f3f3f3;
  border-radius: 0;
  position: relative;
  cursor: pointer;
  border-radius: 20px;
}

.progress-bar:hover {
  border-color: #E6E6E6;
}

body.dark-mode .progress-bar {
  background-color: #5B5B5B;
}

body.dark-mode .progress-bar:hover {
  border-color: #6D6D6D;
}

.progress-fill {
  height: 100%;
  background-color: #5B5B5B;
  border-radius: 0;
  transition: width 0.1s;
  pointer-events: none;
  border-radius: 10px 0 0 10px;
}

.progress-fill:hover {
  background-color: #333333;
}

body.dark-mode .progress-fill {
  background-color: #EBEBEB;
}

body.dark-mode .progress-fill:hover {
  background-color: #f5f5f5;
}

/* 进度条滑块 */
.progress-thumb {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 16px;
  height: 16px;
  background-color: #5B5B5B;

  border-radius: 50%;
  cursor: grab;
  transition: left 0.1s, transform 0.1s, box-shadow 0.1s;
  z-index: 2;
  pointer-events: auto;
}

body.dark-mode .progress-thumb {
  background-color: #EBEBEB;
}

body.dark-mode .progress-thumb:hover {
  background-color: #409eff;
}

.progress-thumb:hover {
  transform: translate(-50%, -50%) scale(1.2);
  box-shadow: 0 0 0 4px rgba(64, 158, 255, 0.2);
  background-color: #409eff;
}

.progress-thumb:active {
  cursor: grabbing;
  transform: translate(-50%, -50%) scale(1.3);
  box-shadow: 0 0 0 6px rgba(64, 158, 255, 0.3);
  background-color: #409eff;
}

.progress-text {
  margin-left: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'Segoe UI', sans-serif;
  font-weight: 400;
  font-size: 14px;
  line-height: 1.33;
  color: #818181;
  white-space: nowrap;
}

.progress-time {
  min-width: 45px;
}

.progress-frames {
  min-width: 60px;
}

/* ==================== 通用按钮系统 ==================== */

/* 中按钮通用样式（28px高度，8px圆角） */
.btn-primary,
.btn-secondary {
  height: 28px;
  padding: 0 16px;
  border-radius: 8px;
  border: 1px solid transparent;
  font-family: 'Segoe UI', sans-serif;
  font-weight: 400;
  font-size: 14px;
  line-height: 1.57;
  text-align: center;
  cursor: pointer;
  outline: none;
  transition: all 0.2s;
  white-space: nowrap;
}

/* 中按钮 - 主要按钮（btn01_Medium） */
.btn-primary {
  background-color: #ffffff;
  border-color: #e6e6e6;
  color: #333333;
}

body.dark-mode .btn-primary {
  background-color: #1a1a1a;
  border-color: #404040;
  color: #e0e0e0;
}

.btn-primary:hover {
  background-color: #e6e6e6;
  border-color: #5b5b5b;
}

body.dark-mode .btn-primary:hover {
  background-color: #333333;
  border-color: #666666;
}

.btn-primary:active {
  background-color: #d3d3d3;
  border-color: #333333;
}

body.dark-mode .btn-primary:active {
  background-color: #404040;
  border-color: #888888;
}

/* 中按钮 - 次要按钮（btn02_Medium） */
.btn-secondary {
  background-color: #5b5b5b;
  border-color: #5b5b5b;
  color: #ffffff;
}

.btn-secondary:hover {
  background-color: #5b5b5b;
  border-color: #333333;
}

.btn-secondary:active {
  background-color: #333333;
  border-color: #333333;
}

/* 大按钮通用样式（44px高度，16px圆角） */
.btn-large-primary,
.btn-large-secondary {
  height: 44px;
  padding: 0 20px;
  border-radius: 12px;
  border: 1px solid transparent;
  font-family: 'Segoe UI', sans-serif;
  font-weight: 400;
  font-size: 14px;
  line-height: 1.57;
  text-align: center;
  cursor: pointer;
  outline: none;
  transition: all 0.2s;
  white-space: nowrap;
  min-width: 110px;
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  width: auto;
}

/* 大按钮 - 主要按钮（btn01_Large） */
.btn-large-primary {
  background-color: #ffffff;
  border-color: #e6e6e6;
  color: #333333;
}

body.dark-mode .btn-large-primary {
  background-color: #1a1a1a;
  border-color: #404040;
  color: #e0e0e0;
}

.btn-large-primary:hover {
  background-color: #f3f3f3;
  border-color: #d3d3d3;
}

body.dark-mode .btn-large-primary:hover {
  background-color: #333333;
  border-color: #666666;
}

.btn-large-primary:active {
  background-color: #d3d3d3;
  border-color: #333333;
}

body.dark-mode .btn-large-primary:active {
  background-color: #404040;
  border-color: #888888;
}

.btn-large-primary:disabled {
  background-color: #ffffff;
  border-color: #f3f3f3;
  color: #aaaaaa;
  cursor: not-allowed;
  opacity: 1;
}

body.dark-mode .btn-large-primary:disabled {
  background-color: #1a1a1a;
  border-color: #2a2a2a;
  color: #666666;
}

/* AI生图按钮图标样式（24px显示） */
.btn-icon-ai {
  width: 24px;
  height: 24px;
}

/* AI图标位置调整（原始640px, 560px -> 缩小到1/2 = -320px, -280px） */
.sprite-AI-img.btn-icon-ai {
  background-position: -320px -280px;
  background-size: 400px 360px;
  background-repeat: no-repeat;
  width: 24px;
  height: 24px;
}

/* AI图标hover状态（原始720px, 560px -> 缩小到1/2 = -360px, -280px） */
.sprite-AI-img.btn-icon-ai:hover {
  background-position: -360px -280px;
}

/* 暗黑模式下的AI图标（原始0px, 640px -> 缩小到1/2 = 0px, -320px） */
body.dark-mode .sprite-AI-img.btn-icon-ai {
  background-position: 0px -320px;
}

/* 暗黑模式hover状态（原始80px, 640px -> 缩小到1/2 = -40px, -320px） */
body.dark-mode .sprite-AI-img.btn-icon-ai:hover {
  background-position: -40px -320px;
}

/* AI生图按钮特殊样式：宽度自适应，图标居中显示 */
.btn-large-primary.btn-ai-generate {
  min-width: 44px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* 恢复原图按钮特殊 样式 */
.btn-editor-recover {
  width: 44px;
  height: 44px;
  padding: 0;
  margin: 0;
  min-width: 44px;
}

.icon-editor-recover {
  background-image: url('../img/controls-sprite.png');
  background-repeat: no-repeat;
  background-position: -232px -152px;
  background-size: 400px 360px;
  width: 40px;
  height: 40px;
  transform: scale(1.4);
}

/* 恢复原图按钮特殊样式
.btn-editor-recover {
  background-image: url('../img/controls-sprite.png');
  background-repeat: no-repeat;
  background-position: -235px -154px;
  background-size: 400px 360px;
  width: 40px;
  height: 40px;
  transform: scale(1.2);
} */

/* 大按钮 - 次要按钮（btn02_Large） */
.btn-large-secondary {
  background-color: #5b5b5b;
  border-color: #5b5b5b;
  color: #ffffff;
}

.btn-large-secondary:hover {
  background-color: #555555;
  border-color: #000000;
}

.btn-large-secondary:active {
  background-color: #000000;
  border-color: #000000;
}

.btn-large-secondary:disabled {
  background-color: rgba(91, 91, 91, 0.3);
  border-color: rgba(91, 91, 91, 0.3);
  color: #ffffff;
  cursor: not-allowed;
  opacity: 1;
}

/* 缩放按钮 */
.zoom-btn {
  width: 28px;
  height: 28px;
  border: none;
  background-color: transparent;
  /* 使用雪碧图 - 原始80x80，通过background-size缩小50%显示 */
  background-image: url('../img/controls-sprite.png');
  background-size: 400px 360px;
  background-repeat: no-repeat;
  cursor: pointer;
  outline: none;
  padding: 0;
  margin: 0;
}

/* 缩小按钮 - 通过data属性区分 */
.zoom-btn[data-type="out"] {
  background-position: -80px -120px;
}

.zoom-btn[data-type="out"]:hover {
  background-position: -120px -120px;
}

body.dark-mode .zoom-btn[data-type="out"] {
  background-position: -240px -120px;
}

body.dark-mode .zoom-btn[data-type="out"]:hover {
  background-position: -280px -120px;
}

/* 放大按钮 */
.zoom-btn[data-type="in"] {
  background-position: 0px -120px;
}

.zoom-btn[data-type="in"]:hover {
  background-position: -40px -120px;
}

body.dark-mode .zoom-btn[data-type="in"] {
  background-position: -160px -120px;
}

body.dark-mode .zoom-btn[data-type="in"]:hover {
  background-position: -200px -120px;
}

/* 显示缩放百分比*/
.scale-percentage {
  width: 60px;
  font-family: 'Segoe UI', sans-serif;
  font-weight: 400;
  font-size: 14px;
  line-height: 1.33;
  color: #818181;
  text-align: right;
  transition: color 0.3s;
}

body.dark-mode .scale-percentage {
  color: #999999;
}

/* 1:1按钮（默认状态：适应屏幕高度模式下显示） */
.reset-scale-btn {
  width: 28px;
  height: 28px;
  border: none;
  background-color: transparent;
  /* 使用雪碧图 - 原始80x80，通过background-size缩小50%显示 */
  background-image: url('../img/controls-sprite.png');
  background-size: 400px 360px;
  background-position: -320px -120px;
  /* one2one.png */
  background-repeat: no-repeat;
  cursor: pointer;
  outline: none;
  padding: 0;
}

.reset-scale-btn:hover {
  background-position: -360px -120px;
  /* one2one_hover.png */
}

body.dark-mode .reset-scale-btn {
  background-position: 0px -160px;
  /* one2one_dark.png */
}

body.dark-mode .reset-scale-btn:hover {
  background-position: -40px -160px;
  /* one2one_hover_dark.png */
}

/* 适应屏幕高度按钮（当1:1模式下显示） */
.reset-scale-btn.is-contain {
  background-position: -80px -160px;
  /* contain.png */
}

.reset-scale-btn.is-contain:hover {
  background-position: -120px -160px;
  /* contain_hover.png */
}

body.dark-mode .reset-scale-btn.is-contain {
  background-position: -160px -160px;
  /* contain_dark.png */
}

body.dark-mode .reset-scale-btn.is-contain:hover {
  background-position: -200px -160px;
  /* contain_hover_dark.png */
}

/* ==================== 娌夋蹈妯″紡鏍峰紡 ==================== */

/* 鏍囬鏍忛殣钘忓姩鐢?*/
.header-navbar.header-hidden {
  transform: translateY(-100%);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

/* 搴曢儴娴眰娌夋蹈妯″紡 */
.footer-bar.footer-immersive {
  height: 88px;
  transition: height 0.3s ease;
}

/* wrapper娌夋蹈妯″紡 */
.footer-main-wrapper.footer-main-wrapper-immersive {
  /* 沉浸模式下调整布局：mini浮层居中，footer-top-actions保持右对齐 */
  align-items: center;
}

/* Mini浮层按钮（进入沉浸模式） */
.minimize-btn {
  width: 28px;
  height: 28px;
  border: none;
  background-color: transparent;
  background-image: url('../img/controls-sprite.png');
  background-size: 400px 360px;
  background-position: -80px -200px;
  /* minimize.png */
  background-repeat: no-repeat;
  cursor: pointer;
  outline: none;
  flex-shrink: 0;
}

.minimize-btn:hover {
  background-position: -120px -200px;
  /* minimize_hover.png */
}

body.dark-mode .minimize-btn {
  background-position: -160px -200px;
  /* minimize_dark.png */
}

body.dark-mode .minimize-btn:hover {
  background-position: -200px -200px;
  /* minimize_hover_dark.png */
}

/* Mini浮层容器 */
.footer-mini {
  display: flex;
  align-items: center;

  gap: 12px;
  height: 68px;
  padding: 0 20px;
  background-color: #ffffff;
  border: 1px solid #e6e6e6;
  border-radius: 16px;
  box-shadow: 0px 10px 32px 0px rgba(51, 51, 51, 0.2);
  transition: background-color 0.3s, border-color 0.3s, box-shadow 0.3s;
}

body.dark-mode .footer-mini {
  background-color: #2a2a2a;
  border-color: #404040;
  box-shadow: 0px 10px 32px 0px rgba(0, 0, 0, 0.4);
}

/* Mini浮层播放按钮 */
.mini-play-btn {
  width: 28px;
  height: 28px;
  border: none;
  background-color: transparent;
  background-image: url('../img/controls-sprite.png');
  background-size: 400px 360px;
  background-position: 0px -240px;
  /* mini_play.png */
  background-repeat: no-repeat;
  cursor: pointer;
  outline: none;
  flex-shrink: 0;
}

.mini-play-btn:hover {
  background-position: -40px -240px;
  /* mini_play_hover.png */
}

.mini-play-btn.is-playing {
  background-position: -160px -240px;
  /* mini_stop.png */
}

.mini-play-btn.is-playing:hover {
  background-position: -200px -240px;
  /* mini_stop_hover.png */
}

body.dark-mode .mini-play-btn {
  background-position: -80px -240px;
  /* mini_play_dark.png */
}

body.dark-mode .mini-play-btn:hover {
  background-position: -120px -240px;
  /* mini_play_hover_dark.png */
}

body.dark-mode .mini-play-btn.is-playing {
  background-position: -240px -240px;
  /* mini_stop_dark.png */
}

body.dark-mode .mini-play-btn.is-playing:hover {
  background-position: -280px -240px;
  /* mini_stop_hover_dark.png */
}

/* Mini娴眰闈欓煶鎸夐挳 */
.mini-mute-btn {
  width: 28px;
  height: 28px;
  border: none;
  background-color: transparent;
  background-image: url('../img/controls-sprite.png');
  background-size: 400px 360px;
  background-position: -320px -240px;
  /* mini_mute.png */
  background-repeat: no-repeat;
  cursor: pointer;
  outline: none;
  flex-shrink: 0;
}

.mini-mute-btn:hover {
  background-position: -360px -240px;
  /* mini_mute_hover.png */
}

.mini-mute-btn.is-muted {
  background-position: -160px -280px;
  /* mini_mute_on.png */
}

.mini-mute-btn.is-muted:hover {
  background-position: -200px -280px;
  /* mini_mute_on_hover.png */
}

.mini-mute-btn.is-disabled {
  background-position: -80px -280px;
  /* mini_mute_disabled.png */
  cursor: not-allowed;
  pointer-events: none;
}

body.dark-mode .mini-mute-btn {
  background-position: 0px -280px;
  /* mini_mute_dark.png */
}

body.dark-mode .mini-mute-btn:hover {
  background-position: -40px -280px;
  /* mini_mute_hover_dark.png */
}

body.dark-mode .mini-mute-btn.is-muted {
  background-position: -240px -280px;
  /* mini_mute_on_dark.png */
}

body.dark-mode .mini-mute-btn.is-muted:hover {
  background-position: -280px -280px;
  /* mini_mute_on_hover_dark.png */
}

body.dark-mode .mini-mute-btn.is-disabled {
  background-position: -120px -280px;
  /* mini_mute_disabled_dark.png */
}

/* Mini浮层缩放按钮（1:1/适应屏幕） */
.mini-scale-btn {
  width: 28px;
  height: 28px;
  border: none;
  background-color: transparent;
  background-image: url('../img/controls-sprite.png');
  background-size: 400px 360px;
  background-position: -320px -120px;
  /* one2one.png */
  background-repeat: no-repeat;
  cursor: pointer;
  outline: none;
  flex-shrink: 0;
}

.mini-scale-btn:hover {
  background-position: -360px -120px;
  /* one2one_hover.png */
}

.mini-scale-btn.is-contain {
  background-position: -80px -160px;
  /* contain.png */
}

.mini-scale-btn.is-contain:hover {
  background-position: -120px -160px;
  /* contain_hover.png */
}

body.dark-mode .mini-scale-btn {
  background-position: 0px -160px;
  /* one2one_dark.png */
}

body.dark-mode .mini-scale-btn:hover {
  background-position: -40px -160px;
  /* one2one_hover_dark.png */
}

body.dark-mode .mini-scale-btn.is-contain {
  background-position: -160px -160px;
  /* contain_dark.png */
}

body.dark-mode .mini-scale-btn.is-contain:hover {
  background-position: -200px -160px;
  /* contain_hover_dark.png */
}

/* Mini浮层最大化按钮（退出沉浸模式） */
.mini-maximize-btn {
  width: 28px;
  height: 28px;
  border: none;
  background-color: transparent;
  background-image: url('../img/controls-sprite.png');
  background-size: 400px 360px;
  background-position: -240px -200px;
  /* maximize.png */
  background-repeat: no-repeat;
  cursor: pointer;
  outline: none;
  flex-shrink: 0;
}

.mini-maximize-btn:hover {
  background-position: -280px -200px;
  /* maximize_hover.png */
}

body.dark-mode .mini-maximize-btn {
  background-position: -320px -200px;
  /* maximize_dark.png */
}

body.dark-mode .mini-maximize-btn:hover {
  background-position: -360px -200px;
  /* maximize_hover_dark.png */
}

/* ==================== 沉浸模式样式结束 ==================== */

/* 清空/关闭按钮 (btn03样式) */
.clear-btn {
  width: 32px;
  height: 28px;
  border: 1px solid #e6e6e6;
  border-radius: 8px;
  background-color: #ffffff;
  cursor: pointer;
  outline: none;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s, border-color 0.2s;
  position: relative;
}

.clear-btn:hover {
  background-color: #e6e6e6;
  border-color: #5b5b5b;
}

.clear-btn:active {
  background-color: #d3d3d3;
  border-color: #333333;
}

.clear-btn svg {
  width: 24px;
  height: 24px;
}

.clear-btn svg path {
  stroke: #333333;
  transition: stroke 0.3s;
}

body.dark-mode .clear-btn {
  background-color: #1a1a1a;
  border-color: #404040;
}

body.dark-mode .clear-btn:hover {
  background-color: #333333;
  border-color: #666666;
}

body.dark-mode .clear-btn:active {
  background-color: #404040;
  border-color: #888888;
}

body.dark-mode .clear-btn svg path {
  stroke: #e0e0e0;
}

/* 空状态底部提示 */
.footer-empty-tip {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 16px;
}

.footer-empty-tip-main {
  font-family: 'Segoe UI', sans-serif;
  font-weight: 400;
  font-size: 16px;
  line-height: 1.5;
  color: #000000;
  transition: color 0.3s;
}

body.dark-mode .footer-empty-tip-main {
  color: #e0e0e0;
}

.footer-empty-tip-sub {
  font-family: 'Segoe UI', sans-serif;
  font-weight: 400;
  font-size: 14px;
  line-height: 1.33;
  color: #80868c;
  transition: color 0.3s;
}

body.dark-mode .footer-empty-tip-sub {
  color: #999999;
}

/* ==================== 绱犳潗寮圭獥 ==================== */

.material-panel {
  position: fixed;
  top: 0;
  right: -400px;
  width: 400px;
  height: 85%;
  display: flex;
  flex-direction: row;
  align-items: center;
  padding: 10px;
  transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1000;
}

.material-panel.show {
  right: 0;
}

.material-panel-container {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: 380px;
  padding: 20px;
  gap: 16px;
  height: 100%;
  max-height: 100%;
  background: #FFFFFF;
  border: 1px solid #e6e6e6;
  box-shadow: none;
  border-radius: 16px;
  flex: none;
  align-self: stretch;
  transition: box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.material-panel.show .material-panel-container {
  box-shadow: 0px 10px 32px rgba(51, 51, 51, 0.2);
}

body.dark-mode .material-panel-container {
  background: #1a1a1a;
  border-color: #404040;
}

body.dark-mode .material-panel.show .material-panel-container {
  box-shadow: 0px 10px 32px rgba(0, 0, 0, 0.5);
}

/* 顶部统计信息 - Figma设计还原 */
.material-panel-stats {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 0px;
  gap: 12px;
  width: auto;
  flex: none;
  order: 0;
  align-self: stretch;
  transition: color 0.3s;
}

/* 鏍囬锛氱礌鏉愬浘鏇挎崲 */
.stats-header {
  font-family: 'Segoe UI', sans-serif;
  font-style: normal;
  font-weight: 400;
  font-size: 12px;
  line-height: 16px;
  color: #818181;
  align-self: stretch;
}

body.dark-mode .stats-header {
  color: #999999;
}

/* 分隔线 */
.stats-divider {
  width: 100%;
  height: 1px;
  background: #F3F3F3;
  flex-shrink: 0;
}

body.dark-mode .stats-divider {
  background: #404040;
}

/* 内容区 */
.stats-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  align-self: stretch;
}

.stats-title {
  font-family: 'Segoe UI', sans-serif;
  font-style: normal;
  font-weight: 400;
  font-size: 14px;
  line-height: 19px;
  color: #333333;
  align-self: stretch;
  transition: color 0.3s;
}

body.dark-mode .stats-title {
  color: #e0e0e0;
}

.stats-help {
  font-family: 'Segoe UI', sans-serif;
  font-style: normal;
  font-weight: 400;
  font-size: 12px;
  line-height: 16px;
  color: #AAAAAA;
  align-self: stretch;
  transition: color 0.3s;
}

body.dark-mode .stats-help {
  color: #666666;
}

/* 鎼滅储妗?*/
.material-search {
  width: 100%;
  margin-top: 0;
  flex: none;
  order: 1;
  align-self: stretch;
}

.material-search-input {
  width: 100%;
  height: 32px;
  padding: 0 12px;
  border: 1px solid #e6e6e6;
  border-radius: 8px;
  font-family: 'Segoe UI';
  font-size: 14px;
  color: #333333;
  background: #ffffff;
  outline: none;
  /* 移除hover过渡动画，直接切换 */
}

.material-search-input::placeholder {
  color: #999999;
}

.material-search-input:focus {
  border-color: #00b4ff;
}

body.dark-mode .material-search-input {
  background: #2a2a2a;
  border-color: #444444;
  color: #e0e0e0;
}

body.dark-mode .material-search-input::placeholder {
  color: #666666;
}

body.dark-mode .material-search-input:focus {
  border-color: #00b4ff;
}

/* 婊氬姩鍖哄煙 */
.material-panel-scroll {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  min-height: auto;
  align-items: flex-start;
  align-content: flex-start;
  padding: 0px;
  gap: 16px 10px;
  width: 100%;
  flex: 1;
  overflow-y: overlay;
  overflow-x: hidden;
}

/* 婊氬姩鏉℃牱寮?- 榛樿闅愯棌 */
.material-panel-scroll::-webkit-scrollbar {
  width: 6px;
}

.material-panel-scroll::-webkit-scrollbar-track {
  background: transparent;
}

.material-panel-scroll::-webkit-scrollbar-thumb {
  background: transparent;
  border-radius: 3px;
  transition: background 0.2s;
}

.material-panel-scroll:hover::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.2);
}

.material-panel-scroll::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.3);
}

body.dark-mode .material-panel-scroll:hover::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
}

body.dark-mode .material-panel-scroll::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}

.material-list {
  display: contents;
}

/* 素材卡片（列表样式）*/
.material-item {
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: 161px;
  align-items: flex-start;
  padding: 0px;
  gap: 10px;
  height: auto;
  flex: none;
}

/* 缩略图 */
.material-thumb {
  width: 161px;
  height: 100px;
  /* background 由 Vue 动态绑定 */
  flex: none;
  order: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: background-color 0.3s;
}

.material-thumb img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

/* 绱犳潗淇℃伅鍖?(Frame 17) */
.material-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: 161px;
  align-items: flex-start;
  padding: 0px;
  gap: 4px;
  height: 59px;
  flex: none;
  order: 1;
  align-self: stretch;
}

/* 素材名称行 */
.material-name-row {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  width: 161px;
  flex: none;
  order: 0;
  align-self: stretch;
}

.material-name {
  flex: 1;
  height: 19px;
  font-family: 'Segoe UI';
  font-style: normal;
  font-weight: 400;
  font-size: 14px;
  line-height: 19px;
  display: flex;
  align-items: center;
  color: #333333;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: color 0.3s;
}

body.dark-mode .material-name {
  color: #e0e0e0;
}

/* 复制按钮 */
.material-btn-copy {
  width: 20px;
  height: 20px;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  opacity: 0.6;
  transition: opacity 0.3s;
}

.material-btn-copy:hover {
  opacity: 1;
}

.material-btn-copy svg rect {
  transition: stroke 0.3s, fill 0.3s;
}

body.dark-mode .material-btn-copy svg rect {
  stroke: #999999;
  fill: #2a2a2a;
}

body.dark-mode .material-btn-copy svg rect:first-child {
  fill: none;
}

.material-meta {
  width: 161px;
  height: 16px;
  font-family: 'Segoe UI';
  font-style: normal;
  font-weight: 400;
  font-size: 12px;
  line-height: 16px;
  display: flex;
  align-items: center;
  color: #333333;
  flex: none;
  align-self: stretch;
}

body.dark-mode .material-meta {
  color: #8e8e93;
}

/* 鎿嶄綔鎸夐挳鍖?(Frame 29) */
.material-actions {
  width: 161px;
  height: 28px;
  flex: none;
  order: 2;
  align-self: stretch;
  position: relative;
  display: flex;
  justify-content: flex-start;
  flex-direction: row;
  gap: 4px;
}

/* 鏇挎崲鎸夐挳 (btn01_Medium) */
.material-btn-replace {
  box-sizing: border-box;
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  padding: 2px 6px;
  width: auto;
  min-width: 60px;
  height: 28px;
  background: #FFFFFF;
  border: 1px solid #e6e6e6;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.material-btn-replace span {
  width: auto;
  min-width: 50px;
  height: 22px;
  font-family: 'Segoe UI';
  font-style: normal;
  font-weight: 400;
  font-size: 13px;
  line-height: 22px;
  display: flex;
  align-items: center;
  text-align: center;
  color: #333333;
  flex: none;
  order: 0;
}

.material-btn-replace:hover {
  background: #F5F5F7;
  border-color: #CCCCCC;
}

.material-btn-replace:active {
  background: #E8E8ED;
  transform: scale(0.98);
}

body.dark-mode .material-btn-replace {
  background: #2d2d2d;
  border-color: #505050;
}

body.dark-mode .material-btn-replace span {
  color: #e0e0e0;
}

body.dark-mode .material-btn-replace:hover {
  background: #3a3a3a;
  border-color: #606060;
}

/* 关闭/恢复按钮 (btn03_Medium) */
.material-btn-close {
  box-sizing: border-box;
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  border-radius: 8px;

  width: 28px;
  height: 28px;
  background: #FFFFFF;
  border: 1px solid #e6e6e6;
  cursor: pointer;
  transition: all 0.15s ease;
  /* 使用雪碧图 - recover图标，原始80x80通过background-size缩小50%显示 */
  background-image: url('../img/controls-sprite.png');
  background-size: 400px 360px;
  background-position: -239px -159px;
  background-repeat: no-repeat;
}

.material-btn-close svg {
  width: 24px;
  height: 24px;
  flex: none;
  order: 0;
  /* 闅愯棌SVG锛屼娇鐢ㄨ儗鏅浘 */
  display: none;
}

.material-btn-close:hover {
  background-color: #F5F5F7;
  border-color: #CCCCCC;
}

.material-btn-close:active {
  background-color: #E8E8ED;
  transform: scale(0.95);
}

body.dark-mode .material-btn-close {
  background-color: #2d2d2d;
  background-position: -280px -160px;
  border-color: #505050;
}

body.dark-mode .material-btn-close:hover {
  background-color: #3a3a3a;
  border-color: #606060;
}

/* 恢复播放按钮（在清空画布按钮左边） */
.restore-playback-btn {
  box-sizing: border-box;
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  border-radius: 8px;
  position: relative;
  width: 28px;
  height: 28px;

  /* 清空按钮宽32px + 12px间距 */

  background: #ffffff7d;
  border: none;
  cursor: pointer;
  transition: all 0.15s ease;
  /* 使用雪碧图 - recover图标，原始80x80通过background-size缩小50%显示 */
  background-image: url('../img/controls-sprite.png');
  background-size: 400px 360px;
  background-position: -238px -158px;
  /* recover.png */
  background-repeat: no-repeat;
}

.restore-playback-btn:hover {
  background-color: #F5F5F7;
  border-color: #CCCCCC;
}

.restore-playback-btn:active {
  background-color: #E8E8ED;
  transform: scale(0.95);
}

body.dark-mode .restore-playback-btn {
  background-color: #4040407d;
  background-position: -278px -158px;
  /* recover_dark.png */
  border: none;
}

body.dark-mode .restore-playback-btn:hover {
  background-color: #3a3a3a;
  border-color: #606060;
}

/* 新按钮 - 在material-btn-close右边8px */
.material-btn-new {
  box-sizing: border-box;
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  border-radius: 8px;
  gap: 10px;
  width: 28px;
  height: 28px;
  background: #FFFFFF;
  border: 1px solid #e6e6e6;
  cursor: pointer;
  transition: all 0.15s ease;
}

.material-btn-new svg {
  width: 20px;
  height: 20px;
  flex: none;
  order: 0;
}

.material-btn-new svg path {
  stroke: #333333;
}

body.dark-mode .material-btn-new svg path {
  stroke: #CCCCCC;
}

.material-btn-new:hover {
  background: #F5F5F7;
  border-color: #CCCCCC;
}

.material-btn-new:active {
  background: #E8E8ED;
  transform: scale(0.95);
}

body.dark-mode .material-btn-new {
  background: #2d2d2d;
  border-color: #505050;
}

body.dark-mode .material-btn-new:hover {
  background: #3a3a3a;
  border-color: #606060;
}

/* 搴曢儴鎸夐挳鍖?*/
.material-panel-footer {
  display: flex;
  flex-direction: row;
  align-items: center;
  padding: 0px;
  gap: 12px;
  width: 100%;
  height: auto;
  flex: none;
  order: 2;
}

/* 侧边弹窗中的大按钮需要flex布局 */
.material-panel-footer .btn-large-secondary {
  flex: 1;
  display: flex;

}

/* 取消按钮（参考白色大按钮样式） */
.material-btn-back {
  box-sizing: border-box;
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  gap: 4px;
  padding: 0 20px;
  height: 44px;
  background: #FFFFFF;
  border: 1px solid #e6e6e6;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.15s ease;
  flex-shrink: 0;
  font-family: 'Segoe UI', sans-serif;
  font-weight: 400;
  font-size: 14px;
  line-height: 1.57;
  color: #333333;
}

.material-btn-back:hover {
  background: #f3f3f3;
  border-color: #d3d3d3;
}

.material-btn-back:active {
  background: #D3D3D3;
  border-color: #333333;
}

body.dark-mode .material-btn-back {
  background: #2d2d2d;
  border-color: #505050;
  color: #e0e0e0;
}

body.dark-mode .material-btn-back:hover {
  background: #3a3a3a;
  border-color: #606060;
}

body.dark-mode .material-btn-back svg path {
  stroke: #e0e0e0;
}

/* 转换按钮进度显示（适配大按钮） */
.btn-large-secondary.mp4-btn-converting,
.btn-large-secondary.svga-btn-converting {
  position: relative;
  flex-direction: column;
  padding: 4px 12px;
  gap: 2px;
}

.mp4-progress-text,
.svga-progress-text {
  font-family: 'Segoe UI', sans-serif;
  font-weight: 600;
  font-size: 14px;
  line-height: 18px;
  color: #333333;
}

.mp4-stage-text,
.svga-stage-text {
  font-family: 'Segoe UI', sans-serif;
  font-weight: 400;
  font-size: 10px;
  line-height: 14px;
  color: #666666;
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mp4-btn-cancel {
  border-color: #ff4444 !important;
}

.mp4-btn-cancel:hover {
  background: rgba(255, 68, 68, 0.1) !important;
}

body.dark-mode .mp4-progress-text,
body.dark-mode .svga-progress-text {
  color: #ffffff;
}

body.dark-mode .mp4-stage-text,
body.dark-mode .svga-stage-text {
  color: #aaaaaa;
}

/* 侧边弹窗按钮已统一使用 btn-large-secondary，不再需要 material-btn-export */

.material-empty {
  width: 100%;
  text-align: center;
  padding: 60px 20px;
  color: #999999;
  font-family: 'Segoe UI';
  font-size: 14px;
}

body.dark-mode .material-empty {
  color: #666;
}

/* 遮罩层 - 隐藏 */
.material-overlay {
  display: none !important;
}

/* ==================== MP4转换弹窗（Figma设计） ==================== */

.mp4-panel {
  position: fixed;
  top: 0;
  right: -400px;
  width: 400px;
  height: 85%;
  display: flex;
  flex-direction: row;
  align-items: stretch;
  padding: 10px;
  transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1000;
}

.mp4-panel.show {
  right: 0;
}

.mp4-panel-container {
  display: flex;
  flex-direction: column;
  align-self: stretch;
  padding: 20px;
  gap: 16px;
  width: 380px;
  background: #FFFFFF;
  border: 1px solid #e6e6e6;
  box-shadow: none;
  border-radius: 16px;
  overflow-y: auto;
  transition: box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.mp4-panel.show .mp4-panel-container {
  box-shadow: 0px 10px 32px 0px rgba(51, 51, 51, 0.2);
}

body.dark-mode .mp4-panel-container {
  background: #1a1a1a;
  border-color: #404040;
}

body.dark-mode .mp4-panel.show .mp4-panel-container {
  box-shadow: 0px 10px 32px rgba(0, 0, 0, 0.5);
}

/* 标题区 */
.mp4-panel-header {
  display: flex;
  flex-direction: column;
  align-self: stretch;
  gap: 12px;
}

.mp4-panel-title {
  font-family: 'Segoe UI', sans-serif;
  font-weight: 400;
  font-size: 12px;
  line-height: 16px;
  color: #818181;
  margin: 0;
}

body.dark-mode .mp4-panel-title {
  color: #999999;
}

.mp4-panel-divider {
  width: 100%;
  height: 1px;
  background: #F3F3F3;
}

body.dark-mode .mp4-panel-divider {
  background: #404040;
}

/* SVGA淇℃伅鍖?*/
.mp4-info-section {
  display: flex;
  flex-direction: column;
  align-self: stretch;
  gap: 4px;
}

.mp4-info-row {
  font-family: 'Segoe UI', sans-serif;
  font-weight: 400;
  font-size: 14px;
  line-height: 19px;
  color: #333333;
  margin: 0;
}

body.dark-mode .mp4-info-row {
  color: #cccccc;
}

.mp4-compress-hint {
  font-family: 'Segoe UI', sans-serif;
  font-weight: 400;
  font-size: 12px;
  line-height: 16px;
  color: #AAAAAA;
  margin: 0;
}

body.dark-mode .mp4-compress-hint {
  color: #666666;
}

/* 配置区域 */
.mp4-config-section {
  display: flex;
  flex-direction: column;
  align-self: stretch;
  gap: 24px;
}

.mp4-config-item {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  align-self: stretch;
  gap: 8px;
  height: 44px;
}

.mp4-config-label {
  font-family: 'Segoe UI', sans-serif;
  font-weight: 400;
  font-size: 16px;
  line-height: 21px;
  color: #333333;
  margin: 0;
  flex-shrink: 0;
  text-align: left;
}

body.dark-mode .mp4-config-label {
  color: #cccccc;
}

/* 下拉选择框样式 */
.mp4-select-wrapper {
  box-sizing: border-box;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  padding: 0 16px;
  gap: 4px;
  width: 218px;
  min-width: 200px;
  height: 44px;
  background: #F3F3F3;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  position: relative;
  transition: all 0.2s ease;
  flex: none;
  flex-grow: 0;
}

.mp4-select-wrapper:hover {
  background: #FCFCFC;
  border: 1px solid #333333;
}

.mp4-select-wrapper:active {
  background: #FFFFFF;
  border: 2px solid #333333;
  padding: 0 14px;
}

body.dark-mode .mp4-select-wrapper {
  background: #3a3a3a;
  border: none;
}

body.dark-mode .mp4-select-wrapper:hover {
  background: #454545;
  border: none;
}

body.dark-mode .mp4-select-wrapper:active {
  background: #3a3a3a;
  border: 2px solid #666666;
  padding: 0 14px;
}

.mp4-select-text {
  font-family: 'Segoe UI', sans-serif;
  font-weight: 600;
  font-size: 16px;
  line-height: 24px;
  color: #333333;
  margin: 0;
}

body.dark-mode .mp4-select-text {
  color: #cccccc;
}

.mp4-select-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mp4-select-icon svg {
  width: 100%;
  height: 100%;
  stroke: #333333;
}

body.dark-mode .mp4-select-icon svg {
  stroke: #cccccc;
}

/* 下拉菜单 */
.mp4-select-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: #FFFFFF;
  border: 1px solid #E6E6E6;
  border-radius: 12px;
  box-shadow: 0px 2px 8px rgba(0, 0, 0, 0.15);
  z-index: 1000;
  overflow: hidden;
  display: none;
}

.mp4-select-wrapper.open .mp4-select-dropdown {
  display: block;
}

body.dark-mode .mp4-select-dropdown {
  background: #2c2c2c;
  border-color: #666666;
  box-shadow: 0px 4px 12px rgba(0, 0, 0, 0.5);
}

.mp4-select-option {
  padding: 12px 16px;
  font-family: 'Segoe UI', sans-serif;
  font-weight: 400;
  font-size: 16px;
  line-height: 21px;
  color: #333333;
  cursor: pointer;
  transition: background 0.15s;
}

.mp4-select-option:hover {
  background: #FCFCFC;
}

.mp4-select-option.selected {
  font-weight: 600;

}

body.dark-mode .mp4-select-option {
  color: #cccccc;
}

body.dark-mode .mp4-select-option:hover {
  background: #3a3a3a;
}

body.dark-mode .mp4-select-option.selected {
  background: #404040;
}

/* 尺寸输入 */
.mp4-size-container {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  flex: none;
}

/* MP4尺寸输入框 - 继承通用样式，仅定义特有属性 */
.mp4-size-input-wrapper {
  width: 73px;
}

.mp4-size-lock {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mp4-size-lock svg {
  width: 100%;
  height: 100%;
  stroke: #333333;
}

body.dark-mode .mp4-size-lock svg {
  stroke: #cccccc;
}

/* 质量和帧率输入 */
.mp4-value-container {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 4px;
  flex: none;
}

/* MP4值输入框 - 继承通用样式，仅定义特有属性 */
.mp4-value-input-wrapper {
  width: 73px;
}

/* 静音开关 */
.mp4-mute-toggle {
  width: 46px;
  height: 26px;
  background: #5B5B5B;
  border-radius: 100px;
  cursor: pointer;
  flex-shrink: 0;
  position: relative;
  transition: background 0.3s;
}

.mp4-mute-toggle.active {
  background: #409EFF;
}

body.dark-mode .mp4-mute-toggle {
  background: #5B5B5B;
}

body.dark-mode .mp4-mute-toggle.active {
  background: #409EFF;
}

.mp4-mute-toggle-handle {
  width: 24px;
  height: 24px;
  background: #FFFFFF;
  border-radius: 50%;
  position: absolute;
  top: 1px;
  left: 1px;
  transition: transform 0.3s;
}

.mp4-mute-toggle.active .mp4-mute-toggle-handle {
  transform: translateX(20px);
}

/* Disabled状态样式 */
/* 下拉选择框disabled */
.mp4-select-wrapper.disabled {
  background: #F3F3F3;
  border: 1px solid #E6E6E6;
  cursor: not-allowed;
  pointer-events: none;
}

.mp4-select-wrapper.disabled .mp4-select-text {
  color: #D3D3D3;
}

.mp4-select-wrapper.disabled .mp4-select-icon svg {
  stroke: #D3D3D3;
}

.mp4-select-wrapper.disabled:hover {
  background: #F3F3F3;
  border: 1px solid #E6E6E6;
}

/* 输入框wrapper disabled */
.mp4-size-input-wrapper:has(input:disabled),
.mp4-value-input-wrapper:has(input:disabled) {
  background: #F3F3F3;
  border: 2px solid #F3F3F3;
  padding: 0 15px;
  pointer-events: none;
}

.mp4-size-input-wrapper:has(input:disabled):hover,
.mp4-value-input-wrapper:has(input:disabled):hover {
  background: #F3F3F3;
  border: 2px solid #E6E6E6;
  padding: 0 15px;
}

.mp4-size-input-wrapper:has(input:disabled):focus-within,
.mp4-value-input-wrapper:has(input:disabled):focus-within {
  background: #F3F3F3;
  border: 1px solid #E6E6E6;
  padding: 0 15px;
}

/* 输入框disabled */
.mp4-input:disabled {
  color: #D3D3D3;
  cursor: not-allowed;
}

/* 静音开关disabled */
.mp4-mute-toggle.disabled {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}

/* 单位文字disabled */
.mp4-config-section.disabled .input-unit {
  color: #D3D3D3;
}

.mp4-config-section.disabled .mp4-size-lock svg {
  stroke: #D3D3D3;
}

body.dark-mode .mp4-config-section.disabled .input-unit {
  color: #666666;
}

body.dark-mode .mp4-config-section.disabled .mp4-size-lock svg {
  stroke: #666666;
}

/* 暗黑模式disabled状态 */
body.dark-mode .mp4-select-wrapper.disabled {
  background: #2a2a2a;
  border: 1px solid #404040;
}

body.dark-mode .mp4-select-wrapper.disabled .mp4-select-text {
  color: #666666;
}

body.dark-mode .mp4-select-wrapper.disabled .mp4-select-icon svg {
  stroke: #666666;
}

body.dark-mode .mp4-select-wrapper.disabled:hover {
  background: #2a2a2a;
  border: 1px solid #404040;
}

body.dark-mode .mp4-size-input-wrapper:has(input:disabled),
body.dark-mode .mp4-value-input-wrapper:has(input:disabled) {
  background: #2a2a2a;
  border: 1px solid #404040;
  padding: 0 15px;
}

body.dark-mode .mp4-size-input-wrapper:has(input:disabled):hover,
body.dark-mode .mp4-value-input-wrapper:has(input:disabled):hover {
  background: #2a2a2a;
  border: 1px solid #404040;
  padding: 0 15px;
}

body.dark-mode .mp4-size-input-wrapper:has(input:disabled):focus-within,
body.dark-mode .mp4-value-input-wrapper:has(input:disabled):focus-within {
  background: #2a2a2a;
  border: 1px solid #404040;
  padding: 0 15px;
}

body.dark-mode .mp4-input:disabled {
  color: #666666;
}

/* 底部按钮 */
.mp4-panel-footer {
  display: flex;
  flex-direction: row;
  justify-content: flex-end;
  align-self: stretch;
  gap: 12px;
  margin-top: auto;
}

/* MP4侧边弹窗中的大按钮需要flex布局 */
/*.mp4-panel-footer .btn-large-secondary {}*/

.mp4-btn {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  padding: 0 20px;
  height: 44px;

  font-family: 'Segoe UI', sans-serif;
  font-weight: 400;
  font-size: 14px;
  line-height: 22px;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
  outline: none;
  box-sizing: border-box;
  user-select: none;
}

.mp4-btn-preview {
  background: #FFFFFF;
  border: 1px solid #e6e6e6;
  color: #333333;
  flex-shrink: 0;
}

.mp4-btn-preview:hover {
  background: #f5f5f5;
  border-color: #CCCCCC;
}

.mp4-btn-preview:active {
  background: #EBEBEB;
  border-color: #B3B3B3;
}

body.dark-mode .mp4-btn-preview {
  background: #2c2c2c;
  border-color: #404040;
  color: #cccccc;
}

body.dark-mode .mp4-btn-preview:hover {
  background: #363636;
  border-color: #4d4d4d;
}

body.dark-mode .mp4-btn-preview:active {
  background: #404040;
  border-color: #595959;
}

.mp4-btn-convert {
  background: #5B5B5B;
  color: #FFFFFF;
  flex: 1;
}

.mp4-btn-convert:hover:not(:disabled) {
  background: #4A4A4A;
}

.mp4-btn-convert:active:not(:disabled) {
  background: #333333;
}

.mp4-btn-convert:disabled {
  background: rgba(91, 91, 91, 0.3);
  cursor: not-allowed;
}

body.dark-mode .mp4-btn-convert {
  background: #e0e0e0;
  color: #1a1a1a;
}

body.dark-mode .mp4-btn-convert:hover:not(:disabled) {
  background: #f0f0f0;
}

body.dark-mode .mp4-btn-convert:active:not(:disabled) {
  background: #d0d0d0;
}

body.dark-mode .mp4-btn-convert:disabled {
  background: rgba(224, 224, 224, 0.3);
}

/* ===== 库加载进度条 ===== */
.library-loading-indicator {
  width: 400px;
  max-width: 50%;
  z-index: 999;
  animation: slideDown 0.3s ease;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(-10px);
  }

  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

.library-loading-indicator .loading-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.library-loading-indicator .loading-text {
  font-size: 13px;
  color: #818181;
  /* 辅助颜色 */
  font-weight: 400;
}

.library-loading-indicator .loading-percentage {
  font-size: 12px;
  color: #999999;
  font-weight: 500;
}

.library-loading-indicator .loading-bar {
  width: 100%;
  height: 4px;
  background: #f3f3f3;
  border-radius: 2px;
  overflow: hidden;
}

.library-loading-indicator .loading-progress {
  height: 100%;
  background: #409eff;
  /* 主色调 */
  border-radius: 2px;
  transition: width 0.3s ease;
}

/* 暗黑模式 */
body.dark-mode .library-loading-indicator {
  background: #2a2a2a;
  border-color: #404040;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

body.dark-mode .library-loading-indicator .loading-text {
  color: #a0a0a0;
}

body.dark-mode .library-loading-indicator .loading-percentage {
  color: #808080;
}

body.dark-mode .library-loading-indicator .loading-bar {
  background: #404040;
}

/* ==================== Toast提示 ==================== */

/* v-cloak隐藏Vue未加载时的内容 */
[v-cloak] {
  display: none;
}

/* Vue未加载时隐藏Toast（防止闪现） */
[v-cloak] .toast-container {
  display: none !important;
}

.toast-container {
  position: fixed;
  top: 48px;
  /* 在header-navbar下方24px */
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  pointer-events: none;
}

.toast-message {
  background: #ffffff;
  border: 1px solid #e6e6e6;
  border-radius: 8px;
  padding: 12px 20px;
  font-size: 14px;
  color: #333333;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  white-space: nowrap;
  max-width: 500px;
  overflow: hidden;
  text-overflow: ellipsis;
}

body.dark-mode .toast-message {
  background: #2a2a2a;
  border-color: #404040;
  color: #cccccc;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

/* Toast淡入淡出动画 */
.toast-fade-enter-active {
  transition: all 0.3s ease;
}

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

/* 初始状态：完全透明且在上方 */
.toast-fade-enter-from {
  opacity: 0;
  transform: translateX(-50%) translateY(-10px);
}

/* 离开状态：淡出到上方 */
.toast-fade-leave-to {
  opacity: 0;
  transform: translateX(-50%) translateY(-10px);
}

/* 显示状态：完全不透明且在原位 */
.toast-fade-enter-to {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.toast-fade-leave-from {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ==================== SVGA转换弹窗（双通道MP4转SVGA） ==================== */

.svga-panel {
  position: fixed;
  top: 0;
  right: -400px;
  width: 400px;
  height: 85%;
  display: flex;
  flex-direction: row;
  align-items: stretch;
  padding: 10px;
  transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1000;
}

.svga-panel.show {
  right: 0;
}

.svga-panel-container {
  display: flex;
  flex-direction: column;
  align-self: stretch;
  padding: 20px;
  gap: 16px;
  width: 380px;
  background: #FFFFFF;
  border: 1px solid #e6e6e6;
  box-shadow: none;
  border-radius: 16px;
  overflow-y: auto;
  transition: box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.svga-panel.show .svga-panel-container {
  box-shadow: 0px 10px 32px 0px rgba(51, 51, 51, 0.2);
}

body.dark-mode .svga-panel-container {
  background: #1a1a1a;
  border-color: #404040;
}

body.dark-mode .svga-panel.show .svga-panel-container {
  box-shadow: 0px 10px 32px rgba(0, 0, 0, 0.5);
}

/* 标题区 */
.svga-panel-header {
  display: flex;
  flex-direction: column;
  align-self: stretch;
  gap: 12px;
}

.svga-panel-title {
  font-family: 'Segoe UI', sans-serif;
  font-weight: 400;
  font-size: 12px;
  line-height: 16px;
  color: #818181;
  margin: 0;
}

body.dark-mode .svga-panel-title {
  color: #999999;
}

.svga-panel-divider {
  width: 100%;
  height: 1px;
  background: #F3F3F3;
}

body.dark-mode .svga-panel-divider {
  background: #404040;
}

/* MP4信息区 */
.svga-info-section {
  display: flex;
  flex-direction: column;
  align-self: stretch;
  gap: 4px;
}

.svga-info-row {
  font-family: 'Segoe UI', sans-serif;
  font-weight: 400;
  font-size: 14px;
  line-height: 19px;
  color: #333333;
  margin: 0;
}

body.dark-mode .svga-info-row {
  color: #cccccc;
}

.svga-compress-hint {
  font-family: 'Segoe UI', sans-serif;
  font-weight: 400;
  font-size: 12px;
  line-height: 16px;
  color: #AAAAAA;
  margin: 0;
}

body.dark-mode .svga-compress-hint {
  color: #666666;
}

/* 配置区域 */
.svga-config-section {
  display: flex;
  flex-direction: column;
  align-self: stretch;
  gap: 24px;
  flex: 1;
}

.svga-config-section.disabled {
  opacity: 0.6;
  pointer-events: none;
}

.svga-config-item {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  align-self: stretch;
  gap: 8px;
  height: 44px;
}

/* 配置项间距修饰符 */
.svga-config-item--mt {
  margin-top: 16px;
}

.svga-config-label {
  font-family: 'Segoe UI', sans-serif;
  font-weight: 400;
  font-size: 16px;
  line-height: 21px;
  color: #333333;
  margin: 0;
  flex-shrink: 0;
  text-align: left;
}

body.dark-mode .svga-config-label {
  color: #cccccc;
}

/* 尺寸输入 */
.svga-size-container {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  flex: none;
}

/* SVGA尺寸输入框 - 继承通用样式，仅定义特有属性 */
.svga-size-input-wrapper {
  width: 73px;
}

.svga-size-lock {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #D3D3D3;
}

body.dark-mode .svga-size-lock {
  color: #666666;
}

/* 值输入容器 */
.svga-value-container {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 4px;
  flex: none;
}

/* SVGA值输入框 - 继承通用样式，仅定义特有属性 */
.svga-value-input-wrapper {
  width: 60px;
}

/* 静音开关 */
.svga-mute-toggle {
  width: 46px;
  height: 26px;
  background: #5B5B5B;
  border-radius: 100px;
  position: relative;
  cursor: pointer;
  transition: background 0.2s ease;
}

.svga-mute-toggle.active {
  background: #409EFF;
}

.svga-mute-toggle.disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.svga-mute-toggle-handle {
  position: absolute;
  width: 24px;
  height: 24px;
  background: #FFFFFF;
  border-radius: 50%;
  top: 1px;
  left: 1px;
  transition: left 0.2s ease;
}

.svga-mute-toggle.active .svga-mute-toggle-handle {
  left: 21px;
}

body.dark-mode .svga-mute-toggle {
  background: #404040;
}

body.dark-mode .svga-mute-toggle.active {
  background: #409EFF;
}

body.dark-mode .svga-mute-toggle-handle {
  background: #cccccc;
}

/* 预估对比区域 */
.svga-estimate-section {
  display: flex;
  flex-direction: column;
  align-self: stretch;
  gap: 8px;
}

.svga-estimate-box {
  display: flex;
  flex-direction: column;
  align-self: stretch;
  gap: 4px;
  padding: 10px;
  background: #FCFCFC;
  border: 1px solid #F3F3F3;
  border-radius: 8px;
}

body.dark-mode .svga-estimate-box {
  background: #2a2a2a;
  border-color: #404040;
}

.svga-estimate-title {
  font-family: 'Segoe UI', sans-serif;
  font-weight: 400;
  font-size: 12px;
  line-height: 16px;
  color: #818181;
  margin: 0;
}

body.dark-mode .svga-estimate-title {
  color: #999999;
}

.svga-estimate-row {
  font-family: 'Segoe UI', sans-serif;
  font-weight: 400;
  font-size: 12px;
  line-height: 16px;
  color: #818181;
  margin: 0;
}

body.dark-mode .svga-estimate-row {
  color: #999999;
}

/* 底部按钮 */
.svga-panel-footer {
  display: flex;
  flex-direction: row;
  justify-content: flex-end;
  align-items: center;
  align-self: stretch;
  gap: 12px;
}

/* SVGA侧边弹窗中的大按钮需要flex布局 */
.svga-panel-footer .btn-large-secondary {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
}

.svga-btn-cancel {
  border-color: #ff4444 !important;
}

.svga-btn-converting {
  position: relative;
  overflow: hidden;
  background: linear-gradient(90deg, #5B5B5B var(--progress, 0%), #F3F3F3 var(--progress, 0%)) !important;
}

body.dark-mode .svga-btn-converting {
  background: linear-gradient(90deg, #5B5B5B var(--progress, 0%), #3a3a3a var(--progress, 0%)) !important;
}

.svga-btn-converting::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, #5B5B5B calc(var(--progress, 0) * 1%), transparent calc(var(--progress, 0) * 1%));
  z-index: 0;
}

.svga-progress-text {
  font-weight: 600;
  margin-right: 4px;
}

.svga-stage-text {
  font-size: 12px;
  opacity: 0.8;
}

/* ========================================
   GIF导出弹窗颜色选择器
   ======================================== */
.gif-color-picker {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
}

.gif-color-input {
  width: 32px;
  height: 32px;
  border: 2px solid #e6e6e6;
  border-radius: 8px;
  cursor: pointer;
  padding: 0;
  background: none;
  -webkit-appearance: none;
  appearance: none;
}

.gif-color-input::-webkit-color-swatch-wrapper {
  padding: 0;
}

.gif-color-input::-webkit-color-swatch {
  border: none;
  border-radius: 6px;
}

.gif-color-input:hover {
  border-color: #5b5b5b;
}

.gif-color-input:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

body.dark-mode .gif-color-input {
  border-color: #404040;
}

body.dark-mode .gif-color-input:hover {
  border-color: #606060;
}

.gif-color-value {
  font-family: 'Consolas', 'Monaco', monospace;
  font-size: 12px;
  color: #818181;
  text-transform: uppercase;
}

body.dark-mode .gif-color-value {
  color: #999999;
}

/* ========================================
   绿幕抠图弹窗（普通MP4模式左侧弹窗）
   ======================================== */
.chromakey-panel {
  position: fixed;
  top: 0;
  left: -400px;
  width: 400px;
  height: 85%;
  display: flex;
  flex-direction: row;
  align-items: stretch;
  padding: 10px;
  transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1000;
}

.chromakey-panel.show {
  left: 0;
}

.chromakey-panel-container {
  display: flex;
  flex-direction: column;
  align-self: stretch;
  padding: 20px;
  gap: 16px;
  width: 380px;
  background: #FFFFFF;
  border: 1px solid #e6e6e6;
  box-shadow: none;
  border-radius: 16px;
  overflow-y: auto;
  transition: box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.chromakey-panel.show .chromakey-panel-container {
  box-shadow: 0px 10px 32px 0px rgba(51, 51, 51, 0.2);
}

body.dark-mode .chromakey-panel-container {
  background: #1a1a1a;
  border-color: #404040;
}

body.dark-mode .chromakey-panel.show .chromakey-panel-container {
  box-shadow: 0px 10px 32px rgba(0, 0, 0, 0.5);
}

/* 标题区 */
.chromakey-panel-header {
  display: flex;
  flex-direction: column;
  align-self: stretch;
  gap: 12px;
}

.chromakey-panel-title {
  font-family: 'Segoe UI', sans-serif;
  font-weight: 400;
  font-size: 12px;
  line-height: 16px;
  color: #818181;
  margin: 0;
}

body.dark-mode .chromakey-panel-title {
  color: #999999;
}

.chromakey-panel-divider {
  width: 100%;
  height: 1px;
  background: #F3F3F3;
}

body.dark-mode .chromakey-panel-divider {
  background: #404040;
}

/* MP4淇℃伅鍖?*/
.chromakey-info-section {
  display: flex;
  flex-direction: column;
  align-self: stretch;
  gap: 4px;
}

.chromakey-info-row {
  font-family: 'Segoe UI', sans-serif;
  font-weight: 400;
  font-size: 14px;
  line-height: 19px;
  color: #333333;
  margin: 0;
}

body.dark-mode .chromakey-info-row {
  color: #cccccc;
}

/* 性能提示 */
.chromakey-performance-hint {
  font-family: 'Segoe UI', sans-serif;
  font-weight: 400;
  font-size: 12px;
  line-height: 16px;
  color: #999999;
  margin-top: 8px;
}

body.dark-mode .chromakey-performance-hint {
  color: #666666;
}

/* 配置区域 */
.chromakey-config-section {
  display: flex;
  flex-direction: column;
  align-self: stretch;
  gap: 24px;
  flex: 1;
}

.chromakey-config-item {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  align-self: stretch;
  gap: 8px;
  height: 44px;
}

.chromakey-config-label {
  font-family: 'Segoe UI', sans-serif;
  font-weight: 400;
  font-size: 16px;
  line-height: 21px;
  color: #333333;
  margin: 0;
  flex-shrink: 0;
  text-align: left;
}

body.dark-mode .chromakey-config-label {
  color: #cccccc;
}

/* 开关按钮 */
.chromakey-switch-wrapper {
  cursor: pointer;
}

.chromakey-switch {
  position: relative;
  width: 48px;
  height: 28px;
  background: #e6e6e6;
  border-radius: 14px;
  transition: background 0.3s;
}

.chromakey-switch.active {
  background: #007AFF;
}

body.dark-mode .chromakey-switch {
  background: #404040;
}

body.dark-mode .chromakey-switch.active {
  background: #0A84FF;
}

.chromakey-switch-handle {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 24px;
  height: 24px;
  background: #FFFFFF;
  border-radius: 12px;
  transition: left 0.3s;
}

.chromakey-switch.active .chromakey-switch-handle {
  left: 22px;
}

/* 滑块 */
.chromakey-slider-wrapper {
  flex: 1;
  display: flex;
  align-items: center;
}

.chromakey-slider {
  width: 100%;
  height: 4px;
  -webkit-appearance: none;
  appearance: none;
  background: #e6e6e6;
  border-radius: 2px;
  outline: none;
}

body.dark-mode .chromakey-slider {
  background: #404040;
}

.chromakey-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  background: #007AFF;
  border-radius: 10px;
  cursor: pointer;
}

.chromakey-slider::-moz-range-thumb {
  width: 20px;
  height: 20px;
  background: #007AFF;
  border-radius: 10px;
  cursor: pointer;
  border: none;
}

body.dark-mode .chromakey-slider::-webkit-slider-thumb {
  background: #0A84FF;
}

body.dark-mode .chromakey-slider::-moz-range-thumb {
  background: #0A84FF;
}

/* 底部按钮 */
.chromakey-panel-footer {
  display: flex;
  flex-direction: row;
  justify-content: flex-end;
  align-self: stretch;
  gap: 12px;
  margin-top: auto;
}

/* 色键弹窗中的大按钮需要flex布局 */
.chromakey-panel-footer .btn-large-secondary {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* ==================== 居中弹窗通用样式（统一管理） ==================== */

/* Vue未加载时隐藏弹窗（防止闪现） */
[v-cloak] .center-modal-overlay {
  display: none !important;
}

/* 弹窗遮罩层 */
.center-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.3);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10000;
  /* 默认隐藏 */
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  /* 动画 */
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 显示状态 */
.center-modal-overlay.show {
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
  display: flex !important;
}

/* 弹窗容器 */
.center-modal-dialog {
  background: #ffffff;
  border-radius: 24px;
  padding: 24px;
  min-width: 320px;
  max-width: 90vw;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  /* 动画 */
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  transform: scale(0.9) translateY(-20px);
}

/* 显示状态下的弹窗 */
.center-modal-overlay.show .center-modal-dialog {
  transform: scale(1) translateY(0);
}

body.dark-mode .center-modal-dialog {
  background: #2a2a2a;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

/* 弹窗中的svga-panel-container使用auto（避免侧边弹窗样式干扰） */
.center-modal-overlay .svga-panel-container {
  align-self: auto;
}

/* 弹窗头部 */
.center-modal-header {
  padding: 0 0 16px 0;
  border-bottom: 1px solid #e6e6e6;
}

body.dark-mode .center-modal-header {
  border-bottom-color: #505050;
}

.center-modal-header h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 500;
  color: #333333;
}

body.dark-mode .center-modal-header h3 {
  color: #e0e0e0;
}

/* 弹窗内容区 */
.center-modal-body {
  padding: 24px 0;
}

/* 弹窗底部 */
.center-modal-footer {
  padding: 16px 0 0 0;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

/* 弹窗按钮直接使用大按钮样式，无需覆盖 */

/* 压缩弹窗特殊样式（说明文字） */
.compress-hint {
  font-size: 12px;
  color: #999999;
  line-height: 1.5;
  margin-bottom: 4px;
}

body.dark-mode .compress-hint {
  color: #777777;
}

/* 撤销按钮（基于大按钮，自定义橙色样式） */
.btn-undo {
  min-width: 80px;
  height: 44px;
  padding: 0 16px;
  border-radius: 12px;
  border: none;
  background-color: #ff9500;
  color: #ffffff;
  font-family: 'Segoe UI', sans-serif;
  font-weight: 400;
  font-size: 14px;
  line-height: 1.57;
  text-align: center;
  cursor: pointer;
  outline: none;
  transition: all 0.2s;
  white-space: nowrap;
}

.btn-undo:hover:not(:disabled) {
  background-color: #e68600;
}

.btn-undo:active:not(:disabled) {
  background-color: #cc7700;
}

.btn-undo:disabled {
  background-color: rgba(255, 149, 0, 0.5);
  cursor: not-allowed;
  opacity: 1;
}

body.dark-mode .btn-undo {
  background-color: #cc7700;
}

body.dark-mode .btn-undo:hover:not(:disabled) {
  background-color: #e68600;
}


/* ==================== 素材编辑器弹窗 ==================== */

.material-editor-modal {
  /* 覆盖默认的 max-width，允许更宽 */
  max-width: 1000px !important;
}

.material-editor-body {
  flex: 1;
  display: flex;
  gap: 24px;
  overflow: hidden;
  /* 防止溢出 */
  padding: 0 !important;
  /* 移除默认padding，由内部容器控制 */
}

/* 左侧预览区 */
.editor-preview-area {
  flex: 1;
  border-radius: 12px;
  position: relative;
  overflow: hidden;
  /* 视口裁剪 */
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 400px;
  /* 最小高度 */
  border: 1px solid #e6e6e6;
  user-select: none;
  background-color: #fcfcfc;
  background-image: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGNpcmNsZSBjeD0iMiIgY3k9IjIiIHI9IjEiIGZpbGw9IiNlM2UzZTMiLz48L3N2Zz4=);
  background-repeat: repeat;
  background-size: 8px 8px;

}

body.dark-mode .editor-preview-area {
  background: #202020;
  border-color: #404040;
}

/* 预览内容容器 (视口内的可移动层) */
.editor-preview-wrapper {
  position: relative;
  flex: none;
  /* 初始不偏移 */
  transform-origin: center center;
  /* 允许鼠标操作 */
  cursor: grab;
}

.editor-preview-wrapper:active {
  cursor: grabbing;
}

/* 实际内容层 (1:1 尺寸) */
.editor-preview-content {
  position: relative;
  background-color: transparent;
  width: 100%;
  height: 100%;
}

/* 底图 */
.editor-base-image {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  pointer-events: none;
  /* 图片不响应鼠标，由 wrapper 响应 */
}

/* 素材图容器 */
.editor-image-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  cursor: move;
  transition: none;
  /* pointer-events 由 Vue 动态控制 */
  outline: none;
}

.editor-image-wrapper.active {
  /* outline 宽度通过 HTML 动态计算以保持固定 2px */
  outline-color: #00B4FF;
  outline-style: solid;
  outline-offset: -2px;
}

/* 文字 Canvas 容器 */
.editor-canvas-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  cursor: move;
  transition: none;
  z-index: 1;
  /* 文字层在上层，但通过 pointer-events 控制事件响应 */
  /* pointer-events 由 Vue 动态控制 */
  outline: none;
}

.editor-canvas-wrapper.active {
  /* outline 宽度通过 HTML 动态计算以保持固定 2px */
  outline-color: #ff00ff;
  outline-style: solid;
  outline-offset: -2px;
}

/* 文字层 Canvas */
.editor-text-canvas {
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: none;
}

/* 激活状态标签（固定尺寸，不受缩放影响） */
.editor-layer-tag {
  position: absolute;
  top: -24px;
  left: 0;
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 500;
  color: #ffffff;
  border-radius: 4px;
  white-space: nowrap;
  pointer-events: none;
  z-index: 10;
  /* 通过 transform 反向缩放来抵消父元素的 scale */
  transform-origin: left top;
}

/* 底图标签样式 */
.editor-layer-tag--image {
  background-color: #00B4FF;
}

/* 文字层标签样式 */
.editor-layer-tag--text {
  background-color: #ff00ff;
}

/* 文字层选中/悬停时的辅助框 - 已移除 */
.editor-text-border {
  display: none;
}

/* 缩放控制 */
.editor-zoom-controls {
  position: absolute;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  padding: 4px 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: white;
  font-size: 14px;
  z-index: 20;
}

.editor-zoom-controls button {
  background: none;
  border: none;
  color: white;
  font-size: 18px;
  cursor: pointer;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.editor-zoom-controls button:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* 平移控制 (新增) */
.editor-pan-controls {
  position: absolute;
  bottom: 80px;
  right: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  z-index: 20;
}

.pan-row {
  display: flex;
  gap: 4px;
}

.pan-btn {
  width: 32px;
  height: 32px;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: white;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.pan-btn:hover {
  background: rgba(0, 0, 0, 0.8);
  transform: scale(1.05);
}

.pan-btn:active {
  transform: scale(0.95);
}

/* 底部按钮组 */
.editor-bottom-actions {
  position: absolute;
  bottom: 10px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 20px;
  pointer-events: none;
  /* 让事件穿透到下层，按钮自身开启 pointer-events */
}

.editor-bottom-actions>* {
  pointer-events: auto;
}

/* 左侧按钮组 */
.editor-bottom-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* 右侧按钮组 */
.editor-bottom-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* 视图模式切换按钮（1:1/适应高度） */
.editor-view-btn {
  width: 28px;
  height: 28px;
  border: none;
  background-color: transparent;
  background-image: url('../img/controls-sprite.png');
  background-size: 400px 360px;
  background-position: -320px -120px;
  /* one2one.png: 原始-640px -240px -> 缩小到1/2 */
  background-repeat: no-repeat;
  cursor: pointer;
  outline: none;
  transition: opacity 0.2s;
  flex-shrink: 0;
}

.editor-view-btn:hover {
  background-position: -360px -120px;
  /* one2one_hover.png: 原始-720px -240px -> 缩小到1/2 */
}

/* 适应高度按钮（当one-to-one模式下显示） */
.editor-view-btn.is-contain {
  background-position: -80px -160px;
  /* contain.png: 原始-160px -320px -> 缩小到1/2 */
}

.editor-view-btn.is-contain:hover {
  background-position: -120px -160px;
  /* contain_hover.png: 原始-240px -320px -> 缩小到1/2 */
}

/* 暗黑模式 */
body.dark-mode .editor-view-btn {
  background-position: 0px -160px;
  /* one2one_dark.png: 原始0px -320px -> 缩小到1/2 */
}

body.dark-mode .editor-view-btn:hover {
  background-position: -40px -160px;
  /* one2one_hover_dark.png: 原始-80px -320px -> 缩小到1/2 */
}

body.dark-mode .editor-view-btn.is-contain {
  background-position: -160px -160px;
  /* contain_dark.png: 原始-320px -320px -> 缩小到1/2 */
}

body.dark-mode .editor-view-btn.is-contain:hover {
  background-position: -200px -160px;
  /* contain_hover_dark.png: 原始-400px -320px -> 缩小到1/2 */
}

/* 编辑器缩放百分比显示 */
.editor-scale-percentage {
  width: 60px;
  font-family: 'Segoe UI', sans-serif;
  font-weight: 400;
  font-size: 14px;
  line-height: 1.33;
  color: #818181;
  text-align: left;
  transition: color 0.3s;
}

body.dark-mode .editor-scale-percentage {
  color: #999999;
}

/* 右侧控制区 */
.editor-controls-area {
  width: 300px;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.editor-control-group {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

body.dark-mode .editor-control-group {
  background: #2a2a2a;
}

.editor-switch-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  color: #333333;
}

body.dark-mode .editor-switch-row {
  color: #e0e0e0;
}

.editor-text-controls {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.editor-control-label {
  font-size: 14px;
  color: #666666;
  margin-bottom: 4px;
}

.editor-control-label--mt {
  margin-top: 10px;
}

body.dark-mode .editor-control-label {
  color: #999999;
}

.editor-hint {
  font-size: 12px;
  color: #999999;
  line-height: 1.4;
  margin-top: 4px;
}

/* 覆盖 textarea 样式 */
.svga-textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid #e6e6e6;
  border-radius: 8px;
  background: #ffffff;
  color: #333333;
  font-family: 'Consolas', 'Monaco', monospace;
  font-size: 12px;
  resize: vertical;
  outline: none;
  transition: border-color 0.2s;
}

.svga-textarea:focus {
  border-color: #007aff;
}

body.dark-mode .svga-textarea {
  background: #333333;
  border-color: #404040;
  color: #e0e0e0;
}

body.dark-mode .svga-textarea:focus {
  border-color: #0a84ff;
}

.fps-input-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.fps-unit {
  font-size: 14px;
  color: #666666;
}

body.dark-mode .fps-unit {
  color: #999999;
}

/* ==================== 广告位样式 ==================== */

/* 右侧浮层广告位 */
.ad-position-right {
  position: fixed;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  width: 160px;
  min-height: 600px;
  background: #ffffff;
  border: 1px solid #e6e6e6;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  z-index: 50;
  transition: opacity 0.3s, background-color 0.3s, border-color 0.3s;
  overflow: hidden;
}

body.dark-mode .ad-position-right {
  background: #2a2a2a;
  border-color: #404040;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* 广告内容占位符 */
.ad-content-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #999999;
  font-size: 14px;
  padding: 20px;
  text-align: center;
}

body.dark-mode .ad-content-placeholder {
  color: #666666;
}

/* 广告位显示状态 */
.ad-position-right[data-ad-visible="true"] {
  display: block;
  opacity: 1;
}

.ad-position-right[data-ad-visible="false"] {
  display: none;
  opacity: 0;
}

/* 底部浮层广告位（预留） */
.ad-position-bottom {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: 728px;
  height: 90px;
  background: #ffffff;
  border: 1px solid #e6e6e6;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  z-index: 50;
  transition: opacity 0.3s, background-color 0.3s, border-color 0.3s;
}

body.dark-mode .ad-position-bottom {
  background: #2a2a2a;
  border-color: #404040;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* 响应式调整 */
@media (max-width: 1400px) {
  .ad-position-right {
    right: 10px;
    width: 120px;
    min-height: 400px;
  }
}

@media (max-width: 1200px) {
  .ad-position-right {
    display: none !important;
  }
}

/* ==================== 变速时间轴编辑器 ==================== */

.speed-remap-editor {
  position: absolute;
  bottom: 166px;
  width: 1000px;
  margin: 0 0 8px 0;
  z-index: 100;
  align-items: flex-start;
  left: 0;
  background-color: #ffffff;
  border: 1px solid #e6e6e6;
  border-radius: 16px;
  padding: 16px 28px;
}

body.dark-mode .speed-remap-editor {
  background-color: #1a1a1a;
  border-color: #404040;
}

.speed-remap-editor-content {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
}

/* 时间轴容器（垂直布局） */
.speed-remap-timeline-wrapper {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 24px 0 0 0;
}

/* 时长预估 */
.speed-remap-duration {
  font-size: 12px;
  color: #666666;



}

body.dark-mode .speed-remap-duration {
  color: #999999;

}

/* 时间轴主体 */
.speed-remap-timeline {
  position: relative;
  width: 500px;
  height: 16px;
  background: #F3F3F3;
  border-radius: 2px;
  cursor: default;

}

body.dark-mode .speed-remap-timeline {
  background: #3a3a3a;

}

/* 压缩区域可视化（底色） */
.speed-remap-timeline-range {
  position: absolute;
  top: 0;
  height: 16px;
  background: #409EFF;
  pointer-events: none;
}

body.dark-mode .speed-remap-timeline-range {
  background: #2a5a8a;
}

/* 每段区间的速率颜色覆盖 */
.speed-remap-segment-overlay {
  position: absolute;
  top: 0;
  height: 16px;
  pointer-events: none;
}

/* 加速区间（深蓝色） */
.speed-remap-segment-overlay.segment-speedup {
  background: #094DDE;
}

body.dark-mode .speed-remap-segment-overlay.segment-speedup {
  background: #5B8CFF;
}

/* 减速区间（浅蓝色） */
.speed-remap-segment-overlay.segment-slowdown {
  background: #C8F2FF;
}

body.dark-mode .speed-remap-segment-overlay.segment-slowdown {
  background: #0a3a4a;
}

/* hover预览线 - 蓝色 */
.speed-remap-timeline-hover-line {
  position: absolute;
  top: 0;
  width: 1px;
  height: 16px;
  background: #00B4FF;
  pointer-events: none;
  display: none;
}

.speed-remap-timeline:hover .speed-remap-timeline-hover-line {
  display: block;
}

/* hover预览线上方的帧数提示（蓝线上方4px） */
.speed-remap-timeline-hover-frame-number {
  position: absolute;
  top: -16px;
  transform: translateX(-50%);
  font-size: 12px;
  color: #333333;
  font-weight: 500;
  white-space: nowrap;
  pointer-events: none;
  display: none;
}

.speed-remap-timeline:hover .speed-remap-timeline-hover-frame-number {
  display: block;
}

body.dark-mode .speed-remap-timeline-hover-frame-number {
  color: #e0e0e0;
}

/* hover预览线下方的速率提示（蓝线下方4px） */
.speed-remap-timeline-hover-speed {
  position: absolute;
  top: 18px;
  transform: translateX(-50%);
  font-size: 11px;
  color: #00B4FF;
  font-weight: 500;
  line-height: 1.4;
  text-align: center;
  white-space: nowrap;
  pointer-events: none;
  display: none;
}

.speed-remap-timeline:hover .speed-remap-timeline-hover-speed {
  display: block;
}

body.dark-mode .speed-remap-timeline-hover-speed {
  color: #33CCFF;
}

/* K帧节点容器 - 包含线和手柄 */
.keyframe-node {
  position: absolute;
  top: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  transform: translateX(-50%);
}

/* K帧竖线 */
.keyframe-line {
  width: 3px;
  height: 16px;
  background: #333333;
  border-width: 0px 1px;
  border-style: solid;
  border-color: #f3f3f3;
}

body.dark-mode .keyframe-line {
  background: #f5f5f5;
  border-color: #3a3a3a;
}

/* K帧手柄 */
.keyframe-handle {
  width: 14px;
  height: 16px;
  margin-top: -16px;
  background-image: url('../img/btn_keyframe.png');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  cursor: ew-resize;
  position: relative;
  top: -16px;
}

.keyframe-handle:hover {
  opacity: 0.8;
}

/* K帧帧数标签（手柄上方2px） */
.keyframe-frame-label {
  position: absolute;
  top: -32px;
  left: 50%;
  transform: translateX(-50%);
  font-family: 'Segoe UI', system-ui, sans-serif;
  font-size: 12px;
  color: #333333;
  white-space: nowrap;
  pointer-events: auto;
  cursor: pointer;
  user-select: none;
}

.keyframe-frame-label:hover {
  opacity: 0.7;
}

/* 端点帧数标签（黑色） */
.frame-label-endpoint {
  color: #333333;
}

body.dark-mode .frame-label-endpoint {
  color: #cccccc;
}

body.dark-mode .keyframe-frame-label {
  color: #999999;
}

/* 端点节点（起点/终点） */
.keyframe-endpoint .keyframe-line {
  background: #333333;
}

body.dark-mode .keyframe-endpoint .keyframe-line {
  background: #f5f5f5;
  border-width: 0px 1px;
  border-style: solid;
  border-color: #3a3a3a;
}

/* 端点手柄 - 左右不同 */
.keyframe-endpoint .keyframe-handle {
  width: 13px;
}

.keyframe-endpoint-left .keyframe-handle {
  width: 16px;
  background-image: url('../img/btn_keyframe_left.png');
}

.keyframe-endpoint-right .keyframe-handle {
  width: 16px;
  background-image: url('../img/btn_keyframe_right.png');
}

/* 选中状态 */
.keyframe-selected .keyframe-handle {
  box-shadow: 0 0 0 2px rgba(0, 180, 255, 0.4);
}

/* 蓝色线点击区域（5px宽） */
.keyframe-line-clickarea {
  width: 5px;
  height: 16px;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  cursor: pointer;
}

/* 时间刻度容器 */
.speed-remap-timescale {
  position: relative;
  width: 500px;
  height: 20px;
  margin-top: 1px;
}

/* 刻度点 */
.timescale-tick {
  position: absolute;
  top: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  transform: translateX(-50%);
}

/* 刻度标记 */
.tick-mark {
  width: 1px;
  height: 3px;
  background: #666666;
}

body.dark-mode .tick-mark {
  background: #999999;
}

/* 刻度标签 */
.tick-label {
  font-family: 'Segoe UI', system-ui, sans-serif;
  font-size: 12px;
  color: rgba(0, 0, 0, 0.4);
  margin-top: 2px;
  white-space: nowrap;
}

body.dark-mode .tick-label {
  color: #999999;
}

/* 时长显示（时间轴右侧4px） */
.speed-remap-duration-label {

  min-width: 88px;
  font-family: 'Segoe UI', system-ui, sans-serif;
  font-size: 12px;
  color: rgba(0, 0, 0, 0.4);
  white-space: nowrap;
  width: 100%;
}

body.dark-mode .speed-remap-duration-label {
  color: #999999;
}

/* 按钮区域 */
.speed-remap-buttons {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;

}

/* 恢复按钮 */
/* 恢复按钮（基于大按钮次要，添加图标） */
.btn-speed-reset {
  gap: 4px;
  padding: 0 8px 0 8px;
  width: 54px;
  min-width: 54px;
}

.btn-speed-reset svg {
  width: 16px;
  height: 16px;
  /* 隐藏SVG，使用背景图标 */
  display: none;
}

/* 使用雪碧图添加recover图标 - 通过::before伪元素 */
.btn-speed-reset::before {
  content: '';
  display: inline-block;
  width: 24px;
  height: 24px;
  background-image: url('../img/controls-sprite.png');
  background-size: 400px 360px;
  background-position: -240px -160px;
  background-repeat: no-repeat;
  flex-shrink: 0;
}

body.dark-mode .btn-speed-reset::before {
  background-position: -280px -160px;
}

/* 取消按钮 */
/* 取消按钮已改为大按钮次要样式，不再需要 btn-speed-cancel */

/* 变速按钮激活状态 */
.btn-active {
  background: #409EFF !important;
  color: #ffffff !important;
  border-color: #409EFF !important;
}

/* ==================== 编辑K帧帧数弹窗 ==================== */

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10000;
}

/* 弹窗中的svga-panel-container使用auto */
.modal-overlay .svga-panel-container {
  align-self: auto;
}

.modal-header {
  padding: 0 0 16px 0;
  border-bottom: 1px solid #e6e6e6;
}

body.dark-mode .modal-header {
  border-bottom-color: #505050;
}

.modal-header h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 500;
  color: #333333;
}

body.dark-mode .modal-header h3 {
  color: #e0e0e0;
}

.modal-body {
  padding: 24px 0px;
}

.form-group {
  margin-bottom: 0;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  color: #666666;
}

body.dark-mode .form-group label {
  color: #b0b0b0;
}

.modal-footer {
  padding: 16px 0 0 0;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

body.dark-mode .modal-footer {
  border-top-color: #505050;
}

/* 弹窗按钮样式（基于Figma设计） */
/* 取消按钮 - btn01_Large */
.modal-footer .btn-primary {
  min-width: 110px;
  height: 44px;
  padding: 0 20px;
  background: #FFFFFF;
  border: 1px solid #E6E6E6;
  border-radius: 12px;
  font-family: 'Segoe UI', sans-serif;
  font-weight: 400;
  font-size: 14px;
  line-height: 1.5714285714285714em;
  text-align: center;
  color: #333333;
  cursor: pointer;
  transition: all 0.15s ease;
}

.modal-footer .btn-primary:hover {
  background: #E6E6E6;
  border-color: #5B5B5B;
}

.modal-footer .btn-primary:active {
  background: #D3D3D3;
  border-color: #333333;
}

.modal-footer .btn-primary:disabled {
  background: #FFFFFF;
  border-color: #F3F3F3;
  color: #AAAAAA;
  cursor: not-allowed;
}

body.dark-mode .modal-footer .btn-primary {
  background: #2d2d2d;
  border-color: #505050;
  color: #e0e0e0;
}

body.dark-mode .modal-footer .btn-primary:hover {
  background: #3a3a3a;
  border-color: #707070;
}

body.dark-mode .modal-footer .btn-primary:active {
  background: #454545;
  border-color: #808080;
}

/* 确定按钮 - btn02_Large */
.modal-footer .btn-secondary {
  min-width: 110px;
  height: 44px;
  padding: 0 20px;
  background: #5B5B5B;
  border: none;
  border-radius: 12px;
  font-family: 'Segoe UI', sans-serif;
  font-weight: 400;
  font-size: 14px;
  line-height: 1.5714285714285714em;
  text-align: center;
  color: #FFFFFF;
  cursor: pointer;
  transition: all 0.15s ease;
}

.modal-footer .btn-secondary:hover {
  border: 1px solid #333333;
}

.modal-footer .btn-secondary:active {
  background: #333333;
  border: 1px solid #333333;
}

.modal-footer .btn-secondary:disabled {
  background: rgba(91, 91, 91, 0.3);
  border: none;
  cursor: not-allowed;
}

body.dark-mode .modal-footer .btn-secondary {
  background: #707070;
}

body.dark-mode .modal-footer .btn-secondary:hover {
  background: #707070;
  border-color: #909090;
}

body.dark-mode .modal-footer .btn-secondary:active {
  background: #808080;
  border-color: #a0a0a0;
}

/* ==================== K帧速度调整弹窗 ==================== */

.keyframe-speed-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.3);
  z-index: 1000;
}

.keyframe-speed-popup {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: #ffffff;
  border-radius: 12px;
  padding: 20px;
  min-width: 280px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  z-index: 1001;
}

body.dark-mode .keyframe-speed-popup {
  background: #2a2a2a;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
}

.keyframe-speed-popup-title {
  font-size: 16px;
  font-weight: 600;
  color: #333333;
  margin-bottom: 16px;
}

body.dark-mode .keyframe-speed-popup-title {
  color: #e0e0e0;
}

.keyframe-speed-popup-content {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
}

.keyframe-speed-info {
  font-size: 13px;
  color: #666666;
  padding: 8px 12px;
  background: #f5f5f5;
  border-radius: 6px;
}

body.dark-mode .keyframe-speed-info {
  color: #999999;
  background: #3a3a3a;
}

.keyframe-speed-slider-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.keyframe-speed-label-text {
  font-size: 13px;
  color: #333333;
  white-space: nowrap;
}

body.dark-mode .keyframe-speed-label-text {
  color: #e0e0e0;
}

.keyframe-speed-slider {
  flex: 1;
  height: 4px;
  -webkit-appearance: none;
  appearance: none;
  background: #e0e0e0;
  border-radius: 2px;
  outline: none;
}

body.dark-mode .keyframe-speed-slider {
  background: #555555;
}

.keyframe-speed-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  background: #409EFF;
  border-radius: 50%;
  cursor: pointer;
  border: none;
}

.keyframe-speed-slider::-moz-range-thumb {
  width: 16px;
  height: 16px;
  background: #409EFF;
  border-radius: 50%;
  cursor: pointer;
  border: none;
}

.keyframe-speed-value {
  font-size: 14px;
  font-weight: 600;
  color: #409EFF;
  min-width: 40px;
  text-align: right;
}

.keyframe-speed-presets {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.keyframe-speed-preset-label {
  font-size: 13px;
  color: #666666;
}

body.dark-mode .keyframe-speed-preset-label {
  color: #999999;
}

.keyframe-speed-preset {
  padding: 4px 12px;
  background: #f0f0f0;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  font-size: 12px;
  color: #333333;
  cursor: pointer;
  transition: background-color 0.2s, border-color 0.2s;
}

.keyframe-speed-preset:hover {
  background: #e0e0e0;
  border-color: #d0d0d0;
}

body.dark-mode .keyframe-speed-preset {
  background: #3a3a3a;
  border-color: #555555;
  color: #e0e0e0;
}

body.dark-mode .keyframe-speed-preset:hover {
  background: #444444;
}

.keyframe-speed-popup-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

.keyframe-speed-delete {
  padding: 0 16px;
  height: 32px;
  background: transparent;
  border: 1px solid #ff4d4f;
  border-radius: 6px;
  font-size: 13px;
  color: #ff4d4f;
  cursor: pointer;
  transition: background-color 0.2s;
}

.keyframe-speed-delete:hover {
  background: rgba(255, 77, 79, 0.1);
}

.keyframe-speed-confirm {
  padding: 0 20px;
  height: 32px;
  background: #409EFF;
  border: none;
  border-radius: 6px;
  font-size: 13px;
  color: #ffffff;
  cursor: pointer;
  transition: background-color 0.2s;
}

.keyframe-speed-confirm:hover {
  background: #66b1ff;
}

/* ==================== 素材编辑器弹窗 ==================== */

.material-editor-modal {
  width: 1000px;
  max-width: 95vw;
  height: 80vh;
  display: flex;
  flex-direction: column;
}

.material-editor-body {
  display: flex;
  flex-direction: row;
  flex: 1;
  min-height: 0;
  gap: 20px;
  padding: 0;
  margin: 16px 0;
}

/* 左侧预览 */
.editor-preview-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 10px;
}

.editor-preview-wrapper {
  /*overflow: hidden;*/
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #333333;
}

body.dark-mode .editor-preview-wrapper {
  border-color: #F5F5F5;
}

.editor-preview-content {
  position: relative;
  user-select: none;
  transform-origin: center center;
}

.editor-base-image {
  display: block;
  max-width: none;
  pointer-events: none;
  width: 100%;
  height: 100%;
}


/* 预览控制 */
.editor-zoom-controls {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: #f9f9f9;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid #e6e6e6;
}

body.dark-mode .editor-zoom-controls {
  background: #2d2d2d;
  border-color: #404040;
}

.editor-zoom-controls button {
  width: 28px;
  height: 28px;
  border: 1px solid #ddd;
  background: #fff;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: #666;
}

body.dark-mode .editor-zoom-controls button {
  background: #333;
  border-color: #555;
  color: #ccc;
}

/* 底部按钮 
.editor-bottom-actions {
  display: flex;
  flex-direction: row;
  align-items: center;
} */

/* 右侧设置 */
.editor-controls-area {
  width: 360px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  /*margin-right: 16px; */

  overflow-y: auto;
}

body.dark-mode .editor-controls-area {
  border-left-color: #404040;
}

.material-btn-edit {
  box-sizing: border-box;
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  border-radius: 8px;
  width: 28px;
  height: 28px;
  background: #FFFFFF;
  border: 1px solid #e6e6e6;
  cursor: pointer;
  transition: all 0.15s ease;
}

.material-btn-edit svg {
  width: 20px;
  height: 20px;
  flex: none;
  order: 0;
}

.material-btn-edit svg path {
  stroke: #333333;
}

body.dark-mode .material-btn-edit svg path {
  stroke: #CCCCCC;
}

.material-btn-edit:hover {
  background: #F5F5F7;
  border-color: #CCCCCC;
}

.material-btn-edit:active {
  background: #E8E8ED;
  transform: scale(0.95);
}

body.dark-mode .material-btn-edit {
  background: #2d2d2d;
  border-color: #505050;
}

body.dark-mode .material-btn-edit:hover {
  background: #3a3a3a;
  border-color: #606060;
}

.edit-dot {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 6px;
  height: 6px;
  background-color: #ff4444;
  border-radius: 50%;
  border: 1px solid #fff;
  z-index: 2;
}