/* ==========================================================================
   AI 海报生成器 - 高质感设计系统
   风格：极简、半玻璃、明亮、轻拟物；参考 tennis 系统的 favicon 配色
   ========================================================================== */

:root {
  --bg-base: #f7f9fc;
  --bg-elev: #ffffff;
  --bg-elev-2: #ffffff;
  --bg-muted: #eef2f7;
  --bg-overlay: rgba(255, 255, 255, 0.78);

  --line: rgba(15, 23, 42, 0.08);
  --line-strong: rgba(15, 23, 42, 0.16);

  --text: #0f172a;
  --text-muted: #475569;
  --text-soft: #64748b;

  --brand: #0d9488;          /* 主品牌色 - 青绿色 */
  --brand-2: #14b8a6;
  --brand-deep: #0f766e;
  --accent: #c7ff00;         /* 荧光黄绿 - 海报主色 */
  --accent-deep: #84cc16;
  --sky: #7ec8ff;            /* 海报背景天空蓝 */
  --warn: #f59e0b;
  --error: #ef4444;
  --ok: #10b981;

  --radius-sm: 6px;
  --radius: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;

  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow: 0 4px 14px -4px rgba(15, 23, 42, 0.08), 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 16px 32px -8px rgba(15, 23, 42, 0.16), 0 2px 6px rgba(15, 23, 42, 0.05);
  --shadow-glow: 0 0 0 4px rgba(13, 148, 136, 0.12);

  --font-sans: 'PingFang SC', 'Microsoft YaHei', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', 'SFMono-Regular', Menlo, Consolas, monospace;
  --font-display: 'Inter Tight', 'PingFang SC', system-ui, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body { height: 100%; }
body {
  font-family: var(--font-sans);
  background: var(--bg-base);
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-deep); }

button { font-family: inherit; cursor: pointer; }

/* ============== Layout ============== */
.app-shell { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; }

.sidebar {
  background: linear-gradient(180deg, #ffffff 0%, #f5f9fb 100%);
  border-right: 1px solid var(--line);
  padding: 24px 0;
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh;
  overflow-y: auto;
}
.sidebar .brand {
  padding: 0 24px 24px;
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 12px;
}
.sidebar .brand .logo {
  width: 40px; height: 40px; border-radius: 10px;
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-2) 100%);
  display: flex; align-items: center; justify-content: center;
  color: white; font-weight: 800; font-size: 18px;
  box-shadow: 0 6px 16px -4px rgba(13, 148, 136, 0.4);
}
.sidebar .brand .title { font-family: var(--font-display); font-weight: 700; font-size: 16px; }
.sidebar .brand .subtitle { font-size: 12px; color: var(--text-muted); }

.nav { padding: 16px 12px; flex: 1; }
.nav .nav-section { margin-bottom: 24px; }
.nav .nav-section-title {
  font-size: 11px; color: var(--text-soft); text-transform: uppercase;
  letter-spacing: 0.06em; font-weight: 600; padding: 8px 12px;
}
.nav a.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: 10px; color: var(--text-muted);
  font-size: 14px; font-weight: 500; margin-bottom: 2px;
  transition: all 0.15s ease;
}
.nav a.nav-item:hover { background: var(--bg-muted); color: var(--text); }
.nav a.nav-item.active {
  background: linear-gradient(135deg, rgba(13, 148, 136, 0.1) 0%, rgba(20, 184, 166, 0.08) 100%);
  color: var(--brand-deep);
  box-shadow: inset 0 0 0 1px rgba(13, 148, 136, 0.15);
}
.nav a.nav-item .icon { width: 18px; height: 18px; opacity: 0.85; }

.sidebar .footer {
  padding: 16px 24px; border-top: 1px solid var(--line);
  font-size: 12px; color: var(--text-soft);
  display: flex; align-items: center; gap: 10px; justify-content: space-between;
}

.main-content { display: flex; flex-direction: column; min-width: 0; }
.topbar {
  background: var(--bg-overlay);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
  padding: 14px 32px;
  display: flex; align-items: center; justify-content: space-between;
  position: sticky; top: 0; z-index: 10;
}
.topbar .page-title { font-family: var(--font-display); font-size: 20px; font-weight: 700; }
.topbar .page-subtitle { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.topbar .topbar-right { display: flex; align-items: center; gap: 12px; }

.user-chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px 6px 6px; background: var(--bg-elev);
  border: 1px solid var(--line); border-radius: 999px;
  font-size: 13px;
}
.user-chip .avatar {
  width: 26px; height: 26px; border-radius: 50%;
  background: linear-gradient(135deg, var(--brand) 0%, var(--accent-deep) 100%);
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 12px;
}

