/* ===== A8 电商综合智能体 - 深色霓虹科技风（复刻旧版配色体系） =====
   默认档（客户喜欢的旧版原味）：GitHub 深蓝黑底 + 霓虹青绿 #00ffd5 + 紫蓝 #6a5cff + 琥珀 #f59e0b；
   浅色档（data-theme="light"）：旧版同族浅色。全部变量驱动。 */

:root {
  color-scheme: dark;
  --bg: #0d1117;
  --bg-elevated: #161b22;
  --surface: rgba(33, 38, 45, 0.6);
  --surface-solid: #21262d;
  --surface-soft: #161b22;
  --border: rgba(110, 118, 129, 0.4);
  --border-strong: rgba(110, 118, 129, 0.55);
  --text: #e6edf3;
  --text-sub: #8b949e;
  --primary: #00ffd5;
  --primary-dark: #33ffdf;
  --primary-deep: #00bba8;
  --primary-soft: rgba(0, 255, 213, 0.08);
  --primary-border: rgba(0, 255, 213, 0.2);
  --secondary: #6a5cff;
  --secondary-soft: #8b7cff;
  --accent-blue: #38bdf8;
  --danger: #ff4d6d;
  --danger-soft: rgba(255, 77, 109, 0.14);
  --gold: #f59e0b;
  --green: #10b981;
  --font-mono: ui-monospace, "SF Mono", "Cascadia Mono", "JetBrains Mono", Consolas, monospace;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.45);
  --card-bg: rgba(33, 38, 45, 0.6);
  --card-border: rgba(110, 118, 129, 0.4);
  --max-width: 1200px;
}

html[data-theme="light"] {
  color-scheme: light;
  --bg: #f4f6fb;
  --bg-elevated: #ffffff;
  --surface: rgba(255, 255, 255, 0.78);
  --surface-solid: #ffffff;
  --surface-soft: #eef2f8;
  --border: rgba(100, 116, 139, 0.26);
  --border-strong: rgba(100, 116, 139, 0.4);
  --text: #1f2937;
  --text-sub: #64748b;
  --primary: #00a884;
  --primary-dark: #0d9488;
  --primary-deep: #0f766e;
  --primary-soft: rgba(0, 168, 132, 0.08);
  --primary-border: rgba(0, 168, 132, 0.25);
  --secondary: #6a5cff;
  --secondary-soft: #7c6cff;
  --accent-blue: #0284c7;
  --danger: #e11d48;
  --danger-soft: #ffe4e6;
  --gold: #b45309;
  --green: #059669;
  --shadow: 0 8px 32px rgba(15, 23, 42, 0.1);
  --shadow-lg: 0 20px 60px rgba(15, 23, 42, 0.14);
  --card-bg: #ffffff;
  --card-border: rgba(100, 116, 139, 0.22);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: "PingFang SC", "Microsoft YaHei", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* 背景柔光（浅色暖调，暗色自动换深） */
.bg-glow {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.35;
}

html[data-theme="light"] .glow {
  opacity: 0.5;
}

.glow-1 {
  width: 56vw;
  height: 56vw;
  top: -22vw;
  right: -14vw;
  background: radial-gradient(circle, rgba(106, 92, 255, 0.45) 0%, transparent 70%);
}

.glow-2 {
  width: 48vw;
  height: 48vw;
  top: 18vh;
  left: -18vw;
  background: radial-gradient(circle, rgba(0, 255, 213, 0.3) 0%, transparent 70%);
}

.glow-3 {
  width: 40vw;
  height: 40vw;
  bottom: -12vw;
  right: 8vw;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.25) 0%, transparent 70%);
}

/* HUD 网格纹理层 */
.bg-grid {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(110, 118, 129, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(110, 118, 129, 0.06) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: radial-gradient(ellipse 90% 64% at 50% 0%, #000 28%, transparent 78%);
  mask-image: radial-gradient(ellipse 90% 64% at 50% 0%, #000 28%, transparent 78%);
}

html[data-theme="light"] .bg-grid {
  background-image:
    linear-gradient(rgba(0, 168, 132, 0.075) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 168, 132, 0.075) 1px, transparent 1px);
}

/* 顶部导航 */
.app-header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 12px 24px;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 0 rgba(24, 28, 33, 0.02);
  transition: box-shadow 0.3s, border-color 0.3s;
}

.app-header.flash {
  animation: flashWarning 0.9s ease 2;
}

@keyframes flashWarning {
  0%, 100% {
    box-shadow: 0 0 0 rgba(255, 59, 48, 0);
    border-bottom-color: var(--border);
  }
  50% {
    box-shadow: 0 0 28px rgba(255, 59, 48, 0.35);
    border-bottom-color: rgba(255, 59, 48, 0.6);
  }
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.brand-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: #0d1117;
  background: linear-gradient(135deg, var(--secondary) 0%, var(--primary) 100%);
  box-shadow: 0 4px 12px rgba(106, 92, 255, 0.35);
}

.brand-icon svg {
  width: 19px;
  height: 19px;
}

.brand-name {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.01em;
  background: linear-gradient(90deg, var(--text) 0%, var(--primary) 130%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  white-space: nowrap;
}

.brand-tag {
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 600;
  font-family: var(--font-mono);
  color: var(--primary);
  background: var(--primary-soft);
  border: 1px solid var(--primary-border);
  border-radius: 999px;
  white-space: nowrap;
}

/* 桌面端导航 */
.top-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.top-nav-item {
  padding: 7px 16px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-sub);
  border-radius: 999px;
  text-decoration: none;
  cursor: pointer;
  transition: color 0.2s, background 0.2s;
  user-select: none;
}

.top-nav-item:hover {
  color: var(--primary);
  background: var(--primary-soft);
}

.top-nav-item.active {
  color: var(--primary);
  font-weight: 600;
  background: var(--primary-soft);
}

/* 激活区 */
.activation {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1 1 auto;
  justify-content: flex-end;
}

.activation-field {
  display: flex;
  min-width: 260px;
}

.activation.unlocked .activation-field {
  display: none;
}

.activation-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.activation-info[hidden] {
  display: none;
}

.activation input {
  width: 100%;
  padding: 9px 14px;
  font-size: 14px;
  color: var(--text);
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.activation input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0, 255, 213, 0.15);
}

