/* ── Reset & Base ─────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:         #0a0a0f;
  --surface:    #12121a;
  --surface2:   #1a1a26;
  --border:     #2a2a3d;
  --border-h:   #5b4fff;
  --accent:     #7c6fff;
  --accent2:    #a78bfa;
  --accent3:    #38bdf8;
  --text:       #e8e8f0;
  --text-muted: #6b6b85;
  --success:    #34d399;
  --error:      #f87171;
  --grad1: linear-gradient(135deg, #7c6fff 0%, #38bdf8 100%);
  --grad2: linear-gradient(135deg, #a78bfa 0%, #7c6fff 100%);
  --radius: 16px;
  --radius-sm: 10px;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', system-ui, sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
}

/* 登录页：背景透明（让视频穿透），加半透明遮罩 */
body.login-page {
  background: transparent;
}
body.login-page::before {
  content: '';
  position: fixed; inset: 0;
  background: rgba(10, 10, 15, 0.40);
  z-index: 1;
  pointer-events: none;
}

/* ── Background Video ────────────────────────────────────────────────────── */
.bg-video {
  position: fixed; inset: 0; z-index: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 1;
  pointer-events: none;
}

/* ── Background Orbs ─────────────────────────────────────────────────────── */
.bg-orbs { position: fixed; inset: 0; z-index: 2; pointer-events: none; overflow: hidden; }
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.18;
  animation: float 12s ease-in-out infinite;
}
.orb-1 { width: 500px; height: 500px; background: #7c6fff; top: -100px; left: -100px; animation-delay: 0s; }
.orb-2 { width: 400px; height: 400px; background: #38bdf8; bottom: -80px; right: -80px; animation-delay: 4s; }
.orb-3 { width: 300px; height: 300px; background: #a78bfa; top: 50%; left: 50%; transform: translate(-50%,-50%); animation-delay: 8s; }
@keyframes float {
  0%,100% { transform: translate(0,0) scale(1); }
  33%      { transform: translate(30px,-20px) scale(1.05); }
  66%      { transform: translate(-20px,30px) scale(0.95); }
}

/* ── Layout ──────────────────────────────────────────────────────────────── */
.app-container {
  position: relative; z-index: 3;
  max-width: 900px;
  margin: 0 auto;
  padding: 0 20px 60px;
}

/* ── Header ──────────────────────────────────────────────────────────────── */
.header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 28px 0 36px;
}
.logo { display: flex; align-items: center; gap: 10px; }
.logo-icon {
  font-size: 22px;
  background: var(--grad1);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.logo-text {
  font-size: 20px; font-weight: 700; letter-spacing: 0.5px;
  background: var(--grad1);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.header-badge {
  font-size: 11px; color: var(--text-muted);
  border: 1px solid var(--border);
  padding: 4px 12px; border-radius: 20px;
  letter-spacing: 0.5px;
}

/* ── Section ─────────────────────────────────────────────────────────────── */
.section-title {
  display: flex; align-items: center; gap: 12px;
  font-size: 18px; font-weight: 600; margin-bottom: 22px;
  color: var(--text);
}
.step-badge {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: 8px;
  background: var(--grad1);
  font-size: 12px; font-weight: 700; color: #fff;
  flex-shrink: 0;
}

/* ── Upload Section ──────────────────────────────────────────────────────── */
.upload-section { margin-bottom: 32px; }

.upload-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 28px;
}
@media (max-width: 600px) { .upload-grid { grid-template-columns: 1fr; } }

.upload-card {
  border-radius: var(--radius);
  overflow: hidden;
}

.upload-zone {
  background: var(--surface);
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 40px 24px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
}
.upload-zone:hover, .upload-zone.drag-over {
  border-color: var(--accent);
  background: rgba(124,111,255,0.06);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(124,111,255,0.15);
}
.upload-zone:active { transform: translateY(0); }
.upload-icon { font-size: 36px; margin-bottom: 4px; }
.upload-label { font-size: 15px; font-weight: 600; color: var(--text); }
.upload-sub { font-size: 13px; color: var(--accent); }
.upload-hint { font-size: 12px; color: var(--text-muted); margin-top: 4px; }

.file-preview {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  display: flex; flex-direction: column; gap: 12px;
  animation: fadeIn 0.3s ease;
}
.preview-info {
  display: flex; align-items: center; gap: 12px;
}
.preview-icon { font-size: 24px; }
.preview-name {
  font-size: 13px; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  max-width: 180px;
}
.preview-size { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.preview-remove {
  background: rgba(248,113,113,0.1); border: 1px solid rgba(248,113,113,0.3);
  color: var(--error); border-radius: 6px;
  width: 28px; height: 28px; cursor: pointer; font-size: 16px;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s; align-self: flex-end;
}
.preview-remove:hover { background: rgba(248,113,113,0.2); }

.cloth-thumb-wrap {
  width: 100%; border-radius: 10px; overflow: hidden;
  background: var(--surface2); max-height: 160px;
  display: flex; align-items: center; justify-content: center;
}
.cloth-thumb {
  width: 100%; max-height: 160px; object-fit: cover; display: block;
  border-radius: 10px;
}

/* ── Submit Button ───────────────────────────────────────────────────────── */
.submit-wrap { text-align: center; }

.btn-submit {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 16px 48px;
  background: var(--grad1);
  border: none; border-radius: 50px;
  color: #fff; font-size: 16px; font-weight: 700;
  cursor: pointer; letter-spacing: 0.5px;
  transition: all 0.3s ease;
  box-shadow: 0 8px 30px rgba(124,111,255,0.4);
  position: relative; overflow: hidden;
}
.btn-submit::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.15) 0%, transparent 60%);
  opacity: 0; transition: opacity 0.3s;
}
.btn-submit:hover:not(:disabled)::after { opacity: 1; }
.btn-submit:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(124,111,255,0.6);
}
.btn-submit:active:not(:disabled) { transform: translateY(0); }
.btn-submit:disabled {
  background: var(--surface2);
  color: var(--text-muted);
  box-shadow: none; cursor: not-allowed;
}
.btn-icon { font-size: 18px; }

