@charset "UTF-8";
/* 鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺?   RESET & BASE
鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺?*/
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  height: 100%;
  font-family: 'Nunito', sans-serif;
  background: var(--bg);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

/* 鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺?   ANIMATED STARFIELD BACKGROUND
鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺?*/
.starfield {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.star {
  position: absolute;
  border-radius: 50%;
  background: var(--pink-light);
  animation: twinkle var(--dur, 3s) ease-in-out infinite;
  animation-delay: var(--delay, 0s);
  opacity: 0;
}

@keyframes twinkle {

  0%,
  100% {
    opacity: 0;
    transform: scale(0.5);
  }

  50% {
    opacity: var(--max-op, 0.7);
    transform: scale(1.2);
  }
}


/* ── (Removed rotating yellow sparkle) ── */

/* 鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺?   SCREEN SYSTEM
鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺?*/
.screen {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  z-index: var(--z-base);
  opacity: 0;
  pointer-events: none;
  /* 恢复至纯粹的纵深缩放，移除螺旋感 */
  transform: scale(1.04);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), 
              transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform, opacity;
}

.screen.active {
  opacity: 1;
  pointer-events: all;
  transform: scale(1);
}

/* 鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺?   COMMON COMPONENTS
鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺?*/

/* Glass Card */
.glass-card {
  background: var(--surface);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-card);
}

/* Primary Button */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 32px;
  border: none;
  border-radius: var(--r-pill);
  cursor: pointer;
  font-family: 'Nunito', sans-serif;
  font-weight: 800;
  font-size: 16px;
  color: var(--text-on-btn);
  background: var(--grad-primary);
  box-shadow: var(--shadow-btn);
  position: relative;
  overflow: hidden;
  transition: var(--t-bounce);
}

.btn-primary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--grad-btn);
  border-radius: inherit;
}

.btn-primary:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: none;
}

.btn-primary:active {
  transform: translateY(1px) scale(0.96);
}
.fine-btn:active {
  transform: scale(0.92);
  background: rgba(255,255,255,0.15);
}
.tool-btn:active {
  transform: scale(0.92);
  background: rgba(255,255,255,0.08);
}

.btn-primary:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* Icon Button */
.btn-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--surface);
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--t-fast);
  font-size: 18px;
}

.btn-icon:hover {
  background: var(--surface-hover);
  border-color: var(--border-mid);
  color: var(--pink);
  box-shadow: none;
}

.btn-icon.active {
  border-color: var(--pink);
  color: var(--pink);
  background: var(--bg);
}

/* Holographic border effect */
.holo-border {
  position: relative;
}

.holo-border::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  background: var(--grad-holo);
  background-size: 300% 300%;
  z-index: -1;
  animation: holoShift 4s linear infinite;
  opacity: 0;
  transition: opacity 0.3s;
}

.holo-border:hover::before {
  opacity: 1;
}

@keyframes holoShift {
  0% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }

  100% {
    background-position: 0% 50%;
  }
}

/* Progress bar */
.progress-wrap {
  position: relative;
  height: 4px;
  background: rgba(255, 140, 210, 0.15);
  border-radius: var(--r-pill);
  cursor: pointer;
  /* 移动端优化：增加透明触控传感器，高度为 16px */
  margin: 10px 0;
}

.progress-wrap::after {
  content: '';
  position: absolute;
  top: -10px;
  bottom: -10px;
  left: 0;
  right: 0;
  z-index: 10;
}

.progress-fill {
  height: 100%;
  border-radius: var(--r-pill);
  background: var(--grad-primary);
  box-shadow: 0 0 8px rgba(255, 110, 180, 0.6);
  transition: width 0.1s linear;
  pointer-events: none;
}

.progress-thumb {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--pink-light);
  box-shadow: 0 0 10px var(--pink);
  border: 2px solid #fff;
  cursor: pointer;
  pointer-events: none;
}

/* Range slider */
input[type=range] {
  -webkit-appearance: none;
  width: 100%;
  height: 4px;
  border-radius: var(--r-pill);
  background: rgba(255, 140, 210, 0.2);
  outline: none;
  cursor: pointer;
}

input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--pink-light);
  box-shadow: 0 0 8px var(--pink);
  border: 2px solid #fff;
  cursor: pointer;
  transition: var(--t-bounce);
}

input[type=range]::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

/* Toast */
.toast {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--surface-modal);
  border: 1px solid var(--border-mid);
  backdrop-filter: blur(20px);
  border-radius: var(--r-pill);
  padding: 10px 24px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  z-index: var(--z-toast);
  opacity: 0;
  transition: var(--t-mid);
  white-space: nowrap;
  pointer-events: none;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}


/* 鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺?   HOME SCREEN
鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺?*/
#screen-home {
  align-items: center;
  justify-content: center;
  padding: var(--sp-xl) var(--sp-lg);
  gap: var(--sp-lg);
  min-height: 100vh; /* 确保容器至少撑满全屏 */
  position: relative;
}

/* ── 首页星云氛围 (Nebula Atmosphere) ── 移至背景层防止裁剪 */
.starfield::before, .starfield::after {
  content: '';
  position: fixed;
  width: 450px;
  height: 450px;
  border-radius: 50%;
  filter: blur(100px);
  z-index: -1;
  opacity: 0.12;
  pointer-events: none;
}

.starfield::before {
  background: var(--pink);
  top: -150px;
  left: -150px;
  animation: floatOrb 15s infinite alternate ease-in-out;
}

