/* ============================================================
   梦幻照进现实 · H5 视觉系统
   设计基调：深空紫 → 暖粉 → 琥珀，玻璃拟态，光晕层次
   目标：手机上一眼高级，触感顺滑，无廉价渐变
   ============================================================ */

:root {
  /* 色板 */
  --bg-0: #08070f;
  --bg-1: #0f0d1c;
  --bg-2: #171326;
  --line: rgba(255, 255, 255, .09);
  --line-strong: rgba(255, 255, 255, .16);

  --txt-0: #f5f3ff;
  --txt-1: rgba(245, 243, 255, .72);
  --txt-2: rgba(245, 243, 255, .44);

  --violet: #a78bfa;
  --pink: #f472b6;
  --amber: #fbbf24;
  --cyan: #67e8f9;

  --grad-main: linear-gradient(135deg, #b39dfb 0%, #e879c0 48%, #f9a8d4 100%);
  --grad-soft: linear-gradient(135deg, rgba(167, 139, 250, .18), rgba(244, 114, 182, .12));

  --r-sm: 12px;
  --r-md: 18px;
  --r-lg: 26px;
  --r-pill: 999px;

  --shadow-card: 0 18px 48px -20px rgba(0, 0, 0, .85);
  --shadow-glow: 0 20px 60px -24px rgba(167, 139, 250, .65);

  --ease: cubic-bezier(.22, .61, .36, 1);
  --dur: .32s;

  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body { height: 100%; }

body {
  background: var(--bg-0);
  color: var(--txt-0);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro SC", "PingFang SC",
               "Helvetica Neue", "Microsoft YaHei", system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  overscroll-behavior-y: none;
}

/* 全局氛围背景：多层光源 + 极细网格 + 颗粒 */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(920px 680px at 8% -12%, rgba(167, 139, 250, .52), transparent 58%),
    radial-gradient(820px 600px at 100% 4%, rgba(244, 114, 182, .38), transparent 56%),
    radial-gradient(700px 540px at 46% 112%, rgba(251, 191, 36, .26), transparent 58%),
    radial-gradient(560px 420px at 78% 62%, rgba(103, 232, 249, .14), transparent 62%);
  animation: ambience 18s ease-in-out infinite;
}
@keyframes ambience {
  0%, 100% { opacity: .85; transform: scale(1); }
  50%      { opacity: 1;   transform: scale(1.06); }
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: .5;
  background-image:
    linear-gradient(rgba(255, 255, 255, .028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .028) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(circle at 50% 18%, #000 0%, transparent 80%);
  -webkit-mask-image: radial-gradient(circle at 50% 18%, #000 0%, transparent 80%);
}

button, input, textarea { font: inherit; color: inherit; border: none; background: none; outline: none; }
button { cursor: pointer; }
svg { display: block; }

/* ⚠ 关键：hidden 属性必须能压过后续的 display 声明
   （.task-visual 等设了 display:grid，会覆盖浏览器默认的 [hidden]{display:none}） */
[hidden] { display: none !important; }

/* ================= 开场动画 ================= */
#splash {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 22px;
  background: var(--bg-0);
  transition: opacity .5s var(--ease), visibility .5s;
}
#splash.out { opacity: 0; visibility: hidden; }

.splash-mark svg { width: 84px; height: 84px; }
#splashRing { animation: ringDraw 1.15s var(--ease) forwards; }
@keyframes ringDraw { to { stroke-dashoffset: 0; } }

.splash-text {
  font-size: 17px;
  letter-spacing: .34em;
  text-indent: .34em;
  background: var(--grad-main);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: fadeUp .7s var(--ease) .25s both;
}
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ================= 应用容器 ================= */
.app {
  position: relative;
  z-index: 1;
  min-height: 100%;
  max-width: 560px;
  margin: 0 auto;
  padding-bottom: calc(28px + var(--safe-b));
}

/* ================= 顶栏 ================= */
.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: calc(var(--safe-t) + 14px) 18px 14px;
  backdrop-filter: blur(22px) saturate(160%);
  -webkit-backdrop-filter: blur(22px) saturate(160%);
  background: linear-gradient(to bottom, rgba(8, 7, 15, .9), rgba(8, 7, 15, .55));
  border-bottom: 1px solid transparent;
  transition: border-color var(--dur) var(--ease);
}
.topbar.scrolled { border-bottom-color: var(--line); }

.brand { display: flex; align-items: center; gap: 9px; }
.brand-dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--grad-main);
  box-shadow: 0 0 14px rgba(244, 114, 182, .85);
  animation: pulse 2.6s ease-in-out infinite;
}
@keyframes pulse { 0%,100% { opacity: 1; transform: scale(1); } 50% { opacity: .6; transform: scale(.82); } }