/* ── Progress Section ────────────────────────────────────────────────────── */
.progress-section { margin-bottom: 32px; }

.progress-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 28px 24px;
}
.progress-header {
  display: flex; align-items: center; gap: 14px; margin-bottom: 18px;
}
.progress-status-icon { font-size: 26px; }
.progress-msg {
  flex: 1; font-size: 15px; font-weight: 500; color: var(--text);
}
.progress-pct {
  font-size: 18px; font-weight: 700;
  background: var(--grad1);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  min-width: 48px; text-align: right;
}
.progress-bar-track {
  height: 8px; background: var(--surface2);
  border-radius: 4px; overflow: hidden; margin-bottom: 20px;
}
.progress-bar-fill {
  height: 100%; width: 0%; border-radius: 4px;
  background: var(--grad1);
  transition: width 0.6s cubic-bezier(0.4,0,0.2,1);
  position: relative; overflow: hidden;
}
.progress-bar-fill::after {
  content: '';
  position: absolute; top: 0; left: -100%;
  width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  animation: shimmer 2s infinite;
}
@keyframes shimmer { to { left: 100%; } }

.progress-steps {
  display: flex; gap: 0;
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.p-step {
  flex: 1; text-align: center;
  padding: 8px 4px; font-size: 11px;
  background: var(--surface2); color: var(--text-muted);
  border-right: 1px solid var(--border);
  transition: all 0.4s ease;
}
.p-step:last-child { border-right: none; }
.p-step.active {
  background: rgba(124,111,255,0.15);
  color: var(--accent2); font-weight: 600;
}
.p-step.done {
  background: rgba(52,211,153,0.1);
  color: var(--success); font-weight: 600;
}

/* ── Result Section ──────────────────────────────────────────────────────── */
.result-section { margin-bottom: 32px; }

.result-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  text-align: center;
}
.result-badge {
  display: inline-block;
  background: rgba(52,211,153,0.1);
  border: 1px solid rgba(52,211,153,0.3);
  color: var(--success); font-size: 13px; font-weight: 600;
  padding: 6px 18px; border-radius: 20px;
  margin-bottom: 20px; letter-spacing: 0.5px;
}
.result-video {
  width: 100%; max-height: 480px;
  border-radius: var(--radius-sm);
  background: #000;
  margin-bottom: 24px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.5);
}
.result-actions {
  display: flex; justify-content: center; gap: 14px; flex-wrap: wrap;
}
.btn-download {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 36px;
  background: var(--grad1);
  border-radius: 50px; color: #fff;
  font-size: 15px; font-weight: 700;
  text-decoration: none;
  transition: all 0.3s;
  box-shadow: 0 6px 24px rgba(124,111,255,0.4);
}
.btn-download:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 32px rgba(124,111,255,0.6);
}
.btn-reset {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 28px;
  background: transparent;
  border: 1px solid var(--border); border-radius: 50px;
  color: var(--text-muted); font-size: 15px; font-weight: 600;
  cursor: pointer; transition: all 0.3s;
}
.btn-reset:hover {
  border-color: var(--accent); color: var(--accent);
  background: rgba(124,111,255,0.06);
}