.starfield::after {
  background: #9650ff;
  bottom: -150px;
  right: -150px;
  animation: floatOrb 20s infinite alternate-reverse ease-in-out;
}

@keyframes floatOrb {
  from { transform: translate(0, 0) scale(1); }
  to { transform: translate(50px, 50px) scale(1.2); }
}

/* Logo */
.home-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.logo-text {
  font-family: 'Orbitron', sans-serif;
  font-size: 30px;
  font-weight: 900;
  /* 精修：全息动态渐变 */
  background: linear-gradient(
    135deg, 
    #FF6EB4 10%, 
    #9650ff 40%, 
    #6EB4FF 60%, 
    #FF6EB4 90%
  );
  background-size: 300% 300%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: holoShift 6s ease infinite; /* 更缓慢平滑的流动 */
  letter-spacing: 6px;
  text-shadow: 0 0 20px rgba(255, 110, 180, 0.15); /* 淡淡的霓虹光晕 */
  margin-right: -6px; /* 抵消末尾字间距 */
}

.logo-sub {
  font-size: 10px;
  font-weight: 500;
  color: #fff; /* 从 muted 提升至白色 */
  letter-spacing: 5px;
  text-transform: uppercase;
  opacity: 0.85; /* 增加透明度确保可见性 */
}

@keyframes holoShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Home title */
 .home-title {
  font-size: 13.5px;
  font-weight: 600;
  color: #fff; /* 提亮至白色 */
  letter-spacing: 2px;
  text-align: center;
  opacity: 0.95;
  margin-top: 10px;
  text-shadow: 0 1px 4px rgba(0,0,0,0.5); /* 增加边缘锐度 */
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.home-title::before {
  content: '';
  width: 20px;
  height: 1px;
  background: rgba(255,255,255,0.1);
}

/* Upload area */
.upload-row {
  display: flex;
  gap: var(--sp-md);
  width: 100%;
  max-width: 360px;
}

.upload-card {
  flex: 1;
  aspect-ratio: 0.75;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  /* 精修：从虚线改为极细实线，增加专业感 */
  border: 1.2px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--r-lg);
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(5px);
  transition: var(--t-bounce);
  position: relative;
  overflow: hidden;
  text-align: center;
  padding: 12px;
  box-shadow: inset 0 0 15px rgba(255, 255, 255, 0.02);
}

.upload-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--grad-surface);
  opacity: 0;
  transition: var(--t-mid);
}

.upload-card:hover::before {
  opacity: 1;
}

.upload-card:hover {
  border-color: var(--pink);
  box-shadow: var(--glow-pink);
  transform: translateY(-3px);
}

.upload-card.has-video {
  border-style: solid;
  border-color: var(--pink);
}

.upload-card.has-video .upload-icon,
.upload-card.has-video .upload-label,
.upload-card.has-video .upload-check,
.upload-card.has-video .upload-hint {
  display: none;
}

.upload-card.has-video .upload-thumb {
  opacity: 1;
}

.upload-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--grad-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  box-shadow: none;
  transition: var(--t-bounce);
}

.upload-card:hover .upload-icon {
  transform: scale(1.1);
}

.upload-label {
  font-size: 13px;
  font-weight: 700;
  color: #fff; /* 提亮，确保在镜面背景前清晰 */
  opacity: 0.9;
}

.upload-hint {
  font-size: 11px;
  color: var(--text-muted);
}

.upload-thumb {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--r-lg);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.upload-check {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: var(--pink);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  z-index: 2;
  box-shadow: 0 0 12px rgba(255, 105, 180, 0.4);
  animation: popIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.upload-check svg {
  width: 12px !important;
  height: 12px !important;
  stroke-width: 4 !important;
}

/* Start button */
.start-btn-wrap {
  width: 100%;
  max-width: 210px; /* Narrower for a sleeker, more refined look */
  margin: 22px auto 0; /* Slightly raised for better balance */
}

.btn-start {
  width: 100%;
  padding: 12px 20px; /* Reduced padding for a more compact feel */
  font-size: 14px; /* Slightly smaller font */
  font-weight: 800;
  letter-spacing: 3px;
  text-transform: uppercase;
  border-radius: 99px;
  background: rgba(255, 110, 180, 0.1);
  border: 1px solid rgba(255, 110, 180, 0.4);
  color: #fff;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(10px);
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
  transition: var(--t-bounce);
}

.btn-start:hover {
  transform: translateY(-2px);
  background: rgba(255, 110, 180, 0.15);
  border-color: var(--pink);
  box-shadow: 0 10px 40px rgba(255, 110, 180, 0.2);
}

/* 扫光效果 (Shimmer) */
.btn-start::after {
  content: '';
  position: absolute;
  top: 0;
  left: -150%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.25),
    transparent
  );
  transform: skewX(-25deg);
  animation: sweep 4s infinite ease-in-out;
}

@keyframes sweep {
  0% { left: -150%; }
  25% { left: 150%; }
  100% { left: 150%; }
}

/* 鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺?   LOADING MODAL
鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺?*/
/* ── 专家级导出向导 (App Store Wizard) ── */
#modal-guide .modal-content {
  width: calc(100% - 48px);
  max-width: 320px;
  background: rgba(20, 18, 40, 0.7);
  backdrop-filter: blur(25px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 28px;
  padding: 30px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  box-shadow: 0 20px 50px rgba(0,0,0,0.5);
}

