:root {
  --bg: #f7f4ef;
  --card: #ffffff;
  --ink: #1e293b;
  --muted: #64748b;
  --line: #e5ded3;
  --primary: #2f7668;
  --primary-strong: #21564d;
  --soft: #edf7f4;
  --accent: #c8753a;
  --shadow: 0 18px 45px rgba(64, 45, 28, 0.08);
  --radius: 22px;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 14% 0%, rgba(47, 118, 104, 0.13), transparent 30rem),
    linear-gradient(180deg, #fffaf4 0, var(--bg) 34rem);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 15px;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
.container { width: min(1180px, calc(100% - 32px)); margin: 0 auto; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255,255,255,.9);
  border-bottom: 1px solid rgba(226, 218, 207, .8);
  backdrop-filter: blur(16px);
}
.header-inner {
  min-height: 72px;
  display: flex;
  align-items: center;
  gap: 26px;
}
.brand { display: inline-flex; align-items: center; gap: 12px; min-width: 210px; }
.brand-mark {
  width: 42px; height: 42px; border-radius: 14px;
  display: grid; place-items: center;
  color: #fff; font-weight: 800;
  background: linear-gradient(135deg, var(--primary), #75a99d);
  box-shadow: 0 10px 22px rgba(47,118,104,.22);
}
.brand strong { display: block; max-width: 240px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 19px; }
.brand small { display: block; max-width: 240px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: 12px; margin-top: 2px; }
.main-nav { display: flex; align-items: center; gap: 8px; flex: 1; }
.main-nav a {
  padding: 9px 12px;
  border-radius: 999px;
  color: #475569;
  font-weight: 650;
}
.main-nav a.active, .main-nav a:hover { color: var(--primary); background: var(--soft); }
.top-search, .inline-search { display: flex; align-items: center; gap: 8px; }
.top-search input, .inline-search input {
  width: 200px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 10px 14px;
  outline: none;
  background: #fff;
}
.top-search input:focus, .inline-search input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(47,118,104,.12); }
.top-search button, .inline-search button, .btn {
  border: 0;
  border-radius: 999px;
  padding: 10px 18px;
  cursor: pointer;
  font-weight: 700;
  white-space: nowrap;
}
.btn.primary, .top-search button, .inline-search button { background: var(--primary); color: #fff; }
.btn.primary:hover, .top-search button:hover, .inline-search button:hover { background: var(--primary-strong); }
.btn.ghost { background: #fff; color: var(--primary); border: 1px solid var(--line); }
.member-links { display: flex; align-items: center; gap: 8px; margin-left: auto; white-space: nowrap; }
.member-links a, .member-links button {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: #475569;
  padding: 8px 13px;
  font-weight: 750;
  cursor: pointer;
}
.member-links .primary-link { border-color: rgba(47,118,104,.28); background: var(--soft); color: var(--primary); }
.member-links button { color: #b45309; }

.hero { padding: 54px 0 38px; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) 420px; gap: 38px; align-items: center; }
.eyebrow { margin: 0 0 8px; color: var(--primary); font-size: 13px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
.hero h1 { margin-bottom: 16px; font-size: clamp(34px, 5vw, 38px); line-height: 1.08; letter-spacing: -.04em; }
.hero-desc { max-width: 620px; color: #526173; font-size: 17px; line-height: 1.85; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 24px; }
.hero-panel, .model-card, .filter-card, .viewer-card, .detail-card, .detail-section {
  border: 1px solid rgba(226, 218, 207, .92);
  border-radius: var(--radius);
  background: rgba(255,255,255,.88);
  box-shadow: var(--shadow);
}
.hero-panel { min-height: 350px; overflow: hidden; }
.skeleton-card, .empty-state {
  min-height: 220px;
  display: grid;
  place-items: center;
  color: var(--muted);
  background: linear-gradient(135deg, rgba(47,118,104,.06), rgba(200,117,58,.08));
}
.section { padding: 24px 0; }
.section-head { display: flex; justify-content: space-between; gap: 16px; align-items: end; margin-bottom: 16px; }
.section-head h2 { margin: 0; font-size: 26px; }
.section-head a { color: var(--primary); font-weight: 750; }
.section-head.compact h2 { font-size: 20px; }

.category-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.category-card {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  transition: transform .18s, box-shadow .18s, border-color .18s;
}
.category-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: rgba(47,118,104,.35); }
.category-card strong { display: block; margin-bottom: 8px; font-size: 17px; }
.category-card span { color: var(--muted); }

.model-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.model-card { overflow: hidden; transition: transform .18s, box-shadow .18s; }
.model-card:hover { transform: translateY(-3px); box-shadow: 0 22px 58px rgba(64,45,28,.13); }
.model-cover { aspect-ratio: 4 / 3; background: #eef2f0; position: relative; overflow: hidden; }
.model-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .25s; }
.model-card:hover .model-cover img { transform: scale(1.04); }
.tag {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--soft);
  color: var(--primary);
  font-size: 12px;
  font-weight: 750;
}
.model-cover .tag { position: absolute; left: 12px; top: 12px; background: rgba(255,255,255,.92); }
.model-body { padding: 16px; }
.model-body h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 8px;
  font-size: 18px;
  line-height: 1.35;
}
.model-body h3 > span:first-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.model-body p { margin: 0 0 14px; color: var(--muted); line-height: 1.65; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.model-meta { display: flex; gap: 8px; flex-wrap: wrap; color: var(--muted); font-size: 13px; }
.vip-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 900;
  letter-spacing: .04em;
  background:
    linear-gradient(135deg, #d49343 0%, #f2c46a 42%, #b46d2b 100%);
  border: 1px solid rgba(255, 255, 255, .62);
  box-shadow:
    0 8px 18px rgba(180, 109, 43, .22),
    inset 0 1px 0 rgba(255, 255, 255, .32);
}
.vip-badge-inline {
  flex: 0 0 auto;
  height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 11px;
  line-height: 22px;
}
.vip-download-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding-right: 14px;
}
.vip-badge-action {
  min-width: 38px;
  height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 12px;
  line-height: 24px;
  transform: translateY(-1px);
}

.page-shell { padding: 34px 0 46px; }
.narrow { width: min(920px, calc(100% - 32px)); }
.hidden { display: none !important; }
.page-title { margin-bottom: 22px; }
.page-title h1 { margin: 6px 0 10px; font-size: 34px; line-height: 1.2; color: var(--ink); }
.list-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 18px; }
.list-toolbar h1 { margin: 0; font-size: 32px; }
.filter-card { padding: 14px 18px; margin-bottom: 16px; box-shadow: none; }
.filter-row { display: flex; gap: 14px; align-items: flex-start; padding: 10px 0; border-bottom: 1px dashed #e8e0d5; }
.filter-row:last-child { border-bottom: 0; }
.filter-row > span { width: 48px; color: var(--muted); font-weight: 750; padding-top: 7px; }
.chip-group { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  border: 1px solid var(--line);
  background: #fff;
  color: #475569;
  border-radius: 999px;
  padding: 7px 13px;
  cursor: pointer;
}
.chip.active, .chip:hover { border-color: var(--primary); background: var(--soft); color: var(--primary); }
.result-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin: 18px 0; }
.result-head select { border: 1px solid var(--line); border-radius: 999px; padding: 8px 12px; background: #fff; }
.pagination { display: flex; justify-content: center; gap: 8px; margin-top: 24px; }
.page-btn { min-width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 12px; background: #fff; cursor: pointer; }
.page-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }

.breadcrumb { display: flex; gap: 8px; color: var(--muted); margin-bottom: 18px; }
.breadcrumb a { color: var(--primary); }
.detail-layout { display: grid; grid-template-columns: minmax(0, 1.25fr) 400px; gap: 22px; align-items: start; }
.viewer-card { overflow: hidden; }
.viewer-head { min-height: 58px; padding: 0 18px; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--line); }
.viewer-head div { display: flex; align-items: center; gap: 12px; }
.viewer-head span { color: var(--muted); font-size: 13px; }
.viewer-head a { color: var(--primary); font-weight: 750; }
.viewer-frame-wrap { position: relative; min-height: 560px; background: #111827; }
#model-viewer-frame { width: 100%; height: 560px; border: 0; display: none; background: #111827; }
.viewer-empty { position: absolute; inset: 0; display: grid; place-items: center; color: #cbd5e1; }
.detail-card { padding: 26px; }
.detail-card h1 { margin-bottom: 14px; font-size: 31px; line-height: 1.2; }
.detail-desc { color: var(--muted); line-height: 1.8; }
.meta-list { margin: 18px 0 0; display: grid; gap: 10px; }
.meta-list div { display: grid; grid-template-columns: 82px 1fr; gap: 10px; padding: 10px 0; border-bottom: 1px dashed var(--line); }
.meta-list dt { color: var(--muted); }
.meta-list dd { margin: 0; font-weight: 650; overflow-wrap: anywhere; }
.detail-actions { display: flex; gap: 12px; margin-top: 24px; }
.detail-section { margin-top: 22px; padding: 22px; }
.two-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.image-gallery { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.image-gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 16px; background: #f1f5f9; }
.file-list, .file-tree { border: 1px solid var(--line); border-radius: 16px; background: #fff; padding: 12px; color: #475569; }
.file-item, .tree-item { padding: 8px 10px; border-bottom: 1px solid #f0ebe4; overflow-wrap: anywhere; }
.file-item:last-child, .tree-item:last-child { border-bottom: 0; }
.tree-item.child { padding-left: 24px; color: var(--muted); }
.muted-page { min-height: 60vh; display: grid; place-items: center; text-align: center; }
.muted-card { width: min(620px, 100%); padding: 34px; border-radius: var(--radius); border: 1px solid var(--line); background: #fff; box-shadow: var(--shadow); }
.notice {
  margin-bottom: 18px;
  padding: 14px 16px;
  border: 1px solid rgba(200,117,58,.25);
  border-radius: 16px;
  background: #fff7ed;
  color: #9a3412;
}
.notice a { color: #9a3412; font-weight: 800; text-decoration: underline; }
.form-card {
  padding: 26px;
  border: 1px solid rgba(226, 218, 207, .92);
  border-radius: var(--radius);
  background: rgba(255,255,255,.92);
  box-shadow: var(--shadow);
}
.form-card label { display: block; margin: 16px 0 8px; color: #475569; font-weight: 750; }
.form-card input, .form-card textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 14px;
  background: #fff;
  color: var(--ink);
  outline: 0;
  font: inherit;
}
.form-card textarea { resize: vertical; line-height: 1.7; }
.form-card input:focus, .form-card textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(47,118,104,.12); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
.form-disabled { opacity: .72; }
.submit-row { display: flex; justify-content: flex-end; gap: 12px; margin-top: 24px; }

@media (max-width: 980px) {
  .header-inner, .list-toolbar { flex-wrap: wrap; }
  .main-nav { order: 3; flex-basis: 100%; overflow-x: auto; }
  .member-links { margin-left: 0; }
  .hero-grid, .detail-layout, .two-cols { grid-template-columns: 1fr; }
  .category-grid, .model-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .top-search input, .inline-search input { width: min(62vw, 320px); }
}
@media (max-width: 620px) {
  .container { width: min(100% - 22px, 1180px); }
  .hero { padding-top: 34px; }
  .hero h1 { font-size: 34px; }
  .category-grid, .model-grid, .image-gallery { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .detail-card h1 { font-size: 26px; }
  .viewer-frame-wrap, #model-viewer-frame { min-height: 430px; height: 430px; }
}
