/* ========== Web 字体定义（共52款，优先使用本地字体） ========== */
@font-face {
  font-family: '马克笔体';
  src: local('马克笔体'), url('fonts/851 GBai 马克笔体.ttf') format('truetype');
}

@font-face {
  font-family: '爱点风雅黑';
  src: local('爱点风雅黑'), url('fonts/AiDianFengYaHei（ShangYongMianFei）-2.ttf') format('truetype');
}

@font-face {
  font-family: '青柳衡山';
  src: local('青柳衡山'), url('fonts/aoyagireisyosimo_ttf_2_01.ttf') format('truetype');
}

@font-face {
  font-family: '童趣黑体';
  src: local('童趣黑体'), url('fonts/ChildFunSans-CHS.ttf') format('truetype');
}

@font-face {
  font-family: '童趣黑体EN';
  src: local('童趣黑体EN'), url('fonts/ChildFunSans.ttf') format('truetype');
}

@font-face {
  font-family: 'OPPO黑体';
  src: local('OPPO黑体'), local('OPPOSans'), url('fonts/OPPOSans4.0-VF.ttf') format('truetype');
}

@font-face {
  font-family: '庞门正道标题体';
  src: local('庞门正道标题体'), url('fonts/PangMenZhengDaoBiaoTiTiMianFeiBan-2.ttf') format('truetype');
}

@font-face {
  font-family: '奇迹混合体';
  src: local('奇迹混合体'), url('fonts/qiji-combo.ttf') format('truetype');
}

@font-face {
  font-family: '锐字奥运夺冠';
  src: local('锐字奥运夺冠'), url('fonts/RuiZiAoYunJingShenDuoGuanJian-2.ttf') format('truetype');
}

@font-face {
  font-family: '锐字奥运拼搏';
  src: local('锐字奥运拼搏'), url('fonts/RuiZiAoYunJingShenPinBoJian-2.ttf') format('truetype');
}

@font-face {
  font-family: '锐字真言词迫';
  src: local('锐字真言词迫'), url('fonts/RuiZiZhenYanCiPoGongYi-2.ttf') format('truetype');
}

@font-face {
  font-family: '思源宋体';
  src: local('思源宋体'), url('fonts/SiyinSong-Regular.ttf') format('truetype');
}

@font-face {
  font-family: '滑动肤';
  src: local('滑动肤'), url('fonts/Slidefu-Regular-2.ttf') format('truetype');
}

@font-face {
  font-family: '滑动悠然';
  src: local('滑动悠然'), url('fonts/slideyouran-Regular.ttf') format('truetype');
}

@font-face {
  font-family: '思源黑体Heavy';
  src: local('思源黑体Heavy'), url('fonts/SourceHanSansSC-Heavy-2.otf') format('opentype');
}

@font-face {
  font-family: '堂线宾宋';
  src: local('堂线宾宋'), url('fonts/TangXianBinSong-2.otf') format('opentype');
}

@font-face {
  font-family: '淘宝买菜体';
  src: local('淘宝买菜体'), url('fonts/TaoBaoMaiCaiTi-Regular.ttf') format('truetype');
}

@font-face {
  font-family: '天成像素体';
  src: local('天成像素体'), url('fonts/TianChengBit-Regular.otf') format('opentype');
}

@font-face {
  font-family: '玄宗体';
  src: local('玄宗体'), url('fonts/XuanZongTi-v0.1.otf') format('opentype');
}

@font-face {
  font-family: '志勇大通体';
  src: local('志勇大通体'), url('fonts/ZhiyongDatongFont.ttf') format('truetype');
}

@font-face {
  font-family: '传奇南安体';
  src: local('传奇南安体'), url('fonts/ZiTiChuanQiNanAnTi-MianFeiShangYong-2.ttf') format('truetype');
}

@font-face {
  font-family: '中华薪火体';
  src: local('中华薪火体'), url('fonts/中华薪火体.ttf') format('truetype');
}

@font-face {
  font-family: '临海隶书';
  src: local('临海隶书'), url('fonts/临海隶书.ttf') format('truetype');
}

@font-face {
  font-family: '乐米波波体';
  src: local('乐米波波体'), url('fonts/乐米波波体.ttf') format('truetype');
}

@font-face {
  font-family: '乐米蜡笔体';
  src: local('乐米蜡笔体'), url('fonts/乐米蜡笔体.ttf') format('truetype');
}

