/* ============ 胖虎AI — 中转站用户前端共享样式 ============ */
:root {
  --paper: #f5f2ea;          /* 页面底 */
  --paper-2: #efece2;
  --surface: #fdfcf8;        /* 卡片面 */
  --ink: #1a1813;
  --ink-2: #57534a;
  --muted: #8f8a7b;
  --hairline: #e3dfd2;
  --line: #d8d3c4;
  --accent: #d4552a;         /* 陶土橙 */
  --accent-deep: #b8431c;
  --accent-wash: rgba(212, 85, 42, .08);
  --good: #0ca30c;
  --bad: #d03b3b;
  --radius: 10px;
  --font: "Inter", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  --mono: "JetBrains Mono", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  color: var(--ink);
  background-color: var(--paper);
  /* 网格纸纹理 */
  background-image:
    linear-gradient(rgba(26, 24, 19, .045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(26, 24, 19, .045) 1px, transparent 1px);
  background-size: 28px 28px;
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
::selection { background: var(--accent); color: #fff; }

.container { max-width: 1120px; margin: 0 auto; padding: 0 32px; }

/* ---------- 顶部导航 ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(10px);
  background: rgba(245, 242, 234, .82);
  border-bottom: 1px solid var(--hairline);
}
.nav-inner {
  max-width: 1120px; margin: 0 auto; padding: 14px 32px;
  display: flex; align-items: center; gap: 40px;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark {
  width: 42px; height: 42px;
  display: grid; place-items: center; flex: none;
}
.brand-mark img {
  width: 100%; height: 100%; display: block; object-fit: contain;
}
.brand-name { font-weight: 700; font-size: 17px; letter-spacing: .01em; }
.brand-sub { font-size: 11px; color: var(--muted); letter-spacing: .28em; margin-top: -2px; }

.nav-links { display: flex; gap: 28px; margin: 0 auto; }
.nav-links a {
  font-size: 14px; color: var(--ink-2); padding: 4px 2px; position: relative;
  transition: color .2s;
}
.nav-links a:hover { color: var(--ink); }
.nav-links a.active { color: var(--accent); font-weight: 600; }
.nav-links a.active::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -4px;
  height: 2px; background: var(--accent); border-radius: 2px;
}
.nav-right { display: flex; align-items: center; gap: 14px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: none; border-radius: 8px; font-size: 14px; font-weight: 600;
  padding: 10px 22px; transition: transform .15s, box-shadow .15s, background .2s;
}
.btn:active { transform: translateY(1px); }
.btn-dark { background: var(--ink); color: #f5f2ea; }
.btn-dark:hover { box-shadow: 4px 4px 0 rgba(26,24,19,.18); transform: translate(-1px,-1px); }
.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { background: var(--accent-deep); }
.btn-ghost { background: transparent; color: var(--ink-2); border: 1px solid var(--line); }
.btn-ghost:hover { border-color: var(--ink); color: var(--ink); }
.btn-sm { padding: 6px 14px; font-size: 13px; border-radius: 7px; }
.btn-lg { padding: 13px 30px; font-size: 15px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

/* ---------- 通用区块 ---------- */
.kicker {
  font-size: 12px; letter-spacing: .3em; color: var(--accent);
  font-weight: 600; text-transform: uppercase;
}
.kicker::before { content: "— "; color: var(--muted); }

.section { padding: 96px 0; }
.section-head { text-align: center; margin-bottom: 56px; }
.section-title { font-size: 34px; font-weight: 800; letter-spacing: -.01em; margin-top: 12px; }
.section-title em { font-style: normal; color: var(--accent); }
.section-desc { color: var(--ink-2); margin-top: 12px; font-size: 15px; }

.card {
  background: var(--surface); border: 1px solid var(--hairline);
  border-radius: var(--radius);
}

/* 进场动画 */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s ease, transform .7s ease; }
.reveal.on { opacity: 1; transform: none; }

/* ---------- 像素方块 logo ---------- */
.pixel-logo { display: grid; gap: 4px; }
.pixel-logo .px {
  background: var(--ink); border-radius: 2px;
  opacity: 0; transform: scale(.3) rotate(18deg);
  animation: px-in .5s cubic-bezier(.2,.9,.3,1.3) forwards;
}
.pixel-logo .px.hl { background: var(--accent); }
@keyframes px-in { to { opacity: 1; transform: none; } }

/* ---------- 打字机 ---------- */
.type-caret {
  display: inline-block; width: 3px; height: .95em; background: var(--accent);
  margin-left: 4px; vertical-align: -0.08em; animation: caret-blink 1s steps(1) infinite;
}
@keyframes caret-blink { 50% { opacity: 0; } }

/* ---------- 表格 ---------- */
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th {
  text-align: left; font-size: 12px; color: var(--muted); font-weight: 600;
  letter-spacing: .06em; padding: 12px 16px; border-bottom: 1px solid var(--hairline);
  white-space: nowrap;
}
.table td { padding: 13px 16px; border-bottom: 1px solid var(--hairline); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: none; }
.table tbody tr { transition: background .15s; }
.table tbody tr:hover { background: rgba(26,24,19,.025); }
.num { font-variant-numeric: tabular-nums; }

.tag {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 999px;
  background: var(--paper-2); color: var(--ink-2); border: 1px solid var(--hairline);
}
.tag.ok { color: var(--good); background: rgba(12,163,12,.08); border-color: rgba(12,163,12,.25); }
.tag.err { color: var(--bad); background: rgba(208,59,59,.08); border-color: rgba(208,59,59,.25); }
.tag.acc { color: var(--accent-deep); background: var(--accent-wash); border-color: rgba(212,85,42,.3); }

/* ---------- 代码块 ---------- */
.codebox { background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--radius); overflow: hidden; }
.codebox-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 9px 14px; border-bottom: 1px solid var(--hairline);
  font-family: var(--mono); font-size: 12px; color: var(--muted);
}
.codebox pre {
  padding: 16px; overflow-x: auto; font-family: var(--mono);
  font-size: 12.5px; line-height: 1.7; color: var(--ink-2);
}
.codebox .k { color: var(--accent-deep); }
.codebox .s { color: #7a6a1f; }
.copy-btn {
  border: none; background: none; color: var(--muted); font-size: 12px;
  display: inline-flex; align-items: center; gap: 4px; padding: 2px 6px; border-radius: 5px;
}
.copy-btn:hover { color: var(--ink); background: var(--paper-2); }

/* ---------- 表单 ---------- */
.field { margin-bottom: 18px; }
.field label { display: block; font-size: 13px; font-weight: 600; color: var(--ink-2); margin-bottom: 7px; }
.input {
  width: 100%; padding: 11px 14px; font-size: 14px; font-family: inherit;
  border: 1px solid var(--line); border-radius: 8px; background: var(--surface);
  color: var(--ink); transition: border-color .2s, box-shadow .2s;
}
.input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-wash); }
.input::placeholder { color: var(--muted); }