.activation input::placeholder {
  color: var(--text-sub);
}

.code-status {
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

.code-status.ok {
  color: var(--primary);
}

.code-status.err {
  color: var(--danger);
}

.remaining-count {
  font-size: 13px;
  color: var(--text-sub);
  white-space: nowrap;
}

.swap-code-btn {
  padding: 4px 10px;
  font-size: 12px;
  border-radius: var(--radius-sm);
}

/* 配额进度条 */
.quota-bar {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--primary-soft);
  border: 1px solid var(--primary-border);
  color: var(--primary-deep);
  font-size: 12px;
}

.quota-bar-track {
  width: 120px;
  height: 8px;
  background: rgba(24, 28, 33, 0.08);
  border-radius: 999px;
  overflow: hidden;
}

.quota-bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--primary), var(--gold));
  border-radius: 999px;
  transition: width 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.quota-bar-fill.mid {
  background: linear-gradient(90deg, var(--gold), #ffd166);
}

.quota-bar-fill.low {
  background: linear-gradient(90deg, #ff8a7a, var(--danger));
  animation: pulse-red 1.8s ease-in-out infinite;
}

.quota-bar-text {
  font-variant-numeric: tabular-nums;
  font-family: var(--font-mono);
  color: var(--text);
  white-space: nowrap;
}

@keyframes pulse-red {
  0%, 100% { box-shadow: 0 0 6px rgba(255, 59, 48, 0.35); }
  50% { box-shadow: 0 0 16px rgba(255, 59, 48, 0.8); }
}

/* 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 18px;
  font-size: 14px;
  font-weight: 600;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s, filter 0.2s, opacity 0.2s, background 0.2s, border-color 0.2s;
  white-space: nowrap;
  font-family: inherit;
  user-select: none;
}

.btn svg {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
}

.btn-primary {
  color: #0d1117;
  background: linear-gradient(135deg, var(--secondary) 0%, var(--primary) 100%);
  box-shadow: 0 4px 16px rgba(106, 92, 255, 0.35);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(106, 92, 255, 0.5);
  filter: brightness(1.08);
}

.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  filter: none;
}

.btn-lg {
  padding: 13px 30px;
  font-size: 16px;
  border-radius: var(--radius-lg);
}

.btn-lg svg {
  width: 18px;
  height: 18px;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 12px;
  border-radius: var(--radius-sm);
}

.btn-secondary {
  color: var(--text);
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
}

.btn-secondary:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-soft);
}

/* 主体布局 */
.app-main {
  position: relative;
  z-index: 1;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 32px 24px 110px;
}

.view {
  display: none;
}

.view.active {
  display: block;
  animation: fadeInUp 0.45s ease both;
}

/* Hero：深色霓虹渐变横幅卡 */
.hero {
  background:
    radial-gradient(1100px 400px at 12% -20%, rgba(0, 255, 213, 0.1), transparent 60%),
    radial-gradient(900px 380px at 92% 10%, rgba(106, 92, 255, 0.14), transparent 55%),
    linear-gradient(180deg, var(--surface) 0%, var(--surface-soft) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  padding: 40px 44px 28px;
  margin-bottom: 24px;
  overflow: hidden;
  position: relative;
}

.hero::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--gold), transparent);
  opacity: 0.9;
}

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  align-items: center;
  gap: 32px;
  max-width: 1080px;
  margin: 0 auto;
}

.hero-copy {
  min-width: 0;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  font-size: 12.5px;
  font-weight: 600;
  font-family: var(--font-mono);
  letter-spacing: 0.02em;
  color: var(--primary-deep);
  background: var(--primary-soft);
  border: 1px solid var(--primary-border);
  border-radius: 999px;
  margin-bottom: 18px;
}

.badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary);
  animation: pulse 2s infinite;
}

