/* createCharacter.html — candy.ai characters_v2 同款单页向导
   配色沿用站点皮肤：底 #131313、卡片 #1e1e1e、主色 #E75275 */

.cc-main { max-width: 960px; margin: 0 auto; }

/* ── 通用步骤骨架 ─────────────────────────────── */
.cc-step { animation: ccFade .25s ease; padding-bottom: 96px; }
@media (max-width: 1023px) {
  .cc-step { padding-bottom: 150px; } /* 移动端 fab 更靠下且高，多留空间 */
}
@keyframes ccFade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.cc-step-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 6px;
}
.cc-back {
  width: 38px; height: 38px;
  border-radius: 10px;
  background: #1e1e1e;
  border: 1px solid #363636;
  color: #fff;
  font-size: 18px;
  cursor: pointer;
  flex: 0 0 38px;
  line-height: 1;
}
.cc-back:hover { background: #303030; }
.cc-step-title {
  color: #fff;
  font-size: 24px;
  font-weight: 700;
}
.cc-step-sub { color: #a1a1a1; font-size: 13px; margin: 4px 0 20px 2px; }

/* 进度点（8 段） */
.cc-dots {
  display: flex;
  gap: 6px;
  margin: 0 0 22px;
}
.cc-dots i {
  flex: 1;
  height: 4px;
  border-radius: 2px;
  background: #2c2c2c;
}
.cc-dots i.on { background: #E75275; }

/* ── 入口步 ─────────────────────────────────── */
.cc-entry-title {
  color: #fff;
  font-size: 34px;
  font-weight: 800;
  text-align: center;
  margin: 26px 0 6px;
}
.cc-entry-title .pink { color: #E75275; }
.cc-entry-sub {
  color: #a1a1a1;
  text-align: center;
  font-size: 14px;
  margin-bottom: 30px;
}
.cc-cat-tabs {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 18px;
}
.cc-cat-tab {
  padding: 8px 22px;
  border-radius: 999px;
  border: 1px solid #363636;
  background: #1a1a1a;
  color: #a1a1a1;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.cc-cat-tab.on { border-color: #E75275; color: #fff; background: rgba(231, 82, 117, .12); }

.cc-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
  max-width: 560px;
  margin: 0 auto;
}
.cc-card {
  position: relative;
  border-radius: 14px;
  border: 2px solid #2c2c2c;
  background: #1a1a1a;
  overflow: hidden;
  cursor: pointer;
  padding: 0 0 16px;
  text-align: center;
}
.cc-card-imgwrap { position: relative; }
.cc-card-imgwrap img { width: 100%; height: 210px; object-fit: cover; display: block; background: #262626; }
.cc-card.on { border-color: #E75275; }
.cc-card-label { color: #fff; font-weight: 700; font-size: 16px; margin-top: 12px; }
.cc-card-check {
  position: absolute; top: 10px; right: 10px;
  width: 26px; height: 26px;
  border-radius: 50%;
  background: #E75275;
  color: #fff;
  font-size: 15px;
  line-height: 26px;
  display: none;
}
.cc-card.on .cc-card-check { display: block; }

/* ── 选项网格 ───────────────────────────────── */
.cc-options {
  display: grid;
  grid-template-columns: repeat(var(--cols, 5), minmax(0, 1fr));
  gap: 14px;
  max-width: 960px;
  margin: 0 auto;
}
.cc-opt {
  position: relative;
  border-radius: 12px;
  border: 2px solid #2c2c2c;
  background: #1a1a1a;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 0;
  padding: 0 0 12px;
  text-align: center;
  overflow: hidden;
}
.cc-opt:hover { border-color: #4a4a4a; transform: translateY(-1px); }
.cc-opt-img, .cc-opt-fallback {
  width: 100%;
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  background: linear-gradient(135deg, #241019, #131313);
  margin-bottom: 10px;
}
.cc-opt-img { object-fit: cover; }
.cc-opt-label { color: #e5e5e5; font-weight: 600; font-size: 14px; padding: 0 8px; }
.cc-opt.on { border-color: #E75275; background: rgba(231, 82, 117, .1); }
.cc-opt.on .cc-opt-label { color: #fff; }
.cc-opt-check {
  position: absolute; top: 8px; right: 8px;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: #E75275;
  color: #fff;
  font-size: 13px;
  line-height: 22px;
  display: none;
  z-index: 2;
}
.cc-opt.on .cc-opt-check { display: block; }

/* 发色色块 */
.cc-options-swatch { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
.cc-options-swatch .cc-opt { padding: 18px 8px 12px; }
.cc-swatch {
  width: 64px; height: 64px;
  border-radius: 50%;
  border: 3px solid #3a3a3a;
  margin-bottom: 12px;
  display: block;
}
.cc-swatch.grad { background-size: 140% 140%; }
.cc-opt.on .cc-swatch { border-color: #E75275; }

/* ── 悬浮前进钮（candy 同款：内容列底部居中的粉色胶囊 NEXT →） ────── */
.cc-next-fab {
  position: fixed;
  bottom: 30px;
  /* 内容区（100px 侧栏起）的水平中心 */
  left: calc(50vw + 50px);
  transform: translateX(-50%);
  min-width: 300px;
  height: 52px;
  border-radius: 26px;
  border: none;
  background: linear-gradient(135deg, #f97187, #e75275);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .14em;
  cursor: pointer;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .45);
  transition: filter .15s ease, opacity .15s ease;
}
.cc-next-fab:hover:not(:disabled) { filter: brightness(1.07); }
.cc-next-fab:disabled { opacity: .45; cursor: not-allowed; }
@media (max-width: 1023px) {
  .cc-next-fab { bottom: 86px; min-width: calc(100vw - 60px); }
}

/* 分屏内的段落标题（Hair Color / Eye Color / Breast Size） */
.cc-section-title {
  color: #fff;
  font-size: 19px;
  font-weight: 700;
  margin: 30px 0 14px;
}

/* ── 步骤底部按钮 ────────────────────────────── */
.cc-actions {
  display: flex;
  gap: 12px;
  margin-top: 24px;
}
.cc-btn-next, .cc-btn-start {
  flex: 1;
  max-width: 420px;
  height: 50px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, #E75275, #d63d60);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
}
.cc-btn-next:disabled, .cc-btn-start:disabled { opacity: .45; cursor: not-allowed; }
.cc-btn-next:hover:not(:disabled), .cc-btn-start:hover:not(:disabled) { filter: brightness(1.08); }

/* ── 最终表单 ───────────────────────────────── */
.cc-form { max-width: 560px; }
.cc-field { margin-bottom: 16px; }
.cc-field-label {
  color: #a1a1a1;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 8px;
  display: flex;
  justify-content: space-between;
}
.cc-name-row { display: flex; gap: 10px; }
.cc-input {
  flex: 1;
  height: 48px;
  border-radius: 10px;
  border: 1px solid #363636;
  background: #1e1e1e;
  color: #fff;
  padding: 0 14px;
  font-size: 15px;
  outline: none;
}
.cc-input:focus { border-color: #E75275; }
.cc-refresh {
  width: 48px; height: 48px;
  border-radius: 10px;
  border: 1px solid #363636;
  background: #1e1e1e;
  color: #E75275;
  font-size: 20px;
  cursor: pointer;
}
.cc-refresh:hover { background: #303030; }
.cc-count { color: #6b6b6b; font-size: 12px; font-weight: 400; }

.cc-age-strip {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 6px 4px 10px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  position: relative;
}
.cc-age-strip::-webkit-scrollbar { display: none; }
.cc-age-chip {
  flex: 0 0 auto;
  min-width: 52px;
  height: 44px;
  border-radius: 12px;
  border: 2px solid #2c2c2c;
  background: #1a1a1a;
  color: #e5e5e5;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
}
.cc-age-chip:hover { border-color: #4a4a4a; color: #fff; }
.cc-age-chip.on { border-color: #E75275; background: rgba(231, 82, 117, .12); color: #fff; }

/* 弹窗触发行 */
.cc-picker {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 48px;
  border-radius: 10px;
  border: 1px solid #363636;
  background: #1e1e1e;
  color: #fff;
  padding: 10px 14px;
  font-size: 15px;
  cursor: pointer;
  text-align: left;
}
.cc-picker:hover { border-color: #4a4a4a; }
.cc-picker .val { color: #a1a1a1; }
.cc-picker .val.set { color: #fff; font-weight: 600; }
.cc-picker .edit { color: #E75275; font-size: 14px; flex: 0 0 auto; }

/* ── 最终步大 CTA（candy 同款：渐变 + 扫光 + 呼吸发光） ──────── */
.cc-cta-big {
  position: relative;
  overflow: hidden;
  width: 100%;
  height: 58px;
  margin-top: 26px;
  border: none;
  border-radius: 29px;
  background: linear-gradient(135deg, #f97187, #E75275 55%, #c9345a);
  color: #fff;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: .04em;
  cursor: pointer;
  box-shadow: 0 10px 32px rgba(231, 82, 117, .5);
  animation: ccGlow 2.4s ease-in-out infinite;
  transition: filter .15s ease;
}
.cc-cta-big:hover:not(:disabled) { filter: brightness(1.08); }
.cc-cta-big:disabled { opacity: .45; cursor: not-allowed; animation: none; }
.cc-cta-big span { position: relative; z-index: 2; }
/* 扫光带 */
.cc-cta-big::after {
  content: '';
  position: absolute;
  top: -20%;
  left: -60%;
  width: 40%;
  height: 140%;
  background: linear-gradient(105deg, rgba(255,255,255,0) 0%, rgba(255,255,255,.45) 50%, rgba(255,255,255,0) 100%);
  transform: skewX(-20deg);
  animation: ccSweep 2.8s ease-in-out infinite;
}
@keyframes ccSweep {
  0%   { left: -60%; }
  55%  { left: 130%; }
  100% { left: 130%; }
}
@keyframes ccGlow {
  0%, 100% { box-shadow: 0 10px 32px rgba(231, 82, 117, .45); }
  50%      { box-shadow: 0 14px 44px rgba(231, 82, 117, .75); }
}
.cc-note { color: #6b6b6b; font-size: 12px; text-align: center; margin-top: 12px; }

/* ── 弹窗 ──────────────────────────────────── */
.cc-modal { position: fixed; inset: 0; z-index: 200; }
.cc-modal-mask {
  position: absolute; inset: 0;
  background: rgba(0, 0, 0, .6);
  backdrop-filter: blur(3px);
}
.cc-modal-box {
  position: relative;
  margin: 6vh auto;
  width: min(560px, calc(100vw - 32px));
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  background: #1a1a1a;
  border: 1px solid #363636;
  border-radius: 16px;
  overflow: hidden;
}
.cc-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid #2c2c2c;
}
.cc-modal-back {
  background: none; border: none;
  color: #a1a1a1; font-size: 14px; cursor: pointer;
}
.cc-modal-back:hover { color: #fff; }
.cc-modal-title { color: #fff; font-weight: 700; font-size: 16px; }
.cc-modal-save {
  background: #E75275; border: none;
  color: #fff; font-size: 13px; font-weight: 600;
  padding: 7px 16px; border-radius: 8px; cursor: pointer;
}
.cc-modal-save:hover { filter: brightness(1.08); }
.cc-modal-search { padding: 12px 16px 0; }
.cc-modal-search input {
  width: 100%;
  height: 40px;
  border-radius: 10px;
  border: 1px solid #363636;
  background: #1e1e1e;
  color: #fff;
  padding: 0 12px;
  font-size: 14px;
  outline: none;
}
.cc-modal-search input:focus { border-color: #E75275; }
.cc-modal-hint { color: #a1a1a1; font-size: 12px; padding: 8px 18px 0; }
.cc-modal-body {
  overflow-y: auto;
  padding: 14px 16px 18px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
  scrollbar-width: thin;
  scrollbar-color: #3a3a3a transparent;
}
.cc-modal-body::-webkit-scrollbar { width: 6px; }
.cc-modal-body::-webkit-scrollbar-track { background: transparent; }
.cc-modal-body::-webkit-scrollbar-thumb { background: #3a3a3a; border-radius: 3px; }
.cc-modal-body.cc-voice-list { grid-template-columns: 1fr; }

.cc-mopt {
  position: relative;
  border-radius: 10px;
  border: 2px solid #2c2c2c;
  background: #1e1e1e;
  color: #e5e5e5;
  padding: 0 0 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  word-break: break-word;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.cc-mopt:hover { border-color: #4a4a4a; }
.cc-mopt.on { border-color: #E75275; background: rgba(231, 82, 117, .12); color: #fff; }
.cc-mopt .check { display: none; position: absolute; top: 6px; right: 8px; color: #E75275; font-weight: 700; }
.cc-mopt.on .check { display: block; }
/* 文本选项（occupation/kinks）回到内联 chip 形态 */
.cc-modal-body.cc-chip-list { display: flex; flex-wrap: wrap; gap: 10px; }
.cc-modal-body.cc-chip-list .cc-mopt {
  flex: 0 0 auto;
  padding: 12px 16px;
  flex-direction: row;
  gap: 6px;
}
.cc-modal-body.cc-chip-list .cc-mopt .cc-mopt-label { margin: 0; }
/* 行式选项（personality/relation：小图 + 文字并排，candy 同款） */
.cc-modal-body.cc-row-list {
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
@media (max-width: 520px) {
  .cc-modal-body.cc-row-list { grid-template-columns: 1fr; }
}
.cc-mopt.cc-row {
  flex-direction: row;
  align-items: center;
  text-align: left;
  padding: 10px 14px 10px 10px;
  gap: 12px;
  border: 1px solid #2a2a2a;
  border-radius: 14px;
  background: #202020;
}
.cc-row-img {
  width: 52px;
  height: 52px;
  border-radius: 10px;
  object-fit: cover;
  flex: 0 0 52px;
  background: linear-gradient(135deg, #241019, #131313);
}
span.cc-row-img.fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
}
.cc-row-label { flex: 1 1 auto; padding: 0; }

/* Voice 行：名称 + 试听 */
.cc-voice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.cc-voice .vmain { display: flex; flex-direction: column; gap: 2px; }
.cc-voice .vname { color: #fff; font-weight: 600; font-size: 14px; }
.cc-voice .vtag { color: #a1a1a1; font-size: 12px; font-weight: 400; }
.cc-play {
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 1px solid #4a4a4a;
  background: #262626;
  color: #E75275;
  font-size: 13px;
  cursor: pointer;
  flex: 0 0 36px;
}
.cc-play:hover { background: #303030; }
.cc-play.playing { border-color: #E75275; }

/* ── 生成完成视图（移动端提交后的内嵌结果） ───────── */
.cc-done {
  text-align: center;
  padding: 30px 10px;
}
.cc-done img {
  width: min(320px, 80vw);
  border-radius: 14px;
  display: block;
  margin: 0 auto 18px;
}
.cc-done h2 { color: #fff; font-size: 22px; font-weight: 800; margin-bottom: 8px; }
.cc-done p { color: #a1a1a1; font-size: 14px; margin-bottom: 22px; }

/* ── 移动端 ────────────────────────────────── */
@media (max-width: 1023px) {
  .cc-entry-title { font-size: 26px; }
  .cc-step-title { font-size: 20px; }
  .cc-options { grid-template-columns: repeat(2, 1fr); }
  .cc-modal-box { margin: 0; width: 100vw; max-height: 100vh; height: 100%; border-radius: 0; }
}

/* ── 结果页（candy 同款：左大图 + 右属性卡网格）────────────────── */
.cc-result {
  display: grid;
  grid-template-columns: minmax(300px, 460px) minmax(0, 1fr);
  gap: 34px;
  align-items: start;
  max-width: 1080px;
  margin: 0 auto;
}
@media (max-width: 900px) {
  .cc-result { grid-template-columns: 1fr; }
}
.cc-result-left {
  background: #171717;
  border: 1px solid #2c2c2c;
  border-radius: 18px;
  overflow: hidden;
  min-height: 420px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.cc-result-photo { width: 100%; display: block; }

/* 圆形百分比进度环 */
.cc-progress-wrap { position: relative; width: 150px; height: 150px; }
.cc-ring { width: 150px; height: 150px; transform: rotate(-90deg); }
.cc-ring-bg, .cc-ring-fg { fill: none; stroke-width: 8; }
.cc-ring-bg { stroke: #2c2c2c; }
.cc-ring-fg {
  stroke: #E75275;
  stroke-linecap: round;
  stroke-dasharray: 339.3;
  stroke-dashoffset: 339.3;
  transition: stroke-dashoffset .45s ease;
  filter: drop-shadow(0 0 6px rgba(231, 82, 117, .6));
}
.cc-ring-num {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 26px; font-weight: 800;
}
.cc-result-gen-text { color: #fff; font-weight: 600; font-size: 15px; margin-top: 20px; }
.cc-result-gen-sub { color: #8a8a8a; font-size: 12px; margin-top: 6px; }

/* 失败占位 */
.cc-result-placeholder { text-align: center; padding: 30px; }
.cc-result-placeholder-icon { font-size: 44px; }
.cc-result-placeholder-t { color: #fff; font-weight: 700; font-size: 16px; margin: 10px 0 6px; }
.cc-result-placeholder-s { color: #8a8a8a; font-size: 13px; }

/* 右列 */
.cc-result-right { min-width: 0; }
.cc-result-name { color: #fff; font-size: 30px; font-weight: 800; margin: 0 0 8px; }
.cc-result-tagline { color: #E75275; font-size: 14px; font-weight: 600; margin-bottom: 18px; }
.cc-tabs {
  display: inline-flex;
  gap: 10px;
  margin-bottom: 16px;
  background: #1a1a1a;
  border-radius: 24px;
  padding: 4px;
}
.cc-tab {
  padding: 9px 26px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 600;
  color: #8a8a8a;
}
.cc-tab.on { background: #2a1420; color: #E75275; border: 1px solid rgba(231, 82, 117, .5); }

/* 属性卡网格（2 列，带主题背景图） */
.cc-attr-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.cc-attr-card {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  min-height: 76px;
  background: #1c1c1c;
  border: 1px solid #2c2c2c;
  display: flex;
  align-items: flex-end;
}
.cc-attr-bg {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: .38;
}
.cc-attr-shade {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(19,19,19,.15), rgba(19,19,19,.82));
}
.cc-attr-txt { position: relative; z-index: 2; padding: 10px 14px; }
.cc-attr-k { color: #b9b9b9; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.cc-attr-v { color: #fff; font-size: 16px; font-weight: 700; margin-top: 3px; }

/* ── Final 表单 picker 行距（candy 同款松紧）────────────────── */
.cc-picker { margin-bottom: 12px; }
.cc-picker:last-of-type { margin-bottom: 20px; }
.cc-picker:hover { border-color: #4a4a4a; background: #232323; }

/* ── 结果页动作区：重生成（次样式）+ 保存（主 CTA 缩小版）──────── */
.cc-action-row {
  display: grid;
  grid-template-columns: 44% 1fr;
  gap: 12px;
  margin-top: 22px;
}
@media (max-width: 900px) {
  .cc-action-row { grid-template-columns: 1fr; }
}
.cc-btn-ghost {
  height: 54px;
  border-radius: 27px;
  border: 1px solid #4a4a4a;
  background: #202020;
  color: #e5e5e5;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}
.cc-btn-ghost:hover:not(:disabled) { border-color: #E75275; color: #fff; }
.cc-btn-ghost:disabled { opacity: .45; cursor: not-allowed; }
.cc-cta-sm { height: 54px; margin-top: 0; font-size: 15px; border-radius: 27px; animation: none; }
.cc-balance { color: #8a8a8a; font-size: 12px; text-align: center; margin-top: 10px; }
.cc-balance b { color: #ffd45e; }
