/* ============================================================
   AI 婚纱照风格站 — 共用样式
   暗调底 + 暖金点缀，让婚纱照自己发光
   ============================================================ */

:root {
  --bg:          #0c0b0a;
  --bg-soft:     #141210;
  --surface:     #1b1815;
  --surface-2:   #242019;
  --line:        #322c25;
  --gold:        #c9a961;
  --gold-bright: #e6cd8f;
  --gold-dim:    #8a7548;
  --text:        #f4efe6;
  --text-soft:   #b5aa9b;
  --text-mute:   #7c7367;
  --danger:      #d96b5a;
  --ok:          #7fb069;

  --radius:   14px;
  --radius-s: 9px;
  --shadow:   0 18px 50px rgba(0, 0, 0, .55);
  --serif: 'Noto Serif SC', 'Source Han Serif SC', 'Songti SC', 'SimSun', serif;
  --sans:  'PingFang SC', 'Microsoft YaHei', -apple-system, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--gold); text-decoration: none; }
a:hover { color: var(--gold-bright); }

h1, h2, h3 { font-family: var(--serif); font-weight: 600; letter-spacing: .02em; margin: 0; }

/* ── 顶栏 ── */
.topbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 32px;
  background: rgba(12, 11, 10, .82);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.topbar .brand { font-family: var(--serif); font-size: 19px; letter-spacing: .16em; }
.topbar .brand em { color: var(--gold); font-style: normal; }
.topbar nav { display: flex; gap: 26px; align-items: center; font-size: 14px; }
.topbar nav a { color: var(--text-soft); }
.topbar nav a:hover, .topbar nav a.active { color: var(--gold); }

/* ── 首屏 ── */
.hero {
  position: relative;
  min-height: 88vh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 90px 24px;
  overflow: hidden;
}
.hero::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse at 50% 38%, rgba(201, 169, 97, .16), transparent 62%);
  pointer-events: none;
}
.hero-eyebrow {
  font-size: 12px; letter-spacing: .42em; color: var(--gold-dim);
  text-transform: uppercase; margin-bottom: 26px;
}
.hero h1 {
  font-size: clamp(34px, 6.4vw, 74px);
  line-height: 1.16; margin-bottom: 22px;
  background: linear-gradient(180deg, #fffdf8 25%, var(--gold) 108%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero p.sub {
  max-width: 620px; color: var(--text-soft); font-size: 16.5px; margin: 0 0 40px;
}
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; justify-content: center; position: relative; }

/* ── 按钮 ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 30px; border-radius: 999px; border: 1px solid transparent;
  font-family: var(--sans); font-size: 14.5px; font-weight: 500;
  cursor: pointer; transition: transform .16s, box-shadow .16s, background .16s, color .16s;
  white-space: nowrap;
}
.btn-primary {
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-bright) 100%);
  color: #1a1509;
  box-shadow: 0 10px 30px rgba(201, 169, 97, .3);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 16px 40px rgba(201, 169, 97, .42); color: #1a1509; }
.btn-ghost { background: transparent; border-color: var(--gold-dim); color: var(--gold); }
.btn-ghost:hover { background: rgba(201, 169, 97, .12); color: var(--gold-bright); }
.btn-quiet { background: var(--surface-2); border-color: var(--line); color: var(--text-soft); }
.btn-quiet:hover { background: #2e2820; color: var(--text); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.btn-sm { padding: 8px 16px; font-size: 13px; }

/* ── 区块 ── */
.section { padding: 88px 32px; max-width: 1320px; margin: 0 auto; }
.section-head { text-align: center; margin-bottom: 54px; }
.section-head .eyebrow { font-size: 12px; letter-spacing: .34em; color: var(--gold-dim); margin-bottom: 14px; }
.section-head h2 { font-size: clamp(25px, 3.4vw, 38px); margin-bottom: 14px; }
.section-head p { color: var(--text-mute); max-width: 560px; margin: 0 auto; }

/* ── 九宫格总览 ── */
.menu-shot {
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
  border: 1px solid var(--line); max-width: 940px; margin: 0 auto 54px;
}
.menu-shot img { display: block; width: 100%; }

