/* =========================================================
   星手换物集 · styles.css
   深色渐变 + 玻璃拟态 · 响应式
   ========================================================= */

:root {
  --bg-0: #07070f;
  --bg-1: #0d0d1f;
  --ink: #eef0ff;
  --ink-dim: #a7a9c8;
  --ink-faint: #6f7196;
  --glass: rgba(255, 255, 255, .055);
  --glass-strong: rgba(255, 255, 255, .09);
  --line: rgba(255, 255, 255, .10);
  --pink: #ff5c8a;
  --violet: #8b5cf6;
  --cyan: #38d9f5;
  --gold: #fbbf24;
  --green: #34d399;
  --grad: linear-gradient(135deg, var(--pink), var(--violet));
  --grad-soft: linear-gradient(135deg, rgba(255, 92, 138, .18), rgba(139, 92, 246, .18));
  --radius: 18px;
  --radius-lg: 24px;
  --shadow: 0 20px 50px -20px rgba(0, 0, 0, .55);
  --font: system-ui, -apple-system, "Segoe UI", "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Noto Sans SC", sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg-1);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
img { display: block; max-width: 100%; }
section, .section, .comments, .detail { scroll-margin-top: 84px; }
::selection { background: rgba(255, 92, 138, .35); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .14); border-radius: 8px; }
::-webkit-scrollbar-track { background: transparent; }

/* ---------- 背景 ---------- */
.bg {
  position: fixed; inset: 0; z-index: -2;
  background:
    radial-gradient(1200px 800px at 85% -10%, rgba(139, 92, 246, .28), transparent 60%),
    radial-gradient(1000px 700px at -10% 30%, rgba(255, 92, 138, .20), transparent 60%),
    radial-gradient(900px 700px at 60% 110%, rgba(56, 217, 245, .16), transparent 60%),
    linear-gradient(180deg, var(--bg-0), var(--bg-1) 40%, #0a0a18);
}
.orb {
  position: fixed; border-radius: 50%; filter: blur(70px);
  opacity: .5; z-index: -1; pointer-events: none;
  animation: float 14s ease-in-out infinite;
}
.orb1 { width: 340px; height: 340px; background: rgba(255, 92, 138, .5); top: -80px; left: -60px; }
.orb2 { width: 300px; height: 300px; background: rgba(139, 92, 246, .55); top: 30%; right: -100px; animation-delay: -5s; }
.orb3 { width: 260px; height: 260px; background: rgba(56, 217, 245, .4); bottom: -60px; left: 30%; animation-delay: -9s; }
@keyframes float {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-26px) scale(1.06); }
}