.guide-icon {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  background: var(--grad-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  box-shadow: 0 10px 20px rgba(255, 110, 180, 0.3);
  margin-bottom: 20px;
}

.guide-title {
  font-size: 20px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 8px;
}

.guide-desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 24px;
}

.guide-badge {
  width: 135px;
  height: 40px;
  cursor: pointer;
  transition: var(--t-fast);
  margin-bottom: 24px;
}

.guide-badge:hover { transform: scale(1.05); }

.guide-secondary-btn {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.15);
  color: #fff;
  padding: 10px 20px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 600;
  width: 100%;
  cursor: pointer;
  transition: var(--t-fast);
}

.guide-secondary-btn:active { background: rgba(255,255,255,0.05); }

.modal-close-btn {
  margin-top: 16px;
  color: var(--text-muted);
  font-size: 12px;
  cursor: pointer;
  text-decoration: underline;
}
}

.loading-card {
  width: calc(100% - 64px);
  max-width: 280px;
  padding: var(--sp-xl) var(--sp-lg);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-md);
  text-align: center;
}

/* 精致化加载圈 (Replaced Yellow Lock) */
.loading-icon-new {
  width: 48px;
  height: 48px;
  border: 2px solid rgba(255, 110, 180, 0.1);
  border-top: 2px solid var(--pink);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  box-shadow: 0 0 15px rgba(255, 110, 180, 0.2);
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.loading-title {
  font-size: 17px;
  font-weight: 800;
  color: var(--pink-light);
}

.loading-status {
  font-size: 13px;
  color: var(--text-secondary);
  min-height: 20px;
}

.loading-bar-wrap {
  width: 100%;
  height: 6px;
  background: rgba(255, 140, 200, 0.15);
  border-radius: var(--r-pill);
  overflow: hidden;
}

.loading-bar-fill {
  height: 100%;
  border-radius: var(--r-pill);
  background: var(--grad-primary);
  box-shadow: 0 0 10px var(--pink);
  transition: width 0.4s ease;
  width: 0%;
}

/* 鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺?   REVIEW SCREEN
鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺愨晲鈺?*/
#screen-review {
  display: flex;
  flex-direction: column;
}

/* Header */
.review-header {
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 18px;
  background: rgba(7, 5, 26, 0.45); /* 极低透明度，增强通透感 */
  backdrop-filter: blur(15px);
  border-bottom: 0.5px solid rgba(255, 255, 255, 0.08); /* 0.5px 极精细分割线 */
  color: var(--text-primary);
  flex-shrink: 0;
  position: relative;
  z-index: 1000;
}

.header-back {
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  color: var(--text-primary);
  transition: var(--t-fast);
}

.header-back:active {
  transform: scale(0.9);
  opacity: 0.7;
}

/* Header Export Button */
.header-export {
  padding: 7px 18px;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--pink-light);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--t-fast);
  backdrop-filter: blur(10px);
}

.header-export:hover {
  background: var(--surface-hover);
  border-color: var(--pink);
  box-shadow: none;
}

.header-export:active {
  transform: scale(0.96);
}

/* Video Area Improvements */
.video-area-container {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
  overflow: hidden;
  position: relative;
}

.video-area {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  display: flex;
  position: relative;
  background: #000;
  transition: var(--t-mid);
}

.video-slot {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  background: #000;
  transition: var(--t-mid);
}

.video-slot:first-child {
  border-right: 1px solid var(--border);
}

.video-slot.is-selected::after {
  content: "";
  position: absolute;
  inset: 0;
  /* Fixed: Removed opaque background that was covering the video */
  border: 1.2px solid var(--pink);
  z-index: 10;
  pointer-events: none;
  /* Sharp, non-bleeding subtle glow */
  box-shadow: 0 0 8px rgba(255, 110, 180, 0.25);
}