.brand-name {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: .05em;
}

.wallet-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 15px;
  border-radius: var(--r-pill);
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, .055);
  font-size: 13.5px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  transition: transform .18s var(--ease), background var(--dur);
}
.wallet-pill:active { transform: scale(.95); background: rgba(255, 255, 255, .1); }
.wallet-icon { color: var(--amber); font-size: 13px; }

/* ================= 页面切换 ================= */
.page { padding: 0 18px; animation: pageIn .42s var(--ease) both; }
.page[hidden] { display: none; }
@keyframes pageIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* ================= 欢迎页 ================= */
.hero { padding: 26px 0 28px; position: relative; }

.hero-glow {
  position: absolute;
  top: -40px; left: 50%;
  width: 320px; height: 320px;
  transform: translateX(-50%);
  pointer-events: none;
  background: radial-gradient(circle, rgba(167, 139, 250, .32), transparent 68%);
  filter: blur(28px);
  animation: breathe 7s ease-in-out infinite;
}
.hero-glow.small { width: 240px; height: 240px; top: -60px; opacity: .7; }
@keyframes breathe { 0%,100% { transform: translateX(-50%) scale(1); opacity: .85; } 50% { transform: translateX(-50%) scale(1.13); opacity: 1; } }

.hero-title {
  position: relative;
  font-size: 40px;
  line-height: 1.16;
  font-weight: 700;
  letter-spacing: -.02em;
}
.hero-title em {
  font-style: normal;
  background: var(--grad-main);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-sub {
  position: relative;
  margin-top: 15px;
  font-size: 14.5px;
  color: rgba(245, 243, 255, .82);
  line-height: 1.78;
}

/* ================= 按钮 ================= */
.btn-primary {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 13px 24px;
  border-radius: var(--r-pill);
  background: var(--grad-main);
  color: #12091f;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: .02em;
  box-shadow: var(--shadow-glow);
  transition: transform .18s var(--ease), filter .18s, box-shadow .18s;
  overflow: hidden;
}
.btn-primary::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 30%, rgba(255,255,255,.42) 50%, transparent 70%);
  transform: translateX(-120%);
  transition: transform .75s var(--ease);
}
.btn-primary:active { transform: scale(.965); filter: brightness(.95); }
.btn-primary:active::after { transform: translateX(120%); }
.btn-primary:disabled { opacity: .55; pointer-events: none; }

.btn-lg { padding: 15px 28px; font-size: 16px; margin-top: 26px; }
.btn-full { display: flex; width: 100%; }

.btn-arrow { width: 18px; height: 18px; margin-left: -1px; stroke-width: 2.4; }

.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 22px;
  border-radius: var(--r-pill);
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, .05);
  color: var(--txt-0);
  font-weight: 600;
  font-size: 15px;
  transition: background .2s, transform .18s var(--ease);
}
.btn-ghost:active { transform: scale(.97); background: rgba(255, 255, 255, .1); }

.btn-back {
  display: grid;
  place-items: center;
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .05);
  transition: background .2s, transform .18s var(--ease);
}
.btn-back:active { transform: scale(.9); background: rgba(255, 255, 255, .11); }
.btn-back svg { width: 19px; height: 19px; }

.link {
  color: var(--violet);
  font-weight: 600;
  text-decoration: none;
  transition: opacity .2s;
}
.link:active { opacity: .6; }

/* ================= 功能条（欢迎页） ================= */
.feature-strip {
  display: grid;
  gap: 11px;
  margin-top: 8px;
}

