/* ============================================================
   Minderr 觅道 · 黑金白设计系统
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* 黑 */
  --bg: #0c0c0e;
  --bg-2: #141417;
  --bg-3: #1b1b1f;
  --card: #17171a;
  --card-2: #1e1e22;
  --line: #2a2a2f;
  /* 金 */
  --gold: #d4af37;
  --gold-2: #c9a961;
  --gold-light: #ecd9a8;
  --gold-dark: #a8862e;
  --gold-grad: linear-gradient(135deg, #f0e0b0 0%, #d4af37 48%, #b8943f 100%);
  /* 白 */
  --ivory: #f4f0e6;
  --white: #ffffff;
  /* 文字 */
  --t1: #f3eee2;
  --t2: #aaa496;
  --t3: #706b5e;
  /* 语义 */
  --green: #5fbf8f;
  --red: #d96a63;
  --blue: #6fa8d6;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 18px 50px -18px rgba(0, 0, 0, .85);
  --gold-shadow: 0 10px 30px -10px rgba(212, 175, 55, .45);
  --maxw: 1200px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
}

html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background:
    radial-gradient(1100px 500px at 85% -10%, rgba(212, 175, 55, .08), transparent 60%),
    radial-gradient(900px 480px at -10% 0%, rgba(212, 175, 55, .05), transparent 55%),
    var(--bg);
  color: var(--t1);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, textarea, select { font-family: inherit; font-size: 15px; }
::selection { background: rgba(212, 175, 55, .3); }

/* 自定义滚动条 */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #33333a; border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: var(--gold-dark); }

/* ---------- 容器 ---------- */
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.page { padding: 34px 0 70px; min-height: 70vh; }

.grid { display: grid; gap: 22px; }
.flex { display: flex; }
.between { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.center { display: flex; align-items: center; }
.gap8 { gap: 8px; } .gap12 { gap: 12px; } .gap16 { gap: 16px; }
.mt8 { margin-top: 8px; } .mt16 { margin-top: 16px; } .mt24 { margin-top: 24px; } .mt32 { margin-top: 32px; }
.mb16 { margin-bottom: 16px; } .flex1 { flex: 1; }
.muted { color: var(--t2); } .dim { color: var(--t3); }
.gold-text {
  background: var(--gold-grad); -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
h1,h2,h3,h4 { font-weight: 700; letter-spacing: .3px; line-height: 1.25; }
.page-title { font-size: 28px; font-weight: 700; }
.sec-head { display: flex; align-items: flex-end; justify-content: space-between; margin: 38px 0 18px; gap: 16px; }
.sec-head h2 { font-size: 21px; display: flex; align-items: center; gap: 10px; }
.sec-head h2::before { content: ""; width: 4px; height: 20px; border-radius: 3px; background: var(--gold-grad); }

/* ============================================================
   顶部导航
   ============================================================ */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(12, 12, 14, .82);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(212, 175, 55, .14);
}
.nav-inner { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; height: 66px; display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.brand { display: flex; align-items: center; gap: 11px; }
.brand img { width: 38px; height: 38px; border-radius: 9px; object-fit: cover; }
.brand .b-name { font-size: 18px; font-weight: 700; letter-spacing: .5px; }
.brand .b-sub { font-size: 11px; color: var(--gold-2); letter-spacing: 3px; display: block; margin-top: -2px; }
.nav-menu { display: flex; gap: 4px; align-items: center; }
.nav-menu a {
  padding: 8px 15px; border-radius: 9px; font-size: 14.5px; color: var(--t2);
  transition: all .2s; position: relative;
}
.nav-menu a:hover { color: var(--t1); background: var(--bg-3); }
.nav-menu a.active { color: var(--gold-light); }
.nav-menu a.active::after {
  content: ""; position: absolute; left: 15px; right: 15px; bottom: 2px; height: 2px;
  background: var(--gold-grad); border-radius: 2px;
}
.nav-user { display: flex; align-items: center; gap: 10px; }
.avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--gold-grad); color: #1a1508; font-weight: 700;
  display: flex; align-items: center; justify-content: center; font-size: 15px;
}
.avatar.sm { width: 30px; height: 30px; font-size: 13px; }

/* ============================================================
   按钮
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 11px 22px; border-radius: 10px; font-size: 14.5px; font-weight: 600;
  transition: all .22s; white-space: nowrap; border: 1px solid transparent;
}
.btn:active { transform: translateY(1px); }
.btn-gold { background: var(--gold-grad); color: #1c1606; box-shadow: var(--gold-shadow); }
.btn-gold:hover { filter: brightness(1.08); }
.btn-outline { border-color: rgba(212, 175, 55, .55); color: var(--gold-light); background: rgba(212, 175, 55, .06); }
.btn-outline:hover { background: rgba(212, 175, 55, .16); }
.btn-ghost { background: var(--bg-3); color: var(--t1); border-color: var(--line); }
.btn-ghost:hover { background: #26262c; }
.btn-light { background: var(--ivory); color: #1a160c; }
.btn-light:hover { background: #fff; }
.btn-sm { padding: 7px 14px; font-size: 13px; border-radius: 8px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* ============================================================
   卡片
   ============================================================ */
