/* ============================================================
   全球 AI 作品博物馆 · 浅色光感主题（克制版）
   小字号 / 轻按钮 / 窄卡片，用留白做节奏
   ============================================================ */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg: #f8f9fc;
  --text: #1a2233;
  --muted: #6b7486;
  --faint: #9aa3b5;
  --border: #e6eaf1;
  --card: #ffffff;
  --primary: #0ea5e9;
  --primary-2: #2563eb;
  --violet: #8b5cf6;
  --danger: #dc2626;
  --ring: rgba(14, 165, 233, 0.15);
  --radius: 12px;
  --shadow-sm: 0 1px 2px rgba(23, 32, 54, 0.04);
  --shadow-md: 0 4px 16px rgba(23, 32, 54, 0.06);
  --shadow-lg: 0 12px 36px rgba(23, 32, 54, 0.09);
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  line-height: 1.65;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
}

/* ---------- 背景极光光斑 ---------- */
.aurora { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.aurora div { position: absolute; border-radius: 50%; filter: blur(100px); opacity: 0.42; }
.aurora .a1 { width: 620px; height: 420px; top: -190px; left: -130px; background: linear-gradient(135deg, #cfdcff, #e6d9ff); }
.aurora .a2 { width: 540px; height: 380px; top: -150px; right: -150px; background: linear-gradient(135deg, #d3f1ff, #d6e7ff); }
.aurora .a3 { width: 680px; height: 460px; top: 46%; left: 33%; background: linear-gradient(135deg, #ece1ff, #dcedff); opacity: 0.32; }

main { flex: 1; width: min(1060px, 90%); margin: 0 auto; padding: 16px 0 72px; }

/* ---------- 悬浮胶囊导航（更轻薄） ---------- */
.nav-wrap {
  position: sticky; top: 14px; z-index: 50;
  width: min(1060px, 90%); margin: 14px auto 0;
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 7px 8px 7px 16px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(230, 234, 241, 0.9);
  border-radius: 999px;
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow-md);
}
.brand { font-size: 0.92rem; font-weight: 700; color: var(--text); text-decoration: none; display: inline-flex; align-items: center; gap: 8px; }
.brand-mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 24px; height: 24px; border-radius: 8px; font-size: 0.72rem; color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--violet));
  box-shadow: 0 3px 8px rgba(99, 102, 241, 0.3);
}
.nav-links { display: flex; align-items: center; gap: 6px; }
.nav-link { color: var(--muted); text-decoration: none; font-size: 0.85rem; font-weight: 600; padding: 6px 11px; border-radius: 999px; transition: color .15s, background .15s; }
.nav-link:hover { color: var(--primary-2); background: rgba(14, 165, 233, 0.07); }
.nav-user { display: inline-flex; align-items: center; gap: 7px; font-size: 0.84rem; margin: 0 4px; }
.nav-user b { max-width: 90px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 650; }
.inline { display: inline; }

/* ---------- 头像 ---------- */
.avatar {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; border-radius: 50%;
  color: #fff; font-size: 0.66rem; font-weight: 700; flex: none; user-select: none;
}

/* ---------- 按钮（轻量） ---------- */
.btn-primary {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 8px 17px; border-radius: 999px; border: none;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: #fff; font-size: 0.85rem; font-weight: 600; text-decoration: none; cursor: pointer;
  box-shadow: 0 3px 10px rgba(37, 99, 235, 0.24);
  transition: transform .16s ease, box-shadow .16s ease, filter .16s ease;
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(37, 99, 235, 0.32); filter: brightness(1.05); }
.btn-primary .arr { transition: transform .16s ease; font-weight: 500; }
.btn-primary:hover .arr { transform: translateX(2px); }
.btn-primary.lg { padding: 11px 24px; font-size: 0.9rem; }
.btn-primary.sm { padding: 6px 14px; font-size: 0.8rem; }
.btn-primary.block { width: 100%; }

.btn-ghost {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 22px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.8); color: var(--text);
  border: 1px solid var(--border); font-size: 0.9rem; font-weight: 600;
  text-decoration: none; cursor: pointer; box-shadow: var(--shadow-sm);
  transition: border-color .16s, transform .16s, box-shadow .16s;
}
.btn-ghost:hover { transform: translateY(-1px); border-color: #d4dbe6; box-shadow: var(--shadow-md); }

.btn-outline {
  display: inline-flex; align-items: center;
  padding: 5px 12px; border-radius: 999px;
  background: transparent; color: var(--faint);
  border: 1px solid var(--border); font-size: 0.78rem; font-weight: 600; cursor: pointer;
  transition: color .15s, border-color .15s;
}
.btn-outline:hover { color: var(--danger); border-color: #fecaca; }

/* ---------- Hero（更多留白、更小标题） ---------- */
.hero { text-align: center; padding: 92px 0 64px; }
.hero-chip {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 5px 14px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.75); border: 1px solid var(--border);
  color: var(--primary-2); font-size: 0.76rem; font-weight: 600; letter-spacing: 0.4px;
  box-shadow: var(--shadow-sm); margin-bottom: 30px;
}
.hero-chip i { width: 6px; height: 6px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.16); }
.hero h1 {
  font-size: clamp(1.7rem, 3.6vw, 2.55rem);
  font-weight: 800; letter-spacing: 0.5px; line-height: 1.32; margin-bottom: 16px; color: #141c2e;
}
.hero h1 em {
  font-style: normal;
  background: linear-gradient(120deg, var(--violet), var(--primary));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-sub { color: var(--muted); font-size: 0.95rem; max-width: 480px; margin: 0 auto 36px; }
.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

.hero-stats { display: flex; align-items: center; justify-content: center; gap: 40px; margin-top: 64px; }
.stat { display: flex; flex-direction: column; align-items: center; gap: 1px; }
.stat b { font-size: 1.3rem; font-weight: 800; line-height: 1.2; letter-spacing: -0.3px; }
.stat span { color: var(--faint); font-size: 0.76rem; }
.stat-sep { width: 1px; height: 26px; background: var(--border); }

/* ---------- 空状态 ---------- */
.empty { text-align: center; padding: 72px 0 36px; }
.empty-icon { font-size: 2.5rem; margin-bottom: 14px; opacity: 0.9; }
.empty h1, .empty h2 { font-size: 1.25rem; margin-bottom: 8px; }
.empty p { color: var(--muted); margin-bottom: 26px; font-size: 0.9rem; }

/* ---------- 区块标题 ---------- */
.sec-head { display: flex; align-items: center; gap: 16px; margin: 10px 0 20px; scroll-margin-top: 90px; }
.sec-head h2 { font-size: 1.12rem; font-weight: 800; letter-spacing: 0.3px; white-space: nowrap; }
.sec-line { flex: 1; height: 1px; background: linear-gradient(90deg, var(--border), transparent); }

/* 模型筛选胶囊（小） */
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 26px; }
.chip {
  padding: 4px 13px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--border); background: rgba(255, 255, 255, 0.8);
  color: var(--muted); font-size: 0.76rem; font-weight: 600; font-family: inherit;
  transition: all .15s ease; box-shadow: none;
}
.chip:hover { border-color: var(--primary); color: var(--primary-2); }
.chip.active {
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  border-color: transparent; color: #fff;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.26);
}

/* 滚动浮现 */
.reveal { opacity: 0; transform: translateY(12px); transition: opacity .5s ease, transform .5s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }

/* ---------- 卡片网格（窄卡、细边、轻影） ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(225px, 1fr)); gap: 20px; }
.card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; text-decoration: none; color: var(--text);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
  display: flex; flex-direction: column; box-shadow: var(--shadow-sm);
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: #dbe3ef; }
.thumb { overflow: hidden; background: #f2f5f9; padding: 8px 8px 0; }
.thumb img {
  width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block;
  border-radius: 8px; transition: transform .4s ease;
}
.card:hover .thumb img { transform: scale(1.035); }
.card-body { padding: 11px 13px 13px; display: flex; flex-direction: column; gap: 9px; }
.card-body h3 { font-size: 0.9rem; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; }

/* 模型标签：渐变底白字（颜色由模板注入） */
.tag {
  padding: 2.5px 10px; border-radius: 999px; font-size: 0.68rem; font-weight: 650;
  color: #fff; white-space: nowrap; letter-spacing: 0.2px;
  box-shadow: none;
}
.author { display: inline-flex; align-items: center; gap: 6px; color: var(--faint); font-size: 0.76rem; font-weight: 550; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.author .avatar { width: 18px; height: 18px; font-size: 0.56rem; }

/* ---------- 详情页 ---------- */
.crumb { color: var(--faint); text-decoration: none; font-size: 0.84rem; display: inline-block; margin-bottom: 14px; font-weight: 600; }
.crumb:hover { color: var(--primary-2); }
.detail { display: grid; grid-template-columns: 1.65fr 1fr; gap: 22px; align-items: start; }
.detail-media {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 10px; box-shadow: var(--shadow-md);
}
.detail-img {
  width: 100%; border-radius: 8px; display: block; cursor: zoom-in; background: #eef2f7;
}
.detail-media figcaption { text-align: center; color: var(--faint); font-size: 0.72rem; margin-top: 9px; }
.detail-info {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 22px; position: sticky; top: 96px; box-shadow: var(--shadow-md);
}
.detail-info h1 { font-size: 1.18rem; line-height: 1.4; margin-bottom: 12px; }
.tags { margin-bottom: 14px; }
.desc { color: var(--text); line-height: 1.8; margin-bottom: 20px; white-space: pre-wrap; font-size: 0.88rem; }
.facts div { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; border-top: 1px solid var(--border); font-size: 0.83rem; }
.facts dt { color: var(--muted); font-weight: 500; }
.facts dd { max-width: 65%; text-align: right; font-weight: 600; }
.creator { display: inline-flex; align-items: center; gap: 7px; }

/* ---------- 表单（窄、轻） ---------- */
.form-card {
  background: rgba(255, 255, 255, 0.9); border: 1px solid var(--border);
  border-radius: 16px; padding: 30px; max-width: 520px; margin: 40px auto;
  box-shadow: var(--shadow-lg); backdrop-filter: blur(10px);
}
.form-card.narrow { max-width: 372px; }
.form-head h1 { font-size: 1.3rem; margin-bottom: 3px; letter-spacing: 0.2px; }
.form-head p { color: var(--muted); font-size: 0.84rem; margin-bottom: 24px; }
.form-card label { display: block; margin-bottom: 15px; font-size: 0.8rem; color: var(--muted); font-weight: 600; }
.form-card input:not([type="file"]), .form-card select, .form-card textarea {
  width: 100%; margin-top: 6px; padding: 9px 12px; border-radius: 10px;
  border: 1px solid var(--border); background: #fff; color: var(--text);
  font-size: 0.9rem; font-family: inherit; transition: border-color .15s, box-shadow .15s;
}
.form-card input:focus, .form-card select:focus, .form-card textarea:focus {
  outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--ring);
}
.form-card select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--faint) 50%), linear-gradient(135deg, var(--faint) 50%, transparent 50%); background-position: calc(100% - 17px) 50%, calc(100% - 12px) 50%; background-size: 5px 5px; background-repeat: no-repeat; }
.form-card textarea { resize: vertical; }
.error {
  background: #fef2f2; border: 1px solid #fecaca;
  color: var(--danger); padding: 9px 13px; border-radius: 10px; margin-bottom: 16px; font-size: 0.84rem;
}
.switch { text-align: center; margin-top: 14px; color: var(--muted); font-size: 0.84rem; }
.switch a { color: var(--primary-2); font-weight: 700; text-decoration: none; }