/* ── Modal ───────────────────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0; z-index: 999;
  background: rgba(0,0,0,0.7);
  display: flex; align-items: center; justify-content: center;
  backdrop-filter: blur(6px);
  animation: fadeIn 0.2s ease;
}
.modal-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 40px 36px;
  max-width: 420px; width: 90%;
  text-align: center;
  animation: slideUp 0.3s ease;
  box-shadow: 0 20px 60px rgba(0,0,0,0.6);
}
.modal-icon { font-size: 48px; margin-bottom: 16px; }
.modal-title { font-size: 20px; font-weight: 700; margin-bottom: 12px; color: var(--error); }
.modal-msg { font-size: 14px; color: var(--text-muted); line-height: 1.6; margin-bottom: 28px; }
.btn-modal-close {
  padding: 12px 36px;
  background: rgba(248,113,113,0.1); border: 1px solid rgba(248,113,113,0.3);
  color: var(--error); border-radius: 50px;
  font-size: 14px; font-weight: 600;
  cursor: pointer; transition: all 0.2s;
}
.btn-modal-close:hover { background: rgba(248,113,113,0.2); }

/* ── Footer ──────────────────────────────────────────────────────────────── */
.footer {
  text-align: center; color: var(--text-muted);
  font-size: 12px; padding-top: 20px;
  border-top: 1px solid var(--border);
}

/* ── Animations ──────────────────────────────────────────────────────────── */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

section { animation: slideUp 0.4s ease; }

/* ── Background Grid ─────────────────────────────────────────────────────── */
.bg-grid {
  position: fixed; inset: 0; z-index: 2; pointer-events: none;
  background-image:
    linear-gradient(rgba(124,111,255,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(124,111,255,0.04) 1px, transparent 1px);
  background-size: 40px 40px;
}

/* ── Login Page (New 2-column layout) ───────────────────────────────────── */
.login-layout {
  position: relative; z-index: 3;
  min-height: 100vh;
  display: flex;
}

/* ── 左侧品牌区 ────────────────────────────────────────────────────────── */
.login-brand {
  flex: 1;
  display: flex; flex-direction: column; justify-content: center;
  padding: 60px 64px;
  position: relative;
}

.brand-logo {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 48px;
}
.brand-logo-icon {
  font-size: 28px;
  background: var(--grad1);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  line-height: 1;
}
.brand-logo-text {
  font-size: 24px; font-weight: 800; letter-spacing: 0.5px;
  background: var(--grad1);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.brand-logo-en {
  font-size: 11px; color: var(--text-muted);
  letter-spacing: 1px; margin-left: 4px; margin-top: 2px;
  align-self: flex-end;
}

.brand-headline {
  font-size: 42px; font-weight: 800; line-height: 1.25;
  color: var(--text); margin-bottom: 20px;
  letter-spacing: -0.5px;
}
.brand-highlight {
  background: var(--grad1);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}

.brand-desc {
  font-size: 15px; color: var(--text-muted);
  line-height: 1.8; margin-bottom: 44px;
  max-width: 480px;
}
.br-pc { display: block; }

.brand-features {
  list-style: none;
  display: flex; flex-direction: column; gap: 20px;
  margin-bottom: 56px;
}
.brand-feature-item {
  display: flex; align-items: flex-start; gap: 16px;
}
.feature-dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--accent); flex-shrink: 0; margin-top: 4px;
  box-shadow: 0 0 8px rgba(124,111,255,0.6);
}
.feature-dot--cyan  { background: var(--accent3); box-shadow: 0 0 8px rgba(56,189,248,0.6); }
.feature-dot--pink  { background: #f472b6; box-shadow: 0 0 8px rgba(244,114,182,0.5); }
.brand-feature-item strong {
  display: block; font-size: 14px; font-weight: 700;
  color: var(--text); margin-bottom: 3px;
}
.brand-feature-item span {
  font-size: 13px; color: var(--text-muted); line-height: 1.5;
}

.brand-bottom {
  font-size: 12px; color: rgba(107,107,133,0.5);
  margin-top: auto;
}

/* ── 右侧登录区 ────────────────────────────────────────────────────────── */
.login-panel {
  width: 480px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  padding: 40px 48px;
  background: rgba(18,18,26,0.6);
  border-left: 1px solid var(--border);
  backdrop-filter: blur(20px);
}

.login-card {
  width: 100%;
  animation: slideUp 0.4s ease;
}

.login-card-header { margin-bottom: 36px; }

.login-logo {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 24px;
}

.login-title {
  font-size: 26px; font-weight: 800; color: var(--text);
  margin-bottom: 8px;
}

.login-subtitle {
  font-size: 14px; color: var(--text-muted);
}

.login-form { display: flex; flex-direction: column; gap: 20px; }

.form-group { display: flex; flex-direction: column; gap: 8px; }

.form-label {
  font-size: 13px; font-weight: 600;
  color: var(--text-muted); letter-spacing: 0.3px;
}

.input-wrap { position: relative; }

.form-input {
  width: 100%;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 13px 16px;
  color: var(--text); font-size: 15px;
  outline: none;
  transition: border-color 0.25s, box-shadow 0.25s;
}
.input-wrap .form-input { padding-right: 46px; }
.form-input::placeholder { color: var(--text-muted); }
.form-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(124,111,255,0.15);
}