.hero-title {
  font-size: clamp(32px, 4.6vw, 50px);
  line-height: 1.12;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 14px;
  background: linear-gradient(90deg, #ffffff 0%, var(--primary-dark) 45%, var(--secondary-soft) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-title em {
  font-style: normal;
  color: var(--primary);
}

.hero-sub {
  font-size: 16px;
  color: var(--text-sub);
  max-width: 560px;
  margin-bottom: 24px;
}

.hero-cta {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.hero-hint {
  font-size: 13px;
  color: var(--text-sub);
}

/* Hero 主视觉：中央工作台卡 + 两侧缩略卡 */
.hero-visual {
  position: relative;
  height: 320px;
  perspective: 1200px;
  max-width: 560px;
  margin: 0 auto;
  width: 100%;
}

.hero-card {
  position: absolute;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.hero-card-center {
  left: 50%;
  top: 0;
  transform: translateX(-50%);
  width: min(400px, 84%);
  height: 300px;
  z-index: 2;
  animation: floatY 6s ease-in-out infinite;
  border-top: 3px solid var(--primary);
}

.hero-card-side {
  top: 40px;
  width: 200px;
  height: 216px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  opacity: 0.92;
  --tilt: 0deg;
  animation: floatYSide 7s ease-in-out infinite;
}

.hero-card-left {
  left: 0;
  --tilt: -5deg;
  transform: rotateZ(var(--tilt));
  animation-delay: -1.2s;
}

.hero-card-right {
  right: 0;
  --tilt: 5deg;
  transform: rotateZ(var(--tilt));
  animation-delay: -2.5s;
}

@keyframes floatY {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%      { transform: translateX(-50%) translateY(-8px); }
}

@keyframes floatYSide {
  0%, 100% { transform: rotateZ(var(--tilt)) translateY(0); }
  50%      { transform: rotateZ(var(--tilt)) translateY(-8px); }
}

.hero-card-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-soft);
}

.hero-card-dots {
  display: flex;
  gap: 6px;
}

.hero-card-dots i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
  background: var(--danger);
  opacity: 0.8;
}

.hero-card-dots i:nth-child(2) { background: var(--gold); }
.hero-card-dots i:nth-child(3) { background: var(--green); }

.hero-card-title {
  font-size: 12px;
  color: var(--text-sub);
  letter-spacing: 1px;
}

.hero-card-body {
  padding: 14px 16px;
  height: calc(100% - 45px);
}

/* AI 工作台场景（真实工作台照片，来源见 img/CREDITS.txt） */
.ai-scene {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: var(--radius-md);
  overflow: hidden;
  background-image:
    linear-gradient(180deg, rgba(10, 16, 48, 0.22), rgba(10, 16, 48, 0) 42%),
    url('../img/hero-workspace.jpg');
  background-size: cover;
  background-position: center 10%;
  border: 1px solid rgba(0, 255, 213, 0.25);
}

.ai-tag {
  position: absolute;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 999px;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.ai-tag-1 {
  top: 14px;
  left: 14px;
  color: var(--primary);
  background: rgba(0, 255, 213, 0.12);
  border: 1px solid rgba(0, 255, 213, 0.3);
}

.ai-tag-2 {
  top: 14px;
  right: 14px;
  color: var(--secondary-soft);
  background: rgba(106, 92, 255, 0.12);
  border: 1px solid rgba(106, 92, 255, 0.3);
}

/* 侧卡缩略 */
.thumb-thumb {
  width: 100%;
  aspect-ratio: 16 / 10;
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin-bottom: 4px;
  position: relative;
}

.thumb-video {
  background-image:
    linear-gradient(160deg, rgba(26, 10, 58, 0.35), rgba(8, 32, 48, 0.15)),
    url('../img/feat-replica.jpg');
  background-size: cover;
  background-position: center;
}
.thumb-video::after {
  content: '';
  position: absolute;
  inset: 0;
  margin: auto;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(0, 255, 213, 0.2);
  box-shadow: 0 0 0 4px rgba(0, 255, 213, 0.15);
}
.thumb-video::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: 0;
  height: 0;
  border: 9px solid transparent;
  border-left-color: var(--primary);
  transform: translate(-30%, -50%);
  z-index: 1;
}

.thumb-image {
  background-image:
    linear-gradient(160deg, rgba(106, 92, 255, 0.18), rgba(245, 158, 11, 0.08)),
    url('../img/feat-batch.jpg');
  background-size: cover;
  background-position: center 72%;
}

.thumb-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
}

.thumb-sub {
  font-size: 11px;
  color: var(--text-sub);
  white-space: nowrap;
}

/* 侧卡可点击 */
.thumb-clickable {
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

/* Hero 侧卡只露出缩略图部分：隐藏文字，缩略图撑满（避免文字被裁断） */
.hero-card-side .thumb-thumb {
  flex: 1;
  margin-bottom: 0;
}

.hero-card-side .thumb-title,
.hero-card-side .thumb-sub {
  display: none;
}
.thumb-clickable:hover,
.thumb-clickable:focus-visible {
  border-color: var(--primary);
  box-shadow: 0 12px 32px -12px rgba(0, 255, 213, 0.3);
}
.thumb-clickable:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* 电商信任保障条 */
.trust-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  max-width: 1080px;
  margin: 0 auto;
  padding-top: 22px;
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: 0 2px 8px rgba(24, 28, 33, 0.03);
}

.trust-item svg {
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  color: var(--primary);
}

.trust-item span {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
}

/* Stats */
.stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 28px 0 48px;
}

.stat-card {
  position: relative;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
}