.content { padding: 32px; flex: 1; min-width: 0; }

/* ============== Card ============== */
.card {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  margin-bottom: 24px;
}
.card-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between;
}
.card-header h2 { font-size: 16px; font-weight: 600; font-family: var(--font-display); }
.card-header .actions { display: flex; gap: 8px; }
.card-body { padding: 24px; }

/* ============== Stats Grid ============== */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 24px; }
.stat-card {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  box-shadow: var(--shadow-sm);
  position: relative; overflow: hidden;
}
.stat-card::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0;
  width: 3px; background: var(--brand);
}
.stat-card .label { color: var(--text-muted); font-size: 12px; font-weight: 500; }
.stat-card .value {
  font-family: var(--font-display); font-size: 28px; font-weight: 700;
  margin: 6px 0 4px;
}
.stat-card .delta { font-size: 12px; color: var(--text-soft); }
.stat-card .delta.up { color: var(--ok); }
.stat-card .delta.down { color: var(--error); }

/* ============== Buttons ============== */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 16px; border-radius: 10px; font-size: 13px;
  font-weight: 500; border: 1px solid var(--line); background: var(--bg-elev);
  color: var(--text); transition: all 0.15s ease; text-decoration: none;
}
.btn:hover { background: var(--bg-muted); border-color: var(--line-strong); }
.btn.primary { background: var(--brand); color: white; border-color: var(--brand); }
.btn.primary:hover { background: var(--brand-deep); border-color: var(--brand-deep); box-shadow: var(--shadow-glow); }
.btn.accent { background: var(--accent); color: #111; border-color: #a8d600; }
.btn.accent:hover { background: #b6e800; }
.btn.danger { background: white; color: var(--error); border-color: rgba(239, 68, 68, 0.3); }
.btn.danger:hover { background: rgba(239, 68, 68, 0.06); }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.sm { padding: 6px 10px; font-size: 12px; }
.btn.lg { padding: 12px 24px; font-size: 15px; }
.btn[disabled] { opacity: 0.5; pointer-events: none; }

/* ============== Forms ============== */
.form-row { margin-bottom: 18px; }
.form-row label {
  display: block; margin-bottom: 6px;
  font-size: 13px; font-weight: 500; color: var(--text-muted);
}
.form-row label .req { color: var(--error); margin-left: 2px; }
.form-row .hint { font-size: 12px; color: var(--text-soft); margin-top: 4px; }

.input, .select, .textarea {
  width: 100%;
  padding: 10px 14px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--bg-elev);
  font-size: 14px; color: var(--text);
  font-family: inherit;
  transition: all 0.15s ease;
}
.input:focus, .select:focus, .textarea:focus {
  outline: none; border-color: var(--brand);
  box-shadow: var(--shadow-glow);
}
.textarea { font-family: var(--font-mono); resize: vertical; min-height: 120px; }

.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }

/* ============== Badges & Tags ============== */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px; border-radius: 6px;
  font-size: 12px; font-weight: 500;
}
.badge.success { background: rgba(16, 185, 129, 0.12); color: #047857; }
.badge.warn { background: rgba(245, 158, 11, 0.14); color: #b45309; }
.badge.error { background: rgba(239, 68, 68, 0.12); color: #b91c1c; }
.badge.info { background: rgba(13, 148, 136, 0.12); color: var(--brand-deep); }
.badge.neutral { background: var(--bg-muted); color: var(--text-muted); }
.badge.dot::before { content:''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

/* ============== Table ============== */
.table { width: 100%; border-collapse: collapse; }
.table th {
  text-align: left; font-size: 12px; color: var(--text-muted);
  font-weight: 600; padding: 12px 16px; border-bottom: 1px solid var(--line);
  text-transform: uppercase; letter-spacing: 0.04em;
}
.table td {
  padding: 14px 16px; border-bottom: 1px solid var(--line);
  font-size: 13px; vertical-align: middle;
}
.table tr:hover td { background: var(--bg-muted); }
.table tr:last-child td { border-bottom: 0; }

.thumb {
  width: 56px; height: 56px; border-radius: 10px;
  object-fit: cover; background: var(--bg-muted);
  border: 1px solid var(--line);
}

/* ============== Toolbar / Filters ============== */
.toolbar {
  display: flex; align-items: center; gap: 10px;
  padding: 16px 24px;
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}
.toolbar .search { flex: 1; max-width: 320px; }
.toolbar .filters { display: flex; gap: 8px; }

/* ============== Pagination ============== */
.pagination {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 24px;
}
.pagination .pages { display: flex; gap: 4px; }
.pagination .page {
  padding: 6px 12px; border-radius: 6px; border: 1px solid var(--line);
  font-size: 12px; color: var(--text-muted); background: var(--bg-elev);
}
.pagination .page.active { background: var(--brand); color: white; border-color: var(--brand); }
.pagination .page:hover:not(.active) { background: var(--bg-muted); }

/* ============== Toast ============== */
.toast {
  position: fixed; right: 20px; bottom: 20px; z-index: 1000;
  padding: 12px 18px; border-radius: 12px;
  background: rgba(15, 23, 42, 0.92); color: white;
  font-size: 13px; opacity: 0; transform: translateY(8px);
  transition: all 0.3s ease;
}
.toast.show { opacity: 1; transform: translateY(0); }

/* ============== Login ============== */
.login-shell {
  display: flex; align-items: center; justify-content: center;
  min-height: 100vh; padding: 24px;
  background:
    radial-gradient(at 20% 20%, rgba(13, 148, 136, 0.08), transparent 50%),
    radial-gradient(at 80% 60%, rgba(199, 255, 0, 0.10), transparent 50%),
    linear-gradient(180deg, #f7f9fc 0%, #ffffff 100%);
}
.login-card {
  width: 100%; max-width: 420px;
  padding: 36px; border-radius: 20px;
  background: var(--bg-overlay);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-lg);
}
.login-card .logo {
  width: 56px; height: 56px; border-radius: 14px;
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-2) 100%);
  display: flex; align-items: center; justify-content: center;
  color: white; font-weight: 800; font-size: 24px;
  box-shadow: 0 8px 24px -4px rgba(13, 148, 136, 0.4);
  margin-bottom: 18px;
}
.login-card h1 { font-family: var(--font-display); font-size: 22px; font-weight: 700; }
.login-card .sub { color: var(--text-muted); font-size: 13px; margin-bottom: 24px; }
.login-card .err {
  background: rgba(239, 68, 68, 0.1); color: #b91c1c;
  padding: 10px 14px; border-radius: 10px;
  font-size: 13px; margin-bottom: 16px;
}

/* ============== Preview ============== */
.preview-grid {
  display: grid; grid-template-columns: 1fr 360px;
  gap: 24px; align-items: start;
}
.poster-stage {
  background: linear-gradient(180deg, #7ec8ff 0%, #3aa0e8 100%);
  border-radius: var(--radius-lg);
  padding: 32px; aspect-ratio: 2/3;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  position: relative; overflow: hidden;
}
.poster-stage img, .poster-stage svg { max-width: 100%; max-height: 100%; }
.poster-stage .placeholder {
  text-align: center; color: white;
  font-size: 13px; opacity: 0.9;
}
.poster-stage .placeholder .badge-pill {
  background: var(--accent); color: #111;
  padding: 4px 12px; border-radius: 999px;
  font-weight: 700; font-size: 12px;
  margin-bottom: 12px; display: inline-block;
}

/* ============== Empty / utilities ============== */
.empty {
  padding: 60px 20px; text-align: center;
  color: var(--text-muted); font-size: 13px;
}
.empty .icon { font-size: 36px; margin-bottom: 12px; opacity: 0.4; }

.muted { color: var(--text-muted); }
.soft { color: var(--text-soft); }
.mono { font-family: var(--font-mono); font-size: 12px; }

.flex { display: flex; }
.flex-1 { flex: 1; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.text-right { text-align: right; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 16px; }

.kbd {
  font-family: var(--font-mono); font-size: 11px;
  padding: 2px 6px; border-radius: 4px;
  background: var(--bg-muted); border: 1px solid var(--line);
  color: var(--text-muted);
}

/* ============== Responsive ============== */
@media (max-width: 1024px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .preview-grid { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .content { padding: 16px; }
}

/* transition 兜底 */
* { transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease; }

/* ============== 参考图选择弹窗 ============== */
.modal-mask {
  position: fixed; inset: 0; z-index: 1000;
  display: flex; align-items: center; justify-content: center;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(4px);
}
.modal-box {
  background: var(--bg-elev); border: 1px solid var(--line);
  border-radius: 16px; box-shadow: 0 24px 60px rgba(15, 23, 42, 0.25);
  max-height: 86vh; display: flex; flex-direction: column; overflow: hidden;
}
.modal-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px; border-bottom: 1px solid var(--line);
}
.modal-head h3 { margin: 0; font-size: 16px; }
.modal-toolbar {
  display: flex; gap: 8px; padding: 14px 20px; border-bottom: 1px solid var(--line);
}
.ref-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px;
  padding: 18px 20px; overflow-y: auto; min-height: 200px;
}
.ref-cell {
  border: 1px solid var(--line); border-radius: 10px; overflow: hidden;
  cursor: pointer; background: var(--bg-muted);
  transition: transform 0.12s ease, border-color 0.12s ease, box-shadow 0.12s ease;
}
.ref-cell:hover {
  transform: translateY(-2px); border-color: var(--brand);
  box-shadow: 0 8px 20px rgba(13, 148, 136, 0.18);
}
.ref-cell img {
  width: 100%; height: 120px; object-fit: cover; display: block; background: #fff;
}
.ref-name {
  font-size: 11px; color: var(--text-soft); padding: 6px 8px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ref-pager {
  display: flex; align-items: center; gap: 12px; justify-content: center;
  padding: 12px 20px; border-top: 1px solid var(--line);
}
@media (max-width: 640px) {
  .ref-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ==========================================================================
   公开站点（市场 / 创作 / 用户登录）
   ========================================================================== */

/* ---- 公开头部 ---- */
.pub-header {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 20px;
  padding: 0 24px; height: 64px;
  background: var(--bg-overlay);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}
.pub-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); }
.pub-brand .logo {
  width: 36px; height: 36px; border-radius: 10px;
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-2) 100%);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 800; font-size: 16px;
  box-shadow: 0 6px 16px -4px rgba(13, 148, 136, 0.4);
}
.pub-brand .name { font-family: var(--font-display); font-weight: 700; font-size: 15px; }
.pub-nav { display: flex; gap: 6px; margin-left: 8px; }
.pub-nav a {
  padding: 8px 14px; border-radius: 10px; color: var(--text-muted);
  font-size: 14px; font-weight: 500; text-decoration: none;
}
.pub-nav a:hover { background: var(--bg-muted); color: var(--text); }
.pub-nav a.active { background: rgba(13, 148, 136, 0.1); color: var(--brand-deep); }
.pub-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.theme-toggle {
  width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--bg-elev); cursor: pointer; font-size: 16px;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.15s ease;
}
.theme-toggle:hover { background: var(--bg-muted); }
.pub-actions .uname { font-size: 13px; color: var(--text-muted); }