/* Optical Alignment Markers - High Precision UI Detail */
.video-slot.is-selected::before {
  content: "";
  position: absolute;
  inset: -1.2px;
  z-index: 11;
  pointer-events: none;
  /* 4 tiny corner brackets + 4 mid-point dots */
  background: 
    linear-gradient(to right, #fff 100%, transparent 0) 0 0,
    linear-gradient(to right, #fff 100%, transparent 0) 100% 100%,
    linear-gradient(to bottom, #fff 100%, transparent 0) 0 0,
    linear-gradient(to bottom, #fff 100%, transparent 0) 100% 100%,
    radial-gradient(circle, #fff 1px, transparent 1px) 50% 0,
    radial-gradient(circle, #fff 1px, transparent 1px) 50% 100%,
    radial-gradient(circle, #fff 1px, transparent 1px) 0 50%,
    radial-gradient(circle, #fff 1px, transparent 1px) 100% 50%;
  background-repeat: no-repeat;
  background-size: 5px 5px, 5px 5px, 5px 5px, 5px 5px, 2px 2px, 2px 2px, 2px 2px, 2px 2px;
  opacity: 0.45;
}

.video-slot video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  transition: transform 0.3s ease;
}

/* 鈹€鈹€ Crop Overlay 鈹€鈹€ */
.crop-overlay {
  position: absolute;
  inset: 0;
  z-index: 20;
  background: rgba(0,0,0,0.45);
  cursor: crosshair;
}
.crop-box {
  position: absolute;
  /* 取消实体边框，改用护角 */
  border: none;
  box-shadow: 0 0 0 9999px rgba(0,0,0,0.7); /* 加深遮罩对比度 */
  box-sizing: border-box;
  cursor: move;
}

/* 增加专业九宫格辅助线 */
.crop-box::before, .crop-box::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.15;
}
.crop-box::before {
  border-left: 0.5px solid #fff;
  border-right: 0.5px solid #fff;
  margin: 0 33.33%;
}
.crop-box::after {
  border-top: 0.5px solid #fff;
  border-bottom: 0.5px solid #fff;
  margin: 33.33% 0;
}
.crop-handle {
  position: absolute;
  width: 38px; height: 38px; /* 增加触控热区 */
  background: transparent;
  z-index: 21;
  touch-action: none;
}
/* 发丝级 L 型护角 */
.crop-handle::after {
  content: '';
  position: absolute;
  width: 18px; height: 18px;
  border: 1.5px solid #fff;
  box-shadow: 0 0 8px rgba(255,255,255,0.3);
  box-sizing: border-box;
}
.crop-handle.tl { top: -2px; left: -2px; cursor: nwse-resize; }
.crop-handle.tl::after { border-right: none; border-bottom: none; top:0; left:0; }
.crop-handle.tr { top: -2px; right: -2px; cursor: nesw-resize; }
.crop-handle.tr::after { border-left: none; border-bottom: none; top:0; right:0; }
.crop-handle.bl { bottom: -2px; left: -2px; cursor: nesw-resize; }
.crop-handle.bl::after { border-right: none; border-top: none; bottom:0; left:0; }
.crop-handle.br { bottom: -2px; right: -2px; cursor: nwse-resize; }
.crop-handle.br::after { border-left: none; border-top: none; bottom:0; right:0; }
.crop-done-btn {
  position: absolute;
  top: 20px;
  bottom: auto;
  left: 50%;
  transform: translateX(-50%);
  z-index: 999;
  /* 极致全息：毛玻璃 + 极细粉色边框 */
  background: rgba(255, 105, 180, 0.1);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  color: #fff;
  border: 0.5px solid rgba(255, 110, 180, 0.6);
  border-radius: 99px;
  padding: 8px 24px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 1px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.5), 0 0 10px rgba(255, 110, 180, 0.2);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.crop-done-btn:active {
  transform: translateX(-50%) scale(0.92);
  background: rgba(255, 110, 180, 0.3);
}

/* 为按钮增加一个微妙的扫光 */
.crop-done-btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transform: skewX(-20deg) translateX(-150%);
  animation: sweep 3s infinite;
}

/* Individual Slot Controls */
/* 移动端安全区适配：底部工具栏底部留白 */
.tool-bar {
  padding-bottom: env(safe-area-inset-bottom, 15px);
}

.btn-slot-fs {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  font-size: 12px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 6px;
  z-index: 5;
  display: flex; align-items: center; justify-content: center;
  padding: 0;
  transition: var(--t-fast);
}

/* 扩大的点击热区 */
.btn-slot-fs::after {
  content: '';
  position: absolute;
  inset: -10px;
}

.btn-slot-fs:active { transform: scale(0.9); }

.video-volume-btn {
  position: absolute;
  right: 12px;
  bottom: 12px;
  width: 34px; /* Slightly smaller for elegance */
  height: 34px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  cursor: pointer;
  z-index: 8;
  display: flex; align-items: center; justify-content: center;
  transition: var(--t-fast);
  padding: 0;
}

.video-volume-btn::after {
  content: '';
  position: absolute;
  inset: -8px;
}

.video-volume-btn:active { transform: scale(0.85); }

/* Vertical volume popup �?appears above the mute button */
.video-volume-pop {
  position: absolute;
  right: 18px; /* 精准对齐右下角喇叭中心 (15px + 38/2 - 32/2) */
  bottom: 56px;
  width: 32px;
  height: 160px;
  border-radius: 16px;
  background: rgba(10, 7, 28, 0.75);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  display: flex !important;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  border: 0.5px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
  
  /* 弹出动效：从喇叭位置向上生长 */
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px) scale(0.95);
  transform-origin: bottom center;
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.video-volume-pop.show {
  opacity: 1;
  pointer-events: all;
  transform: translateY(0) scale(1);
}

/* iOS-style Thick Volume Pill */
.vol-slider-custom {
  position: relative;
  width: 100%; /* 填满容器宽度，确保触控范围 */
  height: 120px;
  cursor: pointer;
  touch-action: none;
  display: flex;
  justify-content: center; /* 内部居中 */
}

/* 轨道背景线 */
.vol-slider-custom::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 100%;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
}
/* Center reference line (50% mark) */
.vol-slider-custom::before {
  content: '';
  position: absolute;
  left: 0; right: 0;
  top: 50%;
  height: 1.5px;
  background: rgba(255, 255, 255, 0.4);
  z-index: 2;
  pointer-events: none;
}
.vol-track-fill {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%); /* 绝对居中 */
  width: 4px;
  background: var(--pink);
  box-shadow: 0 0 12px var(--pink);
  border-radius: 2px;
  z-index: 1;
  transition: height 0.1s ease-out;
}

/* 增加时间轴同款滑块点 (Thumb) */
.vol-track-fill::after {
  content: '';
  position: absolute;
  top: -6px;
  left: 50%;
  transform: translateX(-50%);
  width: 12px;
  height: 12px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 0 8px rgba(255,255,255,0.8);
}

/* ── 精密微调悬浮岛 (Sync Adjuster Island) ── */
.sync-fine-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px; /* Reduced for 5-button layout */
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(15px);
  padding: 6px 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 99px;
  width: fit-content;
  margin: 0 auto 12px auto;
  box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}
.fine-btn {
  background: transparent;
  border: none;
  color: var(--pink-light);
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  border-radius: 6px;
  padding: 4px 6px;
  font-size: 12px;
  cursor: pointer;
  transition: var(--t-fast);
  display: flex;
  align-items: center;
  gap: 2px;
}
.fine-btn:active {
  transform: scale(0.9);
  background: rgba(255, 255, 255, 0.08);
}

/* ── 精密时间轴 (Professional Timeline) ── */
.controls-bar {
  flex-shrink: 0;
  padding: 12px 18px 20px;
  background: linear-gradient(180deg, transparent 0%, rgba(7,5,26,0.9) 30%);
}
.progress-wrap {
  position: relative;
  height: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  margin-bottom: 8px;
}
.progress-track-bg {
  position: absolute;
  left: 0; right: 0;
  height: 2px;
  background: rgba(255,255,255,0.08);
  border-radius: 99px;
}
.progress-fill {
  position: absolute;
  left: 0;
  height: 2px;
  background: var(--grad-primary);
  border-radius: 99px;
  pointer-events: none;
  box-shadow: 0 0 10px rgba(255,110,180,0.4);
}
.progress-thumb {
  position: absolute;
  top: 50%;
  width: 2.5px;
  height: 12px;
  background: #fff;
  border-radius: 1px;
  transform: translate(-50%, -50%);
  pointer-events: none;
  box-shadow: 0 0 8px rgba(255,255,255,0.6);
  transition: height 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.progress-wrap:hover .progress-thumb { 
  height: 18px;
  box-shadow: 0 0 12px #fff;
}

.time-row {
  display: flex;
  align-items: center;
  gap: 20px;
  font-family: 'Outfit', sans-serif;
}

#time-cur, #time-dur {
  font-family: 'Monaco', 'Courier New', monospace;
  font-size: 11px;
  color: #fff; /* 提亮至白色 */
  opacity: 0.85;
  width: 44px;
}

#time-dur { text-align: right; }

.play-btns {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
}

/* 核心大师级播放键 (Master Play Button) */
.btn-play-sm {
  width: 52px; height: 52px;
  border-radius: 50%;
  background: var(--grad-primary);
  border: none;
  font-size: 20px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  position: relative;
  box-shadow: 
    0 10px 20px rgba(255,110,180,0.3),
    inset 0 2px 5px rgba(255,255,255,0.4); /* 内凹发光 */
  transition: var(--t-bounce);
}

.btn-play-sm:active { 
  transform: scale(0.9) translateY(2px);
  box-shadow: 0 4px 10px rgba(255,110,180,0.2);
}

.btn-loop-sm {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 50%;
  width: 36px; height: 36px;
  font-size: 14px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-secondary);
  transition: var(--t-fast);
}

.btn-loop-sm.active {
  background: rgba(255,110,180,0.1);
  border-color: var(--pink);
  color: var(--pink);
  box-shadow: 0 0 10px rgba(255,110,180,0.2);
}
  border-color: var(--pink);
  color: var(--pink);
  background: rgba(255,105,180,0.15);
  box-shadow: 0 0 15px rgba(255, 110, 180, 0.4), inset 0 0 10px rgba(255, 110, 180, 0.2);
  transform: scale(1.05);
}
/* Tiny active indicator */
.btn-loop-sm.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--pink);
  box-shadow: 0 0 5px var(--pink);
}