@font-face {
  font-family: '柳叶体';
  src: local('柳叶体'), url('fonts/也字工厂柳叶体.ttf') format('truetype');
}

@font-face {
  font-family: '慧庭手写体';
  src: local('慧庭手写体'), url('fonts/包参谋慧庭手写体2.1.ttf') format('truetype');
}

@font-face {
  font-family: '词宫谱宋体';
  src: local('词宫谱宋体'), url('fonts/南北词宫谱宋体.ttf') format('truetype');
}

@font-face {
  font-family: '无恙行书';
  src: local('无恙行书'), url('fonts/南构无恙行书.ttf') format('truetype');
}

@font-face {
  font-family: '墨趣古风体';
  src: local('墨趣古风体'), url('fonts/墨趣古风体.ttf') format('truetype');
}

@font-face {
  font-family: 'AI造字冷霜';
  src: local('AI造字冷霜'), url('fonts/字体家AI造字冷霜.ttf') format('truetype');
}

@font-face {
  font-family: '赖江湖怀古体';
  src: local('赖江湖怀古体'), url('fonts/平方赖江湖怀古体.ttf') format('truetype');
}

@font-face {
  font-family: '穸洛情书体';
  src: local('穸洛情书体'), url('fonts/张穸洛情书体.ttf') format('truetype');
}

@font-face {
  font-family: '朝華標題A';
  src: local('朝華標題A'), url('fonts/朝華標題A.ttf') format('truetype');
}

@font-face {
  font-family: '朝華標題B';
  src: local('朝華標題B'), url('fonts/朝華標題B.ttf') format('truetype');
}

@font-face {
  font-family: '江西拙楷';
  src: local('江西拙楷'), url('fonts/江西拙楷2.0_猫啃网.ttf') format('truetype');
}

@font-face {
  font-family: '鹿城瓯韵体';
  src: local('鹿城瓯韵体'), url('fonts/温州鹿城瓯韵体.ttf') format('truetype');
}

@font-face {
  font-family: '演示佛系体';
  src: local('演示佛系体'), url('fonts/演示佛系体.ttf') format('truetype');
}

@font-face {
  font-family: '演示夏行楷';
  src: local('演示夏行楷'), url('fonts/演示夏行楷.ttf') format('truetype');
}

@font-face {
  font-family: '演示春风楷';
  src: local('演示春风楷'), url('fonts/演示春风楷.ttf') format('truetype');
}

@font-face {
  font-family: '演示秋鸿楷';
  src: local('演示秋鸿楷'), url('fonts/演示秋鸿楷2.0.ttf') format('truetype');
}

@font-face {
  font-family: '玉葱楷书';
  src: local('玉葱楷书'), url('fonts/玉ねぎ楷書激無料版v7旧.ttf') format('truetype');
}

@font-face {
  font-family: '彤彤手写体';
  src: local('彤彤手写体'), url('fonts/白路彤彤手写体.ttf') format('truetype');
}

@font-face {
  font-family: '站酷快乐体';
  src: local('站酷快乐体'), url('fonts/站酷快乐体2016修订版.ttf') format('truetype');
}

@font-face {
  font-family: '站酷文艺体';
  src: local('站酷文艺体'), url('fonts/站酷文艺体.ttf') format('truetype');
}

@font-face {
  font-family: '站酷酷黑体';
  src: local('站酷酷黑体'), url('fonts/站酷酷黑体.ttf') format('truetype');
}

@font-face {
  font-family: '站酷高端黑';
  src: local('站酷高端黑'), url('fonts/站酷高端黑.ttf') format('truetype');
}

@font-face {
  font-family: '零度黑体';
  src: local('零度黑体'), url('fonts/香萃零度黑2.0.ttf') format('truetype');
}

@font-face {
  font-family: '鸿雷板书简体';
  src: local('鸿雷板书简体'), url('fonts/鸿雷板书简体2.000.ttf') format('truetype');
}

@font-face {
  font-family: '龚帆免费体';
  src: local('龚帆免费体'), url('fonts/龚帆免费体2.0.ttf') format('truetype');
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  background: linear-gradient(135deg, #f0f4ff 0%, #e8edfb 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.main-container {
  width: 1340px;
  max-width: 100%;
  height: 90vh;
  max-height: 960px;
  background: #fff;
  border-radius: 32px;
  box-shadow: 0 30px 70px rgba(70, 60, 140, 0.15);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.top-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  height: 72px;
  background: #fff;
  border-bottom: 1px solid #eef2f9;
}

.logo-area {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  font-size: 20px;
  color: #2c2c4a;
}

.logo-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, #6c63ff 0%, #4f46e5 100%);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 22px;
}