/* 上传拖拽区 */
.dropzone {
  margin-top: 6px; border: 1.5px dashed #d4dbe6; border-radius: 12px;
  background: #f8fafc; cursor: pointer; overflow: hidden;
  transition: border-color .15s, background .15s;
}
.dropzone:hover, .dropzone.dragover { border-color: var(--primary); background: rgba(14, 165, 233, 0.04); }
.dz-inner { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 26px 14px; color: var(--faint); font-size: 0.82rem; }
.dz-inner b { color: var(--text); font-weight: 650; }
.dz-icon { font-size: 1.5rem; margin-bottom: 3px; }
.dz-preview { display: block; width: 100%; max-height: 240px; object-fit: contain; background: #eef2f7; }

/* ---------- 灯箱 ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 100; background: rgba(15, 23, 42, 0.7);
  display: flex; align-items: center; justify-content: center; cursor: zoom-out;
  backdrop-filter: blur(6px); animation: fadeIn 0.18s ease;
}
.lightbox img { max-width: 94vw; max-height: 92vh; border-radius: 10px; box-shadow: var(--shadow-lg); }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* ---------- 页脚（轻、淡） ---------- */
.footer { border-top: 1px solid var(--border); background: rgba(255, 255, 255, 0.55); margin-top: 36px; }
.footer-inner { width: min(1060px, 90%); margin: 0 auto; padding: 30px 0 34px; }
.footer-brand { font-weight: 700; font-size: 0.92rem; display: inline-flex; align-items: center; gap: 8px; margin-bottom: 5px; }
.footer-inner > p { color: var(--faint); font-size: 0.8rem; margin-bottom: 18px; }
.footer-meta { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; color: var(--faint); font-size: 0.74rem; border-top: 1px solid var(--border); padding-top: 14px; }

/* ---------- 移动端 ---------- */
@media (max-width: 760px) {
  .detail { grid-template-columns: 1fr; }
  .detail-info { position: static; }
  .hero { padding: 64px 0 44px; }
  .hero-stats { gap: 26px; }
  .nav-user b { display: none; }
  .nav-link { padding: 6px 8px; }
}