.stat-card:hover {
  transform: translateY(-4px);
  border-color: var(--primary-border);
  box-shadow: var(--shadow-lg);
}

.stat-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--primary), transparent);
  opacity: 0.5;
}

.stat-value {
  font-size: 36px;
  font-weight: 800;
  font-family: var(--font-mono);
  background: linear-gradient(90deg, var(--primary) 0%, var(--secondary-soft) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  display: inline-block;
  min-width: 64px;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
}

.stat-label {
  font-size: 14px;
  color: var(--text-sub);
  margin-top: 6px;
}

.stat-icon {
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  color: var(--primary);
  opacity: 0.16;
  transition: opacity 0.3s, transform 0.3s;
}

.stat-card:hover .stat-icon {
  opacity: 0.45;
  transform: translateY(-50%) scale(1.08);
}

/* Section header */
.section-header {
  text-align: center;
  margin-bottom: 24px;
}

.section-title {
  font-size: 26px;
  font-weight: 800;
  margin-bottom: 8px;
  color: var(--text);
}

.section-desc {
  color: var(--text-sub);
  font-size: 14px;
}

/* 功能商品卡 */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
}

.feature-card {
  position: relative;
  text-align: left;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  color: var(--text);
  cursor: pointer;
  overflow: hidden;
  transition: transform 0.28s, border-color 0.28s, box-shadow 0.28s;
  font-family: inherit;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow);
}

.feature-card:hover {
  transform: translateY(-6px);
  border-color: var(--primary-border);
  box-shadow: var(--shadow-lg);
}

/* 功能卡大缩略图（电商商品图区） */
.feature-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
}

.thumb-replica {
  background-image:
    linear-gradient(160deg, rgba(10, 16, 48, 0.35), rgba(26, 10, 58, 0.12)),
    url('../img/feat-replica.jpg');
  background-size: cover;
  background-position: center;
}

.thumb-batch {
  background-image:
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(106, 92, 255, 0.2)),
    url('../img/feat-batch.jpg');
  background-size: cover;
  background-position: center 72%;
}

.thumb-voice {
  background-image:
    linear-gradient(160deg, rgba(0, 168, 132, 0.38), rgba(51, 255, 223, 0.18)),
    url('../img/feat-voice.jpg');
  background-size: cover;
  background-position: center;
}

.thumb-model {
  background-image:
    linear-gradient(180deg, rgba(106, 92, 255, 0.1), rgba(24, 16, 48, 0.3)),
    url('../img/feat-model.jpg');
  background-size: cover;
  background-position: center 10%;
}