.user-area {
  display: flex;
  align-items: center;
  gap: 14px;
}

.user-avatar {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: #e8edfb;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  color: #4f46e5;
  font-size: 18px;
}

.user-name {
  font-weight: 600;
  color: #2c2c4a;
  font-size: 15px;
}

.user-badge {
  background: #f5f3ff;
  color: #6c63ff;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}

.main-body {
  display: flex;
  flex: 1;
  overflow: hidden;
}

.steps-sidebar {
  width: 270px;
  background: #fafbff;
  border-right: 1px solid #eef2f9;
  display: flex;
  flex-direction: column;
  padding: 28px 0 0;
}

.steps-header {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.8px;
  color: #8e8bb6;
  padding: 0 28px 16px;
}

.steps-list {
  list-style: none;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0px;
  padding: 0 16px;
}

.step-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 100%;
  height: 100px;
  padding: 6px;
  border-radius: 18px;
  cursor: pointer;
  transition: all 0.25s;
  font-size: 11px;
  font-weight: 500;
  color: #5b5b7a;
  background: transparent;
  border: 1px solid transparent;
  text-align: center;
  flex-shrink: 0;
}

.step-item:hover {
  background: #f0f3fe;
  color: #3a3a5a;
}

.step-item.active {
  background: linear-gradient(135deg, #6c63ff 0%, #5a51e0 100%);
  color: #fff;
  font-weight: 600;
  box-shadow: 0 10px 20px rgba(108, 99, 255, 0.3);
}

.step-item.completed {
  color: #2e7d32;
  background: #e8f5e9;
  border-color: #c8e6c9;
}

.step-item.completed .step-icon {
  background: #2e7d32;
  color: #fff;
}

.step-item.active .step-icon {
  background: #fff;
  color: #6c63ff;
}

.step-icon {
  width: 45px;
  height: 45px;
  border-radius: 25px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #e9ecf5;
  color: #6b6b8a;
  font-size: 20px;
  font-weight: 600;
  transition: 0.2s;
  flex-shrink: 0;
}

.sidebar-actions {
  padding: 12px 20px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.btn-auto {
  background: linear-gradient(135deg, #6c63ff 0%, #554de0 100%);
  border: none;
  color: #fff;
  padding: 12px;
  border-radius: 14px;
  font-weight: 600;
  cursor: pointer;
}

.btn-reset {
  background: #f5f7ff;
  border: 1px solid #dde3f3;
  padding: 10px;
  border-radius: 14px;
  font-weight: 600;
  cursor: pointer;
  color: #444b6e;
}

.content-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: #fff;
}

.content-scroll {
  flex: 1;
  padding: 32px 36px 18px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.content-footer {
  border-top: 1px solid #eef2f9;
  padding: 16px 36px;
  display: flex;
  justify-content: space-between;
}

.footer-btn {
  padding: 12px 28px;
  border-radius: 14px;
  font-weight: 600;
  cursor: pointer;
}

.btn-prev {
  background: #f5f7ff;
  border: 1px solid #dde3f3;
  color: #444b6e;
}

.btn-next {
  background: linear-gradient(135deg, #6c63ff 0%, #4f46e5 100%);
  border: none;
  color: #fff;
}

.step-title {
  font-size: 26px;
  font-weight: 700;
  color: #1e1e3c;
  margin-bottom: 6px;
}

.step-desc {
  color: #71718c;
  margin-bottom: 24px;
}

textarea {
  width: 100%;
  border: 1px solid #e0e4f2;
  border-radius: 16px;
  padding: 16px;
  font-size: 15px;
  resize: vertical;
  background: #fff;
  outline: none;
}

textarea:focus {
  border-color: #6c63ff;
}

select {
  padding: 12px 50px 12px 14px;
  appearance: auto;
  background-position: right 12px center;
}

.btn {
  padding: 12px 26px;
  border-radius: 14px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 15px;
  transition: all 0.25s ease;
}

.btn-primary {
  background: linear-gradient(135deg, #6c63ff 0%, #4f46e5 100%);
  color: #fff;
}

.btn-primary:hover {
  background: linear-gradient(135deg, #7e75ff 0%, #5b51f0 100%);
  box-shadow: 0 10px 24px rgba(79, 70, 229, 0.4);
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  border: 1.5px solid #6c63ff;
  color: #6c63ff;
}

.btn-outline:hover {
  background: #f5f3ff;
  border-color: #4f46e5;
  color: #4f46e5;
  box-shadow: 0 6px 16px rgba(108, 99, 255, 0.2);
  transform: translateY(-1px);
}

select,
input[type="text"],
input[type="number"] {
  border: 1px solid #e0e4f2;
  border-radius: 14px;
  padding: 12px 18px;
  font-size: 15px;
  background: #fff;
  outline: none;
}

select:focus,
input:focus {
  border-color: #6c63ff;
}

.mode-tabs {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
}

.mode-tab {
  padding: 10px 24px;
  border-radius: 14px;
  font-weight: 600;
  cursor: pointer;
  border: 1.5px solid #dde3f3;
  background: #f9fafd;
  color: #5b5b7a;
  transition: all 0.25s ease;
}

.mode-tab:hover {
  background: #eef1ff;
  border-color: #6c63ff;
  color: #4f46e5;
  box-shadow: 0 4px 12px rgba(108, 99, 255, 0.15);
}

.mode-tab.active {
  background: linear-gradient(135deg, #6c63ff 0%, #4f46e5 100%);
  color: #fff;
  border-color: transparent;
}

.two-column {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  align-items: stretch;
}

.left-panel {
  flex: 1;
  min-width: 300px;
  height: 520px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
  background: #fbfcff;
  border: 1px solid #eef2f9;
  border-radius: 24px;
  padding: 24px;
}

.right-panel {
  flex: 1;
  min-width: 280px;
  height: 520px;
  overflow-y: visible;
  background: #fbfcff;
  border: 1px solid #eef2f9;
  border-radius: 24px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.card {
  background: #fbfcff;
  border: 1px solid #eef2f9;
  border-radius: 20px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.card-title {
  font-weight: 700;
  font-size: 16px;
  color: #2c2c4a;
  display: flex;
  align-items: center;
  gap: 8px;
}

.inline-label {
  font-weight: 600;
  color: #2c2c4a;
  display: flex;
  align-items: center;
  white-space: nowrap;
  flex-shrink: 0;
}

.row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;

}

.preview-box {
  background: #f4f6fe;
  border-radius: 18px;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #8282a8;
  min-height: 200px;
  border: 1px dashed #cdd4ee;
  flex-direction: column;
  gap: 4px;
}

.preview-box video {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: none;
  display: block;
  object-fit: contain;
}

.preview-box audio {
  width: 100%;
}

.voice-card,
.video-card {
  background: #fbfcff;
  border: 1px solid #eef2f9;
  border-radius: 24px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.voice-row {
  display: flex;
  align-items: flex-end;
  gap: 24px;
  flex-wrap: wrap;
}

.voice-row .btn {
  margin-bottom: 0;
  height: 46px;
}

.voice-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.voice-slider-group {
  display: flex;
  align-items: center;
  gap: 16px;
}

.voice-slider-label {
  font-weight: 600;
  color: #2c2c4a;
  width: 70px;
}

input[type="range"] {
  width: 160px;
  accent-color: #6c63ff;
}

.topic-card {
  background: #f5f3ff;
  border: 1px solid #d9d0ff;
  border-radius: 14px;
  padding: 10px 16px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  color: #4f46e5;
  transition: all 0.2s ease;
  flex: 1 1 calc(50% - 10px);
  min-width: 140px;
  text-align: center;
}

.topic-card:hover {
  background: #eef1ff;
  border-color: #6c63ff;
  box-shadow: 0 4px 12px rgba(108, 99, 255, 0.15);
}

.switch-active {
  background: #6c63ff !important;
}

.switch-active::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 22px;
  width: 20px;
  height: 20px;
  background: #fff;
  border-radius: 50%;
  transition: 0.3s;
}

.switch-inactive::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  background: #fff;
  border-radius: 50%;
  transition: 0.3s;
}

/* 通用滑块轨道（字幕画中画模块开关） */
.slider-track.switch-active {
  background: #6c63ff !important;
}

.slider-track.switch-active::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 22px;
  width: 20px;
  height: 20px;
  background: #fff;
  border-radius: 50%;
  transition: 0.3s;
}

.slider-track.switch-inactive {
  background: #dde3f3 !important;
}

.slider-track.switch-inactive::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  background: #fff;
  border-radius: 50%;
  transition: 0.3s;
}

/* 深度学习开关专用样式 */
#switchSlider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: #dde3f3;
  border-radius: 24px;
  transition: 0.3s;
}

#switchSlider::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  background: #fff;
  border-radius: 50%;
  transition: 0.3s;
}

#switchSlider.switch-active {
  background: #6c63ff !important;
}

#switchSlider.switch-active::after {
  left: 22px;
}

#switchSlider.switch-inactive {
  background: #dde3f3;
}

