:root {
  --bg: #0a0a0f;
  --bg-elevated: #14141c;
  --bg-hover: #1c1c28;
  --border: rgba(255, 255, 255, 0.08);
  --text: #f0f0f5;
  --text-secondary: #9ca3af;
  --primary: #00d68f;
  --primary-hover: #00b87a;
  --danger: #ef4444;
  --warning: #f59e0b;
  --radius: 16px;
  --radius-sm: 10px;
  --sidebar-w: 200px;
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", sans-serif;
  font-size: 14px;
}

#app {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

[v-cloak] { display: none; }

/* 左侧导航 */
.sidebar {
  width: var(--sidebar-w);
  background: var(--bg-elevated);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}

.sidebar-logo {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 1px;
  border-bottom: 1px solid var(--border);
}

.sidebar-nav {
  flex: 1;
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  overflow-y: auto;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  text-decoration: none;
  cursor: pointer;
  transition: all .15s ease;
}

.nav-item:hover {
  background: var(--bg-hover);
  color: var(--text);
}

.nav-item.active {
  background: rgba(0, 214, 143, 0.12);
  color: var(--primary);
}

.nav-icon { font-size: 18px; width: 24px; text-align: center; }
.nav-label { font-size: 14px; }

.sidebar-user {
  padding: 14px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition: background .15s;
}

.sidebar-user:hover { background: var(--bg-hover); }

.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--primary);
  color: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
}

.user-name { font-size: 14px; color: var(--text); }
.user-points { font-size: 12px; color: var(--primary); margin-top: 2px; }

/* 主内容区 */
.main {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--bg);
}

.topbar {
  height: 64px;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
  background: rgba(10, 10, 15, 0.85);
  backdrop-filter: blur(12px);
  flex-shrink: 0;
}

.topbar-tabs { display: flex; gap: 8px; }

.top-tab {
  padding: 8px 18px;
  border-radius: 999px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: 14px;
  cursor: pointer;
  transition: all .15s;
}

.top-tab:hover { color: var(--text); background: var(--bg-hover); }
.top-tab.active {
  background: var(--primary);
  color: #000;
  font-weight: 600;
}

.topbar-actions { display: flex; gap: 10px; align-items: center; }

.btn-ghost {
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  cursor: pointer;
  transition: all .15s;
}

.btn-ghost:hover { background: var(--bg-hover); border-color: rgba(255,255,255,0.15); }

.page {
  flex: 1;
  overflow-y: auto;
  padding: 28px 32px;
}

/* 首页 */
.home-page { max-width: 1400px; }

.banner {
  padding: 48px 36px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(0,214,143,0.12), rgba(0,214,143,0.02));
  border: 1px solid rgba(0,214,143,0.15);
  margin-bottom: 28px;
}

.banner h1 {
  margin: 0 0 12px;
  font-size: 34px;
  font-weight: 800;
}

.banner p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 16px;
}

.category-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 18px;
  margin-bottom: 36px;
}

.category-card {
  padding: 22px;
  border-radius: var(--radius);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all .15s;
}

.category-card:hover {
  transform: translateY(-3px);
  border-color: rgba(0,214,143,0.35);
  box-shadow: var(--shadow);
}

.cat-icon { font-size: 32px; margin-bottom: 14px; }
.cat-title { font-size: 17px; font-weight: 700; margin-bottom: 6px; }
.cat-desc { color: var(--text-secondary); font-size: 13px; line-height: 1.5; margin-bottom: 14px; }
.cat-count { color: var(--primary); font-size: 12px; font-weight: 600; }

.feature-grid-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 16px;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 18px;
}

.feature-card {
  border-radius: var(--radius);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  overflow: hidden;
  cursor: pointer;
  transition: all .15s;
}

.feature-card:hover {
  border-color: rgba(0,214,143,0.3);
  transform: translateY(-2px);
}

