/* Yituo Studio — 浅紫渐变 · 玻璃拟态 · 明暗双主题 */
:root {
  --bg: #f3effc;
  --bg2: #fdf7ee;
  --card: rgba(255, 255, 255, 0.72);
  --card-solid: #ffffff;
  --ink: #211b45;
  --ink-2: #6b6590;
  --ink-3: #9c96bf;
  --line: rgba(90, 70, 160, 0.14);
  --brand: #7c5cf0;
  --brand-2: #b889f5;
  --brand-3: #5ec2e8;
  --accent: #f6b1c3;
  --shadow: 0 24px 70px -24px rgba(102, 68, 200, 0.28);
  --shadow-sm: 0 10px 30px -12px rgba(102, 68, 200, 0.22);
  --radius: 22px;
  --side-w: 88px;
}
html.dark {
  --bg: #16132a;
  --bg2: #1c1734;
  --card: rgba(38, 32, 66, 0.72);
  --card-solid: #241e40;
  --ink: #ece8ff;
  --ink-2: #a49ecb;
  --ink-3: #6f68a0;
  --line: rgba(180, 160, 255, 0.16);
  --shadow: 0 24px 70px -24px rgba(0, 0, 0, 0.6);
  --shadow-sm: 0 10px 30px -12px rgba(0, 0, 0, 0.45);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", system-ui, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(900px 600px at 12% -10%, rgba(124, 92, 240, 0.16), transparent 60%),
    radial-gradient(800px 500px at 95% 8%, rgba(246, 177, 195, 0.2), transparent 55%),
    radial-gradient(700px 700px at 55% 115%, rgba(94, 194, 232, 0.14), transparent 60%),
    linear-gradient(160deg, var(--bg), var(--bg2));
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; }
::selection { background: rgba(124, 92, 240, 0.25); }

#app { display: flex; min-height: 100vh; }

/* ---------- 侧边栏（1:1 复刻） ---------- */
.sidebar {
  position: fixed; left: 0; top: 0; bottom: 0; width: var(--side-w); z-index: 50;
  display: flex; flex-direction: column; align-items: center;
  padding: 16px 0 20px; gap: 6px;
  background: var(--card-solid);
  border-right: 1px solid var(--line);
}
.logo { display: block; margin-bottom: 10px; }
.logo img {
  width: 46px; height: 46px; border-radius: 15px; object-fit: cover; display: block;
  box-shadow: 0 6px 18px -6px rgba(0, 0, 0, 0.45);
  transition: transform 0.2s;
}
.logo:hover img { transform: scale(1.06); }
.side-nav { display: flex; flex-direction: column; gap: 4px; margin-top: 18px; width: 100%; align-items: center; }
.side-nav a {
  position: relative;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  width: 60px; height: 56px; border-radius: 15px;
  color: var(--ink-3); font-size: 10.5px; letter-spacing: 0.4px;
  transition: color 0.18s, background 0.18s;
}
.side-nav a svg { width: 21px; height: 21px; }
.side-nav a span { font-weight: 500; }
.side-nav a:hover { color: var(--ink); background: rgba(124, 92, 240, 0.07); }
.side-nav a.active { color: var(--ink); background: rgba(124, 92, 240, 0.09); }
.side-nav a.active::before {
  content: ""; position: absolute; left: -14px; top: 50%; transform: translateY(-50%);
  width: 3px; height: 22px; border-radius: 0 3px 3px 0; background: linear-gradient(180deg, var(--brand), var(--brand-2));
}
.side-bottom { margin-top: auto; display: flex; flex-direction: column; gap: 4px; align-items: center; width: 100%; }
.side-btn {
  position: relative;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  width: 60px; height: 50px; border: 0; border-radius: 15px;
  background: transparent; color: var(--ink-3); font-size: 10.5px; letter-spacing: 0.4px; cursor: pointer;
  transition: color 0.18s, background 0.18s;
}
.side-btn svg { width: 20px; height: 20px; }
.side-btn span { font-weight: 500; }
.side-btn:hover { color: var(--ink); background: rgba(124, 92, 240, 0.07); }
#themeBtn .ico-sun { display: none; }
html.dark #themeBtn .ico-sun { display: block; }
html.dark #themeBtn .ico-moon { display: none; }

/* ---------- 主区域 ---------- */
.main { flex: 1; margin-left: var(--side-w); min-width: 0; }
.page { max-width: 1200px; margin: 0 auto; padding: 30px 44px 90px; position: relative; }
.page-head { display: flex; align-items: baseline; gap: 14px; margin-bottom: 26px; }
.brand-name { font-size: 21px; font-weight: 800; background: linear-gradient(90deg, var(--brand), var(--accent)); -webkit-background-clip: text; background-clip: text; color: transparent; letter-spacing: 0.2px; }
.brand-badge { font-size: 12px; color: var(--ink-3); letter-spacing: 2.5px; }