/* Single Adjustment Row */
.single-adj-row {
  display: flex;
  justify-content: center;
  gap: 12px;
  padding: 12px 16px;
  background: linear-gradient(to bottom, rgba(7, 5, 26, 0.4), rgba(7, 5, 26, 0.8));
  backdrop-filter: blur(8px);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  flex-shrink: 0;
}

.adj-btn {
  flex: 1;
  max-width: 64px;
  height: 48px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.85);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.adj-btn::before {
  content: '';
  position: absolute;
  inset: -4px;
  background: var(--grad-primary);
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 0;
}

.adj-btn:active {
  transform: translateY(-1px) scale(0.94);
}

.adj-svg, .adj-icon {
  width: 20px;
  height: 20px;
  font-size: 20px;
  position: relative;
  z-index: 1;
  transition: transform 0.3s ease, color 0.3s ease;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

.adj-btn:hover {
  border-color: rgba(255, 140, 210, 0.5);
  background: rgba(255, 255, 255, 0.08);
  transform: translateY(-3px);
  color: #fff;
}

.adj-btn:hover .adj-svg, 
.adj-btn:hover .adj-icon {
  transform: scale(1.15);
  color: var(--pink-light);
}

.adj-btn.active {
  border-color: var(--pink);
  background: rgba(255, 140, 210, 0.1);
  color: var(--pink);
  box-shadow: 0 0 20px rgba(255, 140, 210, 0.2), 
              inset 0 0 10px rgba(255, 140, 210, 0.1);
}

.adj-btn.active .adj-svg,
.adj-btn.active .adj-icon {
  color: var(--pink);
  transform: scale(1.1);
}

.adj-btn.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 4px;
  background: var(--pink);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--pink);
}

.adj-btn:active {
  transform: translateY(-1px) scale(0.95);
}