.eye-btn {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  background: none; border: none; cursor: pointer;
  color: var(--text-muted); padding: 4px;
  display: flex; align-items: center; justify-content: center;
  transition: color 0.2s;
}
.eye-btn:hover { color: var(--accent); }

.login-error {
  background: rgba(248,113,113,0.1);
  border: 1px solid rgba(248,113,113,0.3);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 13px; color: var(--error);
  animation: fadeIn 0.2s ease;
}

.btn-login {
  width: 100%;
  padding: 15px;
  background: var(--grad1);
  border: none; border-radius: 50px;
  color: #fff; font-size: 16px; font-weight: 700;
  cursor: pointer; letter-spacing: 1px;
  transition: all 0.3s ease;
  box-shadow: 0 8px 30px rgba(124,111,255,0.4);
  margin-top: 4px;
}
.btn-login:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(124,111,255,0.6);
}
.btn-login:active:not(:disabled) { transform: translateY(0); }
.btn-login:disabled {
  opacity: 0.7; cursor: not-allowed; transform: none;
}

.login-footer {
  text-align: center; color: var(--text-muted);
  font-size: 12px; margin-top: 28px;
}

/* 移动端：单列 */
@media (max-width: 900px) {
  .login-layout { flex-direction: column; }
  .login-brand {
    padding: 48px 28px 32px;
    border-bottom: 1px solid var(--border);
  }
  .brand-headline { font-size: 28px; }
  .brand-desc { font-size: 13px; }
  .br-pc { display: none; }
  .login-panel {
    width: 100%; border-left: none;
    padding: 32px 24px 48px;
    background: transparent;
    backdrop-filter: none;
  }
  .brand-bottom { display: none; }
}

/* ── Header 增强（主页 / 工具页共用） ──────────────────────────────────── */
.header-left {
  display: flex; align-items: center; gap: 16px;
}
.header-center { flex: 1; }
.header-right {
  display: flex; align-items: center; gap: 12px;
}
.header-back {
  display: inline-flex; align-items: center; gap: 4px;
  color: var(--text-muted); font-size: 13px; font-weight: 500;
  text-decoration: none; padding: 5px 10px;
  border: 1px solid var(--border); border-radius: 20px;
  transition: all 0.2s;
}
.header-back:hover { color: var(--accent); border-color: var(--accent); background: rgba(124,111,255,0.06); }
.header-back-icon { font-size: 14px; }

.header-welcome { font-size: 13px; color: var(--text-muted); }

.header-usage {
  display: flex; align-items: center; gap: 5px;
  font-size: 12px; color: var(--text-muted);
  background: var(--surface); border: 1px solid var(--border);
  padding: 5px 12px; border-radius: 20px;
}
.header-usage-icon { font-size: 13px; }
.header-usage-count {
  font-size: 15px; font-weight: 700; line-height: 1;
}
.header-usage-total { font-size: 11px; color: var(--text-muted); }

