/* ============================================================
   穷屌丝 · 全站样式
   配色取自站点 logo（西瓜）：果肉红 #e05555 / 瓜皮黄绿 #c9dc7f
   ============================================================ */

:root {
  --bg: #0b0e0c;
  --bg-soft: #0f1311;
  --surface: #151a17;
  --surface-2: #1a201d;
  --surface-3: #212825;
  --border: #29312c;
  --border-soft: #202724;

  --text: #eef2ec;
  --text-dim: #c6cfc7;
  --muted: #8d9a90;

  --red: #e05555;
  --red-2: #c33f3f;
  --red-dim: rgba(224, 85, 85, 0.14);
  --lime: #c9dc7f;
  --lime-2: #a9c04f;
  --lime-dim: rgba(201, 220, 127, 0.14);

  --ok: #6cc47a;
  --warn: #e3b341;

  --r-sm: 9px;
  --r: 13px;
  --r-lg: 18px;
  --shadow: 0 1px 0 rgba(255, 255, 255, 0.045) inset,
            0 14px 34px -18px rgba(0, 0, 0, 0.9);
  --nav-h: 64px;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: clip;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 15px;
  line-height: 1.65;
  color: var(--text);
  background-color: var(--bg);
  background-image:
    radial-gradient(800px 420px at 50% -180px, rgba(224, 85, 85, 0.13), transparent 72%),
    radial-gradient(640px 360px at 92% 0%, rgba(201, 220, 127, 0.055), transparent 70%);
  background-repeat: no-repeat;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
h1, h2, h3, h4 { margin: 0; font-weight: 700; letter-spacing: -0.015em; line-height: 1.3; }
p { margin: 0; }
::selection { background: rgba(224, 85, 85, 0.32); }

.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.wrap-sm { width: 100%; max-width: 780px; margin: 0 auto; padding: 0 24px; }

/* ---------------- 顶部导航 ---------------- */
.nav {
  position: sticky; top: 0; z-index: 60;
  background: rgba(11, 14, 12, 0.82);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--border-soft);
}
.nav-in {
  height: var(--nav-h);
  display: flex; align-items: center; gap: 20px;
}
.brand { display: inline-flex; align-items: center; gap: 10px; flex-shrink: 0; }
.brand-logo {
  width: 34px; height: 34px; border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 0 0 3px rgba(201, 220, 127, 0.09);
}
.brand-name {
  font-size: 17px; font-weight: 800; letter-spacing: 0.02em;
  background: linear-gradient(96deg, var(--text) 32%, var(--lime) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.nav-links {
  display: flex; align-items: center; gap: 2px;
  margin-left: auto; min-width: 0;
  overflow-x: auto; scrollbar-width: none;
}
.nav-links::-webkit-scrollbar { display: none; }
.nav-links a {
  padding: 8px 12px; border-radius: var(--r-sm);
  font-size: 14px; color: var(--muted); white-space: nowrap;
  transition: color 0.16s, background 0.16s;
}
.nav-links a:hover { color: var(--text); background: var(--surface-2); }
.nav-links a.on { color: var(--text); background: var(--surface-3); }
.nav-cta { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.nav-cta .btn-sm { padding: 8px 15px; }

/* ---------------- 按钮 ---------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 11px 20px;
  font: inherit; font-size: 14px; font-weight: 600;
  color: #fff; text-align: center; white-space: nowrap;
  background: linear-gradient(180deg, var(--red), var(--red-2));
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: var(--r-sm);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.18) inset,
              0 10px 24px -12px rgba(224, 85, 85, 0.85);
  cursor: pointer;
  transition: transform 0.15s, filter 0.15s, background 0.15s;
}
.btn:hover { filter: brightness(1.08); transform: translateY(-1px); }
.btn:active { transform: translateY(0); filter: brightness(0.98); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }

.btn-ghost {
  background: var(--surface-2);
  border-color: var(--border);
  color: var(--text);
  box-shadow: none;
}
.btn-ghost:hover { background: var(--surface-3); border-color: #37423a; filter: none; }

.btn-lime {
  background: linear-gradient(180deg, var(--lime), var(--lime-2));
  border-color: rgba(0, 0, 0, 0.18);
  color: #1a2210;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.4) inset,
              0 10px 24px -14px rgba(201, 220, 127, 0.8);
}

.btn-sm { padding: 8px 14px; font-size: 13px; border-radius: 8px; }
.btn-block { width: 100%; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------------- 卡片 ---------------- */
.card {
  background: linear-gradient(180deg, var(--surface-2) 0%, var(--surface) 100%);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 22px;
  box-shadow: var(--shadow);
}
.card + .card { margin-top: 16px; }
.card-h {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap;
  margin-bottom: 16px; padding-bottom: 14px;
  border-bottom: 1px solid var(--border-soft);
}
.card-h h2, .card-h h3 {
  font-size: 15px; font-weight: 700; letter-spacing: 0.01em;
}
.card-h .hint { font-size: 12.5px; color: var(--muted); font-weight: 400; }

/* ---------------- 表格 ---------------- */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--r);
  background: var(--bg-soft);
  -webkit-overflow-scrolling: touch;
}
table.t { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.t th {
  text-align: left; white-space: nowrap;
  padding: 11px 14px;
  font-size: 11.5px; font-weight: 600; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--muted);
  background: var(--surface-3);
  border-bottom: 1px solid var(--border);
}
table.t td {
  padding: 11px 14px;
  color: var(--text-dim);
  border-bottom: 1px solid var(--border-soft);
  vertical-align: middle;
}
table.t tbody tr:last-child td { border-bottom: 0; }
table.t tbody tr:hover td { background: rgba(255, 255, 255, 0.022); }
table.t td.num { font-variant-numeric: tabular-nums; }
table.t .empty { color: var(--muted); text-align: center; padding: 22px 14px; }

/* ---------------- 表单 ---------------- */
label.lbl {
  display: block; margin-bottom: 7px;
  font-size: 12.5px; font-weight: 600; color: var(--muted);
  letter-spacing: 0.02em;
}
.input, input[type="text"], input[type="password"], input[type="number"],
input[type="email"], input[type="time"], input[type="date"], input[type="tel"],
input[type="url"], select, textarea {
  width: 100%;
  padding: 11px 13px;
  font: inherit; font-size: 14px;
  color: var(--text);
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  transition: border-color 0.16s, box-shadow 0.16s, background 0.16s;
}
.input::placeholder, input::placeholder, textarea::placeholder { color: #61706a; }
.input:hover, select:hover { border-color: #36423a; }
.input:focus, input:focus, select:focus, textarea:focus {
  outline: none;
  background: #0c100e;
  border-color: rgba(224, 85, 85, 0.55);
  box-shadow: 0 0 0 3px rgba(224, 85, 85, 0.12);
}
textarea { resize: vertical; min-height: 104px; line-height: 1.6; }
select, select.input {
  appearance: none;
  padding-right: 32px;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238d9a90' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 11px center;
  cursor: pointer;
}
select option { background: #151a17; color: var(--text); }
.field { margin-bottom: 14px; }
.field:last-child { margin-bottom: 0; }
.form-row { display: flex; gap: 12px; flex-wrap: wrap; }
.form-row > * { flex: 1 1 150px; min-width: 0; }

/* ---------------- 提示条 ---------------- */
.alert {
  margin-top: 14px; padding: 10px 13px;
  font-size: 13px; line-height: 1.55;
  background: var(--surface-3);
  border: 1px solid var(--border);
  border-left: 3px solid var(--muted);
  border-radius: 8px;
  color: var(--text-dim);
}
.alert:empty { display: none; }
.alert.ok { border-left-color: var(--ok); background: rgba(108, 196, 122, 0.07); color: #b9e2c0; }
.alert.err { border-left-color: var(--red); background: var(--red-dim); color: #f4bdbc; }
.alert.info { border-left-color: var(--lime-2); background: var(--lime-dim); color: #d8e6b4; }

.key-box {
  margin-top: 10px; padding: 11px 13px;
  font-family: var(--mono); font-size: 12.5px;
  line-height: 1.6; word-break: break-all;
  color: var(--lime);
  background: #080b09;
  border: 1px dashed rgba(201, 220, 127, 0.3);
  border-radius: 8px;
}

/* ---------------- 标签 / 徽章 ---------------- */
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 12px;
  font-size: 12px; font-weight: 600;
  color: var(--lime);
  background: var(--lime-dim);
  border: 1px solid rgba(201, 220, 127, 0.24);
  border-radius: 999px;
}
.pill.red { color: #f0a5a5; background: var(--red-dim); border-color: rgba(224, 85, 85, 0.3); }
.pill.plain { color: var(--muted); background: var(--surface-3); border-color: var(--border); }
.dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex-shrink: 0; }
.tag {
  display: inline-block; padding: 2px 8px; border-radius: 6px;
  font-size: 11.5px; font-weight: 600;
  background: var(--surface-3); color: var(--muted);
}
.tag.ok { color: var(--ok); background: rgba(108, 196, 122, 0.12); }
.tag.off { color: #e08d8d; background: rgba(224, 85, 85, 0.12); }

/* ---------------- 代码块 ---------------- */
pre.code {
  margin: 0; padding: 16px 18px;
  font-family: var(--mono); font-size: 12.8px; line-height: 1.78;
  color: #d7e1d8;
  background: #080b09;
  border: 1px solid var(--border);
  border-radius: var(--r);
  overflow-x: auto;
  tab-size: 2;
}
pre.code .c { color: #5c6d61; }
pre.code .s { color: #e3a17a; }
pre.code .k { color: var(--lime); }
pre.code .n { color: #8fb6e0; }
code {
  padding: 1.5px 6px;
  font-family: var(--mono); font-size: 0.88em;
  color: var(--lime);
  background: var(--surface-3);
  border-radius: 5px;
}
pre code { padding: 0; background: none; color: inherit; font-size: inherit; }

/* ---------------- 分区标题 ---------------- */
.section { padding: 60px 0; }
.section-head { text-align: center; max-width: 620px; margin: 0 auto 34px; }
.eyebrow {
  display: inline-block; margin-bottom: 14px;
  font-size: 12px; font-weight: 700; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--lime-2);
}
.section-head h2 { font-size: clamp(22px, 3.4vw, 30px); margin-bottom: 10px; }
.section-head p { color: var(--muted); font-size: 14.5px; }

/* ---------------- 页脚 ---------------- */
main { flex: 1 0 auto; }
.footer {
  margin-top: auto; padding: 34px 0 40px;
  border-top: 1px solid var(--border-soft);
  background: rgba(9, 12, 10, 0.6);
}
.footer-in {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 24px; flex-wrap: wrap;
}
.footer-brand { display: flex; align-items: center; gap: 10px; }
.footer-brand img { width: 28px; height: 28px; border-radius: 50%; opacity: 0.9; }
.footer-brand b { font-size: 14px; }
.footer-note { font-size: 12.5px; color: var(--muted); margin-top: 6px; }
.footer-links { display: flex; gap: 18px; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.footer-links a:hover { color: var(--text); }

/* ---------------- 登录类居中布局 ---------------- */
.auth {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding: 40px 20px;
}
.auth-card {
  width: 100%; max-width: 430px;
  background: linear-gradient(180deg, var(--surface-2) 0%, var(--surface) 100%);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 32px 30px;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.05) inset,
              0 30px 60px -30px rgba(0, 0, 0, 0.95);
}
.auth-head { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; }
.auth-head img {
  width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 0 0 3px rgba(201, 220, 127, 0.09);
}
.auth-head h1 { font-size: 21px; }
.auth-sub { margin-bottom: 24px; font-size: 13px; color: var(--muted); }
.auth-foot {
  margin-top: 20px; padding-top: 16px;
  border-top: 1px solid var(--border-soft);
  display: flex; justify-content: center; gap: 16px; flex-wrap: wrap;
  font-size: 13px; color: var(--muted);
}
.auth-foot a { color: var(--lime); }
.auth-foot a:hover { text-decoration: underline; }

/* ---------------- 通用工具 ---------------- */
.mt-0 { margin-top: 0; }
.mt-8 { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-0 { margin-bottom: 0; }
.mb-12 { margin-bottom: 12px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.mono { font-family: var(--mono); }
.nowrap { white-space: nowrap; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.empty { color: var(--muted); font-size: 13.5px; text-align: center; padding: 20px 0; }

@media (max-width: 720px) {
  .wrap, .wrap-sm { padding: 0 16px; }
  .nav-in { gap: 12px; }
  .brand-name { display: none; }
  .nav-cta .btn-ghost { display: none; }
  .section { padding: 44px 0; }
  .card { padding: 18px; }
  .auth-card { padding: 26px 22px; }
}