.feature-mini {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 17px 18px;
  border-radius: var(--r-md);
  border: 1px solid rgba(255, 255, 255, .13);
  background: linear-gradient(140deg, rgba(255, 255, 255, .085), rgba(255, 255, 255, .032));
  box-shadow: 0 12px 32px -18px rgba(0, 0, 0, .9);
  transition: transform .2s var(--ease), border-color .2s, background .2s;
}
.feature-mini:active { transform: scale(.985); border-color: rgba(255, 255, 255, .24); }

.feature-mini-icon {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 44px; height: 44px;
  border-radius: 13px;
  font-size: 20px;
  color: #fff;
  background: linear-gradient(140deg, rgba(167, 139, 250, .85), rgba(244, 114, 182, .72));
  border: 1px solid rgba(255, 255, 255, .3);
  box-shadow: 0 8px 20px -10px rgba(167, 139, 250, 1);
}
.feature-mini-text { flex: 1; min-width: 0; }
.feature-mini-name { font-size: 14.5px; font-weight: 600; }
.feature-mini-desc { font-size: 12.5px; color: var(--txt-2); margin-top: 2px; }
.feature-mini-price {
  flex: 0 0 auto;
  padding: 4px 11px;
  border-radius: var(--r-pill);
  font-size: 12.5px;
  font-weight: 700;
  color: #ffe9a8;
  background: rgba(251, 191, 36, .16);
  border: 1px solid rgba(251, 191, 36, .34);
  font-variant-numeric: tabular-nums;
}

/* ================= 认证页 ================= */
.page-auth { padding-top: 8px; }

.auth-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0 26px;
}

.auth-tabs {
  display: flex;
  gap: 4px;
  padding: 4px;
  border-radius: var(--r-pill);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .04);
}
.auth-tab {
  padding: 8px 22px;
  border-radius: var(--r-pill);
  font-size: 14px;
  font-weight: 600;
  color: var(--txt-2);
  transition: color .22s, background .22s;
}
.auth-tab.active {
  color: #12091f;
  background: var(--grad-main);
  box-shadow: 0 6px 18px -8px rgba(167, 139, 250, .9);
}
.auth-spacer { flex: 1; }

.auth-form, .create-form { display: grid; gap: 18px; }

.field { display: grid; gap: 8px; position: relative; }
.field-label {
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: .06em;
  color: var(--txt-2);
  text-transform: uppercase;
}
.field-label b { color: var(--amber); font-weight: 700; text-transform: none; letter-spacing: 0; }

.field > input,
.field textarea,
.field-row input {
  width: 100%;
  padding: 15px 17px;
  border-radius: var(--r-md);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .045);
  font-size: 15.5px;
  color: var(--txt-0);
  transition: border-color .22s, background .22s, box-shadow .22s;
}
.field > input::placeholder,
.field textarea::placeholder,
.field-row input::placeholder { color: var(--txt-2); }

.field > input:focus,
.field textarea:focus,
.field-row input:focus {
  border-color: rgba(167, 139, 250, .7);
  background: rgba(255, 255, 255, .07);
  box-shadow: 0 0 0 4px rgba(167, 139, 250, .13);
}

.field-row { display: flex; gap: 10px; align-items: stretch; }
.field-row input { flex: 1; min-width: 0; }

.btn-code {
  flex: 0 0 auto;
  padding: 0 16px;
  border-radius: var(--r-md);
  border: 1px solid rgba(167, 139, 250, .45);
  background: rgba(167, 139, 250, .12);
  color: var(--violet);
  font-size: 13.5px;
  font-weight: 600;
  white-space: nowrap;
  transition: background .2s, opacity .2s;
}
.btn-code:active { background: rgba(167, 139, 250, .22); }
.btn-code:disabled { opacity: .45; pointer-events: none; }

.btn-eye {
  flex: 0 0 auto;
  width: 50px;
  border-radius: var(--r-md);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .045);
  font-size: 16px;
  opacity: .6;
  transition: opacity .2s, background .2s;
}
.btn-eye:active { background: rgba(255, 255, 255, .1); }
.btn-eye.on { opacity: 1; }