/* Toolbar */
.toolbar {
  display: flex;
  justify-content: space-around;
  padding: 10px var(--sp-md) 14px;
  background: rgba(7, 5, 26, 0.85);
  backdrop-filter: blur(10px);
  flex-shrink: 0;
}

.tool-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  padding: 6px 12px;
  border-radius: var(--r-md);
  border: 1px solid transparent;
  transition: var(--t-fast);
  background: transparent;
  position: relative;
}

.tool-btn::before {
  content: '';
  position: absolute;
  inset: -4px;
}

.tool-btn:active {
  transform: scale(0.9);
}

.tool-btn:hover {
  border-color: var(--border);
  background: var(--surface);
}

.tool-btn.active {
  border-color: var(--pink);
  background: var(--bg);
}

.tool-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--r-md);
  background: rgba(255, 255, 255, 0.05); /* 毛玻璃感背景 */
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  transition: all var(--t-bounce);
}

.tool-btn:hover .tool-icon {
  border-color: var(--border-mid);
  box-shadow: none;
  transform: translateY(-2px);
}

.tool-btn.active .tool-icon {
  border-color: var(--pink-light);
  background: linear-gradient(135deg, rgba(255, 110, 180, 0.25), rgba(150, 80, 255, 0.25));
  box-shadow: 0 0 15px rgba(255, 110, 180, 0.3);
  transform: translateY(-2px);
}

/* [NEW] SVG Icon base */
.svg-icon {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8; /* 稍微加粗一点 */
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: all var(--t-fast);
  color: rgba(255, 255, 255, 0.65); /* 显著提亮默认颜色 */
}

.tool-btn.active .svg-icon {
  color: #fff;
  filter: drop-shadow(0 0 3px var(--pink-light));
  transform: scale(1.05);
}

.tool-label {
  font-size: 11px;
  font-weight: 700;
  color: #fff; /* 提亮标签文字 */
  margin-top: 2px;
  transition: color var(--t-fast);
  opacity: 0.8;
}

.tool-btn.active .tool-label {
  color: var(--pink-light);
  text-shadow: 0 0 8px rgba(255, 110, 180, 0.3);
}

/* Tool Panels (slide up from toolbar) */
.tool-panels {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  z-index: 50;
}

.tool-panel {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(10, 7, 28, 0.94);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  border-top: 1px solid rgba(255, 255, 255, 0.08); /* 极细边框线 */
  padding: 24px 20px var(--sp-md); /* 增加顶部间距给手柄 */
  pointer-events: none;
  opacity: 0;
  transform: translateY(100%) scale(0.98); /* 初始缩小，弹出时放大 */
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), 
              transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  border-radius: 24px 24px 0 0;
  z-index: 60;
}

/* 抽屉手柄 (Drawer Handle) */
.panel-handle {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 44px; /* Slightly taller hit area for easier grabbing */
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: grab;
  z-index: 10;
  touch-action: none; /* CRITICAL: Prevent browser scroll/zoom while dragging */
}
.panel-handle::after {
  content: '';
  width: 36px;
  height: 4px;
  background: rgba(255, 255, 255, 0.2); /* Slightly more visible */
  border-radius: 2px;
  margin-top: -12px; /* Center the visual bar in the top part of the hit area */
}
.panel-handle:active {
  cursor: grabbing;
}

.tool-panel.show {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: all;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px; /* Reduced from 14px */
}

