/* 天问 - 暗色主题 */
:root {
  --bg: #0a0a0b;
  --bg-card: #141416;
  --bg-sidebar: #0e0e10;
  --text: #e8e8ed;
  --text-muted: #8b8b96;
  --accent: #e91e63;
  --accent-light: #f06292;
  --accent-glow: rgba(233, 30, 99, 0.35);
  --border: #2a2a2e;
  --success: #4caf50;
  --error: #f44336;
  --radius: 8px;
  --radius-lg: 12px;
  --font: 'PingFang SC', 'Microsoft YaHei', 'Noto Sans SC', -apple-system, sans-serif;
}

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

html, body {
  height: 100%;
  font-family: var(--font);
  font-size: 14px;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

.app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* 顶部 */
.header {
  height: 56px;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  flex-shrink: 0;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 18px;
}

.logo-icon {
  width: 24px;
  height: 24px;
  color: var(--accent);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 16px;
}
.btn-activate {
  padding: 8px 16px;
  background: var(--accent);
  border: none;
  border-radius: var(--radius);
  color: #fff;
  cursor: pointer;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 500;
}
.btn-activate:hover { opacity: .9; }
.credits {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--text-muted);
  font-size: 14px;
}
.credits-icon { color: #d4a84b; font-size: 14px; }
.user-dropdown {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--text-muted);
  font-size: 13px;
  cursor: pointer;
}
.user-dropdown:hover { color: var(--text); }
.user-arrow { font-size: 10px; }

/* 主体 */
.main {
  flex: 1;
  display: flex;
  overflow: hidden;
}

/* 左侧导航 */
.sidebar {
  width: 25%;
  max-width: 180px;
  min-width: 140px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border);
  min-height: 0;
}

.sidebar-nav {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 8px 0;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  color: var(--text-muted);
  transition: color .2s, background .2s;
  border-left: 3px solid transparent;
  font-size: 13px;
}

.nav-item:hover {
  color: var(--text);
  background: rgba(255,255,255,.04);
}

.nav-item.active {
  color: var(--accent-light);
  background: rgba(233, 30, 99, .12);
  border-left-color: var(--accent);
}

.nav-icon {
  font-size: 16px;
  width: 20px;
  text-align: center;
  flex-shrink: 0;
}