/* ---------- Toast ---------- */
#toast-wrap { position: fixed; top: 20px; left: 50%; transform: translateX(-50%); z-index: 999; display: flex; flex-direction: column; gap: 8px; }
.toast {
  background: var(--ink); color: #f5f2ea; font-size: 13px; padding: 10px 18px;
  border-radius: 8px; box-shadow: 0 8px 24px rgba(26,24,19,.25);
  animation: toast-in .3s cubic-bezier(.2,.9,.3,1.2);
}
.toast.err { background: var(--bad); }
@keyframes toast-in { from { opacity: 0; transform: translateY(-12px); } }

/* ---------- Modal ---------- */
.modal-mask {
  position: fixed; inset: 0; background: rgba(26,24,19,.35); z-index: 100;
  display: none; align-items: center; justify-content: center; backdrop-filter: blur(3px);
}
.modal-mask.open { display: flex; }
.modal {
  width: min(480px, calc(100vw - 40px)); background: var(--surface);
  border: 1px solid var(--hairline); border-radius: 14px; padding: 28px;
  animation: modal-in .25s cubic-bezier(.2,.9,.3,1.15);
  max-height: 86vh; overflow-y: auto;
}
@keyframes modal-in { from { opacity: 0; transform: translateY(16px) scale(.97); } }
.modal h3 { font-size: 18px; margin-bottom: 18px; }

/* ---------- 滚动条 ---------- */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--line); border-radius: 5px; border: 2px solid var(--paper); }
::-webkit-scrollbar-track { background: transparent; }

@media (max-width: 860px) {
  .container { padding: 0 20px; }
  .nav-links { display: none; }
  .section { padding: 64px 0; }
  .section-title { font-size: 26px; }
}