/* ── 功能主页 Hero ───────────────────────────────────────────────────────── */
.home-hero {
  text-align: center;
  padding: 48px 0 36px;
  animation: slideUp 0.4s ease;
}
.home-hero-tag {
  display: inline-block;
  background: rgba(124,111,255,0.1);
  border: 1px solid rgba(124,111,255,0.3);
  color: var(--accent2); font-size: 12px; font-weight: 600;
  padding: 5px 16px; border-radius: 20px;
  letter-spacing: 0.5px; margin-bottom: 20px;
}
.home-hero-title {
  font-size: 36px; font-weight: 800; color: var(--text);
  margin-bottom: 14px; letter-spacing: -0.5px;
}
.home-hero-accent {
  background: var(--grad1);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.home-hero-sub {
  font-size: 15px; color: var(--text-muted); line-height: 1.7;
}
.home-client-cta {
  margin-top: 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.btn-client-download {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 22px;
  border-radius: 999px;
  font-size: 14px; font-weight: 600;
  text-decoration: none; color: var(--text);
  background: linear-gradient(135deg, rgba(124, 111, 255, 0.25) 0%, rgba(56, 189, 248, 0.15) 100%);
  border: 1px solid rgba(124, 111, 255, 0.45);
  box-shadow: 0 0 32px rgba(124, 111, 255, 0.12);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s;
}
.btn-client-download:hover {
  transform: translateY(-1px);
  border-color: rgba(56, 189, 248, 0.55);
  box-shadow: 0 4px 28px rgba(56, 189, 248, 0.15);
}
.btn-client-icon { font-size: 16px; opacity: 0.9; }
.home-client-hint {
  font-size: 12px; color: var(--text-muted);
  max-width: 360px; line-height: 1.5;
}

/* ── 功能卡片网格 ──────────────────────────────────────────────────────── */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-bottom: 32px;
  animation: slideUp 0.5s ease;
}
@media (max-width: 700px) {
  .feature-grid { grid-template-columns: 1fr; }
  .home-hero-title { font-size: 26px; }
}

.feature-card {
  position: relative;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--surface);
  overflow: hidden;
  transition: all 0.3s ease;
  text-decoration: none;
  color: inherit;
  display: block;
}
.feature-card--active {
  cursor: pointer;
}
.feature-card--active:hover {
  border-color: var(--border-h);
  transform: translateY(-4px);
  box-shadow: 0 16px 48px rgba(124,111,255,0.2);
}
.feature-card--coming {
  cursor: default;
  opacity: 0.75;
}

