/* ============================================================
   AI 写真馆 — 页面样式
   视觉参考：智拓平台「AI写真馆」（zhix88.com/home?menu=zhinengti）
   深空底 + 青绿主色 + 橙色主按钮，玻璃拟态面板，星野氛围光
   只服务 /xiezhen 这一个页面，不动 public/css/style.css
   ============================================================ */

:root {
  --bg:          #06080f;
  --bg-2:        #0a0e1a;
  --panel:       rgba(255, 255, 255, .035);
  --panel-2:     rgba(255, 255, 255, .055);
  --line:        rgba(255, 255, 255, .09);
  --line-2:      rgba(255, 255, 255, .16);
  --text:        #e9f2f5;
  --soft:        #9db0bd;
  --mute:        #6d7f8c;
  --teal:        #2ee6c5;
  --teal-dim:    #14a98f;
  --teal-glow:   rgba(46, 230, 197, .28);
  --orange:      #ff7a2f;
  --orange-2:    #ff9a4d;
  --violet:      #6d5cf6;
  --danger:      #ff6b6b;
  --radius:      16px;
  --radius-s:   10px;
  --sans: 'PingFang SC', 'Microsoft YaHei', -apple-system, 'Segoe UI', sans-serif;
  --serif: 'Noto Serif SC', 'Source Han Serif SC', 'Songti SC', 'SimSun', serif;
  --ease: cubic-bezier(.16, 1, .3, 1);
}

* { box-sizing: border-box; }

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

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