.feature-cover {
  height: 140px;
  background: linear-gradient(135deg, #1c1c28, #14141c);
  background-size: cover;
  background-position: center;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
}

.feature-cover-icon {
  font-size: 48px;
  opacity: .75;
  text-shadow: 0 4px 20px rgba(0,0,0,0.4);
}

.feature-info { padding: 16px; }
.feature-name { font-size: 15px; font-weight: 700; margin-bottom: 6px; }
.feature-desc {
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* 按钮 */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  border: none;
  background: var(--primary);
  color: #000;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: all .15s;
}

.btn-primary:hover { background: var(--primary-hover); }
.btn-primary:disabled { opacity: .55; cursor: not-allowed; }

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-hover);
  color: var(--text);
  font-size: 14px;
  cursor: pointer;
  transition: all .15s;
}

.btn-secondary:hover { background: var(--bg-elevated); }

/* 弹窗 */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  backdrop-filter: blur(4px);
}

.modal {
  width: 420px;
  max-width: 90vw;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
}

.modal h3 { margin: 0 0 20px; font-size: 20px; }
.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  cursor: pointer;
  color: var(--text-secondary);
}

.form-group { margin-bottom: 18px; }
.form-label {
  display: block;
  margin-bottom: 8px;
  color: var(--text-secondary);
  font-size: 13px;
}

.form-input {
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  outline: none;
  transition: border-color .15s;
}

.form-input:focus { border-color: var(--primary); }

.form-actions { display: flex; gap: 12px; margin-top: 24px; }
.form-actions .btn-primary, .form-actions .btn-secondary { flex: 1; }

/* 创作台 */
.create-page {
  display: flex;
  gap: 24px;
  padding: 0;
  overflow: hidden;
}

.create-panel {
  width: 460px;
  min-width: 360px;
  max-width: 520px;
  background: var(--bg-elevated);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.create-header {
  padding: 22px 24px;
  border-bottom: 1px solid var(--border);
}

.create-header h2 { margin: 0 0 8px; font-size: 20px; }
.create-header p { margin: 0; color: var(--text-secondary); font-size: 13px; line-height: 1.5; }

.create-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
}

.create-footer {
  padding: 18px 24px;
  border-top: 1px solid var(--border);
  background: var(--bg-elevated);
}

.result-area {
  flex: 1;
  padding: 24px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.result-empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  text-align: center;
}

.result-empty .big-icon { font-size: 64px; margin-bottom: 18px; opacity: .5; }

/* 参数组件 */
.param-block { margin-bottom: 22px; }
.param-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  font-size: 13px;
  color: var(--text-secondary);
}

.param-hint { font-size: 12px; color: var(--text-secondary); margin-top: 6px; line-height: 1.4; }

.model-select {
  width: 100%;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.model-select:hover { border-color: rgba(0,214,143,0.4); }

.model-dropdown {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  max-height: 280px;
  overflow-y: auto;
  z-index: 100;
  box-shadow: var(--shadow);
}

.model-option {
  padding: 12px 16px;
  cursor: pointer;
  border-bottom: 1px solid var(--border);
}

.model-option:last-child { border-bottom: none; }
.model-option:hover { background: var(--bg-hover); }
.model-option.active { background: rgba(0,214,143,0.12); }
.model-option-title { font-size: 14px; margin-bottom: 2px; }
.model-option-desc { font-size: 12px; color: var(--text-secondary); }

.model-select-wrap { position: relative; }

.textarea-prompt {
  width: 100%;
  min-height: 160px;
  padding: 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
  resize: vertical;
  outline: none;
}

.textarea-prompt:focus { border-color: var(--primary); }

.textarea-tools {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: -36px;
  padding-right: 10px;
  position: relative;
  z-index: 2;
}

.textarea-tools button {
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text);
  font-size: 12px;
  cursor: pointer;
}