/* 卡片光晕（装饰） */
.feature-card-glow {
  position: absolute; top: -60px; right: -60px;
  width: 180px; height: 180px;
  border-radius: 50%;
  filter: blur(60px); opacity: 0.12;
  pointer-events: none;
}
.feature-card-glow--purple { background: #7c6fff; }
.feature-card-glow--cyan   { background: #38bdf8; }

.feature-card-inner {
  position: relative; z-index: 1;
  padding: 28px 24px;
  display: flex; flex-direction: column; gap: 16px;
}

.feature-icon-wrap {
  width: 56px; height: 56px; border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.feature-icon-wrap--purple {
  background: rgba(124,111,255,0.15);
  border: 1px solid rgba(124,111,255,0.25);
}
.feature-icon-wrap--cyan {
  background: rgba(56,189,248,0.12);
  border: 1px solid rgba(56,189,248,0.22);
}
.feature-icon { font-size: 26px; }

.feature-info { flex: 1; }
.feature-name {
  font-size: 18px; font-weight: 700; color: var(--text);
  margin-bottom: 8px;
}
.feature-desc {
  font-size: 13px; color: var(--text-muted);
  line-height: 1.7; margin-bottom: 14px;
}
.feature-tags {
  display: flex; gap: 6px; flex-wrap: wrap;
}
.feature-tag {
  font-size: 11px; font-weight: 600; padding: 3px 10px;
  border-radius: 20px;
  background: rgba(124,111,255,0.1);
  border: 1px solid rgba(124,111,255,0.2);
  color: var(--accent2);
}

.feature-arrow {
  display: flex; align-items: center; justify-content: flex-end; gap: 8px;
}
.feature-status {
  font-size: 12px; font-weight: 700; padding: 5px 14px;
  border-radius: 20px; letter-spacing: 0.3px;
}
.feature-status--active {
  background: rgba(124,111,255,0.15);
  border: 1px solid rgba(124,111,255,0.4);
  color: var(--accent2);
}
.feature-status--coming {
  background: rgba(107,107,133,0.1);
  border: 1px solid rgba(107,107,133,0.2);
  color: var(--text-muted);
}
.feature-arrow-icon {
  font-size: 16px; color: var(--accent2);
  transition: transform 0.2s;
}
.feature-card--active:hover .feature-arrow-icon {
  transform: translateX(4px);
}

/* ── 主页底部提示 ────────────────────────────────────────────────────────── */
.home-footnote {
  text-align: center;
  font-size: 12px; color: var(--text-muted);
  padding: 12px 0 24px;
  border-top: 1px solid var(--border);
  margin-bottom: 16px;
}

/* ── Header 右侧退出按钮 ────────────────────────────────────────────────── */
.btn-logout {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 16px;
  background: transparent;
  border: 1px solid var(--border); border-radius: 20px;
  color: var(--text-muted); font-size: 12px; font-weight: 500;
  cursor: pointer; transition: all 0.2s;
}
.btn-logout:hover {
  border-color: var(--error);
  color: var(--error);
  background: rgba(248,113,113,0.06);
}

/* ── 任务托盘（底部悬浮） ───────────────────────────────────────────────── */
.task-tray {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 900;
  background: rgba(18, 18, 26, 0.97);
  border-top: 1px solid var(--border);
  backdrop-filter: blur(16px);
  padding: 14px 20px 18px;
  animation: slideUpTray 0.35s ease;
  max-height: 55vh;
  overflow-y: auto;
}
@keyframes slideUpTray {
  from { transform: translateY(100%); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

.tray-header {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 12px;
}
.tray-title-icon { font-size: 16px; }
.tray-title {
  font-size: 14px; font-weight: 700; color: var(--text);
}
.tray-subtitle {
  font-size: 12px; color: var(--text-muted);
  margin-left: 4px;
}

.tray-list {
  display: flex; flex-direction: column; gap: 10px;
}

/* 单个任务卡片 */
.tray-card {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  transition: border-color 0.3s;
}
.tray-card--processing { border-color: rgba(124,111,255,0.4); }
.tray-card--success    { border-color: rgba(52,211,153,0.4);  background: rgba(52,211,153,0.04); }
.tray-card--failed     { border-color: rgba(248,113,113,0.4); background: rgba(248,113,113,0.04); }

.tray-card-header {
  display: flex; align-items: center; gap: 8px; margin-bottom: 8px;
}
.tray-status-icon { font-size: 15px; flex-shrink: 0; }
.tray-label {
  font-size: 13px; font-weight: 600; color: var(--text); flex: 1;
}
.tray-pct {
  font-size: 13px; font-weight: 700;
  background: var(--grad1);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  min-width: 36px; text-align: right;
}
.tray-card--success .tray-pct { background: none; -webkit-text-fill-color: var(--success); color: var(--success); }
.tray-card--failed  .tray-pct { background: none; -webkit-text-fill-color: var(--error);   color: var(--error); }

.tray-close-x {
  background: none; border: none; cursor: pointer;
  color: var(--text-muted); font-size: 16px; padding: 0 2px;
  line-height: 1; transition: color 0.2s;
}
.tray-close-x:hover { color: var(--error); }

/* 托盘进度条 */
.tray-bar-track {
  height: 4px; background: var(--surface);
  border-radius: 2px; overflow: hidden; margin-bottom: 7px;
}
.tray-bar-fill {
  height: 100%; border-radius: 2px;
  background: var(--grad1);
  transition: width 0.5s ease;
  position: relative; overflow: hidden;
}
.tray-bar-fill::after {
  content: '';
  position: absolute; top: 0; left: -100%;
  width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.35), transparent);
  animation: shimmer 1.8s infinite;
}
.tray-bar-fill--success { background: var(--success); }
.tray-bar-fill--success::after { display: none; }
.tray-bar-fill--failed  { background: var(--error); }
.tray-bar-fill--failed::after  { display: none; }

.tray-msg {
  font-size: 12px; color: var(--text-muted); margin-bottom: 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.tray-card--failed .tray-msg { color: var(--error); }

/* 操作按钮行 */
.tray-actions {
  display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap;
}
.tray-btn {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 6px 14px; border-radius: 20px;
  font-size: 12px; font-weight: 600;
  cursor: pointer; border: none; transition: all 0.2s;
  text-decoration: none;
}
.tray-btn--preview {
  background: rgba(124,111,255,0.15);
  border: 1px solid rgba(124,111,255,0.4);
  color: var(--accent2);
}
.tray-btn--preview:hover { background: rgba(124,111,255,0.28); }
.tray-btn--download {
  background: rgba(52,211,153,0.12);
  border: 1px solid rgba(52,211,153,0.35);
  color: var(--success);
}
.tray-btn--download:hover { background: rgba(52,211,153,0.22); }
.tray-btn--close {
  background: rgba(248,113,113,0.08);
  border: 1px solid rgba(248,113,113,0.3);
  color: var(--error);
}
.tray-btn--close:hover { background: rgba(248,113,113,0.18); }

/* 托盘存在时给页面底部加 padding，避免被遮挡 */
body.has-tray .app-container {
  padding-bottom: 240px;
}

/* ── 视频预览弹窗 ────────────────────────────────────────────────────────── */
.preview-overlay {
  position: fixed; inset: 0; z-index: 999;
  background: rgba(0,0,0,0.85);
  display: flex; align-items: center; justify-content: center;
  backdrop-filter: blur(8px);
  animation: fadeIn 0.2s ease;
  padding: 20px;
}
.preview-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 24px;
  width: 100%; max-width: 760px;
  animation: slideUp 0.3s ease;
  box-shadow: 0 24px 80px rgba(0,0,0,0.7);
}
.preview-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px;
}
.preview-title {
  font-size: 15px; font-weight: 700; color: var(--text);
}
.preview-close {
  background: none; border: none; cursor: pointer;
  color: var(--text-muted); font-size: 22px; line-height: 1;
  transition: color 0.2s; padding: 0;
}
.preview-close:hover { color: var(--error); }
.preview-video {
  width: 100%; max-height: 60vh;
  border-radius: var(--radius-sm);
  background: #000;
  display: block;
  margin-bottom: 18px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.5);
}
.preview-footer {
  display: flex; justify-content: center;
}

/* ── 次数信息条 ─────────────────────────────────────────────────────────── */
.usage-bar {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 18px;
  margin-bottom: 28px;
  font-size: 13px;
  animation: fadeIn 0.4s ease;
}
.usage-left {
  display: flex; align-items: center; gap: 6px;
  color: var(--text-muted);
}
.usage-icon { font-size: 15px; }
.usage-count {
  font-size: 18px; font-weight: 700; line-height: 1;
}
.usage-count.usage-ok    { color: var(--success); }
.usage-count.usage-low   { color: #fbbf24; }
.usage-count.usage-empty { color: var(--error); }
.usage-total { color: var(--text-muted); font-size: 12px; }
.usage-reset { color: var(--text-muted); font-size: 12px; }

/* ── 操作指引区域 ─────────────────────────────────────────────────────────── */
.guide-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 24px;
  animation: fadeIn 0.4s ease;
}
.guide-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
.guide-icon {
  font-size: 18px;
}
.guide-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}
.guide-badge {
  margin-left: auto;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 20px;
  background: rgba(56,189,248,0.12);
  border: 1px solid rgba(56,189,248,0.25);
  color: var(--accent3);
}
.guide-content {
  display: flex;
  justify-content: center;
}
.guide-image {
  max-width: 100%;
  max-height: 400px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}
.guide-image:hover {
  transform: scale(1.02);
  box-shadow: 0 8px 30px rgba(124,111,255,0.3);
}

/* ── 指引图片预览弹窗 ────────────────────────────────────────────────────── */
.guide-overlay {
  position: fixed;
  inset: 0;
  z-index: 999;
  background: rgba(0,0,0,0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(8px);
  animation: fadeIn 0.2s ease;
  padding: 20px;
}
.guide-preview-box {
  position: relative;
  max-width: 95vw;
  max-height: 95vh;
}
.guide-preview-box img {
  max-width: 100%;
  max-height: 90vh;
  border-radius: var(--radius);
  box-shadow: 0 24px 80px rgba(0,0,0,0.8);
}
.guide-close {
  position: absolute;
  top: -40px;
  right: 0;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 28px;
  line-height: 1;
  transition: color 0.2s;
  padding: 0;
}
.guide-close:hover {
  color: var(--text);
}