/* 背景圆环装饰 */
.rings {
  position: absolute; top: -140px; right: -180px; width: 640px; height: 640px;
  border-radius: 50%; pointer-events: none; opacity: 0.55; z-index: 0;
  background: repeating-radial-gradient(circle at center, transparent 0 46px, rgba(124, 92, 240, 0.12) 46px 47.5px);
  -webkit-mask-image: radial-gradient(circle at center, #000 0%, transparent 68%);
  mask-image: radial-gradient(circle at center, #000 0%, transparent 68%);
}
html.dark .rings { opacity: 0.3; }
.page > *:not(.rings) { position: relative; z-index: 1; }

/* ---------- 首页 Hero ---------- */
.hero { display: grid; grid-template-columns: 1.12fr 0.88fr; gap: 44px; align-items: center; padding-top: 34px; }
.hero h1 { font-size: 62px; line-height: 1.18; margin: 0 0 22px; font-weight: 900; letter-spacing: 1.5px; }
.hero h1 .grad { background: linear-gradient(92deg, var(--brand-2) 0%, var(--brand-3) 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p.lead { font-size: 16.5px; line-height: 2; color: var(--ink-2); margin: 0 0 34px; max-width: 470px; }
.hero-actions { display: flex; align-items: center; gap: 20px; margin-bottom: 46px; }
.btn { border: 0; cursor: pointer; border-radius: 999px; font-size: 15px; transition: transform 0.15s, box-shadow 0.15s, opacity 0.15s; }
.btn:hover { transform: translateY(-1.5px); }
.btn.primary { background: var(--ink); color: #fff; padding: 12px 12px 12px 26px; font-weight: 600; display: inline-flex; align-items: center; gap: 14px; box-shadow: var(--shadow-sm); }
html.dark .btn.primary { background: linear-gradient(92deg, var(--brand), var(--brand-2)); }
.btn.primary .arr { width: 30px; height: 30px; border-radius: 50%; background: rgba(255, 255, 255, 0.16); display: inline-flex; align-items: center; justify-content: center; font-size: 14px; }
.btn.ghost { background: transparent; color: var(--ink-2); padding: 10px 14px; }
.btn.ghost:hover { color: var(--brand); }
.btn.block { width: 100%; justify-content: center; }
.btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }
.stats { display: flex; }
.stat { padding: 4px 36px; border-left: 1px solid var(--line); }
.stat:first-child { border-left: 0; padding-left: 0; }
.stat b { display: block; font-size: 27px; font-weight: 800; letter-spacing: 0.3px; }
.stat span { font-size: 12px; color: var(--ink-3); }

.showcase-card {
  position: relative; border-radius: 30px; overflow: hidden; box-shadow: var(--shadow);
  background: var(--card-solid); aspect-ratio: 3/3.7; max-width: 400px; justify-self: end; width: 100%;
  transition: transform 0.25s;
}
.showcase-card:hover { transform: translateY(-4px) scale(1.005); }
.showcase-card img { width: 100%; height: 100%; object-fit: cover; display: block; }
.showcase-card .sc-empty { display: flex; align-items: center; justify-content: center; height: 100%; color: var(--ink-3); font-size: 14px; }
.showcase-card .sc-overlay {
  position: absolute; inset: auto 0 0 0; padding: 64px 24px 20px; color: #fff;
  background: linear-gradient(transparent, rgba(18, 10, 48, 0.78));
}
.showcase-card .sc-tag { display: inline-block; font-size: 17px; font-weight: 700; margin-bottom: 7px; letter-spacing: 0.5px; }
.showcase-card .sc-prompt { font-size: 12px; opacity: 0.85; line-height: 1.7; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.showcase-card .live { position: absolute; top: 16px; right: 18px; font-size: 10px; letter-spacing: 3px; color: rgba(255, 255, 255, 0.92); text-shadow: 0 1px 8px rgba(0, 0, 0, 0.4); }

/* ---------- 区块 ---------- */
.section { margin-top: 88px; }
.section h2 { font-size: 32px; font-weight: 900; margin: 0 0 10px; letter-spacing: 1px; }
.section .sub { color: var(--ink-2); font-size: 14.5px; margin: 0 0 28px; }
.gallery-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.g-card {
  position: relative; border: 0; padding: 0; border-radius: 22px; overflow: hidden; background: var(--card);
  cursor: pointer; text-align: left; color: inherit; box-shadow: var(--shadow-sm);
  transition: transform 0.2s, box-shadow 0.2s;
}
.g-card:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
.g-card img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; background: rgba(124, 92, 240, 0.08); }
.g-card .g-body { position: absolute; inset: auto 0 0 0; padding: 42px 16px 14px; color: #fff; background: linear-gradient(transparent, rgba(18, 10, 48, 0.72)); }
.g-card .g-title { font-weight: 700; font-size: 14px; margin-bottom: 3px; }
.g-card .g-prompt { font-size: 11.5px; opacity: 0.82; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.6; }
.empty-tip { color: var(--ink-3); font-size: 14px; padding: 34px; border: 1.5px dashed var(--line); border-radius: 20px; text-align: center; }

/* 起点卡片（bento） */
.bento-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.b-card {
  position: relative; border: 0; padding: 0; border-radius: 24px; overflow: hidden; cursor: pointer;
  background: var(--card); color: inherit; text-align: left; box-shadow: var(--shadow-sm);
  transition: transform 0.2s, box-shadow 0.2s;
}
.b-card:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
.b-card img { width: 100%; aspect-ratio: 4/3; object-fit: cover; display: block; transition: transform 0.35s; }
.b-card:hover img { transform: scale(1.04); }
.b-card .b-overlay { position: absolute; inset: auto 0 0 0; padding: 54px 18px 16px; color: #fff; background: linear-gradient(transparent, rgba(18, 10, 48, 0.78)); }
.b-card .b-title { font-weight: 800; font-size: 16.5px; margin-bottom: 4px; letter-spacing: 0.5px; }
.b-card .b-prompt { font-size: 11.5px; opacity: 0.85; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.6; }
.b-card .b-go {
  position: absolute; top: 14px; right: 14px; width: 34px; height: 34px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.18); backdrop-filter: blur(8px); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 15px; opacity: 0; transition: opacity 0.2s;
}
.b-card:hover .b-go { opacity: 1; }

.models { display: flex; flex-wrap: wrap; gap: 14px; }
.model-chip {
  display: flex; align-items: center; gap: 14px; padding: 16px 24px; border-radius: 20px;
  border: 1px solid var(--line); background: var(--card); box-shadow: var(--shadow-sm);
}
.model-chip .m-dot { width: 38px; height: 38px; border-radius: 13px; background: linear-gradient(135deg, var(--brand), var(--brand-3)); display: flex; align-items: center; justify-content: center; color: #fff; font-size: 16px; font-weight: 800; }
.model-chip b { font-size: 15px; }
.model-chip span { font-size: 12px; color: var(--ink-2); }

.cta-band { margin-top: 96px; text-align: center; padding: 40px 20px 0; }
.cta-band h3 { font-size: 36px; font-weight: 900; margin: 0 0 14px; letter-spacing: 1px; }
.cta-band p { color: var(--ink-2); margin: 0 0 30px; font-size: 15px; }
.site-footer { text-align: center; color: var(--ink-3); font-size: 12.5px; padding: 56px 0 10px; line-height: 2; }
.site-footer a { color: var(--ink-2); border-bottom: 1px solid var(--line); }

/* ---------- 工作台 ---------- */
.studio { display: grid; grid-template-columns: 420px 1fr; gap: 26px; align-items: start; }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; backdrop-filter: blur(14px); }
.panel + .panel { margin-top: 18px; }
.field { margin-bottom: 16px; }
.field > label { display: block; font-size: 12.5px; color: var(--ink-2); margin-bottom: 7px; font-weight: 600; letter-spacing: 0.3px; }
textarea {
  width: 100%; min-height: 150px; resize: vertical; border-radius: 14px; border: 1px solid var(--line);
  background: var(--card-solid); color: var(--ink); padding: 13px; font-size: 14px; line-height: 1.7; font-family: inherit;
}
textarea:focus, input:focus, select:focus { outline: 2px solid rgba(124, 92, 240, 0.35); border-color: transparent; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
select {
  width: 100%; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--card-solid); color: var(--ink); font-size: 14px;
}
.model-lock {
  display: flex; align-items: center; justify-content: space-between; padding: 12px 15px; border-radius: 12px;
  background: linear-gradient(92deg, rgba(124, 92, 240, 0.12), rgba(94, 194, 232, 0.1));
  border: 1px solid rgba(124, 92, 240, 0.25); font-size: 14px; font-weight: 700;
}
.model-lock span { font-size: 12px; color: var(--ink-2); font-weight: 400; }
.refs { display: flex; gap: 10px; flex-wrap: wrap; }
.ref-item { position: relative; width: 72px; height: 72px; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); }
.ref-item img { width: 100%; height: 100%; object-fit: cover; }
.ref-item .rm { position: absolute; top: 2px; right: 2px; width: 20px; height: 20px; border-radius: 50%; border: 0; background: rgba(0, 0, 0, 0.55); color: #fff; font-size: 11px; cursor: pointer; line-height: 1; }
.ref-add {
  width: 72px; height: 72px; border-radius: 12px; border: 1.5px dashed var(--line); background: transparent;
  color: var(--ink-3); font-size: 22px; cursor: pointer;
}
.gen-cost { font-size: 12.5px; color: var(--ink-3); text-align: center; margin-top: 12px; }

.result-area { min-height: 420px; display: flex; flex-direction: column; }
.result-empty { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--ink-3); gap: 10px; padding: 60px 0; }
.result-empty .big { font-size: 42px; }
.result-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.result-grid figure { margin: 0; position: relative; border-radius: 16px; overflow: hidden; border: 1px solid var(--line); background: var(--card-solid); }
.result-grid img { width: 100%; display: block; }
.result-grid figcaption { display: flex; justify-content: space-between; align-items: center; padding: 8px 10px; font-size: 12px; color: var(--ink-2); }
.result-grid a { color: var(--brand); font-weight: 600; }
.gen-status { display: flex; flex-direction: column; gap: 18px; padding: 30px 34px; border-radius: 16px; background: rgba(124, 92, 240, 0.07); border: 1px solid var(--line); }
.gen-steps { display: flex; flex-direction: column; gap: 13px; }
.g-step { display: flex; align-items: center; gap: 14px; color: var(--ink-3); transition: color 0.3s; font-size: 14.5px; }
.gs-num {
  width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0;
  border: 1.5px solid var(--line); color: var(--ink-3);
  display: flex; align-items: center; justify-content: center;
  font-size: 12.5px; font-weight: 800; transition: all 0.3s;
}
.g-step.active { color: var(--ink); font-weight: 600; }
.g-step.active .gs-num { border-color: rgba(124, 92, 240, 0.25); border-top-color: var(--brand); border-right-color: var(--brand); animation: spin 0.9s linear infinite; }
.g-step.done { color: var(--ink-2); }
.g-step.done .gs-num { background: #2ecc71; border-color: #2ecc71; color: #fff; font-size: 13px; }
.gen-elapsed { display: flex; align-items: center; gap: 12px; font-size: 13px; color: var(--ink-2); padding-top: 6px; border-top: 1px dashed var(--line); }
.spinner { width: 26px; height: 26px; border-radius: 50%; border: 3px solid rgba(124, 92, 240, 0.25); border-top-color: var(--brand); animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.gen-err { padding: 18px 22px; border-radius: 16px; background: rgba(240, 80, 90, 0.09); border: 1px solid rgba(240, 80, 90, 0.3); color: #c0392b; font-size: 14px; }

/* ---------- 模型状态 / 文档 / 关于 ---------- */
.status-card { display: flex; align-items: center; gap: 18px; padding: 26px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--card); box-shadow: var(--shadow-sm); }
.status-dot { width: 12px; height: 12px; border-radius: 50%; background: #2ecc71; box-shadow: 0 0 0 5px rgba(46, 204, 113, 0.15); }
.doc-body { line-height: 2; color: var(--ink); font-size: 14.5px; }
.doc-body h3 { margin: 26px 0 8px; }
.doc-body code { background: rgba(124, 92, 240, 0.1); border-radius: 6px; padding: 2px 7px; font-size: 13px; }
.doc-body pre { background: var(--card-solid); border: 1px solid var(--line); border-radius: 14px; padding: 16px; overflow: auto; font-size: 13px; line-height: 1.7; }

/* ---------- 弹窗 / 表单 ---------- */
.modal-mask { position: fixed; inset: 0; z-index: 100; background: rgba(25, 15, 55, 0.45); backdrop-filter: blur(6px); display: flex; align-items: center; justify-content: center; padding: 20px; }
.modal-mask[hidden] { display: none; }
.modal { position: relative; width: 400px; max-width: 96vw; max-height: 92vh; overflow: auto; background: var(--card-solid); border-radius: 24px; padding: 26px; box-shadow: var(--shadow); }
.modal-close { position: absolute; top: 14px; right: 16px; border: 0; background: transparent; font-size: 16px; color: var(--ink-2); cursor: pointer; }
.auth-tabs { display: flex; gap: 6px; background: rgba(124, 92, 240, 0.08); padding: 5px; border-radius: 14px; margin-bottom: 20px; }
.auth-tab { flex: 1; border: 0; background: transparent; padding: 9px; border-radius: 10px; font-size: 14.5px; font-weight: 600; color: var(--ink-2); cursor: pointer; }
.auth-tab.active { background: var(--card-solid); color: var(--ink); box-shadow: 0 2px 10px rgba(90, 60, 180, 0.12); }
.auth-form label { display: block; font-size: 13px; color: var(--ink-2); margin-bottom: 13px; }
.auth-form input {
  width: 100%; margin-top: 6px; padding: 11px 13px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--bg); color: var(--ink); font-size: 14px;
}
.form-err { color: #e05545; font-size: 13px; min-height: 18px; margin-bottom: 8px; }
.auth-hint { text-align: center; color: var(--ink-2); font-size: 12.5px; margin: 14px 0 0; }

/* ---------- 滑块验证码（照片拼图 · 极验风） ---------- */
.slider-captcha { margin-bottom: 14px; user-select: none; width: 100%; }
.slider-track {
  position: relative; width: 100%; border-radius: 14px; overflow: hidden;
  background: var(--bg); border: 1px solid var(--line);
  box-shadow: inset 0 2px 10px rgba(102, 68, 200, 0.08);
  transition: box-shadow 0.25s, border-color 0.25s;
}
.slider-captcha.passed .slider-track { border-color: rgba(46, 204, 113, 0.55); box-shadow: 0 0 0 3px rgba(46, 204, 113, 0.15); }
.slider-track canvas { display: block; width: 100%; height: auto; }
.slider-pill {
  position: absolute; top: 10px; left: 50%; transform: translateX(-50%); z-index: 3;
  padding: 6px 16px; border-radius: 999px; white-space: nowrap;
  background: rgba(15, 10, 35, 0.62); color: #fff; font-size: 12px; letter-spacing: 1px;
  backdrop-filter: blur(6px); box-shadow: 0 2px 10px -2px rgba(0, 0, 0, 0.35);
  transition: background 0.25s;
}
.slider-pill.ok { background: rgba(46, 204, 113, 0.85); }
.slider-refresh {
  position: absolute; top: 8px; right: 8px; z-index: 3;
  width: 28px; height: 28px; border-radius: 9px; border: 0; cursor: pointer;
  background: rgba(15, 10, 35, 0.45); backdrop-filter: blur(6px);
  color: #fff; display: flex; align-items: center; justify-content: center;
  transition: background 0.15s, transform 0.3s;
}
.slider-refresh:hover { background: rgba(15, 10, 35, 0.72); transform: rotate(180deg); }
.slider-refresh svg { width: 14px; height: 14px; }
.slider-piece { position: absolute; top: 0; left: 0; will-change: transform; filter: drop-shadow(0 5px 12px rgba(10, 5, 30, 0.55)); }
.slider-piece canvas { display: block; }
.slider-loading { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(255, 255, 255, 0.55); backdrop-filter: blur(2px); }
html.dark .slider-loading { background: rgba(20, 16, 40, 0.55); }
.spinner-sm { width: 22px; height: 22px; border-radius: 50%; border: 2.5px solid rgba(124, 92, 240, 0.2); border-top-color: var(--brand); animation: spin 0.8s linear infinite; }
.slider-bar {
  position: relative; width: 100%; height: 44px; margin-top: 10px; border-radius: 999px;
  background: #2b2547; overflow: hidden;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.35);
}
html:not(.dark) .slider-bar { background: #3a345c; }
.slider-fill { position: absolute; inset: 0 auto 0 0; width: 0; background: linear-gradient(90deg, rgba(124, 92, 240, 0.25), rgba(124, 92, 240, 0.45)); }
.slider-thumb {
  position: absolute; top: 4px; left: 4px; width: 36px; height: 36px; border-radius: 50%;
  background: #fff; color: #2b2547;
  display: flex; align-items: center; justify-content: center; cursor: grab; touch-action: none;
  box-shadow: 0 3px 10px -1px rgba(0, 0, 0, 0.4);
  transition: box-shadow 0.15s, transform 0.15s, background 0.25s, color 0.25s;
}
.slider-thumb:hover { transform: scale(1.06); }
.slider-thumb:active { cursor: grabbing; box-shadow: 0 5px 16px -1px rgba(0, 0, 0, 0.5); transform: scale(1.04); }
.slider-thumb svg { width: 18px; height: 18px; }
.slider-thumb .thumb-ok { display: none; }
.slider-tip { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 12.5px; color: rgba(255, 255, 255, 0.72); pointer-events: none; letter-spacing: 2px; transition: color 0.2s; }
.slider-captcha.passed .slider-fill { background: linear-gradient(90deg, rgba(46, 204, 113, 0.3), rgba(46, 204, 113, 0.5)); }
.slider-captcha.passed .slider-thumb { background: #2ecc71; color: #fff; cursor: default; }
.slider-captcha.passed .slider-thumb .thumb-arr { display: none; }
.slider-captcha.passed .slider-thumb .thumb-ok { display: block; }
.slider-captcha.shake .slider-bar { animation: shake 0.4s; }
@keyframes shake { 0%, 100% { transform: translateX(0); } 20% { transform: translateX(-6px); } 40% { transform: translateX(6px); } 60% { transform: translateX(-4px); } 80% { transform: translateX(4px); } }

/* ---------- 设置 ---------- */
.user-card { display: flex; align-items: center; gap: 16px; margin-bottom: 22px; }
.user-card img { width: 56px; height: 56px; border-radius: 18px; object-fit: cover; }
.user-card b { font-size: 17px; }
.user-card .credits { font-size: 13px; color: var(--ink-2); }
.credits b { color: var(--brand); font-size: 16px; }

/* ---------- 关于页（一行一句松排版） ---------- */
.about-page { padding: 30px 34px; }
.about-name { display: flex; align-items: center; gap: 12px; font-size: 20px; font-weight: 900; margin: 0 0 18px; letter-spacing: 0.5px; }
.about-name img { width: 34px; height: 34px; border-radius: 10px; }
.about-line { margin: 15px 0; font-size: 14.5px; line-height: 1.9; }
.about-line a { color: var(--brand); font-weight: 700; }
.about-line.warn { color: #d9822b; font-weight: 600; }
.about-line.muted { color: var(--ink-3); font-size: 13px; }

/* ---------- 我的作品（工作台紧凑网格：一排8张、最多2排） ---------- */
.works-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 8px; }
.w-thumb {
  position: relative; aspect-ratio: 1; margin: 0; border-radius: 10px; overflow: hidden;
  border: 1px solid var(--line); cursor: pointer; background: rgba(124, 92, 240, 0.08);
}
.w-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.w-cap {
  position: absolute; inset: auto 0 0 0; padding: 14px 5px 4px; font-size: 10px; color: #fff;
  background: linear-gradient(transparent, rgba(18, 10, 48, 0.78)); opacity: 0; transition: opacity 0.18s;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; pointer-events: none;
}
.w-thumb:hover .w-cap { opacity: 1; }
.works-more {
  aspect-ratio: 1; border-radius: 10px; border: 1.5px dashed var(--line); background: transparent;
  color: var(--ink-2); font-size: 11.5px; cursor: pointer; padding: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  transition: all 0.18s;
}
.works-more .dot { font-size: 18px; line-height: 1; }
.works-more .cnt { font-size: 10px; color: var(--ink-3); }
.works-more:hover { border-color: var(--brand); color: var(--brand); transform: translateY(-2px); }
@media (max-width: 980px) { .works-grid { grid-template-columns: repeat(6, 1fr); } }
@media (max-width: 640px) { .works-grid { grid-template-columns: repeat(4, 1fr); } }

/* ---------- 资产 / 日志 / 文档 ---------- */
.warn-banner {
  padding: 13px 18px; border-radius: 14px; margin-bottom: 20px; font-size: 13.5px; line-height: 1.8;
  background: linear-gradient(92deg, rgba(240, 150, 60, 0.12), rgba(235, 80, 90, 0.08));
  border: 1px solid rgba(240, 150, 60, 0.4); color: inherit;
}
.key-banner {
  margin-top: 12px; padding: 12px 15px; border-radius: 12px; font-size: 13px; line-height: 1.8;
  background: rgba(124, 92, 240, 0.08); border: 1px dashed rgba(124, 92, 240, 0.4);
}
.key-banner a { color: var(--brand); font-weight: 700; }
.asset-card { position: relative; }
.expire-badge {
  position: absolute; top: 10px; right: 10px; z-index: 2;
  padding: 3px 10px; border-radius: 999px; font-size: 11px; font-weight: 700; color: #fff;
  background: rgba(30, 20, 60, 0.55); backdrop-filter: blur(6px);
}
.expire-badge.urgent { background: #e74c3c; box-shadow: 0 2px 10px -1px rgba(231, 76, 60, 0.6); }
.asset-actions { display: flex; justify-content: space-between; align-items: center; font-size: 11.5px; color: rgba(255, 255, 255, 0.85); }
.asset-actions a { color: #fff; font-weight: 700; border-bottom: 1px solid rgba(255, 255, 255, 0.5); }
.log-panel { padding: 14px; }
.log-list { display: flex; flex-direction: column; gap: 10px; }
.log-item {
  display: flex; gap: 14px; align-items: center; padding: 12px 14px; border-radius: 16px;
  background: var(--card); border: 1px solid var(--line);
}
.log-item.err { border-color: rgba(240, 80, 90, 0.3); background: rgba(240, 80, 90, 0.04); }
.log-thumb { width: 52px; height: 52px; border-radius: 12px; object-fit: cover; flex-shrink: 0; border: 1px solid var(--line); }
.log-thumb-empty { display: flex; align-items: center; justify-content: center; color: var(--ink-3); background: var(--bg); font-size: 16px; }
.log-main { flex: 1; min-width: 0; }
.log-top { display: flex; gap: 10px; align-items: baseline; margin-bottom: 3px; }
.log-model { font-size: 12px; font-weight: 700; color: var(--brand); }
.log-time { font-size: 11.5px; color: var(--ink-3); }
.log-prompt { font-size: 13px; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.log-error { font-size: 12px; color: #e05545; margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.log-side { text-align: right; flex-shrink: 0; }
.log-status { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 11px; font-weight: 700; }
.log-status.ok { color: #2ecc71; background: rgba(46, 204, 113, 0.12); }
.log-item.err .log-status { color: #e05545; background: rgba(240, 80, 90, 0.1); }
.copy-prompt {
  border: 1px solid var(--line); background: transparent; color: var(--ink-3);
  border-radius: 8px; font-size: 11px; padding: 2px 9px; cursor: pointer;
  transition: all 0.15s; flex-shrink: 0; line-height: 1.5;
}
.copy-prompt:hover { color: var(--ink); border-color: var(--ink-3); }
.copy-prompt.copied { color: #1a9c6b; border-color: #1a9c6b; }
.del-log {
  border: 1px solid var(--line); background: transparent; color: var(--ink-3);
  border-radius: 8px; font-size: 11px; padding: 2px 9px; cursor: pointer;
  transition: all 0.15s; flex-shrink: 0; line-height: 1.5;
}
.del-log:hover { color: #e05545; border-color: rgba(240, 80, 90, 0.5); }
.log-batch {
  display: flex; align-items: center; gap: 14px;
  padding: 2px 4px 12px;
}
.log-batch .batch-all { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ink-2); cursor: pointer; user-select: none; }
.batch-info { font-size: 12px; color: var(--ink-3); }
.log-check { width: 16px; height: 16px; accent-color: var(--brand); flex-shrink: 0; cursor: pointer; }
.log-pager {
  display: flex; align-items: center; justify-content: center; gap: 14px;
  padding: 14px 0 4px; margin-top: 8px; border-top: 1px dashed var(--line);
}
.pager-info { font-size: 12px; color: var(--ink-3); }
.btn.sm { padding: 6px 14px; font-size: 12px; }
.log-meta { display: block; font-size: 11px; color: var(--ink-3); margin-top: 4px; }
.doc-kicker { font-size: 11.5px; letter-spacing: 2.5px; color: var(--brand); font-weight: 800; margin: 26px 0 2px; }
.doc-body .doc-kicker:first-child { margin-top: 0; }
.doc-steps { margin: 10px 0 12px; padding-left: 20px; }
.doc-steps li { margin: 7px 0; line-height: 1.9; }
.doc-steps-4 li { margin: 12px 0; font-size: 14.5px; }
.result-label { font-size: 12px; color: var(--ink-3); letter-spacing: 1px; margin-bottom: 12px; padding-bottom: 10px; border-bottom: 1px dashed var(--line); }
.doc-lines { display: flex; flex-direction: column; gap: 10px; margin: 12px 0 16px; }
.doc-line {
  display: flex; align-items: center; gap: 12px; padding: 13px 16px; border-radius: 14px;
  border: 1.5px solid var(--line); background: var(--card); font-size: 14px; flex-wrap: wrap;
}
.doc-line b { font-family: ui-monospace, Consolas, monospace; font-size: 13px; }
.doc-line span { font-size: 12.5px; color: var(--ink-2); flex: 1; min-width: 140px; }
.doc-line a { color: var(--brand); font-weight: 700; font-size: 13px; white-space: nowrap; }
.doc-note { padding: 11px 15px; border-radius: 12px; font-size: 12.5px; color: var(--ink-2); background: rgba(124, 92, 240, 0.07); border-left: 3px solid var(--brand); margin: 8px 0 4px; line-height: 1.8; }
.doc-faq dt { font-weight: 700; margin-top: 14px; }
.doc-faq dd { margin: 4px 0 0 0; color: var(--ink-2); font-size: 13.5px; line-height: 1.8; }

/* ---------- 接口线路选择 ---------- */
.base-select { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.base-opt {
  padding: 12px 14px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--card);
  color: var(--ink); font-size: 13.5px; font-weight: 700; cursor: pointer; text-align: left;
  display: flex; flex-direction: column; gap: 3px; transition: all 0.18s;
}
.base-opt span { font-size: 11px; font-weight: 500; color: var(--ink-3); }
.base-opt:hover { border-color: rgba(124, 92, 240, 0.4); }
.base-opt.on { border-color: var(--brand); background: rgba(124, 92, 240, 0.08); box-shadow: 0 4px 14px -6px rgba(124, 92, 240, 0.4); }
.base-opt.on span { color: var(--brand); }

/* ---------- 密钥绑定输入行 ---------- */
.redeem-row { display: flex; gap: 10px; }
.redeem-row input {
  flex: 1; padding: 11px 14px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--card-solid); color: var(--ink); font-size: 14px; letter-spacing: 0.5px;
}
.redeem-tip { font-size: 12.5px; color: var(--ink-3); margin-top: 10px; line-height: 1.8; }
.redeem-tip a { color: var(--brand); }

/* ---------- 设置页（卡片式） ---------- */
.settings-page { max-width: 680px; }
.s-card + .s-card { margin-top: 16px; }
.s-title { font-size: 16px; font-weight: 800; margin-bottom: 6px; letter-spacing: 0.3px; }
.s-desc { font-size: 12.5px; color: var(--ink-2); margin: 0 0 14px; line-height: 1.8; }
.s-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; margin-bottom: 6px; }
.s-grid .field { grid-column: 1 / -1; }
.s-grid .s-btn-cell { grid-column: 1; align-self: end; margin-bottom: 0; }
.s-grid .s-btn-cell button { padding: 12px 20px; }
.current-key {
  padding: 11px 14px; border-radius: 12px; font-size: 13.5px; color: var(--ink-3);
  background: var(--bg); border: 1px dashed var(--line);
}
.current-key.bound { color: var(--ink); border-style: solid; }
.base-key-status { margin-top: 8px; font-size: 11.5px; color: var(--ink-3); line-height: 1.7; }
.base-key-status .mono { font-size: 11px; }
.base-key-status .dot-sep { margin: 0 2px; color: var(--line); }
.mono { font-family: ui-monospace, Consolas, monospace; font-size: 13px; letter-spacing: 0.3px; }
.key-chip {
  display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 700;
  color: var(--ink-2); background: rgba(124, 92, 240, 0.1);
}
.key-chip.ok { color: #2ecc71; background: rgba(46, 204, 113, 0.13); }
.btn.danger {
  background: rgba(235, 80, 90, 0.08); color: #d64545; padding: 11px 22px;
  border: 1px solid rgba(235, 80, 90, 0.35); font-weight: 600;
}
.btn.danger:hover { background: #e05545; color: #fff; }

/* ---------- 图片放大查看（lightbox） ---------- */
#lightbox {
  position: fixed; inset: 0; z-index: 300; display: none;
  align-items: center; justify-content: center;
  background: rgba(15, 10, 35, 0.85); backdrop-filter: blur(10px);
  cursor: zoom-out; animation: lb-in 0.18s ease;
}
#lightbox.open { display: flex; }
@keyframes lb-in { from { opacity: 0; } to { opacity: 1; } }
#lightbox img {
  max-width: 92vw; max-height: 86vh; border-radius: 14px;
  box-shadow: 0 30px 90px -20px rgba(0, 0, 0, 0.7); cursor: default;
  animation: lb-zoom 0.2s ease;
}
@keyframes lb-zoom { from { transform: scale(0.92); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.lb-close, .lb-download {
  position: absolute; z-index: 2; border: 0; cursor: pointer;
  width: 42px; height: 42px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255, 255, 255, 0.14); color: #fff; font-size: 16px;
  backdrop-filter: blur(6px); transition: background 0.15s, transform 0.15s;
}
.lb-close { top: 22px; right: 26px; }
.lb-download { top: 22px; right: 78px; width: auto; padding: 0 18px; border-radius: 999px; font-size: 13.5px; text-decoration: none; }
.lb-close:hover, .lb-download:hover { background: rgba(255, 255, 255, 0.3); transform: scale(1.05); }
img.zoomable { cursor: zoom-in; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 34px; transform: translateX(-50%); z-index: 200;
  background: var(--ink); color: #fff; padding: 11px 22px; border-radius: 999px; font-size: 14px;
  box-shadow: var(--shadow);
}
html.dark .toast { background: var(--brand); }

/* ---------- 响应式 ---------- */
@media (max-width: 1080px) {
  .gallery-grid { grid-template-columns: repeat(3, 1fr); }
  .bento-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr; }
  .showcase-card { justify-self: start; max-width: 420px; }
  .studio { grid-template-columns: 1fr; }
  .hero h1 { font-size: 44px; }
}
@media (max-width: 640px) {
  .sidebar { width: 64px; }
  .main { margin-left: 64px; }
  .page { padding: 24px 18px 60px; }
  .side-nav a, .side-btn { width: 50px; font-size: 10px; }
  .side-nav a.active::before { left: -7px; }
  .hero h1 { font-size: 34px; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .bento-grid { grid-template-columns: 1fr; }
  .stat { padding: 4px 20px; }
  .stat b { font-size: 22px; }
}