.form-msg {
  min-height: 20px;
  font-size: 13px;
  color: #fb7185;
  padding-left: 3px;
}
.form-msg.ok { color: #4ade80; }

.auth-tip { text-align: center; font-size: 13px; color: var(--txt-2); }

/* ================= 主页 ================= */
.home-hero { padding: 30px 0 22px; position: relative; }
.home-title { position: relative; font-size: 25px; font-weight: 700; letter-spacing: -.01em; }
.home-sub { position: relative; margin-top: 9px; font-size: 13.5px; color: var(--txt-2); }

.feature-cards { display: grid; gap: 14px; }

.feature-card {
  position: relative;
  display: grid;
  gap: 11px;
  padding: 21px 19px;
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  background: linear-gradient(150deg, rgba(255, 255, 255, .105), rgba(255, 255, 255, .038));
  border-color: rgba(255, 255, 255, .14);
  box-shadow: 0 20px 50px -22px rgba(0, 0, 0, .95), inset 0 1px 0 rgba(255, 255, 255, .07);
  overflow: hidden;
  text-align: left;
  transition: transform .22s var(--ease), border-color .22s;
  animation: cardIn .5s var(--ease) both;
}
.feature-card:nth-child(2) { animation-delay: .06s; }
.feature-card:nth-child(3) { animation-delay: .12s; }
@keyframes cardIn { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

.feature-card::before {
  content: "";
  position: absolute;
  top: -60%; right: -30%;
  width: 200px; height: 200px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(167, 139, 250, .3), transparent 66%);
  filter: blur(22px);
  opacity: .9;
  transition: opacity .3s, transform .3s;
}
.feature-card:active { transform: scale(.985); border-color: var(--line-strong); }
.feature-card:active::before { transform: scale(1.2); }

.fc-top { display: flex; align-items: center; gap: 12px; position: relative; }
.fc-icon {
  display: grid; place-items: center;
  width: 48px; height: 48px;
  border-radius: 15px;
  font-size: 22px;
  color: #fff;
  background: linear-gradient(140deg, rgba(167, 139, 250, .95), rgba(244, 114, 182, .8));
  border: 1px solid rgba(255, 255, 255, .32);
  box-shadow: 0 10px 24px -10px rgba(167, 139, 250, 1);
}
.fc-name { font-size: 17px; font-weight: 700; letter-spacing: -.01em; }
.fc-badge {
  margin-left: auto;
  padding: 4px 11px;
  border-radius: var(--r-pill);
  font-size: 11.5px;
  font-weight: 700;
  color: #ffe9a8;
  background: rgba(251, 191, 36, .17);
  border: 1px solid rgba(251, 191, 36, .36);
  font-variant-numeric: tabular-nums;
}
.fc-desc { position: relative; font-size: 13px; color: var(--txt-1); line-height: 1.65; }

/* ================= 通用页头 ================= */
.create-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0 22px;
}
.create-title { flex: 1; font-size: 18px; font-weight: 700; letter-spacing: -.01em; }

.price-chip, .status-chip {
  padding: 6px 14px;
  border-radius: var(--r-pill);
  font-size: 12.5px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.price-chip {
  color: var(--amber);
  background: rgba(251, 191, 36, .13);
  border: 1px solid rgba(251, 191, 36, .26);
}
.status-chip {
  color: var(--violet);
  background: rgba(167, 139, 250, .14);
  border: 1px solid rgba(167, 139, 250, .3);
}
.status-chip.done { color: #4ade80; background: rgba(74, 222, 128, .13); border-color: rgba(74, 222, 128, .3); }
.status-chip.fail { color: #fb7185; background: rgba(251, 113, 133, .13); border-color: rgba(251, 113, 133, .3); }

/* ================= 创作页 ================= */
.field textarea { resize: none; line-height: 1.65; padding-bottom: 30px; }

.char-count {
  position: absolute;
  right: 15px;
  bottom: 12px;
  font-size: 11.5px;
  color: var(--txt-2);
  font-variant-numeric: tabular-nums;
}

.chip-group { display: flex; flex-wrap: wrap; gap: 9px; }
.chip {
  padding: 9px 16px;
  border-radius: var(--r-pill);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .04);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--txt-1);
  transition: all .2s var(--ease);
}
.chip.active {
  color: #12091f;
  background: var(--grad-main);
  border-color: transparent;
  box-shadow: 0 8px 22px -10px rgba(167, 139, 250, .95);
}
.chip:active { transform: scale(.94); }

.slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, .1);
  margin-top: 6px;
}
.slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 24px; height: 24px;
  border-radius: 50%;
  background: var(--grad-main);
  border: 2.5px solid var(--bg-1);
  box-shadow: 0 4px 14px rgba(167, 139, 250, .75);
  cursor: pointer;
}
.slider::-moz-range-thumb {
  width: 24px; height: 24px;
  border-radius: 50%;
  background: var(--grad-main);
  border: 2.5px solid var(--bg-1);
  cursor: pointer;
}