.panel-title {
  font-size: 16px;
  font-weight: 900;
  letter-spacing: -0.3px;
  color: #fff;
  background: linear-gradient(to right, #fff, rgba(255, 255, 255, 0.7));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.panel-confirm {
  width: 38px;
  height: 38px;
  background: transparent;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  transition: all 0.3s var(--t-bounce);
  opacity: 0.8;
  position: relative;
  z-index: 50; /* Ensure button stays above the drag handle */
}

.panel-confirm:active {
  transform: scale(0.8);
  opacity: 1;
}

.panel-confirm svg {
  width: 22px !important;
  height: 22px !important;
  filter: drop-shadow(0 0 4px rgba(255,255,255,0.2));
}

/* SVG Check Draw Animation */
.panel-confirm svg polyline,
.upload-check svg polyline {
  stroke-dasharray: 20;
  stroke-dashoffset: 20;
  animation: drawCheck 0.4s ease forwards 0.1s;
}

@keyframes drawCheck {
  to { stroke-dashoffset: 0; }
}

@keyframes popIn {
  0% { transform: scale(0); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.panel-confirm::before {
  content: '';
  position: absolute;
  inset: -10px;
}

.panel-confirm:hover {
  transform: scale(1.1);
}

.panel-confirm:active {
  transform: scale(0.9);
}

/* Canvas Panel */
.canvas-scroll {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 8px;
  scrollbar-width: none;
}

.canvas-scroll::-webkit-scrollbar {
  display: none;
}

.ratio-item {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  padding: 8px 12px;
  border-radius: var(--r-md);
  border: 1px solid var(--border);
  background: var(--surface);
  transition: var(--t-fast);
  position: relative;
}

.ratio-item::before {
  content: '';
  position: absolute;
  inset: -6px;
}

.ratio-item:hover {
  border-color: var(--border-mid);
  background: var(--surface-hover);
}

.ratio-item.active {
  border-color: var(--pink);
  background: var(--bg);
}

.ratio-item:active {
  transform: scale(0.94);
}

.ratio-box {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.4); /* 默认改为实线 */
  border-radius: 4px;
  transition: all var(--t-fast);
}

/* 只有无框（原始比例）使用虚线 */
.ratio-item[data-ratio="free"] .ratio-box {
  border-style: dashed;
}

.ratio-item:hover .ratio-box {
  border-color: rgba(255, 255, 255, 0.7);
}

.ratio-item.active .ratio-box {
  background: rgba(255, 255, 255, 0.15);
  border-width: 1.5px;
  border-color: #fff;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

.ratio-name {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-secondary);
}

.ratio-val {
  font-size: 10px;
  color: var(--text-muted);
}

/* Speed Panel */
.speed-grid {
  display: flex;
  gap: 12px;
  flex-wrap: nowrap;
  justify-content: flex-start;
  padding: 15px 4px;
  overflow-x: auto;
  scrollbar-width: none; /* Firefox */
  -webkit-overflow-scrolling: touch;
}

.speed-grid::-webkit-scrollbar {
  display: none; /* Hide scrollbar for Chrome/Safari */
}

.speed-chip {
  flex-shrink: 0;
  padding: 8px 16px;
  border-radius: var(--r-pill);
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--t-bounce);
  font-family: system-ui, -apple-system, sans-serif;
  font-variant-numeric: normal;
  position: relative;
}

.speed-chip::before {
  content: '';
  position: absolute;
  inset: -4px;
}

/* ── BGM Rate Section ── */
.bgm-rate-section {
  background: rgba(255, 255, 255, 0.04);
  padding: 12px;
  border-radius: var(--r-md);
  border: 1px solid rgba(255, 110, 180, 0.15);
}
.bgm-rate-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.bgm-rate-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
}
.bgm-rate-val {
  font-size: 14px;
  font-weight: 900;
  color: var(--pink-light);
  font-family: system-ui, -apple-system, sans-serif;
  font-variant-numeric: normal;
}
.bgm-rate-range {
  -webkit-appearance: none;
  width: 100%;
  height: 4px;
  background: rgba(255, 110, 180, 0.2);
  border-radius: 2px;
  outline: none;
}
.bgm-rate-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  background: var(--pink);
  border: 2px solid #fff;
  border-radius: 50%;
  box-shadow: 0 0 10px var(--pink);
  cursor: pointer;
  transition: transform 0.1s;
}
.bgm-rate-range::-webkit-slider-thumb:active {
  transform: scale(1.2);
}

.speed-chip:hover {
  border-color: var(--border-mid);
  color: var(--pink-light);
  transform: translateY(-1px);
}

.speed-chip.active {
  border-color: var(--pink-light);
  background: var(--surface-active);
  color: #fff;
  box-shadow: 0 0 15px rgba(255, 110, 180, 0.4);
  text-shadow: 0 0 8px var(--pink);
}

.speed-chip:active {
  transform: scale(0.92);
}

/* Music Panel */
.music-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.music-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px var(--sp-md);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--surface);
  cursor: pointer;
  transition: var(--t-fast);
}

.music-option:hover {
  border-color: var(--border-mid);
  background: var(--surface-hover);
}

.music-opt-icon {
  font-size: 22px;
}

.music-opt-label {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-secondary);
}

.music-opt-sub {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

.music-now-playing {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px var(--sp-md);
  border: 1px solid var(--pink);
  border-radius: var(--r-md);
  background: var(--bg);
}

.music-bars {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 20px;
}

.music-bar {
  width: 3px;
  background: var(--pink);
  border-radius: 2px;
  animation: musicBar var(--dur, 0.6s) ease-in-out infinite alternate;
}

@keyframes musicBar {
  from {
    height: 4px;
  }

  to {
    height: var(--h, 16px);
  }
}

.music-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--pink-light);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}