.pub-main { min-height: calc(100vh - 64px); }

/* ---- 市场 Hero ---- */
.market-hero {
  background:
    radial-gradient(at 15% 20%, rgba(13, 148, 136, 0.12), transparent 45%),
    radial-gradient(at 85% 30%, rgba(199, 255, 0, 0.14), transparent 45%),
    linear-gradient(135deg, #0d9488 0%, #14b8a6 60%, #7ec8ff 120%);
  color: #fff; padding: 56px 24px 64px; text-align: center;
}
.market-hero h1 { font-family: var(--font-display); font-size: 38px; font-weight: 800; letter-spacing: -0.5px; }
.market-hero p { font-size: 15px; opacity: 0.92; margin: 12px 0 24px; }
.market-hero p b { color: var(--accent); }
.hero-cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.hero-cta .btn { box-shadow: 0 10px 30px -8px rgba(0,0,0,0.3); }

/* ---- 市场容器 / 工具栏 ---- */
.market-wrap { max-width: 1200px; margin: 0 auto; padding: 28px 24px 48px; }
.market-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.market-head h1 { font-family: var(--font-display); font-size: 24px; font-weight: 700; }
.market-toolbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 24px; }
.market-toolbar .search { max-width: 340px; }
.cat-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--bg-elev); color: var(--text-muted); font-size: 13px; text-decoration: none;
  transition: all 0.15s ease;
}
.chip:hover { border-color: var(--line-strong); color: var(--text); }
.chip.active { background: var(--brand); color: #fff; border-color: var(--brand); }
.chip .cnt { opacity: 0.7; font-size: 11px; margin-left: 2px; }

/* ---- 海报网格 ---- */
.poster-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
}
.poster-card {
  background: var(--bg-elev); border: 1px solid var(--line); border-radius: var(--radius-lg);
  overflow: hidden; box-shadow: var(--shadow); transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}