.sidebar-footer {
  flex-shrink: 0;
  margin-top: auto;
  padding: 12px;
  border-top: 1px solid var(--border);
}
.sidebar-cost {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.btn-generate-sidebar {
  width: 100%;
  padding: 10px 12px;
  background: var(--accent);
  border: none;
  border-radius: var(--radius);
  color: #fff;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.btn-generate-sidebar:hover { opacity: .92; }

/* 主内容 */
.content {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  width: 75%;
  max-width: 75%;
}

.page {
  display: none;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.page.active {
  display: flex;
  flex-direction: column;
}

.page-with-works.active {
  flex-direction: row;
}

.page-with-works .page-left {
  flex: 0 0 35%;
  min-width: 0;
  overflow-y: auto;
  padding: 24px;
  max-width: 35%;
  display: flex;
  flex-direction: column;
}

.page-with-works .page-right {
  flex: 0 0 65%;
  flex-shrink: 0;
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  background: var(--bg-sidebar);
  max-width: 65%;
}

.works-tabs {
  display: flex;
  padding: 12px 16px 0;
  gap: 4px;
  border-bottom: 1px solid var(--border);
}
.works-tabs .tab {
  padding: 10px 16px;
  font-size: 13px;
  color: var(--text-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.works-tabs .tab:hover { color: var(--text); }
.works-tabs .tab.active { color: var(--accent-light); border-bottom-color: var(--accent); }

.works-body {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
}
.works-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
  min-height: 240px;
}
.works-empty-illus {
  width: 120px;
  height: 100px;
  margin-bottom: 16px;
  background: linear-gradient(135deg, #2a2a2e 0%, #1a1a1d 100%);
  border-radius: var(--radius);
  border: 1px dashed var(--border);
}
.works-empty p { max-width: 200px; line-height: 1.6; }

.work-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 16px;
}

.work-item-processing {
  border-color: var(--accent);
  border-width: 2px;
}

.work-item-success {
  border-color: rgba(76, 175, 80, 0.5);
}

.work-item-failed {
  border-color: rgba(244, 67, 54, 0.5);
}

.work-item-preview {
  position: relative;
  background: var(--bg);
  min-height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.work-item-preview-processing {
  flex-direction: column;
  gap: 16px;
  padding: 40px 20px;
}

.work-processing-spinner {
  width: 48px;
  height: 48px;
  border: 4px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.work-processing-text {
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
}

.work-processing-progress {
  width: 100%;
  max-width: 200px;
  height: 4px;
  background: var(--bg-card);
  border-radius: 2px;
  overflow: hidden;
}

.work-processing-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-light));
  transition: width 0.3s ease;
  border-radius: 2px;
}

.work-item-preview-failed {
  flex-direction: column;
  gap: 12px;
  padding: 40px 20px;
}

.work-failed-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(244, 67, 54, 0.2);
  color: #f44336;
  font-size: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
}

.work-failed-text {
  color: #f44336;
  font-size: 14px;
  font-weight: 500;
}

.work-item-preview video {
  width: 100%;
  max-height: 200px;
  display: block;
}
.work-item-title { 
  padding: 8px 12px; 
  font-size: 13px; 
  color: var(--text-muted); 
}

.work-item-actions {
  display: flex;
  gap: 8px;
  padding: 8px 12px;
  border-top: 1px solid var(--border);
}

.work-item-actions a { 
  display: inline-block; 
  padding: 6px 12px; 
  color: var(--accent); 
  font-size: 13px; 
  text-decoration: none;
  border-radius: var(--radius);
  transition: all 0.2s;
}

.work-item-actions a:hover { 
  color: var(--accent-light); 
  background: rgba(233, 30, 99, 0.1);
}

.work-item-delete {
  padding: 6px 12px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-muted);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
}

.work-item-delete:hover {
  color: #f44336;
  border-color: #f44336;
  background: rgba(244, 67, 54, 0.1);
}

.page:not(.page-with-works) {
  overflow-y: auto;
  padding: 24px 32px 48px;
}

/* 首页 Banner - 只在首页显示 */
#page-home .banner {
  text-align: center;
  padding: 120px 24px 150px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
}

#page-home .banner-sub {
  font-size: 32px;
  color: var(--text-muted);
  margin-bottom: 24px;
  font-weight: 500;
  width: 70%;
  max-width: 1200px;
}

#page-home .banner-title {
  font-size: 96px;
  font-weight: 700;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-light) 50%, #ff8a80 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 32px;
  letter-spacing: 3px;
  line-height: 1.2;
  width: 70%;
  max-width: 1200px;
}

#page-home .banner-desc {
  font-size: 32px;
  color: var(--text-muted);
  font-weight: 400;
  width: 70%;
  max-width: 1200px;
}

/* 功能示例卡片 */
.demo-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 16px;
}

.demo-card {
  display: block;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color .2s, box-shadow .2s;
  cursor: pointer;
}

.demo-card:hover {
  border-color: rgba(233, 30, 99, .4);
  box-shadow: 0 4px 20px var(--accent-glow);
}

.demo-preview {
  aspect-ratio: 16/10;
  background: #1a1a1d;
  display: flex;
  align-items: center;
  justify-content: center;
}

.demo-placeholder {
  color: var(--text-muted);
  font-size: 13px;
  text-align: center;
  padding: 16px;
}

.demo-caption {
  padding: 12px 16px;
  font-size: 13px;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
  line-height: 1.5;
}

/* 功能页通用 */
.page-inner h2 {
  font-size: 22px;
  margin-bottom: 8px;
  color: var(--text);
}

.page-tip {
  color: var(--text-muted);
  font-size: 13px;
  margin-bottom: 24px;
}

/* 工作区 - 上传 / 参数 / 提交 / 结果 */
.workspace {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  width: 100%;
  min-height: 200px;
  display: block;
  visibility: visible;
  opacity: 1;
}

.upload-group {
  margin-top: 16px;
}
.upload-group:first-child {
  margin-top: 0;
}
.upload-label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  color: var(--text-muted);
}
.upload-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 24px 32px;
  text-align: center;
  color: var(--text-muted);
  cursor: pointer;
  transition: border-color .2s, background .2s;
  position: relative;
  min-height: 120px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.upload-zone-content {
  pointer-events: none;
  z-index: 1;
}