.slider-marks {
  display: flex;
  justify-content: space-between;
  font-size: 11.5px;
  color: var(--txt-2);
  margin-top: 5px;
}

.cost-note { text-align: center; font-size: 12.5px; color: var(--txt-2); }
.cost-note b { color: var(--amber); font-weight: 700; }

/* ================= 任务页 ================= */
.page-task { padding-bottom: 30px; }

.task-body { display: grid; gap: 20px; }

.task-visual {
  display: grid;
  place-items: center;
  gap: 22px;
  min-height: 260px;
  padding: 30px 20px;
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  background: linear-gradient(160deg, rgba(255, 255, 255, .055), rgba(255, 255, 255, .015));
}

.orbit { position: relative; width: 84px; height: 84px; }
.orbit span {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid transparent;
  border-top-color: var(--violet);
  border-right-color: var(--pink);
  animation: spin 1.15s linear infinite;
}
.orbit span:nth-child(2) { inset: 12px; border-top-color: var(--pink); border-right-color: var(--amber); animation-duration: 1.6s; animation-direction: reverse; }
.orbit span:nth-child(3) { inset: 24px; border-top-color: var(--amber); border-right-color: var(--violet); animation-duration: 2.1s; }
@keyframes spin { to { transform: rotate(360deg); } }

.task-hint { font-size: 13.5px; color: var(--txt-1); text-align: center; }

.task-preview { border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--line-strong); background: #000; }
.task-preview video, .task-preview img { display: block; width: 100%; height: auto; }
.task-preview .preview-text {
  padding: 20px 18px;
  font-size: 14.5px;
  line-height: 1.85;
  white-space: pre-wrap;
  color: var(--txt-0);
  background: linear-gradient(160deg, rgba(167, 139, 250, .12), rgba(244, 114, 182, .06));
}

.task-actions { display: grid; gap: 11px; }

/* ================= 钱包 ================= */
.wallet-card {
  position: relative;
  padding: 26px 22px;
  border-radius: var(--r-lg);
  border: 1px solid var(--line-strong);
  background: linear-gradient(145deg, rgba(167, 139, 250, .22), rgba(244, 114, 182, .14) 48%, rgba(251, 191, 36, .1));
  box-shadow: var(--shadow-glow);
  overflow: hidden;
}
.wallet-card::before {
  content: "";
  position: absolute;
  top: -70%; left: -20%;
  width: 240px; height: 240px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, .3), transparent 65%);
  filter: blur(26px);
}
.wallet-label { position: relative; font-size: 12.5px; letter-spacing: .1em; color: var(--txt-1); text-transform: uppercase; }
.wallet-big {
  position: relative;
  margin-top: 8px;
  font-size: 38px;
  font-weight: 700;
  letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
}
.wallet-quick { position: relative; display: flex; flex-wrap: wrap; gap: 9px; margin-top: 20px; }

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 26px 0 13px;
}
.section-title { font-size: 15px; font-weight: 700; letter-spacing: .01em; }

.ledger-list { display: grid; gap: 9px; }
.empty { padding: 26px 0; text-align: center; font-size: 13px; color: var(--txt-2); }