/* 缩略图角标 */
.thumb-tag {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  padding: 3px 10px;
  font-size: 11px;
  font-weight: 600;
  color: #fff;
  background: rgba(35, 38, 43, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  backdrop-filter: blur(4px);
  letter-spacing: 0.03em;
}

/* 功能卡正文 */
.feature-body {
  padding: 16px 18px 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.feature-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.feature-card h3 {
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
}

.feature-hot {
  padding: 1px 7px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: #fff;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  border-radius: 999px;
}

.feature-card p {
  font-size: 13px;
  color: var(--text-sub);
}

.feature-bottom {
  margin-top: auto;
  padding-top: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.feature-price {
  font-size: 13px;
  font-weight: 700;
  color: var(--primary);
}



.feature-go {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  font-weight: 600;
  color: var(--primary);
  transition: gap 0.2s;
}

.feature-go svg {
  width: 14px;
  height: 14px;
}

.feature-card:hover .feature-go {
  gap: 8px;
}

/* 使用流程（3 步） */
.steps-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  max-width: 1080px;
  margin: 0 auto;
}

.step-card {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 20px 22px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.step-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.step-num {
  flex: none;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 800;
  font-family: var(--font-mono);
  color: #0d1117;
  background: linear-gradient(135deg, var(--secondary), var(--primary));
  border-radius: 50%;
}

.step-body h3 {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}

.step-body p {
  font-size: 13px;
  color: var(--text-sub);
  line-height: 1.6;
}

/* 页脚 */
.app-footer {
  max-width: 1080px;
  margin: 56px auto 0;
  padding: 24px 0 8px;
  border-top: 1px solid var(--border);
  text-align: center;
}

.footer-line {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.footer-hint {
  margin-top: 6px;
  font-size: 12px;
  color: var(--text-sub);
}

@media (max-width: 768px) {
  .steps-row {
    grid-template-columns: 1fr;
  }
}

/* Wizard */
.wizard {
  max-width: 720px;
  margin: 0 auto;
  animation: fadeInUp 0.4s ease both;
}

.wizard-header {
  margin-bottom: 20px;
}

.wizard-header .back-btn {
  margin-bottom: 12px;
}

.wizard-header h2 {
  font-size: 26px;
  font-weight: 800;
  margin: 12px 0 8px;
  color: var(--text);
}

.wizard-header p {
  color: var(--text-sub);
  font-size: 14px;
}

.wizard-form {
  padding: 26px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.form-field {
  display: block;
  margin-bottom: 18px;
}

.form-field > span {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.form-field input,
.form-field textarea,
.form-field select {
  width: 100%;
  padding: 12px 14px;
  font-size: 14px;
  color: var(--text);
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  outline: none;
  font-family: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-field input:focus,
.form-field textarea:focus,
.form-field select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0, 255, 213, 0.12);
}

.form-field input::placeholder,
.form-field textarea::placeholder {
  color: var(--text-sub);
}

.form-field textarea {
  resize: vertical;
  min-height: 96px;
}

/* 字段引导文案（如 SKU 清单填写格式） */
.field-hint {
  display: block;
  margin-top: 8px;
  font-size: 12px;
  font-style: normal;
  line-height: 1.6;
  color: var(--text-sub);
}

.form-field select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%237c858e' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  /* 不占满整行：原生下拉弹层宽度跟随 select，整行宽会在窄窗/高分屏下溢出屏幕 */
  width: auto;
  min-width: 220px;
  max-width: 100%;
}

/* 压缩原生弹层行高（部分 Chromium 会把 select 的 padding 应用到弹层行） */
.form-field select option {
  padding: 4px 10px;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 8px;
}

.submit-btn svg {
  width: 16px;
  height: 16px;
}

/* 配额提示 */
.quota-hint {
  margin: 4px 0 12px;
  padding: 9px 12px;
  border-radius: 10px;
  font-size: 12.5px;
  color: var(--primary-deep);
  background: var(--primary-soft);
  border: 1px dashed var(--primary-border);
  line-height: 1.5;
}

.quota-hint.low {
  color: var(--danger);
  background: var(--danger-soft);
  border-color: rgba(255, 59, 48, 0.4);
}

/* 结果区 */
.result {
  margin-top: 20px;
  padding: 16px;
  border-radius: var(--radius-md);
  font-size: 14px;
  line-height: 1.6;
  word-break: break-word;
}

.result.err {
  background: var(--danger-soft);
  border: 1px solid rgba(255, 59, 48, 0.28);
  color: var(--text);
}

.result.loading {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  color: var(--text-sub);
}

.result.ok {
  padding: 0;
  background: transparent;
  border: none;
}

.result-card {
  background: var(--primary-soft);
  border: 1px solid var(--primary-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.result-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  background: linear-gradient(90deg, var(--primary-soft), transparent);
  border-bottom: 1px solid var(--primary-border);
}

.result-card-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 700;
  color: var(--primary-deep);
}

.result-card-title svg {
  width: 18px;
  height: 18px;
}

.result-card > .result-text,
.result-card > .result-media {
  padding: 18px;
}

.result-text {
  white-space: pre-wrap;
  margin-bottom: 12px;
}

.result-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 18px;
  border-top: 1px solid var(--primary-border);
  background: var(--surface);
  flex-wrap: wrap;
}

.result-meta {
  font-size: 12px;
  color: var(--text-sub);
}

.result-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.result-media {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
  margin-top: 0;
}

.media-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.result-media img,
.result-media video {
  width: 100%;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
}

.copy-link {
  align-self: flex-start;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  color: var(--primary-deep);
  background: var(--surface);
  border: 1px solid var(--primary-border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
  font-family: inherit;
}

.copy-link:hover {
  background: var(--primary-soft);
  border-color: var(--primary);
}

/* Spinner */
.spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(124, 133, 142, 0.3);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  flex: 0 0 auto;
}

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

/* Toast */
#toast-wrap {
  position: fixed;
  top: 72px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
  max-width: min(460px, calc(100% - 40px));
}

.toast {
  padding: 10px 16px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 0.25s, transform 0.25s;
  pointer-events: auto;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.toast-ok {
  border-color: rgba(0, 181, 120, 0.4);
  background: var(--surface);
}

.toast-err {
  border-color: rgba(255, 59, 48, 0.4);
  background: var(--surface);
}

.toast-info {
  border-color: var(--primary-border);
  background: var(--surface);
}

/* 底部导航（手机端） */
.bottom-nav {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 90;
  padding: 6px 0 calc(6px + env(safe-area-inset-bottom));
  background: var(--surface);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--border);
}

.bottom-nav::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(0, 255, 213, 0.4), transparent);
}

.nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 6px 8px;
  color: var(--text-sub);
  font-size: 11px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: color 0.2s;
  user-select: none;
}

.bottom-nav {
  display: none;
  justify-content: space-around;
}

.nav-item svg {
  width: 22px;
  height: 22px;
}

.nav-item.active {
  color: var(--primary);
}

.nav-item[aria-disabled="true"] {
  opacity: 0.5;
  cursor: not-allowed;
}

/* 作品集网格 */
.works-grid {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  gap: 16px;
}

@media (min-width: 720px) {
  .works-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1080px) {
  .works-grid { grid-template-columns: repeat(3, 1fr); }
}

.work-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow);
}

.work-card:hover {
  transform: translateY(-3px);
  border-color: var(--primary-border);
  box-shadow: var(--shadow-lg);
}

.work-cover {
  position: relative;
  aspect-ratio: 4 / 3;
  background: var(--surface-soft);
  overflow: hidden;
}

.work-cover img,
.work-cover video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.work-cover-empty {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    linear-gradient(135deg, var(--primary-soft), transparent),
    repeating-linear-gradient(45deg, rgba(24, 28, 33, 0.03) 0 12px, transparent 12px 24px);
  color: var(--text-sub);
  font-size: 13px;
}