.upload-zone.has-files {
  padding: 8px;
  min-height: auto;
  align-items: flex-start;
  justify-content: flex-start;
}

.upload-zone.has-files .upload-zone-content {
  display: none;
}

.upload-zone:hover, .upload-zone.dragover {
  border-color: var(--accent);
  background: rgba(233, 30, 99, .06);
  color: var(--accent-light);
}

.upload-zone.has-files:hover {
  background: transparent;
}

.upload-zone .hint {
  font-size: 13px;
  margin-top: 8px;
}

.upload-list {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.upload-zone .upload-list {
  margin-top: 0;
}

.upload-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  background: #1a1a1d;
  border-radius: var(--radius);
  margin-bottom: 4px;
  font-size: 12px;
  position: relative;
}

.upload-item-preview {
  width: 48px !important;
  height: 48px !important;
  flex-shrink: 0;
  border-radius: 4px;
  overflow: hidden;
  background: #0f0f10;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.upload-item-preview img {
  width: 100% !important;
  height: 100% !important;
  max-width: 48px !important;
  max-height: 48px !important;
  object-fit: cover;
  display: block;
}

.upload-item-preview video {
  width: 100% !important;
  height: 100% !important;
  max-width: 48px !important;
  max-height: 48px !important;
  object-fit: cover;
  display: block;
}

.upload-item-play-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 18px;
  color: rgba(255, 255, 255, 0.9);
  pointer-events: none;
  z-index: 1;
}

.upload-item-preview-file {
  display: flex;
  align-items: center;
  justify-content: center;
}

.upload-item-file-icon {
  font-size: 24px;
  opacity: 0.6;
}

