/* ============================================================
 * theme-shared.css — 深色玻璃拟态主题
 * 设计基准：card-creator.html 的视觉语言
 * 适用：xhs-drama / cosmetics-4 / xhs-image
 * ============================================================ */

/* ===== 设计 Token ===== */
:root {
  --theme-bg: #080c14;
  --theme-surface: rgba(255,255,255,0.03);
  --theme-border: rgba(255,255,255,0.08);
  --theme-border-focus: rgba(99,102,241,0.5);
  --theme-text: #f1f5f9;
  --theme-text-secondary: rgba(148,163,184,0.7);
  --theme-text-tertiary: rgba(148,163,184,0.5);
  --theme-accent: #6366f1;
  --theme-accent-gradient: linear-gradient(135deg, #6366f1, #8b5cf6);
  --theme-radius: 0.875rem;
  --theme-radius-sm: 0.625rem;
  --theme-header-bg: rgba(8,12,20,0.75);
  --theme-mesh: radial-gradient(ellipse 70% 50% at 15% 15%, rgba(99,102,241,0.08) 0%, transparent 60%),
                 radial-gradient(ellipse 50% 40% at 85% 80%, rgba(139,92,246,0.06) 0%, transparent 60%),
                 linear-gradient(160deg, #0a0f1e 0%, #080c14 60%, #0f0a14 100%);
}

/* ===== 全局 ===== */
html.theme-dark { background: #080c14; }
body.theme-dark {
  background: var(--theme-mesh);
  background-attachment: fixed;
  color: var(--theme-text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* ===== 卡片 ===== */
.theme-dark .card {
  background: var(--theme-surface);
  border: 1px solid var(--theme-border);
  border-radius: var(--theme-radius);
  padding: 1.25rem;
  margin-bottom: 1rem;
  transition: border-color 0.2s;
}
.theme-dark .card-title {
  font-size: 0.9375rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--theme-text);
}
.theme-dark .card-desc {
  font-size: 0.8125rem;
  color: var(--theme-text-secondary);
  margin-bottom: 1rem;
  line-height: 1.6;
}

/* ===== 节标题 ===== */
.theme-dark .section-label {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--theme-text-tertiary);
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

/* ===== 主要按钮 ===== */
.theme-dark .btn-primary {
  width: 100%;
  padding: 1rem;
  border-radius: var(--theme-radius);
  border: none;
  background: var(--theme-accent-gradient);
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
  box-shadow: 0 4px 16px rgba(99,102,241,0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}
.theme-dark .btn-primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(99,102,241,0.3);
}
.theme-dark .btn-primary:active:not(:disabled) { transform: scale(0.98); }
.theme-dark .btn-primary:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* ===== 次要按钮 ===== */
.theme-dark .btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  padding: 0.75rem 1rem;
  border-radius: var(--theme-radius-sm);
  border: 1px solid var(--theme-border);
  background: var(--theme-surface);
  color: var(--theme-text-secondary);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s;
}
.theme-dark .btn-secondary:hover {
  color: var(--theme-text);
  border-color: rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.05);
}

/* ===== 输入框 ===== */
.theme-dark input[type="text"],
.theme-dark input[type="number"],
.theme-dark textarea,
.theme-dark select {
  width: 100%;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--theme-border);
  border-radius: var(--theme-radius-sm);
  padding: 0.75rem 0.875rem;
  color: var(--theme-text);
  font-size: 0.875rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s;
  line-height: 1.6;
}
.theme-dark input:focus,
.theme-dark textarea:focus,
.theme-dark select:focus {
  border-color: var(--theme-border-focus);
}
.theme-dark input::placeholder,
.theme-dark textarea::placeholder {
  color: rgba(148,163,184,0.35);
}

/* ===== 标签 / 徽章 ===== */
.theme-dark .tag {
  display: inline-block;
  padding: 0.2rem 0.5rem;
  border-radius: 0.3125rem;
  font-size: 0.6875rem;
  font-weight: 500;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.07);
  color: var(--theme-text-secondary);
}
.theme-dark .tag-accent {
  background: rgba(99,102,241,0.1);
  border-color: rgba(99,102,241,0.2);
  color: #818cf8;
}

/* ===== 返回按钮 ===== */
.theme-dark .back-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  color: var(--theme-text-secondary);
  font-size: 0.8125rem;
  text-decoration: none;
  padding: 0.375rem 0.75rem;
  border-radius: 0.5rem;
  border: 1px solid var(--theme-border);
  background: rgba(255,255,255,0.04);
  transition: all 0.2s;
}
.theme-dark .back-btn:hover {
  color: var(--theme-text);
  background: rgba(255,255,255,0.08);
}

/* ===== StepBar ===== */
.theme-dark .step-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px 0 24px;
  gap: 0;
}
.theme-dark .step-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-width: 48px;
}
.theme-dark .step-circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  background: rgba(255,255,255,0.08);
  color: var(--theme-text-secondary);
  transition: .2s;
}
.theme-dark .step-active .step-circle {
  background: var(--theme-accent-gradient);
  color: #fff;
  box-shadow: 0 2px 12px rgba(99,102,241,0.4);
}
.theme-dark .step-done .step-circle {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff;
}
.theme-dark .step-label {
  font-size: 10px;
  color: var(--theme-text-tertiary);
  white-space: nowrap;
}
.theme-dark .step-active .step-label {
  color: var(--theme-text);
  font-weight: 600;
}
.theme-dark .step-connector {
  width: 28px;
  height: 2px;
  background: rgba(255,255,255,0.08);
  margin: 0 2px;
  align-self: flex-start;
  margin-top: 15px;
}
.theme-dark .connector-done {
  background: linear-gradient(90deg, #10b981, #059669);
}

/* ===== 上传区域 ===== */
.theme-dark .upload-area {
  border: 2px dashed var(--theme-border);
  border-radius: var(--theme-radius-sm);
  padding: 28px 16px;
  text-align: center;
  cursor: pointer;
  transition: .2s;
}
.theme-dark .upload-area:hover {
  border-color: var(--theme-accent);
  background: rgba(99,102,241,0.06);
}
.theme-dark .upload-text {
  font-size: 14px;
  color: var(--theme-text-secondary);
}
.theme-dark .upload-hint {
  font-size: 12px;
  color: var(--theme-text-tertiary);
  margin-top: 4px;
}

/* ===== 底部操作栏 ===== */
.theme-dark .bottom-bar {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  padding: 12px 16px;
  padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  background: var(--theme-header-bg);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--theme-border);
  z-index: 100;
}