.work-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  color: #0d1117;
  background: linear-gradient(90deg, var(--secondary), var(--primary));
  box-shadow: 0 2px 10px rgba(106, 92, 255, 0.35);
  letter-spacing: 0.02em;
}

.work-body {
  padding: 12px 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.work-time {
  font-size: 11.5px;
  color: var(--text-sub);
}

.work-preview-text {
  font-size: 13px;
  line-height: 1.55;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.work-actions {
  margin-top: auto;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding-top: 6px;
}

.work-actions .btn {
  font-size: 12px;
  padding: 6px 10px;
}

/* 空态 */
.empty-state {
  margin: 28px auto 0;
  padding: 32px 22px 36px;
  max-width: 520px;
  text-align: center;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px dashed var(--border-strong);
}

.empty-illustration {
  width: 96px;
  height: 96px;
  margin: 0 auto 14px;
  border-radius: 22px;
  background:
    radial-gradient(circle at 30% 30%, rgba(0, 255, 213, 0.3), transparent 55%),
    radial-gradient(circle at 70% 70%, rgba(106, 92, 255, 0.3), transparent 55%),
    linear-gradient(135deg, var(--primary-soft), var(--surface-soft));
  border: 1px solid var(--border);
  position: relative;
}

.empty-illustration::before {
  content: "";
  position: absolute;
  inset: 22px;
  border-radius: 14px;
  border: 1.5px dashed var(--border-strong);
}

.empty-title {
  font-size: 17px;
  font-weight: 600;
  color: var(--text);
}

.empty-hint {
  margin-top: 6px;
  font-size: 13px;
  line-height: 1.7;
  color: var(--text-sub);
}

.empty-hint strong {
  color: var(--primary);
  font-weight: 600;
}

/* 我的页 */
.me-content {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 760px;
  margin: 0 auto;
}

.me-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  box-shadow: var(--shadow);
}

.me-card-head {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: 0.06em;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.me-card-head::before {
  content: "";
  width: 14px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--primary), var(--gold));
}

/* 身份卡 */
.me-identity {
  display: flex;
  align-items: center;
  gap: 14px;
}

.me-avatar {
  flex: 0 0 52px;
  width: 52px;
  height: 52px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: var(--primary-soft);
  border: 1px solid var(--primary-border);
  color: var(--primary);
}

.me-avatar svg {
  width: 26px;
  height: 26px;
}

.me-identity-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.me-code-status {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.me-code-status.ok {
  color: var(--green);
}

.me-code-masked {
  font-family: ui-monospace, Consolas, monospace;
  font-size: 15px;
  color: var(--text);
  letter-spacing: 0.08em;
}

/* 配额卡 */
.me-quota {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.me-quota-num {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.me-quota-big {
  font-size: 34px;
  font-weight: 800;
  color: var(--primary);
  font-family: ui-monospace, Consolas, monospace;
  line-height: 1;
}

.me-quota-slash {
  color: var(--text-sub);
  font-size: 18px;
}

.me-quota-total {
  font-size: 18px;
  color: var(--text-sub);
  font-family: ui-monospace, Consolas, monospace;
}

.me-quota-unit {
  font-size: 12px;
  color: var(--text-sub);
  margin-left: 2px;
}

.me-quota-track {
  width: 100%;
  height: 12px;
  border-radius: 999px;
  background: rgba(24, 28, 33, 0.08);
  overflow: hidden;
}

.me-quota-fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--primary), var(--gold));
  transition: width 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.me-quota-fill.mid {
  background: linear-gradient(90deg, var(--gold), #ffd166);
}

.me-quota-fill.low {
  background: linear-gradient(90deg, #ff8a7a, var(--danger));
  animation: pulse-red 1.8s ease-in-out infinite;
}

.me-rules {
  list-style: none;
  margin: 14px 0 0;
  padding: 12px 0 0;
  border-top: 1px dashed var(--border-strong);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.me-rules li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--text);
  line-height: 1.5;
}

.me-rules b {
  color: var(--primary);
  font-weight: 700;
}

.me-rule-dot {
  flex: 0 0 6px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: linear-gradient(90deg, var(--primary), var(--gold));
}

/* 数据卡 */
.me-stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.me-stat {
  padding: 14px;
  border-radius: var(--radius-md);
  background: var(--surface-soft);
  border: 1px solid var(--border);
  text-align: center;
}

.me-stat-num {
  font-size: 26px;
  font-weight: 800;
  color: var(--text);
  font-family: ui-monospace, Consolas, monospace;
}

.me-stat-num-sm {
  font-size: 16px;
  color: var(--primary);
}

.me-stat-label {
  margin-top: 4px;
  font-size: 12px;
  color: var(--text-sub);
}

.me-feature-bars {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.me-feature-empty {
  font-size: 12.5px;
  color: var(--text-sub);
  text-align: center;
  padding: 8px 0;
}

.me-feature-row {
  display: grid;
  grid-template-columns: 84px 1fr 26px;
  align-items: center;
  gap: 10px;
}

.me-feature-name {
  font-size: 12.5px;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.me-feature-track {
  height: 8px;
  border-radius: 999px;
  background: rgba(24, 28, 33, 0.08);
  overflow: hidden;
}

.me-feature-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--primary), var(--gold));
  transition: width 0.5s ease;
}

.me-feature-count {
  font-size: 12px;
  color: var(--text-sub);
  text-align: right;
  font-family: ui-monospace, Consolas, monospace;
}

/* 管理卡 */
.me-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.btn.danger {
  border-color: rgba(255, 59, 48, 0.4);
  color: var(--danger);
}

.btn.danger:hover {
  background: var(--danger-soft);
  border-color: var(--danger);
}

/* 帮助卡 */
.me-faq {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.faq-item {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-soft);
  overflow: hidden;
}

.faq-item summary {
  cursor: pointer;
  padding: 12px 14px;
  font-size: 13.5px;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: space-between;
  list-style: none;
  user-select: none;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "＋";
  font-size: 13px;
  color: var(--text-sub);
  transition: transform 0.2s ease;
}

.faq-item[open] summary::after {
  content: "－";
}

.faq-item > div {
  padding: 0 14px 12px;
  font-size: 13px;
  line-height: 1.7;
  color: var(--text-sub);
}

/* 图片字段：上传框优先 + URL 切换 */
.img-field-bar {
  display: flex;
  justify-content: flex-end;
  margin: -2px 0 8px;
}

.img-mode-toggle {
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-sub);
  background: transparent;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
  font-family: inherit;
}