#switchSlider.switch-inactive::after {
  left: 2px;
}

/* ---------- 弹窗层级 ---------- */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(20, 18, 40, 0.55);
  backdrop-filter: blur(10px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

/* 进度加载层需要更高层级，覆盖所有功能弹窗 */
#progressModal {
  z-index: 1100;
}

.modal-overlay.active {
  display: flex;
}

.modal-dialog {
  background: #fff;
  border-radius: 32px;
  padding: 36px 40px;
  width: 720px;
  max-width: 90vw;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.2);
}

.modal-title {
  font-size: 22px;
  font-weight: 700;
  color: #1e1e3c;
  margin-bottom: 24px;
}

.modal-row {
  display: flex;
  gap: 24px;
  margin-bottom: 20px;
}

.modal-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.full-width-btn {
  width: 100%;
  margin-top: 8px;
}

.modal-close-x {
  position: absolute;
  top: 16px;
  right: 20px;
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  font-size: 22px;
  color: #8e8bb6;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s ease;
  z-index: 10;
}

.modal-close-x:hover {
  background: #f0f3fe;
  color: #4f46e5;
}

.progress-box {
  background: #fff;
  border-radius: 32px;
  padding: 42px 48px;
  text-align: center;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

.spinner {
  width: 60px;
  height: 60px;
  margin: 0 auto 20px;
  border: 5px solid #eef2f9;
  border-top-color: #6c63ff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.ip-asset-card {
  background: #fff;
  border: 1.5px solid #eef2f9;
  border-radius: 16px;
  padding: 16px 20px;
  cursor: pointer;
  transition: all 0.25s ease;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.ip-asset-card:hover {
  border-color: #c5c0f8;
  background: #fbfaff;
  box-shadow: 0 4px 16px rgba(108, 99, 255, 0.08);
  transform: translateY(-1px);
}

.ip-asset-card.selected {
  border-color: #6c63ff;
  background: #f5f3ff;
  box-shadow: 0 0 0 3px rgba(108, 99, 255, 0.1);
}

.ip-asset-info {
  flex: 1;
  min-width: 0;
}

.ip-asset-name {
  font-weight: 700;
  font-size: 16px;
  color: #1e1e3c;
  margin-bottom: 6px;
}

.ip-asset-type {
  font-size: 12px;
  color: #6c63ff;
  background: #f0edff;
  padding: 3px 12px;
  border-radius: 12px;
  display: inline-block;
  font-weight: 600;
  margin-bottom: 4px;
}

.ip-asset-meta {
  font-size: 12px;
  color: #9a9ab0;
  margin-top: 4px;
}

.ip-asset-delete {
  background: #fff;
  border: 1.5px solid #ffe0e0;
  color: #e57373;
  padding: 8px 16px;
  border-radius: 12px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  transition: all 0.2s;
  white-space: nowrap;
  flex-shrink: 0;
}

.ip-asset-delete:hover {
  background: #fff5f5;
  border-color: #e57373;
  box-shadow: 0 4px 12px rgba(229, 115, 115, 0.15);
}

.video-preview-container {
  flex: 1;
  aspect-ratio: 9 / 16;
  max-height: 380px;
  background: #f4f6fe;
  border-radius: 18px;
  border: 1px dashed #cdd4ee;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.video-preview-container video {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* 校对字幕弹窗表格 */
.subtitle-edit-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
}

.subtitle-edit-table th,
.subtitle-edit-table td {
  padding: 8px 4px;
  border-bottom: 1px solid #eef2f9;
  vertical-align: middle;
}

.subtitle-edit-table th {
  color: #1e1e3c;
  font-weight: 700;
}

.subtitle-edit-table td {
  color: #5b5b7a;
}

.subtitle-edit-col-index {
  width: 50px;
  text-align: center;
}

.subtitle-edit-col-content {
  width: auto;
}

.subtitle-edit-col-start {
  width: 80px;
  text-align: center;
}

.subtitle-edit-col-end {
  width: 80px;
  text-align: center;
}

.subtitle-edit-col-duration {
  width: 80px;
  text-align: center;
}

.subtitle-edit-input {
  width: 100%;
  padding: 6px 8px;
  border: 1px solid #e0e4f2;
  border-radius: 8px;
  font-size: 14px;
  box-sizing: border-box;
}

.subtitle-template-card.selected {
  border-color: #6c63ff !important;
  background: #f0edff !important;
  box-shadow: 0 0 0 3px rgba(108, 99, 255, 0.2) !important;
}


.create-template-layout {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 20px;
  max-height: 60vh;
}

.create-template-left {
  flex: 3;
  min-width: 0;
  overflow-y: auto;
  display: flex;
  gap: 16px;
}

.create-template-right {
  flex: 1.2;
  min-width: 200px;
  position: sticky;
  top: 0;
}

/* 画中画管理弹窗 */
.pip-item .row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.pip-item .inline-label {
  font-weight: 600;
  color: #2c2c4a;
  white-space: nowrap;
}

.pip-item select,
.pip-item input[type="number"] {
  border: 1px solid #e0e4f2;
  border-radius: 10px;
  padding: 8px 14px;
  font-size: 14px;
  background: #fff;
  outline: none;
}

.pip-item select:focus,
.pip-item input:focus {
  border-color: #6c63ff;
}

/* 画中画素材管理 - 选中卡片 */
.pip-material-card {
  transition: transform 0.2s, box-shadow 0.2s;
  border-radius: 10px;
}

.pip-material-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.pip-material-selected {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(108, 99, 255, 0.3);
}

/* 右侧预览区 9:16 容器 */
.preview-9x16 {
  width: 100%;
  max-width: 300px;
  aspect-ratio: 9 / 16;
  background: #1a1a2e;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

/* 左侧面板：占三分之二 */
.panel-left {
  flex: 2;
  min-width: 0;
  height: 520px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
  background: #fbfcff;
  border: 1px solid #eef2f9;
  border-radius: 24px;
  padding: 24px;
}

/* 右侧面板：占三分之一，居中显示预览内容 */
.panel-right {
  flex: 1;
  min-width: 0;
  height: 520px;
  overflow: hidden;
  background: #fbfcff;
  border: 1px solid #eef2f9;
  border-radius: 24px;
  padding: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

#btnGenerateOriginal {
  margin-top: 15px;
  margin-bottom: 15px;
}

/* 爆款剪辑三列等高 */
.content-scroll>div>div {
  height: 100%;
}

/* 法务检查弹窗加大 */
#legalModal .modal-dialog {
  width: 720px;
  max-width: 94vw;
  height: 70vh;
}

/* 历史记录弹窗加大高度 */
#subtitleTemplateModal .modal-dialog {
  height: 80vh;
}

#subtitleTemplateModal .modal-dialog #subtitleTemplateContent {
  max-height: 55vh;
  overflow-y: auto;
}