.ledger-item {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 14px 16px;
  border-radius: var(--r-md);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .032);
}
.ledger-icon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 11px; font-size: 15px; background: rgba(255, 255, 255, .06); }
.ledger-main { flex: 1; min-width: 0; }
.ledger-name { font-size: 13.5px; font-weight: 600; }
.ledger-time { font-size: 11.5px; color: var(--txt-2); margin-top: 1px; font-variant-numeric: tabular-nums; }
.ledger-amt { font-size: 14.5px; font-weight: 700; font-variant-numeric: tabular-nums; }
.ledger-amt.in { color: #4ade80; }
.ledger-amt.out { color: var(--txt-1); }

.logout { margin-top: 26px; color: #fb7185; border-color: rgba(251, 113, 133, .3); }
.logout:active { background: rgba(251, 113, 133, .12); }

/* ================= 最近作品 ================= */
.recent-list { display: grid; gap: 9px; }

.recent-item {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 13px 16px;
  border-radius: var(--r-md);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .032);
  text-align: left;
  width: 100%;
  transition: background .2s, transform .18s var(--ease);
}
.recent-item:active { transform: scale(.985); background: rgba(255, 255, 255, .06); }
.recent-main { flex: 1; min-width: 0; }
.recent-name { font-size: 13.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.recent-time { font-size: 11.5px; color: var(--txt-2); margin-top: 1px; font-variant-numeric: tabular-nums; }
.recent-status { font-size: 12px; font-weight: 700; padding: 4px 11px; border-radius: var(--r-pill); }
.recent-status.done { color: #4ade80; background: rgba(74, 222, 128, .12); }
.recent-status.run { color: var(--violet); background: rgba(167, 139, 250, .12); }
.recent-status.fail { color: #fb7185; background: rgba(251, 113, 133, .12); }

.safe-bottom { height: 12px; }

/* ================= Toast ================= */
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(42px + var(--safe-b));
  z-index: 300;
  transform: translate(-50%, 22px);
  max-width: calc(100vw - 60px);
  padding: 12px 20px;
  border-radius: var(--r-pill);
  border: 1px solid var(--line-strong);
  background: rgba(18, 14, 32, .95);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  color: var(--txt-0);
  font-size: 13.5px;
  font-weight: 500;
  text-align: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity .28s var(--ease), transform .28s var(--ease), visibility .28s;
  box-shadow: 0 16px 44px -16px rgba(0, 0, 0, .9);
}
.toast.show { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
.toast.err { border-color: rgba(251, 113, 133, .45); }

/* ================= 无障碍 & 降级 ================= */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

@media (min-width: 480px) {
  .hero-title { font-size: 46px; }
  .feature-cards { grid-template-columns: 1fr; }
}

/* 极窄屏适配 */
@media (max-width: 340px) {
  .hero-title { font-size: 33px; }
  .wallet-pill { padding: 7px 12px; font-size: 12.5px; }
  .create-title { font-size: 16px; }
}

/* 功能临时维护态：置灰但仍可读，避免用户误以为可以下单 */
.feature-card.is-off {
  opacity: .55;
  filter: grayscale(.35);
  cursor: not-allowed;
}
.feature-card.is-off .fc-badge {
  background: rgba(255, 255, 255, .08);
  color: var(--muted, #9aa0b5);
  font-size: 12px;
  letter-spacing: .02em;
}

/* ============================================================
   换脸素材上传
   ============================================================ */
.upload-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 22px 14px;
  border: 1.5px dashed rgba(255, 255, 255, .22);
  border-radius: 14px;
  background: rgba(255, 255, 255, .03);
  cursor: pointer;
  transition: border-color .18s ease, background .18s ease, transform .12s ease;
  user-select: none;
}
.upload-box:hover,
.upload-box:focus-within {
  border-color: rgba(120, 170, 255, .65);
  background: rgba(120, 170, 255, .07);
}
.upload-box:active {
  transform: scale(.995);
}
.upload-icon {
  font-size: 24px;
  line-height: 1;
  color: rgba(150, 190, 255, .85);
}
.upload-text {
  font-size: 14px;
  font-weight: 600;
  color: rgba(255, 255, 255, .9);
}
.upload-hint {
  font-size: 12px;
  color: var(--muted, #9aa0b5);
  text-align: center;
  line-height: 1.5;
}

/* 已选文件状态 */
.upload-state {
  margin-top: 8px;
  font-size: 13px;
  line-height: 1.6;
  min-height: 0;
}
.upload-state:empty {
  display: none;
}
.upload-state .us-ok {
  color: #62d68b;
}
.upload-state .us-err {
  color: #ff7b7b;
}
.upload-state .us-wait {
  color: var(--muted, #9aa0b5);
}

/* 上传完成后高亮边框，形成明确的"已就绪"反馈 */
.upload-box.is-ready {
  border-style: solid;
  border-color: rgba(98, 214, 139, .55);
  background: rgba(98, 214, 139, .06);
}
