/* 大随视觉 · 提示词图库 —— 沿用官网配色 */
:root {
  --bg: #faf8f4;
  --bg-soft: #f6f1e8;
  --line: #e9e2d6;
  --gold: #a07f48;
  --gold-light: #b8945f;
  --ink: #2d2a25;
  --ink-2: #857f74;
  --ink-3: #b3ab9c;
  --radius: 10px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  font-size: 15px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

.wrap { max-width: 1180px; margin: 0 auto; padding: 0 24px; }

/* ── 顶栏（与官网首页格式一致） ── */
.nav {
  border-bottom: 1px solid var(--line);
  background: rgba(250, 248, 244, 0.92);
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(12px);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand .logo-img { height: 42px; width: auto; display: block; }
.brand-txt { display: flex; flex-direction: column; line-height: 1.15; }
.brand-txt .cn { font-size: 19px; font-weight: 700; letter-spacing: 3px; }
.brand-txt .en { font-size: 10px; color: var(--ink-2); letter-spacing: 2.5px; margin-top: 3px; }
.menu { display: flex; gap: 36px; font-size: 14px; color: var(--ink-2); }
.menu a:hover { color: var(--gold-light); }
.nav-cta {
  border: 1px solid var(--gold-light);
  color: var(--gold-light);
  padding: 9px 22px;
  font-size: 14px;
  border-radius: 2px;
  transition: 0.25s;
}
.nav-cta:hover { background: var(--gold-light); color: #faf8f4; }
/* 后台页右侧的纯文字链接 */
.nav-links { display: flex; gap: 22px; font-size: 14px; color: var(--ink-2); }
.nav-links a:hover { color: var(--gold); }

/* ── 通栏图（与官网首页一致，纯图无文字） ── */
.mega {
  position: relative;
  width: 100%;
  aspect-ratio: 2200 / 670;
  max-height: 500px;
  overflow: hidden;
  background: #ded5c6;
}
.mega .pic { position: absolute; inset: 0; }
.mega .pic picture { display: block; width: 100%; height: 100%; }
.mega .pic img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  display: block;
}
.mega::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1px; z-index: 4;
  background: rgba(45, 42, 37, 0.14);
}

/* ── 页头 ── */
.hero { padding: 52px 0 34px; }
.hero h1 {
  font-size: 30px;
  font-weight: 500;
  letter-spacing: 1px;
  margin-bottom: 12px;
}
.hero p { color: var(--ink-2); font-size: 14px; max-width: 620px; }
.hero .rule {
  width: 44px; height: 2px; background: var(--gold);
  margin: 20px 0 0;
}

/* ── 工具栏（搜索 + 排序） ── */
.toolbar {
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 22px 0 10px;
  flex-wrap: wrap;
}
.search-box {
  flex: 1 1 280px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 100px;
  padding: 8px 16px;
  color: var(--ink-2);
}
.search-box input {
  flex: 1;
  border: 0; outline: none;
  font-size: 14px; font-family: inherit;
  background: transparent; color: var(--ink);
}
.search-box input::placeholder { color: var(--ink-3); }
.sort-select {
  padding: 9px 14px;
  border: 1px solid var(--line);
  border-radius: 100px;
  font-size: 13px; font-family: inherit;
  background: #fff; color: var(--ink);
  cursor: pointer;
  outline: none;
}
.sort-select:focus { border-color: var(--gold-light); }

/* ── 筛选条 ── */
.filters {
  display: flex; gap: 8px; flex-wrap: wrap;
  padding: 10px 0 6px;
}
.chip {
  padding: 6px 15px;
  border: 1px solid var(--line);
  border-radius: 100px;
  font-size: 13px;
  color: var(--ink-2);
  cursor: pointer;
  background: transparent;
  transition: all .18s;
  font-family: inherit;
}
.chip:hover { border-color: var(--gold-light); color: var(--gold); }
.chip.on { background: var(--ink); color: #fff; border-color: var(--ink); }

/* ── 网格 ── */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 20px 16px;
  padding: 22px 0 70px;
}
.card { display: block; cursor: pointer; }
.card-img {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--bg-soft);
  border: 1px solid var(--line);
}
.card-img img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .5s ease;
  display: block;
}
.card:hover .card-img img { transform: scale(1.04); }