/* ---------- 顶部导航 ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(18px) saturate(140%);
  background: rgba(10, 10, 26, .72);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  max-width: 1160px; margin: 0 auto; padding: 0 20px;
  height: 64px; display: flex; align-items: center; gap: 18px;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 18px; letter-spacing: .5px; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 10px; background: var(--grad);
  display: grid; place-items: center; font-size: 17px;
  box-shadow: 0 6px 18px -6px rgba(255, 92, 138, .6);
}
.nav-links { display: flex; gap: 4px; margin-left: auto; }
.nav-links a {
  position: relative; padding: 8px 14px; border-radius: 12px;
  color: var(--ink-dim); font-size: 14.5px; font-weight: 600; transition: .25s;
}
.nav-links a:hover { color: var(--ink); background: var(--glass); }
.nav-links a.on {
  color: var(--ink); background: var(--grad-soft);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14);
}
.nav-user {
  padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--glass); color: var(--ink); font-size: 13.5px; font-weight: 600;
  transition: .25s; white-space: nowrap; max-width: 140px; overflow: hidden; text-overflow: ellipsis;
}
.nav-user:hover { border-color: rgba(255, 255, 255, .3); transform: translateY(-1px); }

/* ---------- Hero ---------- */
.hero { padding: 72px 20px 40px; text-align: center; max-width: 900px; margin: 0 auto; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 14px; border-radius: 999px;
  background: var(--glass-strong); border: 1px solid var(--line);
  font-size: 13px; color: var(--ink-dim); margin-bottom: 22px; backdrop-filter: blur(10px);
}
.hero-badge b { color: var(--gold); }
.hero-title {
  font-size: clamp(34px, 6vw, 58px); line-height: 1.15; font-weight: 900; letter-spacing: 1px;
  background: linear-gradient(120deg, #fff, var(--pink) 45%, var(--violet));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-sub { margin: 18px auto 0; max-width: 560px; color: var(--ink-dim); font-size: 16.5px; }
.hero-actions { margin-top: 30px; display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.hero-stats { margin-top: 36px; display: flex; justify-content: center; gap: 34px; flex-wrap: wrap; }
.hero-stats .stat { text-align: center; }
.hero-stats .num {
  font-size: 24px; font-weight: 800;
  background: linear-gradient(120deg, #fff, #b9a8ff);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-stats .lbl { font-size: 12.5px; color: var(--ink-faint); }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 26px; border-radius: 999px; font-size: 15px; font-weight: 700;
  border: 0; transition: .28s cubic-bezier(.34, 1.56, .64, 1); will-change: transform;
}
.btn:active { transform: scale(.96); }
.btn-primary { background: var(--grad); color: #fff; box-shadow: 0 12px 30px -10px rgba(255, 92, 138, .7); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 18px 40px -12px rgba(255, 92, 138, .8); }
.btn-ghost { background: var(--glass); color: var(--ink); border: 1px solid var(--line); backdrop-filter: blur(8px); }
.btn-ghost:hover { background: var(--glass-strong); transform: translateY(-2px); }
.btn.on { background: var(--grad); color: #fff; border-color: transparent; }
.btn.on[data-act="fav"] { background: linear-gradient(135deg, #f59e0b, #f97316); box-shadow: 0 12px 30px -10px rgba(245, 158, 11, .7); }
.btn-sm { padding: 9px 16px; font-size: 13.5px; }
.btn-block { width: 100%; }

/* ---------- 区块 ---------- */
.section { max-width: 1160px; margin: 0 auto; padding: 34px 20px 10px; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.section-title { font-size: 24px; font-weight: 800; letter-spacing: .5px; }
.section-title .grad {
  background: linear-gradient(120deg, var(--pink), var(--violet));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.section-sub { color: var(--ink-faint); font-size: 13.5px; margin-top: 4px; }
.section-link { color: var(--cyan); font-size: 14px; font-weight: 600; white-space: nowrap; }
.section-link:hover { opacity: .8; }

/* ---------- 筛选胶囊 ---------- */
.pills { display: flex; gap: 8px; flex-wrap: wrap; }
.pill {
  padding: 8px 16px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--glass); color: var(--ink-dim); font-size: 13.5px; font-weight: 600; transition: .25s;
}
.pill:hover { color: var(--ink); border-color: rgba(255, 255, 255, .28); }
.pill.on {
  background: var(--grad); color: #fff; border-color: transparent;
  box-shadow: 0 8px 20px -8px rgba(255, 92, 138, .6);
}

/* ---------- 卡片网格 ---------- */
.grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }

.card {
  background: var(--glass); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; backdrop-filter: blur(14px); display: flex; flex-direction: column;
  transition: transform .3s cubic-bezier(.34, 1.56, .64, 1), box-shadow .3s, border-color .3s;
}
.card:hover { transform: translateY(-6px); border-color: rgba(255, 255, 255, .22); box-shadow: var(--shadow); }
.card-media { position: relative; display: block; aspect-ratio: 3 / 2; overflow: hidden; background: #141428; }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.card:hover .card-media img { transform: scale(1.05); }
.chip {
  position: absolute; top: 12px; padding: 5px 11px; border-radius: 999px;
  font-size: 12px; font-weight: 700; color: #fff; backdrop-filter: blur(8px);
}
.chip-type {
  left: 12px;
  background: linear-gradient(135deg, rgba(139, 92, 246, .85), rgba(255, 92, 138, .85));
  box-shadow: 0 4px 14px -4px rgba(139, 92, 246, .6);
}
.chip-delivery { right: 12px; }
.chip-local { background: rgba(56, 217, 245, .85); box-shadow: 0 4px 14px -4px rgba(56, 217, 245, .6); }
.chip-mail { background: rgba(34, 197, 94, .85); box-shadow: 0 4px 14px -4px rgba(34, 197, 94, .6); }
.card-body { padding: 16px 18px 14px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card-title { font-size: 16.5px; font-weight: 700; line-height: 1.4; }
.card-title a:hover { color: var(--pink); }
.card-desc {
  color: var(--ink-dim); font-size: 13.5px; line-height: 1.55;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.card-meta { display: flex; justify-content: space-between; color: var(--ink-faint); font-size: 12.5px; margin-top: 2px; }
.card-actions { margin-top: auto; padding-top: 10px; border-top: 1px dashed var(--line); display: flex; gap: 10px; }
.act-btn {
  display: inline-flex; align-items: center; gap: 5px; padding: 6px 12px;
  border-radius: 999px; border: 1px solid transparent; background: transparent;
  color: var(--ink-faint); font-size: 13px; font-weight: 600; transition: .22s;
}
.act-btn em { font-style: normal; }
.act-btn:hover { color: var(--ink); background: var(--glass-strong); }
.act-btn.on { color: var(--pink); }
.act-btn.on[data-act="fav"] { color: var(--gold); }

.empty {
  grid-column: 1 / -1; text-align: center; padding: 60px 20px; color: var(--ink-faint);
  background: var(--glass); border: 1px dashed var(--line); border-radius: var(--radius);
}
.empty .e { font-size: 40px; display: block; margin-bottom: 10px; }

/* ---------- 特色 ---------- */
.features { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.feature-card {
  background: var(--glass); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 26px; backdrop-filter: blur(14px); transition: .3s;
}
.feature-card:hover { transform: translateY(-4px); border-color: rgba(255, 255, 255, .22); }
.feature-icon { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; font-size: 22px; margin-bottom: 14px; }
.f1 { background: rgba(255, 92, 138, .16); }
.f2 { background: rgba(139, 92, 246, .16); }
.f3 { background: rgba(56, 217, 245, .14); }
.feature-card h3 { font-size: 16px; margin-bottom: 6px; }
.feature-card p { color: var(--ink-dim); font-size: 13.5px; }

/* ---------- CTA ---------- */
.cta { margin: 46px auto; max-width: 1160px; padding: 0 20px; }
.cta-inner {
  position: relative; overflow: hidden; border-radius: var(--radius-lg); padding: 44px 30px; text-align: center;
  background: linear-gradient(135deg, rgba(255, 92, 138, .2), rgba(139, 92, 246, .22), rgba(56, 217, 245, .14));
  border: 1px solid var(--line); backdrop-filter: blur(14px);
}
.cta-inner h2 { font-size: 24px; font-weight: 800; margin-bottom: 8px; }
.cta-inner p { color: var(--ink-dim); margin-bottom: 22px; }

/* ---------- 表单 ---------- */
.form-wrap { max-width: 720px; margin: 36px auto 0; padding: 0 20px; }
.form-card {
  background: var(--glass); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 32px; backdrop-filter: blur(16px);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { margin-bottom: 18px; }
.field label { display: block; font-size: 13.5px; font-weight: 600; color: var(--ink-dim); margin-bottom: 8px; }
.field label b { color: var(--pink); font-weight: 700; margin-left: 2px; }
.input, textarea, select {
  width: 100%; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line);
  background: rgba(10, 10, 26, .5); color: var(--ink); font-family: inherit; font-size: 14.5px; transition: .22s; outline: none;
}
.input:focus, textarea:focus, select:focus {
  border-color: rgba(255, 92, 138, .55); box-shadow: 0 0 0 3px rgba(255, 92, 138, .15);
  background: rgba(10, 10, 26, .75);
}
textarea { min-height: 110px; resize: vertical; }
select {
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--ink-dim) 50%),
    linear-gradient(135deg, var(--ink-dim) 50%, transparent 50%);
  background-position: calc(100% - 20px) 50%, calc(100% - 15px) 50%;
  background-size: 5px 5px; background-repeat: no-repeat;
}
.hint { font-size: 12px; color: var(--ink-faint); margin-top: 6px; }
.radio-row { display: flex; gap: 10px; flex-wrap: wrap; }
.radio { flex: 1; min-width: 130px; position: relative; }
.radio input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.radio span {
  display: block; padding: 12px; text-align: center; border-radius: 12px;
  border: 1px solid var(--line); background: rgba(10, 10, 26, .5);
  font-size: 14px; font-weight: 600; color: var(--ink-dim); transition: .22s;
}
.radio input:checked + span {
  border-color: transparent; color: #fff; background: var(--grad);
  box-shadow: 0 8px 20px -8px rgba(255, 92, 138, .6);
}
.form-actions { margin-top: 24px; }

/* ---------- 详情页 ---------- */
.detail { max-width: 860px; margin: 0 auto; padding: 30px 20px 60px; }
.back-link { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-faint); font-size: 14px; font-weight: 600; margin-bottom: 18px; transition: .2s; }
.back-link:hover { color: var(--ink); }
.detail-card {
  background: var(--glass); border: 1px solid var(--line); border-radius: var(--radius-lg);
  overflow: hidden; backdrop-filter: blur(16px);
}
.detail-media { position: relative; aspect-ratio: 16 / 9; background: #141428; }
.detail-media img { width: 100%; height: 100%; object-fit: cover; }
.detail-media .chips { position: absolute; top: 14px; left: 14px; display: flex; gap: 8px; }
.detail-media .chip { position: static; }
.detail-info { padding: 28px; }
.detail-title { font-size: clamp(22px, 4vw, 30px); font-weight: 800; line-height: 1.3; margin-bottom: 12px; }
.detail-meta {
  display: flex; flex-wrap: wrap; gap: 16px; color: var(--ink-faint); font-size: 13.5px;
  padding-bottom: 18px; border-bottom: 1px solid var(--line); margin-bottom: 20px;
}
.detail-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 22px; }
.detail-section { margin-top: 26px; }
.section-label { font-size: 15px; font-weight: 700; margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.section-label .bar { width: 4px; height: 16px; border-radius: 2px; background: var(--grad); }
.kv {
  display: grid; grid-template-columns: auto 1fr; gap: 10px 16px;
  background: rgba(10, 10, 26, .45); border: 1px solid var(--line); border-radius: 14px; padding: 18px;
}
.kv-label { color: var(--ink-faint); font-size: 13.5px; font-weight: 600; }
.kv-value { font-size: 14.5px; word-break: break-word; }
.detail-desc { color: var(--ink-dim); font-size: 15px; line-height: 1.8; }
.contact-box {
  margin-top: 22px; display: flex; gap: 12px; align-items: center;
  background: linear-gradient(135deg, rgba(56, 217, 245, .12), rgba(139, 92, 246, .12));
  border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px;
}
.contact-box .ico { font-size: 22px; }
.contact-box span:last-child { color: var(--ink-dim); font-size: 13.5px; }

/* 材料 / 步骤 */
.materials { display: flex; flex-direction: column; gap: 10px; }
.material-item {
  display: flex; align-items: center; gap: 10px;
  background: rgba(10, 10, 26, .45); border: 1px solid var(--line);
  border-radius: 12px; padding: 12px 14px; font-size: 14.5px;
}
.material-item .ck { color: var(--green); font-weight: 800; }
.steps { display: flex; flex-direction: column; gap: 14px; }
.step {
  display: flex; gap: 16px; background: rgba(10, 10, 26, .45);
  border: 1px solid var(--line); border-radius: 14px; padding: 18px;
}
.step-num {
  flex-shrink: 0; width: 34px; height: 34px; border-radius: 50%; background: var(--grad);
  display: grid; place-items: center; font-weight: 800; font-size: 15px;
  box-shadow: 0 6px 16px -6px rgba(255, 92, 138, .6);
}
.step h4 { font-size: 15px; margin-bottom: 5px; }
.step p { color: var(--ink-dim); font-size: 14px; line-height: 1.7; }
.tips-box {
  margin-top: 24px; border-radius: 14px; padding: 18px;
  background: linear-gradient(135deg, rgba(251, 191, 36, .12), rgba(255, 92, 138, .1));
  border: 1px solid rgba(251, 191, 36, .3);
}
.tips-box h4 { color: var(--gold); font-size: 14.5px; margin-bottom: 8px; }
.tips-box p { color: var(--ink-dim); font-size: 14px; line-height: 1.7; }
.related-card {
  display: flex; align-items: center; gap: 14px;
  background: var(--glass-strong); border: 1px solid var(--line);
  border-radius: 14px; padding: 14px; transition: .25s;
}
.related-card:hover { border-color: rgba(255, 255, 255, .28); transform: translateY(-2px); }
.related-card img { width: 84px; height: 64px; object-fit: cover; border-radius: 10px; }
.related-card h4 { font-size: 14.5px; margin-bottom: 3px; }
.related-card p { font-size: 12.5px; color: var(--ink-faint); }

/* ---------- 留言区 ---------- */
.comments { margin-top: 30px; }
.comments-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.comments-head h3 { font-size: 17px; font-weight: 700; }
.comments-head .count { color: var(--ink-faint); font-size: 13px; font-weight: 400; margin-left: 4px; }
.comment-form { display: flex; gap: 10px; margin-bottom: 20px; }
.comment-form input { flex: 1; }
.comment { display: flex; gap: 12px; padding: 16px 0; border-top: 1px solid var(--line); }
.comment-avatar {
  width: 38px; height: 38px; border-radius: 50%; flex-shrink: 0;
  background: var(--grad); display: grid; place-items: center; font-size: 15px; font-weight: 700;
}
.comment-head { display: flex; gap: 10px; align-items: baseline; margin-bottom: 4px; }
.comment-nick { font-size: 14px; font-weight: 700; }
.comment-time { font-size: 12px; color: var(--ink-faint); }
.comment-text { font-size: 14px; color: var(--ink-dim); line-height: 1.7; }
.comments .empty { margin: 0; padding: 36px; }

/* ---------- Toast / Modal ---------- */
.toast {
  position: fixed; left: 50%; bottom: 36px; transform: translate(-50%, 20px);
  background: rgba(16, 16, 36, .92); border: 1px solid var(--line); color: var(--ink);
  padding: 12px 22px; border-radius: 999px; font-size: 14px; font-weight: 600;
  opacity: 0; pointer-events: none; transition: .35s; z-index: 100;
  backdrop-filter: blur(12px); box-shadow: var(--shadow);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.modal {
  position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 20px;
  background: rgba(5, 5, 14, .6); backdrop-filter: blur(8px);
  opacity: 0; pointer-events: none; transition: .3s;
}
.modal.show { opacity: 1; pointer-events: auto; }
.modal-card {
  width: 100%; max-width: 400px; background: rgba(18, 18, 40, .95);
  border: 1px solid var(--line); border-radius: 20px; padding: 28px;
  transform: translateY(12px) scale(.97); transition: .3s;
}
.modal.show .modal-card { transform: none; }
.modal-title { font-size: 18px; font-weight: 800; margin-bottom: 6px; }
.modal-sub { color: var(--ink-faint); font-size: 13px; margin-bottom: 18px; }
.modal-actions { display: flex; gap: 10px; margin-top: 18px; }
.modal-actions .btn { flex: 1; }

/* ---------- 页脚 ---------- */
.footer {
  border-top: 1px solid var(--line); margin-top: 60px; padding: 30px 20px;
  color: var(--ink-faint); text-align: center; font-size: 13px;
}
.footer .heart { color: var(--pink); }

/* ---------- 动效 ---------- */
.shake { animation: shake .4s; }
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  75% { transform: translateX(6px); }
}
.fade-up { animation: fadeUp .6s ease both; }
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: none; }
}
.stagger > * { animation: fadeUp .6s ease both; }
.stagger > *:nth-child(2) { animation-delay: .06s; }
.stagger > *:nth-child(3) { animation-delay: .12s; }
.stagger > *:nth-child(4) { animation-delay: .18s; }
.stagger > *:nth-child(5) { animation-delay: .24s; }
.stagger > *:nth-child(6) { animation-delay: .3s; }

/* ---------- 响应式 ---------- */
@media (max-width: 720px) {
  .nav-inner { height: 58px; padding: 0 14px; gap: 10px; }
  .brand { font-size: 15.5px; }
  .brand-mark { width: 30px; height: 30px; font-size: 15px; }
  .nav-links a { padding: 7px 10px; font-size: 13px; }
  .nav-user { padding: 7px 10px; font-size: 12px; max-width: 92px; }
  .hero { padding-top: 48px; }
  .form-row { grid-template-columns: 1fr; }
  .form-card { padding: 22px; }
  .detail-info { padding: 20px; }
  .detail { padding: 20px 14px 50px; }
  .grid { grid-template-columns: 1fr; }
  .section-title { font-size: 20px; }
}