.img-mode-toggle:hover {
  color: var(--primary);
  border-color: var(--primary);
  background: var(--primary-soft);
}

.img-url-area .img-url-input {
  width: 100%;
  padding: 12px 14px;
  font-size: 14px;
  color: var(--text);
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  outline: none;
  font-family: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.img-url-area .img-url-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0, 255, 213, 0.12);
}

.img-dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 30px 16px;
  border: 1.5px dashed var(--border-strong);
  border-radius: var(--radius-md);
  cursor: pointer;
  text-align: center;
  transition: border-color 0.2s, background 0.2s;
}

.img-dropzone:hover,
.img-dropzone.drag {
  border-color: var(--primary);
  background: var(--primary-soft);
}

.img-dropzone.busy {
  pointer-events: none;
  opacity: 0.7;
}

.dz-plus {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--primary);
  background: var(--primary-soft);
  border: 1px solid var(--primary-border);
}

.dz-plus svg {
  width: 22px;
  height: 22px;
}

.dz-hint {
  font-size: 13px;
  color: var(--text-sub);
}

.upload-preview {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.upload-thumb {
  position: relative;
  width: 64px;
  height: 64px;
}

.upload-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  display: block;
}

.thumb-del {
  position: absolute;
  top: -7px;
  right: -7px;
  width: 20px;
  height: 20px;
  border: none;
  border-radius: 50%;
  background: var(--danger);
  color: #fff;
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.thumb-del:hover {
  filter: brightness(1.15);
}

/* 必填校验闪烁提示 */
.img-field.flash .img-dropzone,
.img-field.flash .img-url-input {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px rgba(255, 59, 48, 0.15);
}

/* 链接预览小卡 */
.link-preview {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
  padding: 8px 10px;
  border-radius: 10px;
  background: var(--primary-soft);
  border: 1px dashed var(--primary-border);
}

.link-preview[hidden] { display: none; }

.link-preview-fav {
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
  background-size: cover;
  background-position: center;
  border-radius: 6px;
  background-color: var(--surface);
  box-shadow: inset 0 0 0 1px var(--border-strong);
}

.link-preview-main { flex: 1; min-width: 0; }

.link-preview-host {
  font-size: 12.5px;
  color: var(--primary);
  font-weight: 600;
  line-height: 1.2;
}

.link-preview-path {
  font-size: 11.5px;
  color: var(--text-sub);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.25;
}

.link-preview-close {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-sub);
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
}

.link-preview-close:hover {
  background: var(--danger-soft);
  color: var(--danger);
  border-color: rgba(255, 59, 48, 0.45);
}

/* 模板按钮 hover 扫光 */
#template-btn {
  position: relative;
  overflow: hidden;
}
#template-btn::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 20%, rgba(0, 255, 213, 0.12) 50%, transparent 80%);
  transform: translateX(-100%);
  transition: transform 0.8s ease;
}
#template-btn:hover::after {
  transform: translateX(100%);
}

/* 主题切换按钮：太阳 ⇄ 月亮交叉过渡 */
.theme-toggle {
  position: relative;
  overflow: hidden;
  width: 36px;
  height: 32px;
  padding: 0;
}

.theme-toggle svg {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 18px;
  height: 18px;
  transition: opacity 0.35s ease, transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.theme-toggle .icon-moon {
  opacity: 0;
  transform: rotate(-90deg) scale(0.4);
}

html[data-theme="dark"] .theme-toggle .icon-sun {
  opacity: 0;
  transform: rotate(90deg) scale(0.4);
}

html[data-theme="dark"] .theme-toggle .icon-moon {
  opacity: 1;
  transform: rotate(0deg) scale(1);
}

html[data-theme="dark"] .theme-toggle {
  color: var(--primary);
  border-color: var(--primary-border);
  box-shadow: 0 0 14px rgba(0, 255, 213, 0.35);
}

.theme-toggle.spin svg {
  animation: theme-spin 0.45s ease;
}

/* 动画 */
@keyframes theme-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.85); }
}

