/* ==========================================================================
   谗嘴虫 · 肉食零食订购平台 — 全局设计系统
   炭黑 × 蜜金 × 辣椒红 × 奶油白 — 潮牌肉食高级感
   ========================================================================== */
:root {
  --bg: #0d0804;
  --bg-2: #17100a;
  --bg-3: #20150b;
  --card: linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.015));
  --line: rgba(240,162,74,.16);
  --line-strong: rgba(240,162,74,.32);
  --gold: #F0A24A;
  --gold-bright: #FFC46B;
  --gold-deep: #C9772E;
  --gold-soft: #8a5c2a;
  --red: #E0453A;
  --red-deep: #B3302A;
  --cream: #F7EAD7;
  --cream-dim: #E8D8BF;
  --muted: #B8A18A;
  --muted-2: #8a735c;
  --radius: 16px;
  --radius-lg: 22px;
  --shadow: 0 18px 50px rgba(0,0,0,.5);
  --shadow-gold: 0 8px 30px rgba(240,162,74,.18);
  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --font-display: "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--cream);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
body::before {
  content: "";
  position: fixed; inset: 0; z-index: -2;
  background:
    radial-gradient(1200px 600px at 85% -10%, rgba(224,69,58,.14), transparent 60%),
    radial-gradient(1000px 700px at -10% 20%, rgba(240,162,74,.10), transparent 55%),
    radial-gradient(800px 600px at 50% 110%, rgba(240,162,74,.08), transparent 60%),
    var(--bg);
}
a { color: var(--gold-bright); text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; }

::selection { background: rgba(240,162,74,.3); }

.container { max-width: 1200px; margin: 0 auto; padding: 0 22px; }

/* ---------- 顶部导航 ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(13,8,4,.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner {
  max-width: 1200px; margin: 0 auto; padding: 0 22px;
  height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.brand { display: flex; align-items: center; gap: 11px; flex-shrink: 0; }
.brand-logo { width: 40px; height: 40px; flex-shrink: 0; }
.brand-name { font-size: 21px; font-weight: 800; letter-spacing: .06em; color: var(--cream); }
.brand-name em { font-style: normal; color: var(--gold-bright); }
.brand-name sup { font-size: .42em; color: var(--gold); margin-left: 2px; }
.nav { display: flex; align-items: center; gap: 4px; }
.nav a {
  color: var(--muted); padding: 8px 14px; border-radius: 10px;
  font-size: 14.5px; font-weight: 600; transition: .2s; white-space: nowrap;
}
.nav a:hover { color: var(--cream); }
.nav a.active { color: var(--gold-bright); background: rgba(240,162,74,.1); }
.nav .nav-auth { display: flex; align-items: center; gap: 8px; margin-left: 6px; }
.nav-user { color: var(--gold-bright); font-size: 13.5px; font-weight: 600; max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: none; border-radius: 12px; font-weight: 700; font-size: 14.5px; padding: 11px 22px; transition: .2s; white-space: nowrap; }
.btn:active { transform: scale(.97); }
.btn-gold { background: linear-gradient(135deg, #F5B255, #E8893A); color: #2a1706; box-shadow: var(--shadow-gold); }
.btn-gold:hover { filter: brightness(1.06); }
.btn-red { background: linear-gradient(135deg, #E8594C, #C22E27); color: #fff; box-shadow: 0 8px 26px rgba(224,69,58,.3); }
.btn-red:hover { filter: brightness(1.05); }
.btn-ghost { background: transparent; color: var(--gold-bright); border: 1px solid var(--line-strong); }
.btn-ghost:hover { background: rgba(240,162,74,.08); }
.btn-sm { padding: 7px 14px; font-size: 13px; border-radius: 10px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }

/* ---------- 章节标题 ---------- */
.sec { padding: 72px 0; }
.sec-kicker { display: inline-flex; align-items: center; gap: 10px; font-size: 13px; letter-spacing: .3em; color: var(--gold); text-transform: uppercase; font-weight: 700; }
.sec-kicker::before { content: ""; width: 26px; height: 2px; background: linear-gradient(90deg, var(--red), var(--gold)); }
.sec-title { font-size: 34px; font-weight: 800; letter-spacing: .02em; margin: 14px 0 8px; line-height: 1.25; }
.sec-title .hl { color: var(--gold-bright); }
.sec-sub { color: var(--muted); font-size: 15.5px; max-width: 640px; }
.sec-head { margin-bottom: 38px; }
.sec-head.center { text-align: center; }
.sec-head.center .sec-sub { margin: 0 auto; }