.upload-item-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.upload-item .name { 
  color: var(--text); 
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.upload-item .size {
  color: var(--text-muted);
  font-size: 12px;
}

.upload-item .remove { 
  color: var(--text-muted); 
  cursor: pointer; 
  font-size: 18px;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s;
  flex-shrink: 0;
}

.upload-item .remove:hover { 
  color: var(--error); 
  background: rgba(233, 30, 99, 0.1);
}

.upload-zone.has-files {
  padding: 8px !important;
  min-height: auto !important;
}

.upload-zone.has-files .upload-plus {
  display: none !important;
}

.upload-zone.has-files .upload-zone-content {
  display: none !important;
}

.upload-plus { 
  font-size: 28px; 
  color: var(--text-muted); 
  line-height: 1.2; 
  display: block;
}

.upload-text {
  font-size: 14px;
  color: var(--text-muted);
  margin-top: 8px;
  display: block;
}
.upload-sub, .upload-hint { font-size: 12px; color: var(--text-muted); margin-top: 6px; }
.upload-count { color: var(--accent-light); font-weight: 500; }

.stepper { 
  display: flex; 
  align-items: center; 
  gap: 8px; 
  flex: 1;
  max-width: 300px;
}
.stepper input[type="number"] { width: 70px; padding: 8px 10px; text-align: center; background: #1a1a1d; border: 1px solid var(--border); border-radius: var(--radius); color: var(--text); font-size: 14px; }
.step-btn { width: 32px; height: 32px; padding: 0; border: 1px solid var(--border); border-radius: var(--radius); background: #1a1a1d; color: var(--text); font-size: 18px; cursor: pointer; line-height: 1; }
.step-btn:hover { border-color: var(--accent); color: var(--accent-light); }

.pills, .tabs-pills { 
  display: flex; 
  flex-wrap: wrap; 
  gap: 8px; 
}

/* 通道选择统一布局：所有选项统一显示 */
.pills[data-name="channel"] {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pills[data-name="channel"] .pill {
  flex: 1;
  min-width: calc(33.333% - 6px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.pill, .tab-pill { 
  padding: 10px 16px; 
  border: 1px solid var(--border); 
  border-radius: var(--radius); 
  font-size: 13px; 
  color: var(--text); 
  cursor: pointer; 
  transition: all .2s; 
  position: relative;
  background: var(--bg-card);
}

.pill:hover, .tab-pill:hover { 
  color: var(--text); 
  border-color: rgba(233,30,99,.4); 
}

.pill.active, .tab-pill.active { 
  border-color: var(--accent); 
  border-width: 2px;
  color: var(--accent-light); 
  background: rgba(233,30,99,.1); 
  font-weight: 500;
}

.pill small, .pill .rec { 
  font-size: 11px; 
  color: #ff6b35;
  background: rgba(255, 107, 53, 0.15);
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: 6px;
  font-weight: 500;
  display: inline-block;
}

.pill-card { 
  display: flex; 
  flex-direction: column; 
  align-items: flex-start; 
  text-align: left; 
  padding: 12px 16px; 
  min-width: 200px;
  background: var(--bg-card);
  border: 2px solid var(--border);
  position: relative;
}

.pill-card.active {
  border-color: var(--accent);
  background: rgba(233, 30, 99, .1);
}

.pill-card .pill-title { 
  font-weight: 500; 
  font-size: 14px;
  color: var(--text);
  margin-bottom: 4px;
}

.pill-card .pill-desc { 
  font-size: 12px; 
  color: var(--text-muted); 
  margin-top: 4px; 
  line-height: 1.5;
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  transition: opacity 0.2s, max-height 0.2s;
}

.pill-card:hover .pill-desc {
  opacity: 1;
  max-height: 100px;
}

/* AI配音卡片布局：横向排列，三个一排 */
.pills[data-with-desc="1"] {
  display: flex;
  flex-direction: row;
  gap: 12px;
  flex-wrap: nowrap;
}

.pills[data-with-desc="1"] .pill-card {
  flex: 1;
  min-width: 0;
}

.lang-pair { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.lang-pair-item { flex: 1; min-width: 140px; }
.lang-pair-item label.lang-pair-lbl { display: block; font-size: 12px; color: var(--text-muted); margin-bottom: 6px; }
.lang-pair-item select { width: 100%; }
.lang-pair-arrow { color: var(--accent); font-size: 16px; }

.preset-styles { 
  display: grid; 
  grid-template-columns: repeat(6, 1fr); 
  gap: 8px; 
}

.preset-style-btn { 
  padding: 16px 12px; 
  border: 2px solid var(--border); 
  border-radius: var(--radius); 
  font-size: 13px; 
  color: var(--text); 
  cursor: pointer; 
  text-align: center;
  background: var(--bg-card);
  min-height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 500;
  transition: all .2s;
}

.preset-style-btn:hover { 
  border-color: rgba(233,30,99,.4); 
  color: var(--accent-light); 
}

.preset-style-btn.active { 
  border-color: var(--accent); 
  border-width: 2px;
  color: var(--accent-light); 
  background: rgba(233,30,99,.1); 
}

.row-inline .toggle-wrap { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.row-inline input[type="checkbox"] { width: auto; }
.slider-wrap { display: flex; align-items: center; gap: 12px; }
.slider-wrap input[type="range"] { flex: 1; accent-color: var(--accent); }
.slider-val { font-size: 13px; color: var(--text-muted); min-width: 28px; }
.char-count { font-size: 12px; color: var(--text-muted); display: block; margin-top: 4px; }
.sidebar-cost {
  display: none;
}
.cost-row { 
  display: none;
}
.btn-generate-sidebar,
.sidebar-footer {
  display: none !important;
}

.cost-note { 
  display: none;
}
/* 样式参数：两排布局，第一排字体和粗细，第二排字号和行间距 */
.form-row.style-params-grid {
  display: grid !important;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: 0;
  align-items: flex-start;
  flex-direction: unset !important;
}

.style-params-grid .style-param-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.style-params-grid .style-param-item label {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 0;
  min-width: auto;
}

.style-params-grid .style-param-item select,
.style-params-grid .style-param-item .stepper {
  width: 100%;
  max-width: 100%;
}

.form-row {
  margin-top: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.form-row label {
  display: block;
  margin-bottom: 0;
  font-size: 13px;
  color: var(--text-muted);
  min-width: 120px;
  flex-shrink: 0;
}


.form-row input,
.form-row textarea,
.form-row select {
  flex: 1;
  padding: 10px 12px;
  background: #1a1a1d;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
}

.form-row textarea {
  min-height: 180px;
  height: 180px;
  resize: vertical;
  border: 2px dashed var(--border);
  padding: 24px 32px;
  text-align: left;
  font-size: 14px;
  background: var(--bg-card);
  transition: border-color .2s, background .2s;
  box-sizing: border-box;
  line-height: 1.5;
  width: 100%;
}

.form-row textarea:focus {
  border-color: var(--accent);
  background: rgba(233, 30, 99, .06);
  outline: none;
}

.form-row textarea::placeholder {
  color: var(--text-muted);
  text-align: center;
}

/* 对于包含 textarea、pills 等的 form-row，使用垂直布局 */
.form-row:not(:has(.stepper)):not(:has(input[type="number"])) {
  flex-direction: column;
  align-items: flex-start;
}

.form-row:not(:has(.stepper)):not(:has(input[type="number"])) label {
  min-width: auto;
  margin-bottom: 6px;
}

/* 如果浏览器不支持 :has()，使用类名方式 */
.form-row-vertical {
  flex-direction: column;
  align-items: flex-start;
}

.form-row-vertical label {
  min-width: auto;
  margin-bottom: 6px;
}

/* 视频口播带货：字段两排显示 */
.form-row-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-top: 16px;
}

/* AI数字人：三个字段一排显示 */
.form-row-grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

/* 视频加字幕：两个字段一排显示 */
.form-row-grid-2 {
  grid-template-columns: repeat(2, 1fr);
}

.form-row-grid .form-row {
  margin-top: 0;
  width: 100%;
  margin-right: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.form-row-grid .form-row label {
  min-width: auto;
  margin-bottom: 6px;
}

.form-row-grid .form-row.row-inline {
  flex-direction: row;
  align-items: center;
}

.form-row-grid .form-row select,
.form-row-grid .form-row input {
  width: 100%;
}

.form-row .pills,
.form-row .lang-pair,
.form-row .preset-styles {
  width: 100%;
  flex: 1;
  max-width: 100%;
  justify-content: flex-start;
  display: flex;
  flex-wrap: wrap;
}

.form-row input:focus,
.form-row textarea:focus,
.form-row select:focus {
  outline: none;
  border-color: var(--accent);
}

.btn-submit {
  margin-top: 20px;
  padding: 12px 28px;
  background: linear-gradient(135deg, var(--accent), var(--accent-light));
  border: none;
  border-radius: var(--radius);
  color: #fff;
  font-family: var(--font);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity .2s, transform .05s;
  width: 100%;
  max-width: 300px;
  margin-left: auto;
  margin-right: auto;
  display: block;
}

.form-row:has(.btn-submit) {
  display: flex !important;
  justify-content: center;
  align-items: center;
}

.btn-submit:hover { opacity: .92; }
.btn-submit:active { transform: scale(.98); }
.btn-submit:disabled { opacity: .6; cursor: not-allowed; }

.progress-bar {
  margin-top: 16px;
  height: 6px;
  background: #1a1a1d;
  border-radius: 3px;
  overflow: hidden;
}

.progress-bar .fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-light));
  border-radius: 3px;
  transition: width .3s;
}

.result-box {
  margin-top: 20px;
  padding: 16px;
  background: #1a1a1d;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.result-box .label {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.result-box .preview {
  max-width: 100%;
  max-height: 320px;
  border-radius: var(--radius);
}

.result-box .actions {
  margin-top: 12px;
}

.result-box .actions a,
.result-box .actions button {
  display: inline-block;
  margin-right: 12px;
  padding: 8px 16px;
  background: var(--accent);
  border: none;
  border-radius: var(--radius);
  color: #fff;
  font-size: 13px;
  cursor: pointer;
  font-family: var(--font);
}

.result-box .actions a { text-decoration: none; }

.msg {
  padding: 12px 16px;
  border-radius: var(--radius);
  font-size: 13px;
  margin-top: 12px;
}

.msg.error { background: rgba(244,67,54,.15); color: #f48a82; }
.msg.success { background: rgba(76,175,80,.15); color: #81c784; }

/* 响应式 */
@media (max-width: 900px) {
  .demo-cards { grid-template-columns: 1fr 1fr; }
  .sidebar { width: 72px; }
  .nav-item span:not(.nav-icon) { display: none; }
  .nav-item { justify-content: center; padding: 12px; }
}

@media (max-width: 600px) {
  .demo-cards { grid-template-columns: 1fr; }
  #page-home .banner-title { font-size: 48px; width: 90%; }
  #page-home .banner-sub { font-size: 20px; width: 90%; }
  #page-home .banner-desc { font-size: 20px; width: 90%; }
  #page-home .banner { padding: 60px 16px 80px; min-height: 50vh; }
  .content { padding: 16px; }
}