.textarea-tools button.primary { background: var(--primary); color: #000; border-color: var(--primary); }

.upload-zone {
  width: 120px;
  height: 120px;
  border-radius: var(--radius-sm);
  border: 2px dashed var(--border);
  background: var(--bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all .15s;
  position: relative;
  overflow: hidden;
}

.upload-zone:hover { border-color: var(--primary); color: var(--text); }

.upload-zone .upload-icon { font-size: 28px; margin-bottom: 6px; }
.upload-zone .upload-label { font-size: 12px; text-align: center; padding: 0 8px; }

.upload-preview {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
}

.upload-remove {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(0,0,0,0.7);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 12px;
}

.upload-row { display: flex; flex-wrap: wrap; gap: 12px; }

.cost-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  font-size: 14px;
}

.cost-bar .cost { color: var(--primary); font-weight: 700; font-size: 16px; }
.cost-bar .insufficient { color: var(--danger); font-weight: 700; }

/* ============ 发现灵感：案例展示墙 ============ */
.showcase-page {
  padding: 24px 28px 40px;
  height: 100%;
  overflow-y: auto;
}
.showcase-head h2 { margin: 0 0 6px; font-size: 22px; }
.showcase-head p {
  margin: 0 0 18px;
  color: var(--text-secondary);
  font-size: 13px;
}

.showcase-tabs { display: flex; gap: 8px; margin-bottom: 20px; }
.showcase-tab {
  padding: 7px 16px;
  border-radius: 999px;
  cursor: pointer;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 13px;
  transition: all .18s;
}
.showcase-tab:hover { background: var(--bg-hover); color: var(--text); }
.showcase-tab.active {
  background: rgba(0, 214, 143, 0.15);
  color: var(--primary);
  border-color: rgba(0, 214, 143, 0.35);
}

.showcase-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 18px;
}

.showcase-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: transform .2s, border-color .2s, box-shadow .2s;
}
.showcase-card:hover {
  transform: translateY(-4px);
  border-color: rgba(0, 214, 143, 0.35);
  box-shadow: var(--shadow);
}

.showcase-cover {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 4;
  background: #0f0f16;
  overflow: hidden;
}
.showcase-cover img,
.showcase-cover video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.showcase-cover-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 34px;
  color: var(--text-secondary);
}

.showcase-play {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: #fff;
  opacity: 0;
  transition: opacity .2s;
}
.showcase-card:hover .showcase-play { opacity: 1; }

.showcase-duration {
  position: absolute;
  right: 8px;
  bottom: 8px;
  padding: 2px 7px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.65);
  font-size: 11px;
  color: #fff;
}

.showcase-meta { padding: 11px 13px 14px; }
.showcase-title { font-size: 13px; font-weight: 600; margin-bottom: 4px; }
.showcase-prompt {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.showcase-empty {
  padding: 60px 0;
  text-align: center;
  color: var(--text-secondary);
}

/* 播放弹窗 */
.player-mask {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.player-box {
  position: relative;
  width: 100%;
  max-width: 880px;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.player-close {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 5;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 14px;
}
.player-box video {
  width: 100%;
  max-height: 66vh;
  background: #000;
  display: block;
}
.player-poster {
  position: relative;
  cursor: pointer;
  width: 100%;
}
.player-poster img {
  width: 100%;
  max-height: 66vh;
  object-fit: cover;
  display: block;
}
.player-poster-btn {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 62px;
  height: 62px;
  border-radius: 50%;
  background: rgba(0, 214, 143, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: #04140d;
}
.player-poster-tip {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 12px;
  text-align: center;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.85);
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.9);
}
.player-info { padding: 16px 18px 18px; overflow-y: auto; }
.player-title { font-size: 15px; font-weight: 700; margin-bottom: 6px; }
.player-prompt {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 14px;
}
.player-use { width: 100%; }

/* 图片案例的大图预览 */
.player-image {
  width: 100%;
  max-height: 66vh;
  object-fit: contain;
  background: #0b0b12;
  display: block;
}

@media (max-width: 900px) {
  .showcase-page { padding: 16px 14px 30px; }
  .showcase-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px;
  }
  .player-mask { padding: 10px; }
}

.generate-btn {
  width: 100%;
  padding: 14px;
  font-size: 16px;
}

.notice {
  margin-top: 12px;
  font-size: 12px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 6px;
}

/* 结果卡片 */
.result-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 18px;
}

.result-card {
  border-radius: var(--radius);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  overflow: hidden;
}