.card {
  background: linear-gradient(180deg, var(--card-2), var(--card));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
}
.card.gold-edge { border-color: rgba(212, 175, 55, .32); }

/* 创意卡片（闲鱼式） */
.idea-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.idea-card {
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  overflow: hidden; transition: transform .25s, border-color .25s, box-shadow .25s;
  display: flex; flex-direction: column;
}
.idea-card:hover { transform: translateY(-5px); border-color: rgba(212, 175, 55, .45); box-shadow: var(--shadow); }
.idea-thumb { aspect-ratio: 4/3; background: var(--bg-3); position: relative; overflow: hidden; }
.idea-thumb img { width: 100%; height: 100%; object-fit: cover; }
.idea-thumb .no-img {
  width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
  color: var(--gold-dark); font-size: 34px; font-weight: 700;
  background: radial-gradient(circle at 50% 40%, rgba(212,175,55,.12), transparent 70%);
}
.idea-body { padding: 14px 15px 15px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.idea-body h3 { font-size: 15.5px; font-weight: 600; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.idea-body .sum { font-size: 13px; color: var(--t2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; flex: 1; }
.idea-meta { display: flex; align-items: center; justify-content: space-between; font-size: 12.5px; color: var(--t3); }
.idea-meta .like { color: var(--gold-2); display: flex; align-items: center; gap: 4px; }

/* 悬赏卡片 */
.bounty-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.bounty-card {
  background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px;
  transition: all .25s; display: flex; flex-direction: column; gap: 12px;
}
.bounty-card:hover { border-color: rgba(212, 175, 55, .45); transform: translateY(-3px); box-shadow: var(--shadow); }
.bounty-card .top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.bounty-card h3 { font-size: 16px; font-weight: 600; }
.bounty-card .sum { font-size: 13.5px; color: var(--t2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.bounty-foot { display: flex; align-items: center; justify-content: space-between; border-top: 1px solid var(--line); padding-top: 12px; }
.reward-box { display: flex; flex-direction: column; }
.reward-box .r-val { font-size: 20px; font-weight: 700; }
.reward-box .r-lab { font-size: 11px; color: var(--t3); }
.heat-pill { font-size: 12px; color: var(--gold-2); display: inline-flex; gap: 4px; align-items: center; }

/* ============================================================
   徽章
   ============================================================ */
.badge {
  display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px;
  border-radius: 999px; font-size: 12px; font-weight: 600; line-height: 1.5;
  border: 1px solid transparent; white-space: nowrap;
}
.tier-0 { background: #26262a; color: #9a9488; border-color: #34343a; }
.tier-1 { background: rgba(201,169,97,.14); color: var(--gold-2); border-color: rgba(201,169,97,.35); }
.tier-2 { background: rgba(212,175,55,.2); color: var(--gold-light); border-color: rgba(212,175,55,.5); }
.tier-3 { background: var(--gold-grad); color: #1c1606; box-shadow: 0 4px 16px -4px rgba(212,175,55,.6); }
.st-open { background: rgba(111,168,214,.14); color: var(--blue); border-color: rgba(111,168,214,.35); }
.st-ongoing { background: rgba(212,175,55,.16); color: var(--gold-2); border-color: rgba(212,175,55,.4); }
.st-done, .st-published, .st-verified { background: rgba(95,191,143,.14); color: var(--green); border-color: rgba(95,191,143,.35); }
.st-disputed, .st-rejected { background: rgba(217,106,99,.14); color: var(--red); border-color: rgba(217,106,99,.35); }
.st-pending { background: rgba(170,164,150,.14); color: var(--t2); border-color: rgba(170,164,150,.3); }
.st-closed { background: #26262a; color: var(--t3); border-color: #34343a; }
.role-vip { color: var(--gold-light); }
.role-enterprise { color: var(--gold); }

/* ============================================================
   表单
   ============================================================ */
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13.5px; color: var(--t2); margin-bottom: 7px; font-weight: 600; }
.input, .textarea, .select {
  width: 100%; padding: 12px 14px; border-radius: 10px;
  background: var(--bg-2); border: 1px solid var(--line); color: var(--t1);
  transition: border-color .2s, box-shadow .2s; outline: none;
}
.input:focus, .textarea:focus, .select:focus {
  border-color: var(--gold-2); box-shadow: 0 0 0 3px rgba(212,175,55,.14);
}
.textarea { min-height: 130px; resize: vertical; line-height: 1.7; }
.select option { background: var(--bg-2); color: var(--t1); }
.input::placeholder, .textarea::placeholder { color: var(--t3); }
.form-hint { font-size: 12px; color: var(--t3); margin-top: 5px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.input-group { display: flex; gap: 10px; }
.input-group .input { flex: 1; }

/* 认证/登录卡片 */
.auth-wrap { max-width: 430px; margin: 48px auto; }
.auth-wrap .card { padding: 32px 30px; }
.auth-tabs { display: flex; background: var(--bg-2); border-radius: 11px; padding: 4px; margin-bottom: 26px; }
.auth-tabs button { flex: 1; padding: 9px; border-radius: 8px; font-size: 14.5px; color: var(--t2); font-weight: 600; }
.auth-tabs button.on { background: var(--gold-grad); color: #1c1606; }
.auth-logo { text-align: center; margin-bottom: 22px; }
.auth-logo img { width: 64px; height: 64px; border-radius: 14px; margin: 0 auto 12px; }

/* 图片上传占位 */
.uploader {
  border: 1.5px dashed rgba(212,175,55,.4); border-radius: 12px; padding: 26px;
  text-align: center; color: var(--t2); cursor: pointer; transition: all .2s; background: rgba(212,175,55,.04);
}
.uploader:hover { border-color: var(--gold); background: rgba(212,175,55,.1); color: var(--gold-light); }
.uploader img { max-height: 240px; margin: 0 auto; border-radius: 10px; }
.uploader .up-icon { font-size: 30px; margin-bottom: 6px; }

/* 筛选条 */
.filter-bar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 22px; }
.chip {
  padding: 7px 16px; border-radius: 999px; font-size: 13.5px; color: var(--t2);
  background: var(--bg-2); border: 1px solid var(--line); transition: all .2s;
}
.chip:hover { color: var(--t1); }
.chip.on { background: rgba(212,175,55,.18); color: var(--gold-light); border-color: var(--gold-2); }
.search-box { flex: 1; min-width: 200px; position: relative; }
.search-box .input { padding-left: 38px; }
.search-box::before { content: "⌕"; position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--t3); font-size: 18px; z-index: 1; }

/* ============================================================
   表格（管理后台）
   ============================================================ */
.table-wrap { overflow-x: auto; border-radius: 12px; border: 1px solid var(--line); }
table.data { width: 100%; border-collapse: collapse; font-size: 13.5px; min-width: 640px; }
table.data th {
  text-align: left; background: var(--bg-3); color: var(--gold-2); font-weight: 600;
  padding: 13px 15px; white-space: nowrap; border-bottom: 1px solid var(--line);
}
table.data td { padding: 12px 15px; border-bottom: 1px solid var(--line); color: var(--t2); vertical-align: middle; }
table.data tr:last-child td { border-bottom: none; }
table.data tr:hover td { background: rgba(212,175,55,.04); }

/* 后台布局 */
.admin-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 26px; border-bottom: 1px solid var(--line); }
.admin-tabs button { padding: 11px 17px; font-size: 14px; color: var(--t2); border-bottom: 2px solid transparent; margin-bottom: -1px; font-weight: 600; }
.admin-tabs button.on { color: var(--gold-light); border-bottom-color: var(--gold); }
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.stat-box { background: var(--card); border: 1px solid var(--line); border-radius: 13px; padding: 18px 20px; }
.stat-box .s-lab { font-size: 12.5px; color: var(--t3); }
.stat-box .s-val { font-size: 26px; font-weight: 700; margin-top: 6px; }

/* ============================================================
   弹窗
   ============================================================ */
.modal-mask {
  position: fixed; inset: 0; background: rgba(5,5,6,.72); backdrop-filter: blur(5px);
  display: none; align-items: center; justify-content: center; z-index: 1000; padding: 20px;
}
.modal-mask.show { display: flex; }
.modal {
  background: var(--bg-2); border: 1px solid rgba(212,175,55,.3); border-radius: 16px;
  width: 100%; max-width: 480px; max-height: 88vh; overflow-y: auto; padding: 26px;
  box-shadow: var(--shadow); animation: modalIn .25s ease;
}
@keyframes modalIn { from { opacity: 0; transform: translateY(14px) scale(.98); } to { opacity: 1; transform: none; } }
.modal h3 { margin-bottom: 16px; font-size: 18px; }
.modal .modal-foot { display: flex; gap: 10px; justify-content: flex-end; margin-top: 22px; }

/* Toast */
.toast {
  position: fixed; top: 84px; left: 50%; transform: translateX(-50%) translateY(-20px);
  background: var(--bg-3); border: 1px solid rgba(212,175,55,.4); color: var(--t1);
  padding: 11px 22px; border-radius: 11px; font-size: 14px; z-index: 2000;
  opacity: 0; transition: all .3s; box-shadow: var(--shadow); max-width: 90vw;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.err { border-color: rgba(217,106,99,.5); }
.toast.ok { border-color: rgba(95,191,143,.5); }

/* ============================================================
   首页 Hero
   ============================================================ */
.hero {
  position: relative; padding: 78px 0 70px; text-align: center; overflow: hidden;
  border-bottom: 1px solid rgba(212,175,55,.14);
}
.hero::after {
  content: ""; position: absolute; left: 50%; bottom: -1px; transform: translateX(-50%);
  width: 70%; height: 1px; background: linear-gradient(90deg, transparent, var(--gold), transparent);
}
.hero h1 { font-size: 46px; font-weight: 800; letter-spacing: 1px; margin-bottom: 18px; }
.hero p { font-size: 17px; color: var(--t2); max-width: 620px; margin: 0 auto 30px; }
.hero .hero-actions { display: flex; gap: 14px; justify-content: center; }
.hero .hero-logo { width: 88px; height: 88px; border-radius: 20px; margin: 0 auto 26px; box-shadow: var(--gold-shadow); }

/* 空状态 */
.empty { text-align: center; padding: 60px 20px; color: var(--t3); }
.empty .e-icon { font-size: 44px; margin-bottom: 12px; opacity: .6; }

/* ============================================================
   聊天室
   ============================================================ */
.chat-layout { display: grid; grid-template-columns: 1fr; gap: 0; height: 62vh; min-height: 420px; }
.chat-box { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--bg-2); }
.chat-head { padding: 14px 18px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; background: var(--bg-3); }
.chat-stream { flex: 1; overflow-y: auto; padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.msg { display: flex; gap: 10px; max-width: 78%; }
.msg .m-av { flex-shrink: 0; }
.msg .m-bubble {
  background: var(--bg-3); padding: 10px 14px; border-radius: 13px; border: 1px solid var(--line);
}
.msg .m-name { font-size: 12px; color: var(--t3); margin-bottom: 3px; }
.msg .m-text { font-size: 14.5px; white-space: pre-wrap; word-break: break-word; }
.msg.mine { align-self: flex-end; flex-direction: row-reverse; }
.msg.mine .m-bubble { background: rgba(212,175,55,.14); border-color: rgba(212,175,55,.35); }
.msg.sys { align-self: center; max-width: 90%; }
.msg.sys .m-bubble { background: transparent; border: none; color: var(--t3); font-size: 12.5px; padding: 2px; }
.msg.ai .m-bubble { border-color: rgba(212,175,55,.5); background: rgba(212,175,55,.08); }
.msg.ai .m-name { color: var(--gold-2); }
.chat-input { display: flex; gap: 10px; padding: 14px; border-top: 1px solid var(--line); background: var(--bg-3); }
.chat-input .input { flex: 1; }

/* 详情页布局 */
.detail-head { display: flex; gap: 14px; align-items: flex-start; flex-wrap: wrap; margin-bottom: 18px; }
.detail-main { display: grid; grid-template-columns: 1.4fr .9fr; gap: 22px; align-items: start; }
.like-big { display: inline-flex; align-items: center; gap: 8px; font-size: 16px; }
.kv { display: flex; justify-content: space-between; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.kv:last-child { border-bottom: none; }
.kv .k { color: var(--t3); } .kv .v { color: var(--t1); font-weight: 600; }

/* 分页 */
.pagination { display: flex; gap: 7px; justify-content: center; margin-top: 34px; }
.pagination button { min-width: 38px; height: 38px; border-radius: 9px; background: var(--bg-2); border: 1px solid var(--line); color: var(--t2); font-size: 14px; }
.pagination button.on { background: var(--gold-grad); color: #1c1606; border-color: transparent; }
.pagination button:disabled { opacity: .4; }

/* ============================================================
   响应式
   ============================================================ */
@media (max-width: 980px) {
  .idea-grid { grid-template-columns: repeat(3, 1fr); }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .detail-main { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .nav-menu { display: none; }
  .idea-grid { grid-template-columns: repeat(2, 1fr); gap: 13px; }
  .bounty-list { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .hero h1 { font-size: 34px; }
  .hero { padding: 54px 0 50px; }
  .container { padding: 0 16px; }
  .page { padding: 24px 0 50px; }
}
@media (max-width: 460px) {
  .idea-grid { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: 1fr; }
  .brand .b-sub { display: none; }
}