/* 深色玻璃（默认档）与浅色玻璃（light 档） */
.app-header,
.bottom-nav {
  background: rgba(13, 17, 23, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

html[data-theme="light"] .app-header {
  background: rgba(244, 246, 251, 0.86);
}

html[data-theme="light"] .bottom-nav {
  background: rgba(244, 246, 251, 0.94);
}

html[data-theme="light"] .brand-name {
  background: linear-gradient(90deg, #0f172a 0%, #0d9488 100%);
  -webkit-background-clip: text;
  background-clip: text;
}

html[data-theme="light"] .hero-title {
  background: linear-gradient(90deg, #0f172a 0%, #0d9488 45%, #6a5cff 100%);
  -webkit-background-clip: text;
  background-clip: text;
}

html[data-theme="light"] .theme-toggle {
  color: inherit;
  border-color: var(--border-strong);
  box-shadow: none;
}

/* light 档：原偏白的浅色文字调深保证对比度（复刻旧版） */
html[data-theme="light"] .work-time,
html[data-theme="light"] .work-preview-text,
html[data-theme="light"] .me-stat-label,
html[data-theme="light"] .me-quota-total,
html[data-theme="light"] .me-quota-slash,
html[data-theme="light"] .me-quota-unit,
html[data-theme="light"] .me-feature-name,
html[data-theme="light"] .me-feature-count,
html[data-theme="light"] .me-rules li,
html[data-theme="light"] .quota-hint,
html[data-theme="light"] .faq-item > div,
html[data-theme="light"] .empty-hint {
  color: #475569;
}

html[data-theme="light"] .me-code-masked,
html[data-theme="light"] .me-quota-big,
html[data-theme="light"] .me-stat-num,
html[data-theme="light"] .empty-title,
html[data-theme="light"] .faq-item summary {
  color: #111827;
}

html[data-theme="light"] .empty-hint strong,
html[data-theme="light"] .link-preview-host {
  color: #4f46e5;
}

html[data-theme="light"] .me-avatar {
  color: #4f46e5;
}

html[data-theme="light"] .result-card {
  background: rgba(0, 168, 132, 0.05);
  border-color: rgba(0, 168, 132, 0.3);
}

/* light 档：输入框白底 */
html[data-theme="light"] .activation input,
html[data-theme="light"] .form-field input,
html[data-theme="light"] .form-field textarea,
html[data-theme="light"] .form-field select {
  background: #ffffff;
  border-color: rgba(100, 116, 139, 0.35);
}

html[data-theme="light"] .quota-bar-track {
  background: rgba(15, 23, 42, 0.08);
}

/* 解锁态：隐藏广告性质内容（数据卡 / 3 步引导 / 头部解锁提示） */
body.is-unlocked .stats-row,
body.is-unlocked .steps-section,
body.is-unlocked .hero-hint {
  display: none;
}

/* 响应式 */
@media (min-width: 1024px) {
  .feature-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 900px) {
  .hero-inner {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .hero-visual {
    margin-top: 24px;
  }
  .trust-bar {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .app-header {
    flex-wrap: wrap;
    gap: 10px;
    padding: 12px 16px;
  }

  .brand-tag {
    display: none;
  }

  .top-nav {
    display: none;
  }

  .activation {
    width: 100%;
    justify-content: space-between;
    flex-wrap: wrap;
  }

  .activation-field {
    flex: 1 1 100%;
    min-width: 0;
  }

  .activation.unlocked .activation-info {
    flex: 1;
    flex-wrap: wrap;
  }

  .activation input {
    width: 100%;
    min-width: 0;
  }

  .app-main {
    padding: 20px 16px 100px;
  }

  .hero {
    padding: 28px 20px 22px;
  }

  .hero-title {
    font-size: 30px;
  }

  .hero-sub {
    font-size: 15px;
  }

  /* 手机端 Hero 主视觉简化：只留中间卡片，两侧不显示 */
  .hero-visual {
    height: 250px;
  }
  .hero-card-side {
    display: none;
  }
  .hero-card-center {
    width: min(360px, 94%);
    height: 240px;
  }

  .stats-row {
    grid-template-columns: 1fr;
    margin-bottom: 36px;
  }

  .feature-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .feature-body {
    padding: 12px 14px 14px;
  }

  .feature-card h3 {
    font-size: 15px;
  }

  .feature-card p {
    font-size: 12px;
  }

  .wizard-form {
    padding: 20px;
  }

  .form-actions {
    flex-direction: column;
  }

  .form-actions .btn {
    width: 100%;
  }

  .bottom-nav {
    display: flex;
  }
}

@media (max-width: 720px) {
  .activation-info {
    flex-wrap: wrap;
    row-gap: 8px;
  }
  .quota-bar {
    order: 3;
    width: 100%;
    justify-content: space-between;
  }
  .quota-bar-track {
    flex: 1;
    width: auto;
  }
}

@media (max-width: 480px) {
  .trust-bar {
    grid-template-columns: 1fr;
  }
  .feature-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .me-card {
    padding: 14px 14px;
  }
  .me-feature-row {
    grid-template-columns: 76px 1fr 24px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