.badge {
  position: absolute; top: 8px; left: 8px;
  font-size: 10px; padding: 2px 8px;
  border-radius: 100px; letter-spacing: 0.5px;
  backdrop-filter: blur(4px);
}
.badge.free { background: rgba(45,42,37,.72); color: #f0ece2; }
.badge.paid { background: rgba(160,127,72,.92); color: #fff; }

.card-meta { padding: 9px 2px 0; }
.card-title {
  font-size: 13px; line-height: 1.4; font-weight: 400;
  overflow: hidden; display: -webkit-box;
  -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.card-sub { font-size: 11px; color: var(--ink-3); margin-top: 3px; }

/* ── 详情 ── */
.detail { display: grid; grid-template-columns: 1.15fr 1fr; gap: 48px; padding: 40px 0 80px; }
.detail-img {
  border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--line); background: var(--bg-soft);
}
.detail-img img { width: 100%; display: block; max-height: 640px; object-fit: contain; background: var(--bg-soft); }
.thumbs { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.thumbs img {
  width: 62px; height: 62px; object-fit: cover;
  border-radius: 6px; border: 1px solid var(--line); cursor: pointer;
}
.thumbs img.on { border-color: var(--gold); }

.detail h2 { font-size: 24px; font-weight: 500; margin-bottom: 8px; letter-spacing: .5px; }
.detail .sub { font-size: 13px; color: var(--ink-3); margin-bottom: 26px; }
.tagline { display: flex; gap: 7px; flex-wrap: wrap; margin-bottom: 26px; }
.tag {
  font-size: 12px; color: var(--ink-2);
  background: var(--bg-soft); border: 1px solid var(--line);
  padding: 3px 10px; border-radius: 100px;
}

.section-label {
  font-size: 12px; letter-spacing: 1.6px; color: var(--ink-3);
  margin-bottom: 10px; text-transform: uppercase;
}
.prompt-box {
  background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius); padding: 18px;
  font-size: 13.5px; line-height: 1.85;
  white-space: pre-wrap; word-break: break-word;
  max-height: 380px; overflow-y: auto;
  font-family: "SF Mono", Menlo, Consolas, monospace;
  color: #3d3a33;
}
.prompt-locked {
  position: relative; overflow: hidden;
  background: var(--bg-soft); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 26px 20px;
  min-height: 250px;
  text-align: center;
}
.prompt-locked .blur {
  filter: blur(5px); opacity: .78; user-select: none;
  font-size: 13px; line-height: 1.9; color: #6b6459;
  max-height: 220px; overflow: hidden; text-align: left;
  font-family: "SF Mono", Menlo, Consolas, monospace;
}
.prompt-locked .lock-cover {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 12px;
  background: linear-gradient(180deg, rgba(246,241,232,.35), rgba(246,241,232,.97) 62%);
}
.lock-cover p { font-size: 13px; color: var(--ink-2); }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px; padding: 11px 26px;
  background: var(--ink); color: #fff;
  border: 1px solid var(--ink); border-radius: 100px;
  font-size: 14px; cursor: pointer; font-family: inherit;
  transition: all .2s;
}
.btn:hover { background: var(--gold); border-color: var(--gold); }
.btn.gold { background: var(--gold); border-color: var(--gold); }
.btn.gold:hover { background: #8b6c3a; border-color: #8b6c3a; }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn.ghost:hover { border-color: var(--gold); color: var(--gold); background: transparent; }
.btn.sm { padding: 7px 16px; font-size: 13px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

.price { font-size: 22px; color: var(--gold); font-weight: 500; }
.price small { font-size: 13px; color: var(--ink-3); font-weight: 400; }

/* ── 弹窗 ── */
.modal-mask {
  position: fixed; inset: 0; background: rgba(35,32,28,.5);
  display: none; align-items: center; justify-content: center;
  z-index: 200; padding: 20px; backdrop-filter: blur(3px);
}
.modal-mask.on { display: flex; }
.modal {
  background: var(--bg); border-radius: 14px;
  width: 100%; max-width: 400px; padding: 30px 28px;
  max-height: 90vh; overflow-y: auto;
  border: 1px solid var(--line);
}
.modal h3 { font-size: 18px; font-weight: 500; margin-bottom: 6px; }
.modal .hint { font-size: 13px; color: var(--ink-2); margin-bottom: 20px; }
.qr-frame {
  border: 1px solid var(--line); border-radius: 10px;
  padding: 12px; background: #fff; text-align: center; margin-bottom: 18px;
}
.qr-frame img { width: 100%; max-width: 220px; display: block; margin: 0 auto; }
.qr-empty {
  padding: 44px 0; color: var(--ink-3); font-size: 13px;
}
.order-line {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--bg-soft); border: 1px dashed var(--line);
  border-radius: 8px; padding: 11px 14px; margin-bottom: 8px;
  font-size: 13px;
}
.order-line b {
  font-family: "SF Mono", Menlo, Consolas, monospace;
  font-size: 14px; letter-spacing: 1px; color: var(--gold);
}
.copy { font-size: 12px; color: var(--ink-2); cursor: pointer; border: 0; background: none; font-family: inherit; }
.copy:hover { color: var(--gold); }

.field { margin-bottom: 14px; }
.field label { display: block; font-size: 12px; color: var(--ink-2); margin-bottom: 6px; }
.field input, .field textarea, .field select {
  width: 100%; padding: 10px 12px;
  border: 1px solid var(--line); border-radius: 8px;
  font-size: 14px; font-family: inherit;
  background: #fff; color: var(--ink);
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--gold-light); }
.field textarea { resize: vertical; min-height: 90px; }
.field .row2 { display: flex; gap: 10px; }

.status-tip {
  font-size: 13px; padding: 11px 14px; border-radius: 8px;
  background: #f6f1e8; color: var(--ink-2); margin-bottom: 14px;
}
.status-tip.ok { background: #eef5e6; color: #4a6b2a; }
.status-tip.wait { background: #faf3e3; color: #8a6a28; }

/* ── 后台 ── */
.admin { padding: 30px 0 80px; }
.admin-tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--line); margin-bottom: 26px; }
.admin-tabs button {
  background: none; border: 0; padding: 11px 18px;
  font-size: 14px; color: var(--ink-2); cursor: pointer;
  font-family: inherit; border-bottom: 2px solid transparent;
}
.admin-tabs button.on { color: var(--ink); border-bottom-color: var(--gold); }

.panel { display: none; }
.panel.on { display: block; }

table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { text-align: left; padding: 11px 10px; border-bottom: 1px solid var(--line); }
th { color: var(--ink-2); font-weight: 400; font-size: 12px; letter-spacing: .5px; }
tr:hover td { background: var(--bg-soft); }
.mono { font-family: "SF Mono", Menlo, Consolas, monospace; }

/* 后台封面：悬停放大 */
.cover-thumb {
  position: relative;
  display: inline-block;
  cursor: zoom-in;
}
.cover-thumb img:first-child {
  width: 72px; height: 72px;
  object-fit: cover; border-radius: 6px;
  display: block;
}
.cover-preview {
  position: absolute; left: 82px; top: 0;
  width: 260px; height: 260px;
  object-fit: cover; border-radius: 8px;
  border: 1px solid var(--line);
  box-shadow: 0 8px 24px rgba(0,0,0,.12);
  opacity: 0; pointer-events: none;
  transition: opacity .2s;
  z-index: 100;
}
.cover-thumb:hover .cover-preview {
  opacity: 1;
}

/* ── 后台卡片操作 ── */
.admin-card { position: relative; }
.admin-card .card-actions {
  position: absolute; top: 8px; right: 8px;
  display: flex; gap: 6px;
  opacity: 0; transition: opacity .2s;
}
.admin-card:hover .card-actions { opacity: 1; }
.act-btn {
  padding: 5px 12px; border-radius: 100px;
  font-size: 12px; border: 0; cursor: pointer;
  font-family: inherit; backdrop-filter: blur(4px);
}
.act-btn.edit {
  background: rgba(45,42,37,.78); color: #fff;
}
.act-btn.edit:hover { background: var(--gold); }
.act-btn.del {
  background: rgba(160,60,60,.85); color: #fff;
}
.act-btn.del:hover { background: #c44; }
.badge.draft {
  background: rgba(160,127,72,.92); color: #fff;
}

.admin-form {
  background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius); padding: 24px; max-width: 720px;
}
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
.form-grid .full { grid-column: 1 / -1; }

.upload-box {
  border: 1px dashed var(--line); border-radius: 8px;
  padding: 22px; text-align: center; color: var(--ink-3);
  font-size: 13px; cursor: pointer; background: var(--bg-soft);
}
.upload-box:hover { border-color: var(--gold-light); color: var(--gold); }
.preview-list { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.preview-list .p {
  position: relative; width: 74px; height: 74px;
  border-radius: 6px; overflow: hidden; border: 1px solid var(--line);
}
.preview-list .p img { width: 100%; height: 100%; object-fit: cover; }
.preview-list .p button {
  position: absolute; top: 2px; right: 2px;
  width: 18px; height: 18px; border-radius: 50%;
  background: rgba(0,0,0,.6); color: #fff; border: 0;
  font-size: 11px; cursor: pointer; line-height: 1;
}

.empty { text-align: center; padding: 70px 0; color: var(--ink-3); font-size: 14px; }

@media (max-width: 820px) {
  .detail { grid-template-columns: 1fr; gap: 28px; padding: 24px 0 60px; }
  .hero { padding: 34px 0 20px; }
  .hero h1 { font-size: 23px; }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 14px 10px; }
  .card-title { font-size: 12px; }
  .form-grid { grid-template-columns: 1fr; }
  .nav-links { gap: 14px; font-size: 12px; }
  .wrap { padding: 0 16px; }
  .chip { padding: 5px 12px; font-size: 12px; }
  /* 顶栏紧凑（对齐官网） */
  .brand-txt .en { display: none; }
  .menu { gap: 18px; font-size: 13px; }
  .nav-inner { height: 64px; }
  .nav-cta { padding: 8px 16px; font-size: 13px; }
  .mega { height: 300px; aspect-ratio: auto; }
}

@media (max-width: 640px) {
  .mega { height: 170px; aspect-ratio: auto; }
  .brand-txt .cn { font-size: 16px; letter-spacing: 2px; }
  .nav-inner { flex-wrap: wrap; height: auto; padding-top: 10px; padding-bottom: 10px; row-gap: 8px; }
  .nav-inner .brand { flex: 1 1 auto; }
  .nav-inner .menu {
    order: 3; width: 100%; justify-content: space-between;
    gap: 8px; font-size: 12.5px; padding-top: 6px;
    border-top: 1px solid var(--line); overflow-x: auto;
  }
  .nav-inner .nav-cta { order: 2; white-space: nowrap; }
}

@media (max-width: 520px) {
  .nav-inner .menu { font-size: 12px; }
}