/* ── 风格卡片 ── */
.style-grid {
  display: grid; gap: 22px;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
}
.style-card {
  position: relative; border-radius: var(--radius); overflow: hidden;
  background: var(--surface); border: 1px solid var(--line);
  cursor: pointer; transition: transform .3s cubic-bezier(.2,.7,.3,1), border-color .3s, box-shadow .3s;
}
.style-card:hover { transform: translateY(-6px); border-color: var(--gold-dim); box-shadow: 0 24px 54px rgba(0,0,0,.62); }
.style-card .thumb { position: relative; aspect-ratio: 1 / 1; overflow: hidden; }
.style-card .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .55s cubic-bezier(.2,.7,.3,1); }
.style-card:hover .thumb img { transform: scale(1.06); }
.style-card .thumb::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(12,11,10,.94) 6%, rgba(12,11,10,.12) 52%, transparent 76%);
}
.style-card .idx {
  position: absolute; top: 14px; left: 16px; z-index: 2;
  font-family: var(--serif); font-size: 13px; letter-spacing: .1em;
  color: var(--gold); background: rgba(12,11,10,.6); border: 1px solid var(--gold-dim);
  border-radius: 999px; padding: 3px 12px; backdrop-filter: blur(6px);
}
.style-card .body { position: absolute; bottom: 0; left: 0; right: 0; z-index: 2; padding: 20px 20px 22px; }
.style-card h3 { font-size: 20px; margin-bottom: 5px; }
.style-card .tagline { color: var(--text-soft); font-size: 13.5px; }
.style-card .peek {
  margin-top: 12px; font-size: 12.5px; color: var(--gold);
  opacity: 0; transform: translateY(6px); transition: .3s;
}
.style-card:hover .peek { opacity: 1; transform: translateY(0); }

/* ── 流程 ── */
.flow { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.flow-step {
  padding: 26px 22px; border-radius: var(--radius);
  background: linear-gradient(160deg, var(--surface) 0%, var(--bg-soft) 100%);
  border: 1px solid var(--line); position: relative;
}
.flow-step .n {
  font-family: var(--serif); font-size: 34px; color: var(--gold-dim);
  line-height: 1; margin-bottom: 14px;
}
.flow-step h4 { margin: 0 0 8px; font-size: 16px; font-family: var(--serif); }
.flow-step p { margin: 0; color: var(--text-mute); font-size: 13.5px; }

/* ── 留资表单 ── */
.lead-wrap { max-width: 560px; margin: 0 auto; }
.lead-form {
  display: grid; gap: 14px; padding: 32px;
  background: linear-gradient(160deg, var(--surface) 0%, var(--bg-soft) 100%);
  border: 1px solid var(--line); border-radius: var(--radius);
}
.field { display: flex; flex-direction: column; gap: 7px; }
.field label { font-size: 13px; color: var(--text-soft); }
.field .req { color: var(--gold); }

input, select, textarea {
  width: 100%; padding: 12px 14px; font-family: var(--sans); font-size: 14.5px;
  background: var(--bg); color: var(--text);
  border: 1px solid var(--line); border-radius: var(--radius-s);
  outline: none; transition: border-color .18s, box-shadow .18s;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--gold-dim); box-shadow: 0 0 0 3px rgba(201, 169, 97, .14);
}
input::placeholder, textarea::placeholder { color: var(--text-mute); }
textarea { resize: vertical; min-height: 84px; }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--gold-dim) 50%), linear-gradient(135deg, var(--gold-dim) 50%, transparent 50%); background-position: calc(100% - 19px) center, calc(100% - 14px) center; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; padding-right: 38px; }

/* ── 页脚 ── */
.footer {
  border-top: 1px solid var(--line); padding: 40px 32px;
  text-align: center; color: var(--text-mute); font-size: 13px;
}