.music-remove {
  margin-left: auto;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(255, 110, 180, 0.2);
  border: none;
  cursor: pointer;
  color: var(--pink);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

/* Filter Panel */
.filter-rows {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.filter-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.filter-row-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.filter-name {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
}

.filter-value {
  font-size: 13px;
  font-weight: 800;
  color: var(--pink-light);
  font-family: system-ui, -apple-system, sans-serif;
  font-variant-numeric: normal;
}

.filter-reset {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 11px;
  transition: var(--t-fast);
  padding: 2px 6px;
  border-radius: 4px;
}

.filter-reset:hover {
  color: var(--pink);
  background: var(--surface);
}
/* ── Export Overlay ── */
.export-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  backdrop-filter: blur(20px);
  z-index: 20000;
  display: none; 
  align-items: center;
  justify-content: center;
  padding: 30px;
}
.export-overlay.active {
  display: flex !important;
}
.export-content {
  width: 100%;
  max-width: 400px;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.export-loader {
  width: 60px;
  height: 60px;
  border: 4px solid rgba(255,255,255,0.1);
  border-top-color: var(--pink);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 20px;
}
@keyframes spin { to { transform: rotate(360deg); } }

.export-status {
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 10px;
  text-align: center;
}
.export-tip {
  font-size: 13px;
  color: rgba(255,140,210,0.8);
  line-height: 1.6;
  text-align: center;
}
.export-close-btn {
  margin-top: 20px;
  padding: 10px 30px;
  border-radius: 20px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  color: #fff;
  cursor: pointer;
}

/* BGM Loop Button */
.bgm-loop-btn {
  background: rgba(255,105,180,0.1);
  border: 1px solid rgba(255,105,180,0.3);
  color: var(--pink-light);
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 10px;
  margin-bottom: 5px;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.bgm-loop-btn.active {
  background: var(--pink);
  border-color: var(--pink);
  color: #fff;
  box-shadow: 0 0 10px rgba(255,105,180,0.4);
}
.bgm-offset-range {
  -webkit-appearance: none;
  width: 100%;
 height: 4px;
 background: rgba(255,105,180,0.2);
 border-radius: 2px;
 outline: none;
 margin: 15px 0;
}
.bgm-offset-range::-webkit-slider-thumb {
 -webkit-appearance: none;
 width: 20px;
 height: 20px;
 background: var(--pink);
 border: 2px solid #fff;
 border-radius: 50%;
 box-shadow: 0 0 10px var(--pink);
 cursor: pointer;
 transition: transform 0.1s;
}
.bgm-offset-range::-webkit-slider-thumb:active {
 transform: scale(1.2);
}
#bgm-offset-val {
  color: var(--pink);
  margin-left: 6px;
  font-family: monospace;
}
.bgm-mini-btn {
  background: rgba(255,105,180,0.15);
  border: 1px solid var(--pink);
 color: var(--pink);
 padding: 4px 10px;
 border-radius: 12px;
 font-size: 11px;
 font-weight: 700;
 cursor: pointer;
}
.bgm-mini-btn:active {
 background: var(--pink);
 color: #fff;
}
.bgm-offset-range-sm {
 -webkit-appearance: none;
 width: 100%;
 height: 3px;
 background: rgba(255,105,180,0.2);
 border-radius: 2px;
 outline: none;
 margin: 10px 0;
}
.bgm-offset-range-sm::-webkit-slider-thumb {
 -webkit-appearance: none;
 width: 18px;
 height: 18px;
 background: var(--pink);
 border: 2px solid #fff;
 border-radius: 50%;
 box-shadow: 0 0 8px var(--pink);
 cursor: pointer;
}
@charset " UTF-8\;

/* Upload Card Interaction Polish */
.upload-card {
 cursor: pointer;
 position: relative;
 transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.upload-card:active {
 transform: scale(0.96) translateY(2px);
 box-shadow: inset 0 0 20px rgba(0,0,0,0.5);
}
.upload-icon, .upload-label, .upload-hint, .upload-check, .upload-thumb {
 pointer-events: none !important;
}
@charset " UTF-8\;

/* Bling Bling Start Button */
.btn-start {
 position: relative;
 overflow: hidden;
 background: linear-gradient(45deg, #ff69b4, #da70d6, #ff69b4);
 background-size: 200% 200%;
 animation: gradient-flow 3s ease infinite, breathing-aura 2s ease-in-out infinite;
 border: 1px solid rgba(255,255,255,0.3);
 box-shadow: 0 0 20px rgba(255,105,180,0.4);
 font-weight: 800;
 letter-spacing: 1px;
}
.btn-start::after {
 content: \\;
 position: absolute;
 top: -50%;
 left: -50%;
 width: 200%;
 height: 200%;
 background: linear-gradient(
 to right,
 rgba(255,255,255,0) 0%,
 rgba(255,255,255,0) 40%,
 rgba(255,255,255,0.7) 50%,
 rgba(255,255,255,0) 60%,
 rgba(255,255,255,0) 100%
 );
 transform: rotate(45deg);
 animation: shimmer-swipe 2.5s infinite;
 pointer-events: none;
}
@keyframes gradient-flow {
 0% { background-position: 0% 50%; }
 50% { background-position: 100% 50%; }
 100% { background-position: 0% 50%; }
}
@keyframes shimmer-swipe {
 0% { transform: translate(-100%, -100%) rotate(45deg); }
 100% { transform: translate(100%, 100%) rotate(45deg); }
}
@keyframes breathing-aura {
 0%, 100% { transform: scale(1); box-shadow: 0 0 20px rgba(255,105,180,0.4); }
 50% { transform: scale(1.03); box-shadow: 0 0 35px rgba(255,105,180,0.7); }
}

/* Filter Presets - Review Shortcuts */
.filter-presets {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 12px;
  padding: 8px 0 12px; /* Increased bottom padding for better separation from sliders */
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  margin-top: 2px; /* Reduced top margin */
  overflow: hidden;
}

.presets-label {
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: rgba(255, 255, 255, 0.85); /* Brighter, more legible on mobile */
  opacity: 0.9;
  white-space: nowrap;
  margin-left: 2px;
}

.presets-row {
  display: flex;
  gap: 8px; /* Tighter button gap */
  overflow-x: auto;
  scrollbar-width: none;
  flex: 1;
}

.presets-row::-webkit-scrollbar {
  display: none;
}

.preset-btn {
  flex-shrink: 0;
  padding: 7px 15px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

.preset-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.25);
  color: #fff;
}

.preset-btn.active {
  background: rgba(255, 110, 180, 0.12);
  border-color: var(--pink-light);
  color: #fff;
  box-shadow: 0 0 15px rgba(255, 110, 180, 0.2), inset 0 0 5px rgba(255, 110, 180, 0.1);
}

.preset-btn:active {
  transform: scale(0.92);
}

.preset-btn.active::before {
  content: '';
  position: absolute;
  top: -2px;
  left: 50%;
  transform: translateX(-50%);
  width: 10px;
  height: 2px;
  background: var(--pink-light);
  border-radius: 4px;
  box-shadow: 0 0 8px var(--pink-light);
}