a { color: var(--teal); text-decoration: none; }
a:hover { color: #7ff5dc; }

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

button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
.hidden { display: none !important; }

/* ── 背景：星野 + 氛围光斑 ── */
.sky {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(900px 600px at 78% -8%, rgba(46, 230, 197, .10), transparent 60%),
    radial-gradient(760px 520px at 12% 8%, rgba(109, 92, 246, .13), transparent 62%),
    radial-gradient(1000px 700px at 50% 108%, rgba(255, 122, 47, .07), transparent 65%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 55%, #070a12 100%);
}
.sky::after {
  content: ''; position: absolute; inset: -20%;
  background-image:
    radial-gradient(1.4px 1.4px at 12% 22%, rgba(255,255,255,.65), transparent),
    radial-gradient(1.2px 1.2px at 28% 64%, rgba(255,255,255,.45), transparent),
    radial-gradient(1.6px 1.6px at 44% 14%, rgba(255,255,255,.55), transparent),
    radial-gradient(1.1px 1.1px at 62% 46%, rgba(255,255,255,.4), transparent),
    radial-gradient(1.5px 1.5px at 76% 26%, rgba(255,255,255,.5), transparent),
    radial-gradient(1.2px 1.2px at 88% 72%, rgba(255,255,255,.42), transparent),
    radial-gradient(1.3px 1.3px at 8% 84%, rgba(255,255,255,.38), transparent),
    radial-gradient(1.7px 1.7px at 34% 92%, rgba(255,255,255,.3), transparent),
    radial-gradient(1.2px 1.2px at 68% 88%, rgba(255,255,255,.34), transparent);
  background-size: 520px 520px, 640px 640px, 480px 480px, 700px 700px, 560px 560px, 620px 620px, 740px 740px, 500px 500px, 680px 680px;
  opacity: .7;
  animation: drift 90s linear infinite;
}
@keyframes drift { to { transform: translate3d(-60px, -40px, 0); } }

.orb {
  position: fixed; z-index: 0; pointer-events: none;
  width: 520px; height: 520px; border-radius: 50%;
  filter: blur(90px); opacity: .5;
  animation: float 22s ease-in-out infinite;
}
.orb-a { top: -160px; right: -120px; background: radial-gradient(circle, rgba(46,230,197,.5), transparent 68%); }
.orb-b { bottom: -200px; left: -140px; background: radial-gradient(circle, rgba(109,92,246,.55), transparent 68%); animation-delay: -8s; }
@keyframes float {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50%      { transform: translate3d(30px, 40px, 0) scale(1.08); }
}

/* ── 顶栏 ── */
.topbar {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; gap: 20px;
  padding: 14px 30px;
  background: rgba(6, 8, 15, .72);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--line);
}
.topbar a.brand { color: var(--text); }
.topbar a.brand:hover { color: var(--text); }
.topbar .brand small {
  display: block; font-family: var(--sans); font-size: 11px; letter-spacing: .16em;
  color: var(--mute); margin-top: -3px;
}
.topbar .brand {
  display: flex; align-items: center; gap: 11px;
  font-family: var(--serif); font-size: 18px; letter-spacing: .1em;
}
.topbar .brand .mark {
  width: 30px; height: 30px; flex: none;
  display: grid; place-items: center;
  border-radius: 9px;
  background: linear-gradient(140deg, rgba(46,230,197,.9), rgba(20,169,143,.7));
  color: #04201b; font-size: 15px; font-weight: 700;
  box-shadow: 0 0 22px var(--teal-glow);
}
.topbar .brand small {
  display: block; font-family: var(--sans); font-size: 10px; letter-spacing: .3em;
  color: var(--mute); margin-top: -4px;
}
/* ═══════════════════════════════════════════════════════════
   统一主导航（2026-10-11 二次重构）
   全站所有页面入口都在这一条里：
     对外创作台 4 个（所有人可见） + 后台工具 5 个（仅管理员可见）
   ═══════════════════════════════════════════════════════════ */
.topbar .main-nav {
  display: flex; align-items: center; flex-wrap: wrap; gap: 4px;
}
.topbar .main-group { display: flex; align-items: center; gap: 4px; }
.topbar .main-group.hidden { display: none; }
.topbar .nav-item {
  padding: 6px 12px; border-radius: 999px; font-size: 13.5px; line-height: 1.35;
  color: var(--soft); background: transparent; border: 1px solid transparent;
  white-space: nowrap; cursor: pointer; font-family: inherit; text-decoration: none;
}
.topbar .nav-item:hover { color: var(--text); background: rgba(255, 255, 255, .07); }
.topbar .nav-item.active {
  color: #04201b; font-weight: 600;
  background: linear-gradient(135deg, var(--teal), var(--teal-dim));
  box-shadow: 0 0 16px var(--teal-glow);
}
.topbar .nav-divider { width: 1px; height: 16px; background: var(--line); margin: 0 6px; flex: none; }
.topbar .main-nav .ver-switch { padding: 2px; }
.topbar .main-nav .ver-switch button { padding: 5px 13px; font-size: 12.5px; }
.topbar .main-nav { margin-left: 10px; }
.topbar .site-nav { display: flex; align-items: center; gap: 20px; margin-left: 10px; }
.topbar .site-nav .nav-link { color: var(--soft); position: relative; padding: 3px 0; white-space: nowrap; }
.topbar .site-nav .nav-link:hover { color: var(--text); }
.topbar .site-nav .nav-link.active { color: var(--teal); font-weight: 600; }
.topbar .site-nav .nav-link.active::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -3px;
  height: 2px; border-radius: 2px; background: currentColor;
}
.topbar .acct { margin-left: auto; display: flex; align-items: center; gap: 16px; font-size: 14px; }
.topbar nav {
  margin-left: auto; display: flex; align-items: center; gap: 22px; font-size: 14px;
}
.topbar nav a { color: var(--soft); }
.topbar nav a:hover { color: var(--teal); }
.who { font-size: 13px; color: var(--mute); }
.who b { color: var(--teal); font-weight: 600; }

/* ── 主容器 ── */
.wrap { position: relative; z-index: 1; max-width: 1120px; margin: 0 auto; padding: 0 24px 90px; }

/* ── 英雄区 ── */
.hero { text-align: center; padding: 62px 0 34px; }
.hero-icon {
  width: 74px; height: 74px; margin: 0 auto 20px;
  display: grid; place-items: center;
  border-radius: 22px;
  background: linear-gradient(150deg, rgba(46,230,197,.16), rgba(109,92,246,.14));
  border: 1px solid rgba(46,230,197,.35);
  box-shadow: 0 0 46px rgba(46,230,197,.18), inset 0 0 30px rgba(46,230,197,.06);
}
.hero-icon svg { width: 38px; height: 38px; }
.hero h1 {
  font-size: 42px; line-height: 1.2; margin-bottom: 12px;
  background: linear-gradient(92deg, #ffffff 22%, var(--teal) 78%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero .tag {
  display: inline-block; vertical-align: middle; margin-left: 10px;
  padding: 3px 9px; border-radius: 7px; font-family: var(--sans);
  font-size: 12px; font-weight: 700; letter-spacing: .06em;
  color: #04201b; background: var(--teal);
}
.hero-badges {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 22px;
  font-size: 13.5px; color: var(--soft); margin: 16px 0 22px;
}
.hero-badges span { display: inline-flex; align-items: center; gap: 7px; }
.hero-badges span::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 8px var(--teal); }