.result-media {
  aspect-ratio: 1 / 1;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.result-media img, .result-media video {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.result-actions {
  padding: 12px;
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.result-actions button {
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-size: 12px;
  cursor: pointer;
}

.result-actions button:hover { background: var(--bg-hover); }

/* 任务状态 */
.task-list { display: flex; flex-direction: column; gap: 12px; }
.task-item {
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.task-status { font-size: 12px; padding: 4px 10px; border-radius: 999px; }
.task-status.pending { background: rgba(245,158,11,0.15); color: var(--warning); }
.task-status.success { background: rgba(0,214,143,0.15); color: var(--primary); }
.task-status.error { background: rgba(239,68,68,0.15); color: var(--danger); }

/* 响应式 */
@media (max-width: 900px) {
  .sidebar { width: 64px; }
  .sidebar-logo { font-size: 12px; }
  .nav-label, .user-meta { display: none; }
  .create-panel { width: 100%; max-width: none; border-right: none; }
  .create-page { flex-direction: column; }
}

/* ========== 账户面板（我的） ========== */
.user-panel { max-width: 420px; }
.up-head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 16px; }
.up-head h3 { margin: 0; }
.up-sub { font-size: 12px; color: var(--text-secondary); margin-top: 4px; }
.up-close {
  width: 30px; height: 30px; border-radius: 8px; cursor: pointer; font-size: 16px;
  background: none; border: 1px solid var(--border); color: var(--text-secondary);
}
.up-close:hover { color: var(--text); border-color: var(--primary); }
.up-usercard {
  display: flex; align-items: center; gap: 12px; padding: 16px;
  border: 1px solid var(--border); border-radius: 12px;
  background: rgba(255, 255, 255, 0.03); margin-bottom: 14px;
}
.up-avatar {
  width: 44px; height: 44px; border-radius: 50%; flex: none;
  background: linear-gradient(135deg, var(--primary), #0ea5e9);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; font-weight: 700; color: #04110b; text-transform: uppercase;
}
.up-usermeta { flex: 1; min-width: 0; }
.up-username { font-weight: 600; font-size: 15px; }
.up-userhint { font-size: 11.5px; color: var(--text-secondary); margin-top: 2px; }
.up-points { text-align: right; flex: none; }
.up-points-num { font-size: 20px; font-weight: 700; color: var(--primary); }
.up-points-num span { font-size: 11px; font-weight: 400; color: var(--text-secondary); }
.up-refresh { margin-top: 6px; padding: 4px 12px; font-size: 12px; }
.up-menu {
  border: 1px solid var(--border); border-radius: 12px; overflow: hidden;
  background: rgba(255, 255, 255, 0.03); margin-bottom: 14px;
}
.up-menu-item {
  display: flex; align-items: center; gap: 12px; width: 100%;
  padding: 13px 14px; background: none; border: none;
  border-bottom: 1px solid var(--border);
  color: inherit; cursor: pointer; text-align: left; font: inherit;
}
.up-menu-item:last-child { border-bottom: none; }
.up-menu-item:hover { background: var(--bg-hover); }
.up-mi-icon {
  flex: none; width: 30px; height: 30px; border-radius: 8px;
  background: rgba(0, 214, 143, 0.1);
  display: flex; align-items: center; justify-content: center; font-size: 14px;
}
.up-mi-body { flex: 1; display: flex; flex-direction: column; gap: 2px; line-height: 1.35; }
.up-mi-body b { font-size: 13.5px; font-weight: 600; }
.up-mi-body i { font-size: 11px; font-style: normal; color: var(--text-secondary); }
.up-mi-arrow { flex: none; color: var(--text-secondary); font-size: 17px; }
.up-logout {
  width: 100%; padding: 12px; border-radius: 10px; cursor: pointer;
  border: 1px solid rgba(239, 68, 68, 0.4); background: none;
  color: var(--danger); font-size: 14px;
}
.up-logout:hover { background: rgba(239, 68, 68, 0.08); }
.up-info {
  border: 1px solid var(--border); border-radius: 12px; overflow: hidden;
  background: rgba(255, 255, 255, 0.03); margin-bottom: 14px;
}
.up-info-row {
  display: flex; justify-content: space-between; gap: 12px;
  padding: 12px 14px; border-bottom: 1px solid var(--border); font-size: 13px;
}
.up-info-row:last-child { border-bottom: none; }
.up-info-row span { color: var(--text-secondary); flex: none; }
.up-hl { color: var(--primary); }
.up-about { text-align: center; padding: 8px 4px 12px; }
.up-about-logo { font-size: 22px; font-weight: 700; margin-bottom: 6px; }
.up-about-version { font-size: 12px; color: var(--text-secondary); margin-bottom: 12px; }
.up-about-desc { font-size: 12.5px; color: var(--text-secondary); line-height: 1.7; text-align: left; margin: 0 0 12px; }
.up-notice {
  position: fixed; left: 50%; top: 24px; transform: translateX(-50%);
  background: var(--bg-elevated); border: 1px solid var(--primary);
  color: var(--text); padding: 8px 18px; border-radius: 20px;
  font-size: 13px; z-index: 9999; white-space: nowrap;
}

/* 我的作品：任务结果列表 */
.works-list { display: flex; flex-direction: column; gap: 16px; }
.work-item {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
}
.work-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 12px; }
.work-title { font-weight: 600; font-size: 14px; }
.work-meta { font-size: 12px; color: var(--text-secondary); margin-top: 4px; }
.work-error { color: var(--danger); font-size: 13px; padding: 10px 0; }
.work-hint { color: var(--text-secondary); font-size: 13px; padding: 10px 0; }
.work-link { color: var(--primary); font-size: 12px; word-break: break-all; padding: 8px; text-decoration: none; }
.works-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.works-grid .result-media img { cursor: zoom-in; }

/* 创作台：出结果后引导去我的作品 */
.result-done { padding: 40px 20px; text-align: center; color: var(--text-secondary); }
.done-icon { font-size: 40px; margin-bottom: 12px; }

/* 图片灯箱 */
.lightbox {
  position: fixed; inset: 0; z-index: 10000;
  background: rgba(0, 0, 0, 0.88);
  display: flex; align-items: center; justify-content: center;
  padding: 40px;
}
.lightbox img, .lightbox video { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 8px; }
.lightbox-close {
  position: absolute; top: 18px; right: 24px;
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.12); color: #fff;
  border: none; font-size: 20px; cursor: pointer;
}
.lightbox-download {
  position: absolute; bottom: 28px; left: 50%; transform: translateX(-50%);
  background: var(--primary); color: #000; font-weight: 700; border: none;
  padding: 8px 22px; border-radius: 20px; font-size: 13px; cursor: pointer;
}

/* 我的作品：状态操作区 */
.work-ops { display: flex; align-items: center; gap: 8px; flex: none; }
.work-op {
  background: transparent; border: 1px solid var(--border); color: var(--text-secondary);
  font-size: 12px; padding: 3px 10px; border-radius: 999px; cursor: pointer;
}
.work-op:hover { color: var(--text); background: var(--bg-hover); }
.task-status.unknown { background: rgba(148, 163, 184, 0.16); color: var(--text-secondary); }
.work-op-primary { border-color: var(--primary); color: var(--primary); }
.work-op-primary:hover { background: rgba(0, 214, 143, 0.1); }


/* ==========================================================================
   移动端适配（≤768px）
   --------------------------------------------------------------------------
   901px 以上   ：完整左侧导航（200px）
   769 ~ 900px  ：侧边栏收窄成图标条（见本文件 @media 900px 那段）
   ≤768px       ：左侧导航变成底部标签栏，页面改为整体滚动
   ========================================================================== */
@media (max-width: 768px) {
  /* ---- 1. 骨架：解除桌面端 height:100vh + overflow:hidden 的三层锁定 ---- */
  html, body {
    height: auto;
    min-height: 100%;
    -webkit-text-size-adjust: 100%;
  }
  #app {
    flex-direction: column;
    height: auto;
    min-height: 100vh;
    min-height: 100dvh;   /* 移动端地址栏显隐时更准，不支持的浏览器会用上面那条 */
    overflow: visible;
  }

  /* ---- 2. 左侧导航 → 底部标签栏 ---- */
  .sidebar {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    width: 100%;
    flex-direction: row;
    border-right: none;
    border-top: 1px solid var(--border);
    background: rgba(20, 20, 28, 0.96);
    backdrop-filter: blur(12px);
    z-index: 100;
    /* 开了 viewport-fit=cover 的机型上让开 iPhone 底部小黑条；没开则为 0，无副作用 */
    padding-bottom: env(safe-area-inset-bottom);
  }
  /* 顶部栏已经显示用户名和积分，底栏只留功能入口，省出横向空间 */
  .sidebar-logo,
  .sidebar-user { display: none; }

  .sidebar-nav {
    flex: 1;
    padding: 6px 4px;
    flex-direction: row;
    gap: 0;
    overflow: visible;
  }
  .nav-item {
    flex: 1;
    flex-direction: column;
    gap: 3px;
    padding: 6px 2px;
    min-height: 50px;        /* 触控目标建议 ≥44px */
    justify-content: center;
  }
  .nav-icon { font-size: 21px; width: auto; }
  .nav-label { font-size: 11px; }

  /* ---- 3. 主区：给底栏腾位置，恢复整体滚动 ---- */
  .main {
    overflow: visible;
    padding-bottom: calc(58px + env(safe-area-inset-bottom));
  }

  /* ---- 4. 顶部栏：tabs 改成横向滚动，避免按钮被挤出屏幕 ---- */
  .topbar { height: 56px; padding: 0 14px; gap: 10px; }
  .topbar-tabs {
    flex: 1;
    min-width: 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .topbar-tabs::-webkit-scrollbar { display: none; }
  .top-tab { padding: 7px 12px; font-size: 13px; white-space: nowrap; }
  .topbar-actions { gap: 6px; flex: none; }
  .btn-ghost { padding: 8px 10px; font-size: 12px; }

  /* ---- 5. 通用页面留白 ---- */
  .page {
    padding: 16px 14px 24px;
    overflow: visible;
    flex: none;
  }

  /* ---- 6. 首页 ---- */
  .banner { padding: 26px 18px; margin-bottom: 20px; }
  .banner h1 { font-size: 24px; }
  .banner p { font-size: 14px; }
  .category-cards,
  .feature-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px;
  }
  .category-card { padding: 16px; }
  .feature-cover { height: 110px; }

  /* ---- 7. 创作台：原来左右分栏，手机上改成上下堆叠 ---- */
  .create-page {
    flex-direction: column;
    gap: 0;
    overflow: visible;
  }
  .create-panel {
    width: 100%;
    min-width: 0;
    max-width: none;
    border-right: none;
    border-bottom: 1px solid var(--border);
    overflow: visible;
  }
  .create-header { padding: 16px 14px; }
  .create-scroll { flex: none; overflow: visible; padding: 16px 14px; }
  .create-footer { padding: 14px; }
  .result-area { flex: none; overflow: visible; padding: 16px 14px; }
  .result-empty { min-height: 200px; padding: 24px 0; }

  /* ---- 8. 表单控件：触控友好 ---- */
  /* iOS Safari 在 input 字号小于 16px 时会放大整个页面，且不会自动缩回 */
  .form-input,
  .textarea-prompt,
  input, select, textarea { font-size: 16px; }

  .form-input,
  .btn-primary,
  .btn-secondary,
  .btn-ghost { min-height: 44px; }

  .textarea-prompt { min-height: 120px; }
  .upload-zone { min-height: 104px; }
  .param-block { margin-bottom: 18px; }

  /* ---- 9. 结果区 ---- */
  .result-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px;
  }
  .result-media img, .result-media video { max-height: 60vh; }
  .result-actions button { padding: 8px 14px; font-size: 13px; }
  .result-empty .big-icon { font-size: 44px; }

  /* ---- 10. 我的作品 ---- */
  .works-grid { grid-template-columns: 1fr; }
  .works-list { gap: 14px; }
  .work-head, .work-ops { flex-wrap: wrap; }
  .work-op { padding: 6px 12px; font-size: 13px; }

  /* ---- 11. 弹窗：改成贴底的抽屉，比居中弹窗在手机上好操作 ---- */
  .modal-backdrop { align-items: flex-end; padding: 0; }
  .modal {
    position: relative;   /* 让关闭按钮相对弹窗自身定位，而不是整个遮罩 */
    width: 100%;
    max-width: none;
    max-height: 92vh;
    overflow-y: auto;
    border-radius: var(--radius) var(--radius) 0 0;
    border-bottom: none;
    padding: 22px 16px calc(22px + env(safe-area-inset-bottom));
  }
  .form-actions { flex-direction: column; gap: 10px; }
  .form-actions .btn-primary, .form-actions .btn-secondary { width: 100%; }
}