/* ---------- 页脚 ---------- */
.footer { border-top: 1px solid var(--line); padding: 48px 0 36px; margin-top: 40px; background: var(--bg-2); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; }
.footer h4 { font-size: 15px; color: var(--cream); margin-bottom: 14px; }
.footer a, .footer p { color: var(--muted); font-size: 13.5px; display: block; margin-bottom: 8px; }
.footer .fine { color: var(--muted-2); font-size: 12px; line-height: 1.8; }
.footer-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.footer-brand .brand-logo { width: 34px; height: 34px; }

/* ---------- 徽章 / 标签 ---------- */
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 700; letter-spacing: .08em; }
.badge-hot { color: var(--red); border: 1px solid rgba(224,69,58,.4); background: rgba(224,69,58,.1); }
.badge-gold { color: var(--gold-bright); border: 1px solid rgba(240,162,74,.4); background: rgba(240,162,74,.1); }
.badge-green { color: #7fd0a8; border: 1px solid rgba(127,208,168,.4); background: rgba(127,208,168,.1); }
.badge-gray { color: var(--muted); border: 1px solid rgba(184,161,138,.3); background: rgba(184,161,138,.08); }

/* ---------- 通用卡片 ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }

/* ---------- Toast ---------- */
#toast {
  position: fixed; left: 50%; bottom: 44px; transform: translateX(-50%) translateY(20px);
  background: rgba(30,20,10,.96); color: var(--cream); padding: 12px 22px; border-radius: 12px;
  border: 1px solid var(--line-strong); font-size: 14px; z-index: 999; opacity: 0; pointer-events: none;
  transition: .3s; max-width: 86vw; text-align: center; box-shadow: var(--shadow);
}
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
#toast.err { border-color: rgba(224,69,58,.5); }

/* ---------- 弹窗遮罩 ---------- */
.mask {
  position: fixed; inset: 0; z-index: 200; background: rgba(5,3,1,.7);
  backdrop-filter: blur(3px); display: none; align-items: flex-end; justify-content: center;
}
.mask.show { display: flex; }
.sheet {
  width: 100%; max-width: 560px; max-height: 88vh; overflow-y: auto;
  background: linear-gradient(180deg, #1c120a, #140d07);
  border: 1px solid var(--line-strong); border-bottom: none;
  border-radius: 22px 22px 0 0; padding: 22px 22px calc(22px + env(safe-area-inset-bottom));
  animation: sheetup .28s ease;
}
@keyframes sheetup { from { transform: translateY(40px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.sheet-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.sheet-head h3 { font-size: 18px; }

/* ---------- 表单 ---------- */
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 7px; font-weight: 600; }
.input, .select, .textarea {
  width: 100%; background: rgba(255,255,255,.04); border: 1px solid var(--line);
  border-radius: 12px; padding: 12px 14px; color: var(--cream); font-size: 15px; outline: none; transition: .2s;
}
.input:focus, .select:focus, .textarea:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(240,162,74,.12); }
.input::placeholder, .textarea::placeholder { color: var(--muted-2); }
.select option { background: #1c120a; color: var(--cream); }
.textarea { min-height: 80px; resize: vertical; }

/* ---------- 响应式 ---------- */
@media (max-width: 820px) {
  .sec { padding: 52px 0; }
  .sec-title { font-size: 27px; }
  .footer-grid { grid-template-columns: 1fr; gap: 22px; }
  .topbar-inner { height: 58px; }
  .nav { overflow-x: auto; -webkit-overflow-scrolling: touch; position: relative; mask-image: linear-gradient(90deg,#000 88%,transparent); -webkit-mask-image: linear-gradient(90deg,#000 88%,transparent); padding-right: 18px; }
  .nav::-webkit-scrollbar { display: none; }
  .nav a { font-size: 13.5px; padding: 7px 11px; }
  .nav-auth .nav-user { display: none; }
  .brand-name { font-size: 17px; }
  .brand-logo { width: 34px; height: 34px; }
}
@media (max-width: 560px) {
  .container { padding: 0 16px; }
  .topbar-inner { padding: 0 14px; }
  .sec-title { font-size: 24px; }
  .brand-name { font-size: 18px; }
}