/* 退出按钮 */
.btn-logout {
  padding: 8px 18px;
  border-radius: 12px;
  background: rgba(229, 115, 115, 0.1);
  border: 1px solid rgba(229, 115, 115, 0.3);
  color: #e57373;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.25s;
  margin-left: 8px;
}

.btn-logout:hover {
  background: rgba(229, 115, 115, 0.2);
  border-color: #e57373;
}

/* ========== 美化所有下拉菜单 ========== */
select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  padding: 10px 40px 10px 16px;
  font-size: 14px;
  font-weight: 500;
  color: #2c2c4a;
  background-color: #f9fafd;
  border: 1.5px solid #e0e4f2;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.25s ease;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M6 8L1 3h10z' fill='%236c63ff'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 12px;
  max-width: 100%;
}

select:hover {
  border-color: #6c63ff;
  background-color: #f0f3fe;
  box-shadow: 0 2px 8px rgba(108, 99, 255, 0.1);
}

select:focus {
  outline: none;
  border-color: #6c63ff;
  background-color: #fff;
  box-shadow: 0 0 0 3px rgba(108, 99, 255, 0.15);
}

/* 下拉选项面板样式（部分浏览器支持） */
select option {
  padding: 10px;
  background: #fff;
  color: #2c2c4a;
  font-size: 14px;
}

#historyModal {
  z-index: 1000;
}

#deleteConfirmModal {
  z-index: 1100;
}

#subtitleTemplateSelect {
  min-width: 180px;
  flex: 2;
}

#btnManageTemplate {
  flex: 1;
}