.poster-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: rgba(13, 148, 136, 0.3); }
.poster-thumb { position: relative; display: block; aspect-ratio: 2 / 3; background: var(--bg-muted); overflow: hidden; text-decoration: none; }
.poster-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.poster-ph {
  width: 100%; height: 100%;
  background: linear-gradient(135deg, var(--brand) 0%, var(--sky) 100%);
  display: flex; align-items: center; justify-content: center;
}
.poster-thumb .cat { position: absolute; left: 10px; top: 10px; backdrop-filter: blur(4px); }
.poster-meta { padding: 14px 16px 16px; }
.pm-name { font-weight: 600; font-size: 15px; font-family: var(--font-display); }
.pm-desc { color: var(--text-muted); font-size: 12px; margin: 4px 0 12px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pm-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; }

/* ---- 创作页 ---- */
.create-wrap { max-width: 1200px; margin: 0 auto; padding: 24px; display: grid; grid-template-columns: 1fr 380px; gap: 24px; align-items: start; }
.create-form { min-width: 0; }
.back-link { display: inline-block; color: var(--text-muted); font-size: 13px; margin-bottom: 16px; text-decoration: none; }
.back-link:hover { color: var(--brand-deep); }
.var-list { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.var-item { margin-bottom: 0; }
.ref-style { padding: 10px 14px; border-radius: 10px; background: var(--bg-muted); font-size: 13px; color: var(--text-muted); }

/* ---- 制作同款：模板海报预览 ---- */
.ref-poster-row { display: flex; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.ref-poster-item { flex: 1; min-width: 120px; }
.ref-poster-item label { display: block; font-size: 11px; font-weight: 600; color: var(--text-soft); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 6px; }
/* contain 完整显示海报不裁剪，封面/参考两张图等高对齐 */
.ref-poster-img {
  width: 100%; height: 300px;
  object-fit: contain;
  border-radius: 10px; border: 1px solid var(--line);
  background: var(--bg-muted);
}

@media (max-width: 1024px) {
  .create-wrap { grid-template-columns: 1fr; }
  .create-preview .card { position: static !important; }
  .var-list { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .market-hero h1 { font-size: 28px; }
}

/* ---- 提示词预览卡片 ---- */
#promptPreviewCard { margin-bottom: 20px; }
#promptPreviewCard .card-header { display: flex; align-items: center; gap: 12px; }
#promptPreviewCard .card-header h2 { font-size: 15px; }
#finalPromptText { font-family: 'Courier New', 'Consolas', monospace; font-size: 13px; line-height: 1.6; }

/* ---- 用户登录：一键登录 ---- */
.btn-login {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; padding: 12px 16px; border-radius: 12px; font-size: 15px; font-weight: 600;
  text-decoration: none; transition: all 0.15s ease; margin-bottom: 6px;
}
.btn-login .ic { font-size: 18px; }
.btn-login.wechat { background: #07c160; color: #fff; box-shadow: 0 8px 20px -6px rgba(7, 193, 96, 0.5); }
.btn-login.wechat:hover { background: #06ad56; }
.login-divider { display: flex; align-items: center; gap: 12px; color: var(--text-soft); font-size: 12px; margin: 18px 0; }
.login-divider::before, .login-divider::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.login-hint { font-size: 12px; color: var(--text-soft); background: var(--bg-muted); padding: 10px 12px; border-radius: 10px; margin-bottom: 6px; text-align: center; }

/* ==========================================================================
   暗色主题
   ========================================================================== */
[data-theme="dark"] {
  --bg-base: #0b1120;
  --bg-elev: #111a2e;
  --bg-elev-2: #16213a;
  --bg-muted: #1b2740;
  --bg-overlay: rgba(17, 26, 46, 0.82);

  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.18);

  --text: #e2e8f0;
  --text-muted: #94a3b8;
  --text-soft: #64748b;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow: 0 4px 14px -4px rgba(0, 0, 0, 0.45), 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 16px 32px -8px rgba(0, 0, 0, 0.6), 0 2px 6px rgba(0, 0, 0, 0.35);
}