.crew {
  display: inline-flex; align-items: center; gap: 14px;
  padding: 10px 18px 10px 12px; border-radius: 999px;
  background: var(--panel); border: 1px solid var(--line);
  font-size: 13px; color: var(--soft);
}
.crew .dot-live { width: 7px; height: 7px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 10px var(--teal); animation: pulse 2.4s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
.crew-faces { display: flex; }
.crew-faces i {
  width: 30px; height: 30px; margin-left: -9px; border-radius: 50%;
  border: 2px solid #0b1120; display: grid; place-items: center;
  font-size: 12px; font-style: normal; color: #0a1a1c; font-weight: 600;
  background: linear-gradient(140deg, #6ee7d3, #14a98f);
}
.crew-faces i:first-child { margin-left: 0; }
.crew-faces i:nth-child(2) { background: linear-gradient(140deg, #9db4ff, #5b6ef0); }
.crew-faces i:nth-child(3) { background: linear-gradient(140deg, #ffd08a, #ff9a4d); }
.crew-faces i:nth-child(4) { background: linear-gradient(140deg, #f5a8d0, #d16bb0); }
.crew-faces i:nth-child(5) { background: linear-gradient(140deg, #b6f2a8, #6fbf69); }
.crew-faces i:nth-child(6) { background: linear-gradient(140deg, #cbb8ff, #8a6ff0); }

/* ── 通用面板 ── */
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  backdrop-filter: blur(14px);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .45);
}
.panel-head {
  display: flex; align-items: center; gap: 12px;
  padding: 18px 24px; border-bottom: 1px solid var(--line);
}
.panel-head .ico {
  width: 34px; height: 34px; flex: none; border-radius: 10px;
  display: grid; place-items: center; font-size: 16px;
  background: rgba(46,230,197,.12); border: 1px solid rgba(46,230,197,.28); color: var(--teal);
}
.panel-head strong { font-size: 16px; font-weight: 600; letter-spacing: .02em; }
.panel-head p { margin: 1px 0 0; font-size: 12.5px; color: var(--mute); }
.panel-body { padding: 22px 24px 8px; }

/* ── 选项行 ── */
.opt-row { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 16px; padding: 14px 0; border-top: 1px dashed rgba(255,255,255,.07); }
.opt-row:first-child { border-top: 0; padding-top: 2px; }
.opt-label { display: flex; align-items: flex-start; gap: 8px; font-size: 13.5px; color: var(--soft); padding-top: 8px; }
.opt-label .glyph { color: var(--teal); font-size: 13px; opacity: .9; }
.opt-field { min-width: 0; }

.chips { display: flex; flex-wrap: wrap; gap: 9px; }
.chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 16px; border-radius: 999px;
  background: rgba(255, 255, 255, .04);
  border: 1px solid var(--line);
  color: var(--soft); font-size: 13.5px; line-height: 1.4;
  transition: all .22s var(--ease);
}
.chip:hover { border-color: var(--line-2); color: var(--text); transform: translateY(-1px); }
.chip.on {
  color: #052a24; font-weight: 600;
  background: linear-gradient(140deg, #59f0d6, var(--teal-dim));
  border-color: transparent;
  box-shadow: 0 0 20px var(--teal-glow);
}
.chip img {
  width: 22px; height: 22px; border-radius: 6px; object-fit: cover; flex: none;
  border: 1px solid rgba(255,255,255,.14);
}
.chip.on img { border-color: rgba(5,42,36,.35); }
.chip .lock { font-size: 11px; opacity: .7; }

.text-input {
  width: 100%; padding: 11px 15px; border-radius: 11px;
  background: rgba(255, 255, 255, .035);
  border: 1px solid var(--line);
  color: var(--text); font-size: 14px; outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.text-input::placeholder { color: #5d6f7c; }
.text-input:focus { border-color: rgba(46,230,197,.55); box-shadow: 0 0 0 3px rgba(46,230,197,.12); }

/* 高级设置 */
.adv { margin: 10px 0 4px; }
.adv > summary {
  list-style: none; cursor: pointer; user-select: none;
  font-size: 13px; color: var(--mute); padding: 8px 0;
  display: inline-flex; align-items: center; gap: 7px;
}
.adv > summary::-webkit-details-marker { display: none; }
.adv > summary::before { content: '▸'; transition: transform .2s; display: inline-block; }
.adv[open] > summary::before { transform: rotate(90deg); }
.adv > summary:hover { color: var(--teal); }
.adv-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px 20px; padding: 6px 0 12px; }
.field label { display: block; font-size: 12.5px; color: var(--mute); margin-bottom: 6px; }
.field select {
  width: 100%; padding: 10px 13px; border-radius: 10px;
  background: rgba(255,255,255,.05); border: 1px solid var(--line);
  color: var(--text); outline: none; appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--soft) 50%), linear-gradient(135deg, var(--soft) 50%, transparent 50%);
  background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%;
  background-size: 5px 5px, 5px 5px; background-repeat: no-repeat;
}
.field select:focus { border-color: rgba(46,230,197,.55); }
.field select option { background: #0d1420; color: var(--text); }

/* ── 出图工作台 ── */
.studio { margin-top: 24px; }

.photo-row { display: flex; flex-wrap: wrap; gap: 12px; padding: 4px 0 16px; }
.photo-add {
  width: 84px; height: 84px; flex: none;
  display: grid; place-items: center; gap: 2px;
  border-radius: 14px; cursor: pointer;
  border: 1px dashed rgba(46,230,197,.45);
  background: rgba(46,230,197,.05);
  color: var(--teal); font-size: 11.5px; text-align: center;
  transition: all .22s var(--ease);
}
.photo-add:hover { background: rgba(46,230,197,.1); border-color: var(--teal); transform: translateY(-2px); }
.photo-add .plus { font-size: 20px; line-height: 1; }
.photo-add input { display: none; }
.photo-add.busy { opacity: .6; pointer-events: none; }

.thumb {
  position: relative; width: 84px; height: 84px; flex: none;
  border-radius: 14px; overflow: hidden;
  border: 1px solid var(--line-2);
  background: #0b1120;
}
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb .del {
  position: absolute; top: 4px; right: 4px;
  width: 20px; height: 20px; border: 0; border-radius: 50%;
  background: rgba(6,8,15,.75); color: #fff; font-size: 12px; line-height: 1;
  display: grid; place-items: center;
}
.thumb .del:hover { background: var(--danger); }
.thumb .badge-main {
  position: absolute; left: 4px; bottom: 4px;
  padding: 1px 6px; border-radius: 6px; font-size: 10px;
  background: rgba(46,230,197,.9); color: #04201b; font-weight: 600;
}
.photo-hint { font-size: 12.5px; color: var(--mute); align-self: center; max-width: 260px; }

.brief-box { position: relative; }
.brief-box textarea {
  width: 100%; min-height: 108px; resize: vertical;
  padding: 16px 18px; border-radius: 14px;
  background: rgba(255, 255, 255, .035);
  border: 1px solid var(--line);
  color: var(--text); font-size: 14.5px; line-height: 1.75; outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.brief-box textarea::placeholder { color: #5d6f7c; }
.brief-box textarea:focus { border-color: rgba(46,230,197,.5); box-shadow: 0 0 0 3px rgba(46,230,197,.1); }

.go-row { display: flex; align-items: center; gap: 16px; margin-top: 14px; flex-wrap: wrap; }
.cost { font-size: 12.5px; color: var(--mute); }
.cost b { color: var(--teal); font-weight: 600; }

.btn-go {
  margin-left: auto;
  display: inline-flex; align-items: center; gap: 9px;
  padding: 13px 32px; border: 0; border-radius: 999px;
  font-size: 15px; font-weight: 600; color: #2a1204;
  background: linear-gradient(120deg, var(--orange-2), var(--orange));
  box-shadow: 0 10px 30px rgba(255, 122, 47, .3);
  transition: transform .18s var(--ease), box-shadow .18s;
}
.btn-go:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 14px 38px rgba(255,122,47,.42); }
.btn-go:active:not(:disabled) { transform: scale(.97); }
.btn-go:disabled { opacity: .55; cursor: not-allowed; box-shadow: none; }

.btn-ghost {
  padding: 11px 22px; border-radius: 999px;
  background: transparent; border: 1px solid var(--line-2);
  color: var(--soft); font-size: 14px;
  transition: all .2s var(--ease);
}
.btn-ghost:hover { border-color: var(--teal); color: var(--teal); }

/* ── 出图结果 ── */
.result { margin-top: 26px; }
.result-status {
  display: flex; align-items: center; gap: 10px;
  font-size: 13.5px; color: var(--soft); padding: 0 2px 14px;
}
.result-status .spin {
  width: 13px; height: 13px; border-radius: 50%; flex: none;
  border: 2px solid rgba(46,230,197,.25); border-top-color: var(--teal);
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.card {
  position: relative; border-radius: var(--radius); overflow: hidden;
  background: var(--panel); border: 1px solid var(--line);
  animation: rise .5s var(--ease) both;
}
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.card .ph { aspect-ratio: 3 / 4; background: linear-gradient(110deg, #0d1420 30%, #16202f 50%, #0d1420 70%); background-size: 200% 100%; animation: shimmer 1.5s linear infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }
.card img.shot { width: 100%; display: block; cursor: zoom-in; }
.card .meta { padding: 11px 14px; display: flex; align-items: center; gap: 10px; font-size: 12.5px; color: var(--mute); }
.card .meta .tag2 { color: var(--teal); }
.card .meta a { margin-left: auto; color: var(--soft); }
.card .meta a:hover { color: var(--teal); }
.card .err { padding: 18px; font-size: 13px; color: var(--danger); }
.card .ai-note {
  position: absolute; top: 8px; left: 8px;
  padding: 2px 7px; border-radius: 6px; font-size: 10.5px;
  background: rgba(6,8,15,.7); color: var(--soft); border: 1px solid var(--line);
}

.empty { text-align: center; color: var(--mute); font-size: 14px; padding: 16px 0 8px; }

/* 登录提示条 */
.notice {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  margin: 20px 0 0; padding: 14px 18px; border-radius: 13px;
  background: rgba(255, 122, 47, .08);
  border: 1px solid rgba(255, 122, 47, .3);
  font-size: 13.5px; color: #ffd9bf;
}
.notice a { color: var(--orange-2); font-weight: 600; text-decoration: underline; }

/* 轻提示 */
.toast {
  position: fixed; left: 50%; bottom: 34px; transform: translate(-50%, 20px);
  z-index: 90; padding: 11px 20px; border-radius: 999px;
  background: rgba(10, 16, 26, .94); border: 1px solid var(--line-2);
  color: var(--text); font-size: 13.5px; opacity: 0; pointer-events: none;
  transition: all .28s var(--ease); backdrop-filter: blur(10px);
  max-width: min(86vw, 520px); text-align: center;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.err { border-color: rgba(255, 107, 107, .6); color: #ffd6d6; }
.toast.ok { border-color: rgba(46, 230, 197, .5); }

/* 看大图 */
.lightbox {
  position: fixed; inset: 0; z-index: 95; display: none;
  align-items: center; justify-content: center;
  background: rgba(3, 5, 10, .9); backdrop-filter: blur(6px); padding: 30px;
}
.lightbox.show { display: flex; }
.lightbox img { max-width: 100%; max-height: 100%; border-radius: 12px; box-shadow: 0 30px 80px rgba(0,0,0,.7); }

/* ── 页脚 ── */
.foot { margin-top: 54px; padding-top: 20px; border-top: 1px solid var(--line); display: flex; gap: 18px; flex-wrap: wrap; font-size: 12.5px; color: var(--mute); }
.foot a { color: var(--mute); }
.foot a:hover { color: var(--teal); }

/* ── 响应式 ── */
@media (max-width: 860px) {
  .topbar { padding: 12px 16px; gap: 12px; }
  .topbar .brand { font-size: 16px; }
  .topbar nav { gap: 14px; font-size: 13px; }
  .topbar nav .hide-sm { display: none; }
  .wrap { padding: 0 14px 70px; }
  .hero { padding: 40px 0 26px; }
  .hero h1 { font-size: 30px; }
  .hero-badges { gap: 6px 14px; font-size: 12.5px; }
  .opt-row { grid-template-columns: 1fr; gap: 8px; }
  .opt-label { padding-top: 0; }
  .panel-body { padding: 16px 16px 4px; }
  .panel-head { padding: 14px 16px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 11px; }
  .btn-go { margin-left: 0; width: 100%; justify-content: center; }
  .photo-add, .thumb { width: 72px; height: 72px; }
}

@media (prefers-reduced-motion: reduce) {
  .sky::after, .orb, .card, .card .ph, .crew .dot-live { animation: none !important; }
  * { transition-duration: .01ms !important; }
}