/* ── 提示条 ── */
.toast {
  position: fixed; left: 50%; bottom: 34px; transform: translate(-50%, 20px);
  padding: 13px 26px; border-radius: 999px; font-size: 14px; z-index: 200;
  background: var(--surface-2); border: 1px solid var(--gold-dim); color: var(--text);
  box-shadow: var(--shadow); opacity: 0; pointer-events: none; transition: .28s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.err { border-color: var(--danger); color: #ffd9d2; }
.toast.ok  { border-color: var(--ok); color: #e3f5d8; }

/* ── 后台 ── */
.admin-body { background: var(--bg); }
.admin-wrap { max-width: 1180px; margin: 0 auto; padding: 32px; }

.panel {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 26px; margin-bottom: 20px;
}
.panel-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; margin-bottom: 20px; flex-wrap: wrap;
}
.panel-head h3 { font-size: 18px; }
.panel-head .step-no {
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; border-radius: 50%; margin-right: 10px;
  background: var(--gold); color: #1a1509; font-size: 13px; font-weight: 700;
  font-family: var(--sans);
}

.grid-2 { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.grid-3 { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }

/* 画幅比例选择器 */
.ratio-picker { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(62px, 1fr)); }
.ratio-opt {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  padding: 11px 4px 8px; border-radius: var(--radius-s); cursor: pointer;
  background: var(--bg); border: 1.5px solid var(--line); color: var(--text-mute);
  font-family: var(--sans); font-size: 11.5px; line-height: 1;
  transition: border-color .18s, background .18s, color .18s;
}
.ratio-opt:hover { border-color: var(--gold-dim); color: var(--text-soft); }
.ratio-opt.sel { border-color: var(--gold); background: rgba(201, 169, 97, .1); color: var(--gold-bright); }
.ratio-opt .glyph {
  display: block; border: 1.5px solid currentColor; border-radius: 3px; opacity: .85;
}

/* 风格选择器 */
.picker { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); }
.picker .opt {
  position: relative; border-radius: var(--radius-s); overflow: hidden;
  border: 2px solid var(--line); cursor: pointer; aspect-ratio: 1/1;
  transition: border-color .2s, transform .2s;
}
.picker .opt img { width: 100%; height: 100%; object-fit: cover; display: block; }
.picker .opt span {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 16px 8px 7px;
  font-size: 12.5px; text-align: center;
  background: linear-gradient(to top, rgba(12,11,10,.95), transparent);
}
.picker .opt:hover { transform: translateY(-3px); border-color: var(--gold-dim); }
.picker .opt.sel { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(201,169,97,.22); }
.picker .opt.sel::after {
  content: '✓'; position: absolute; top: 7px; right: 8px;
  width: 22px; height: 22px; border-radius: 50%; background: var(--gold); color: #1a1509;
  display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700;
}

/* 参考图 */
.refs { display: flex; gap: 12px; flex-wrap: wrap; }
.ref-item {
  position: relative; width: 104px; height: 104px; border-radius: var(--radius-s);
  overflow: hidden; border: 1px solid var(--line);
}
.ref-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ref-item .del {
  position: absolute; top: 4px; right: 4px; width: 22px; height: 22px;
  border-radius: 50%; border: none; cursor: pointer;
  background: rgba(12,11,10,.8); color: #fff; font-size: 13px; line-height: 1;
}
.ref-add {
  width: 104px; height: 104px; border-radius: var(--radius-s);
  border: 1.5px dashed var(--gold-dim); background: transparent; color: var(--gold);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 5px; cursor: pointer; font-size: 12px; font-family: var(--sans);
}
.ref-add:hover { background: rgba(201,169,97,.09); }
.ref-add .plus { font-size: 24px; line-height: 1; }

/* 分镜表 */
.shot-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.shot-table th, .shot-table td {
  border: 1px solid var(--line); padding: 9px 11px; text-align: left; vertical-align: top;
}
.shot-table th { background: var(--surface-2); color: var(--gold); font-weight: 500; white-space: nowrap; }
.shot-table tr:hover td { background: rgba(201,169,97,.05); }
.table-scroll { overflow-x: auto; }

/* 逐帧出图卡 */
.frame-grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); }
.frame-card {
  background: var(--bg-soft); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden;
}
.frame-card .fc-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 13px 16px; border-bottom: 1px solid var(--line);
}
.frame-card .fc-head strong { font-size: 14px; }
.frame-card .fc-body { padding: 16px; }
.frame-card .fc-prompt {
  font-size: 12.5px; color: var(--text-mute); line-height: 1.65;
  max-height: 108px; overflow-y: auto; white-space: pre-wrap;
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-s);
  padding: 11px; margin-bottom: 12px;
}
.frame-card .fc-result { margin-top: 14px; }
.frame-card .fc-result img { width: 100%; border-radius: var(--radius-s); display: block; }
.frame-card .fc-meta { display: flex; gap: 10px; align-items: center; font-size: 12px; color: var(--text-mute); margin-top: 9px; }

.badge {
  display: inline-block; padding: 3px 11px; border-radius: 999px; font-size: 12px;
  background: var(--surface-2); color: var(--text-soft); border: 1px solid var(--line);
}
.badge.run  { border-color: var(--gold-dim); color: var(--gold); }
.badge.ok   { border-color: var(--ok); color: #cfe8bf; }
.badge.err  { border-color: var(--danger); color: #ffcabf; }

/* 进度条 */
.bar { height: 5px; border-radius: 999px; background: var(--surface-2); overflow: hidden; margin-top: 11px; }
.bar > i { display: block; height: 100%; width: 0; border-radius: 999px; background: linear-gradient(90deg, var(--gold-dim), var(--gold-bright)); transition: width .5s; }

/* 弹窗 */
.modal-mask {
  position: fixed; inset: 0; z-index: 150; display: none;
  align-items: center; justify-content: center; padding: 24px;
  background: rgba(6, 5, 4, .86); backdrop-filter: blur(7px);
}
.modal-mask.show { display: flex; }
.modal {
  background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius);
  max-width: 940px; width: 100%; max-height: 88vh; overflow: auto; box-shadow: var(--shadow);
}
.modal img { width: 100%; display: block; }

.notice {
  padding: 13px 16px; border-radius: var(--radius-s); font-size: 13.5px;
  border: 1px solid var(--gold-dim); background: rgba(201,169,97,.09); color: var(--gold-bright);
  margin-bottom: 18px;
}
.notice.err { border-color: var(--danger); background: rgba(217,107,90,.1); color: #ffcabf; }

.muted { color: var(--text-mute); }
.small { font-size: 12.5px; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.spacer { flex: 1; }
.hidden { display: none !important; }

.login-box { max-width: 380px; margin: 12vh auto; }

@media (max-width: 720px) {
  .topbar { padding: 13px 18px; }
  .topbar nav { gap: 16px; font-size: 13px; }
  .section { padding: 60px 18px; }
  .admin-wrap { padding: 18px; }
  .panel { padding: 18px; }
}
