/* ============================================================
   工具集 · 前台样式
   ============================================================ */

:root {
  --bg: #f5f6fa;
  --bg-soft: #eef0f6;
  --surface: #ffffff;
  --surface-2: #fbfbfd;
  --text: #101828;
  --text-2: #5a6478;
  --text-3: #949cad;
  --line: rgba(16, 24, 40, 0.07);
  --line-strong: rgba(16, 24, 40, 0.13);
  --brand: #5a5ce0;
  --brand-soft: #eef0ff;
  --brand-text: #4343c4;

  --shadow-xs: 0 1px 2px rgba(16, 24, 40, 0.05);
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.04), 0 2px 6px rgba(16, 24, 40, 0.04);
  --shadow-md: 0 2px 4px rgba(16, 24, 40, 0.04), 0 10px 24px rgba(16, 24, 40, 0.07);
  --shadow-lg: 0 8px 16px rgba(16, 24, 40, 0.06), 0 28px 64px rgba(16, 24, 40, 0.16);

  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-xl: 26px;

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Source Han Sans SC", system-ui, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e1016;
    --bg-soft: #151823;
    --surface: #171a24;
    --surface-2: #1c202c;
    --text: #f2f4f9;
    --text-2: #a6aec2;
    --text-3: #6f7789;
    --line: rgba(255, 255, 255, 0.08);
    --line-strong: rgba(255, 255, 255, 0.16);
    --brand: #8387ff;
    --brand-soft: #23264a;
    --brand-text: #b9bcff;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 28px 64px rgba(0, 0, 0, 0.6);
  }
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.6;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(680px 420px at 12% -8%, rgba(122, 124, 255, 0.16), transparent 70%),
    radial-gradient(620px 380px at 92% 4%, rgba(80, 200, 190, 0.12), transparent 68%),
    radial-gradient(700px 500px at 50% 106%, rgba(180, 130, 255, 0.09), transparent 72%);
  pointer-events: none;
}

@media (prefers-color-scheme: dark) {
  body::before {
    background:
      radial-gradient(680px 420px at 12% -8%, rgba(90, 92, 224, 0.22), transparent 70%),
      radial-gradient(620px 380px at 92% 4%, rgba(24, 140, 130, 0.16), transparent 68%);
  }
}

button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }

.wrap {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ============================ 顶栏 ============================ */

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s ease;
}

.topbar.is-stuck { border-bottom-color: var(--line); }

.topbar__inner {
  height: 68px;
  display: flex;
  align-items: center;
  gap: 20px;
}

.brand { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }

.brand__mark {
  width: 34px;
  height: 34px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #6f71ff, #5a5ce0 55%, #8b5cf6);
  box-shadow: 0 4px 12px rgba(90, 92, 224, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.32);
  color: #fff;
}

.brand__mark svg { width: 19px; height: 19px; }

.brand__text { display: flex; flex-direction: column; line-height: 1.15; }

.brand__text strong {
  font-size: 15px;
  font-weight: 650;
  letter-spacing: 0.01em;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand__text span {
  font-size: 10.5px;
  color: var(--text-3);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 500;
}

.topbar__tools { margin-left: auto; display: flex; align-items: center; gap: 10px; }

.search {
  position: relative;
  display: flex;
  align-items: center;
  width: 260px;
  height: 38px;
  padding: 0 10px 0 34px;
  border-radius: var(--r-sm);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-xs);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.search:focus-within {
  border-color: color-mix(in srgb, var(--brand) 45%, transparent);
  box-shadow: 0 0 0 3.5px color-mix(in srgb, var(--brand) 12%, transparent);
}

.search__icon {
  position: absolute;
  left: 11px;
  width: 15px;
  height: 15px;
  color: var(--text-3);
  pointer-events: none;
}

.search input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 13.5px;
}

.search input::placeholder { color: var(--text-3); }
.search input::-webkit-search-cancel-button { -webkit-appearance: none; }

.search kbd {
  flex-shrink: 0;
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--text-3);
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  padding: 1px 5px;
  line-height: 1.4;
  background: var(--surface-2);
}

.search:focus-within kbd { opacity: 0; }

/* ============================ 按钮 ============================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 38px;
  padding: 0 15px;
  border: 1px solid transparent;
  border-radius: var(--r-sm);
  font-size: 13.5px;
  font-weight: 550;
  white-space: nowrap;
  transition: transform 0.12s ease, background 0.18s, border-color 0.18s, box-shadow 0.18s, color 0.18s;
}

.btn:active { transform: scale(0.975); }
.btn svg { width: 15px; height: 15px; }

.btn--primary {
  color: #fff;
  background: linear-gradient(150deg, #6a6cf5, #5457dd);
  box-shadow: 0 2px 4px rgba(90, 92, 224, 0.2), 0 6px 16px rgba(90, 92, 224, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.24);
}

.btn--primary:hover {
  background: linear-gradient(150deg, #7476ff, #5e61ec);
  box-shadow: 0 3px 6px rgba(90, 92, 224, 0.24), 0 10px 24px rgba(90, 92, 224, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.btn--ghost {
  color: var(--text-2);
  background: var(--surface);
  border-color: var(--line);
  box-shadow: var(--shadow-xs);
}

.btn--ghost:hover {
  color: var(--text);
  border-color: var(--line-strong);
  background: var(--surface-2);
}

.icon-btn {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 9px;
  color: var(--text-2);
  transition: background 0.16s, color 0.16s, border-color 0.16s;
}

.icon-btn:hover { color: var(--text); border-color: var(--line-strong); }
.icon-btn svg { width: 15px; height: 15px; }

/* ============================ Hero ============================ */

.hero { padding: 46px 0 30px; }

.hero h1 {
  margin: 0 0 10px;
  font-size: clamp(28px, 3.6vw, 40px);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.22;
  word-break: break-word;
}

.hero h1 em {
  font-style: normal;
  background: linear-gradient(100deg, #5a5ce0, #a855f7 55%, #ec4899);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero p {
  margin: 0;
  font-size: 14.5px;
  color: var(--text-2);
  max-width: 560px;
}

.hero__stats {
  margin-top: 22px;
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 12.5px;
  color: var(--text-3);
}

.hero__stats b {
  color: var(--text);
  font-weight: 650;
  font-size: 14px;
  margin-right: 2px;
  font-variant-numeric: tabular-nums;
}

.hero__stats i { width: 1px; height: 11px; background: var(--line-strong); display: block; }

/* ============================ 筛选 ============================ */

.filters { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 22px; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 13px;
  border-radius: 99px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text-2);
  font-size: 12.8px;
  font-weight: 500;
  box-shadow: var(--shadow-xs);
  transition: all 0.16s ease;
}

.chip:hover { color: var(--text); border-color: var(--line-strong); transform: translateY(-1px); }

.chip span { font-size: 11px; color: var(--text-3); font-variant-numeric: tabular-nums; }

.chip.is-active {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(150deg, #6a6cf5, #5457dd);
  box-shadow: 0 2px 8px rgba(90, 92, 224, 0.3);
}

.chip.is-active span { color: rgba(255, 255, 255, 0.72); }

/* ============================ 卡片 ============================ */

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(288px, 1fr));
  gap: 16px;
  padding-bottom: 60px;
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 20px;
  border-radius: var(--r-lg);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  text-align: left;
  overflow: hidden;
  transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.22s, border-color 0.22s;
  animation: cardIn 0.42s cubic-bezier(0.22, 1, 0.36, 1) both;
  cursor: pointer;
}

@keyframes cardIn {
  from { opacity: 0; transform: translateY(10px) scale(0.985); }
  to { opacity: 1; transform: none; }
}

.card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(420px 180px at var(--mx, 50%) var(--my, 0%), hsl(var(--h) var(--s, 88%) 60% / 0.1), transparent 70%);
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}

.card:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--brand) 20%, var(--line));
  box-shadow: var(--shadow-md);
}

.card:hover::after { opacity: 1; }

.card__head { display: flex; align-items: flex-start; gap: 12px; }

.card__icon {
  flex-shrink: 0;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-size: 22px;
  line-height: 1;
  background: linear-gradient(150deg, hsl(var(--h) var(--s, 88%) 97%), hsl(var(--h) var(--s, 88%) 91%));
  border: 1px solid hsl(var(--h) var(--s, 88%) 89%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

@media (prefers-color-scheme: dark) {
  .card__icon {
    background: linear-gradient(150deg, hsl(var(--h) var(--s, 88%) 24%), hsl(var(--h) var(--s, 88%) 18%));
    border-color: hsl(var(--h) var(--s, 88%) 32%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  }
}

.card__title-wrap { min-width: 0; flex: 1; padding-top: 1px; }

.card__title {
  margin: 0;
  font-size: 15.5px;
  font-weight: 620;
  letter-spacing: -0.01em;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card__meta {
  margin-top: 3px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  color: var(--text-3);
  overflow: hidden;
}

.card__meta span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.dot { width: 3px; height: 3px; border-radius: 99px; background: currentColor; opacity: 0.55; flex-shrink: 0; }

.card__summary {
  margin: 0;
  font-size: 13px;
  line-height: 1.62;
  color: var(--text-2);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 3.24em;
}

.card__foot {
  margin-top: auto;
  padding-top: 2px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  row-gap: 6px;
}

.tag {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-2);
  background: var(--bg-soft);
  border-radius: 6px;
  padding: 2.5px 7px;
  white-space: nowrap;
}

.card__go {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 560;
  color: var(--brand-text);
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity 0.2s, transform 0.2s;
}

.card:hover .card__go { opacity: 1; transform: none; }
.card__go svg { width: 13px; height: 13px; }

.pin {
  position: absolute;
  top: 13px;
  right: 13px;
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  color: var(--brand);
  opacity: 0.75;
}

.pin svg { width: 13px; height: 13px; }

.status {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10.5px;
  font-weight: 600;
  padding: 1.5px 7px;
  border-radius: 99px;
}

.status::before { content: ""; width: 5px; height: 5px; border-radius: 99px; background: currentColor; }

.status--new { color: #0f9e8a; background: rgba(18, 165, 148, 0.1); }
.status--beta { color: #c2700a; background: rgba(240, 160, 25, 0.13); }

@media (prefers-color-scheme: dark) {
  .status--new { color: #4ed6c4; }
  .status--beta { color: #f5b955; }
}

/* ============================ 空状态 ============================ */

.empty { padding: 68px 24px 80px; text-align: center; animation: cardIn 0.4s ease both; }

.empty__icon {
  width: 60px;
  height: 60px;
  margin: 0 auto 18px;
  border-radius: 19px;
  display: grid;
  place-items: center;
  font-size: 27px;
  background: var(--surface);
  border: 1px dashed var(--line-strong);
  box-shadow: var(--shadow-xs);
}

.empty h3 { margin: 0 0 7px; font-size: 16px; font-weight: 620; }

.empty p {
  margin: 0 auto 20px;
  font-size: 13.5px;
  color: var(--text-2);
  max-width: 340px;
}

/* ============================ 页脚 ============================ */

.site-footer {
  padding: 26px 0 42px;
  border-top: 1px solid var(--line);
  font-size: 12.5px;
  color: var(--text-3);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.site-footer a { color: var(--text-3); transition: color 0.16s; }
.site-footer a:hover { color: var(--brand-text); }
.site-footer__sep { opacity: 0.5; }

/* ============================ 弹层 ============================ */

.modal { position: fixed; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center; padding: 24px; }
.modal[hidden] { display: none; }

.modal__scrim {
  position: absolute;
  inset: 0;
  background: rgba(16, 24, 40, 0.34);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  animation: fadeIn 0.22s ease both;
}

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.modal__panel {
  position: relative;
  width: 100%;
  max-width: 620px;
  max-height: calc(100vh - 48px);
  overflow: auto;
  background: var(--surface);
  border-radius: var(--r-xl);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-lg);
  animation: popIn 0.3s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes popIn {
  from { opacity: 0; transform: translateY(14px) scale(0.97); }
  to { opacity: 1; transform: none; }
}

.modal__close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 2;
  border-color: transparent;
  background: color-mix(in srgb, var(--bg-soft) 80%, transparent);
}

/* 详情 */

.detail { padding: 30px 30px 26px; }

.detail__top { display: flex; align-items: flex-start; gap: 15px; padding-right: 40px; }

.detail__icon {
  flex-shrink: 0;
  width: 60px;
  height: 60px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  font-size: 29px;
  line-height: 1;
  background: linear-gradient(150deg, hsl(var(--h) var(--s, 88%) 97%), hsl(var(--h) var(--s, 88%) 91%));
  border: 1px solid hsl(var(--h) var(--s, 88%) 89%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

@media (prefers-color-scheme: dark) {
  .detail__icon {
    background: linear-gradient(150deg, hsl(var(--h) var(--s, 88%) 24%), hsl(var(--h) var(--s, 88%) 18%));
    border-color: hsl(var(--h) var(--s, 88%) 32%);
  }
}

.detail__head { min-width: 0; flex: 1; padding-top: 2px; }

.detail h2 {
  margin: 0 0 6px;
  font-size: 22px;
  font-weight: 680;
  letter-spacing: -0.02em;
  line-height: 1.3;
  word-break: break-word;
}

.detail__metaline {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 12px;
  color: var(--text-3);
}

.detail__url {
  margin: 18px 0 0;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border-radius: var(--r-sm);
  background: var(--bg-soft);
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--text-2);
  overflow: hidden;
}

.detail__url span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.detail__url svg { width: 13px; height: 13px; flex-shrink: 0; color: var(--text-3); }

.detail__summary {
  margin: 18px 0 0;
  font-size: 14.5px;
  line-height: 1.7;
  color: var(--text);
  font-weight: 450;
}

.detail__desc {
  margin: 14px 0 0;
  font-size: 13.8px;
  line-height: 1.82;
  color: var(--text-2);
  white-space: pre-wrap;
  word-break: break-word;
}

.detail__tags { margin-top: 18px; display: flex; flex-wrap: wrap; gap: 6px; }
.detail__tags .tag { font-size: 11.5px; padding: 3px 9px; }

.detail__changelog {
  margin-top: 18px;
  padding: 12px 14px;
  border-radius: var(--r-md);
  background: var(--surface-2);
  border: 1px solid var(--line);
  font-size: 12.8px;
  line-height: 1.75;
  color: var(--text-2);
  white-space: pre-wrap;
  word-break: break-word;
}

.detail__changelog b {
  display: block;
  font-size: 11.5px;
  color: var(--text-3);
  font-weight: 600;
  letter-spacing: 0.04em;
  margin-bottom: 6px;
  text-transform: uppercase;
}

.detail__actions {
  margin-top: 26px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.detail__actions .spacer { flex: 1; }
.detail .btn--primary { height: 40px; padding: 0 18px; }

/* ============================ Toast ============================ */

.toast {
  position: fixed;
  left: 50%;
  bottom: 30px;
  transform: translate(-50%, 14px);
  z-index: 90;
  padding: 10px 18px;
  border-radius: 99px;
  background: rgba(16, 24, 40, 0.92);
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  box-shadow: 0 10px 30px rgba(16, 24, 40, 0.28);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.24s, transform 0.24s cubic-bezier(0.22, 1, 0.36, 1);
}

.toast.is-show { opacity: 1; transform: translate(-50%, 0); }

/* ============================ 响应式 ============================ */

@media (max-width: 860px) {
  .wrap { padding: 0 18px; }
  .search { width: 190px; }
  .hero { padding: 34px 0 24px; }
}

@media (max-width: 680px) {
  .topbar__inner { height: 60px; gap: 10px; }
  .brand__text span { display: none; }
  .brand__text strong { max-width: 150px; }
  .search { width: 38px; padding: 0; justify-content: center; }
  .search__icon { position: static; }
  .search input, .search kbd { display: none; }
  .search.is-open { position: absolute; left: 14px; right: 14px; top: 11px; width: auto; padding: 0 12px 0 34px; z-index: 5; }
  .search.is-open .search__icon { position: absolute; left: 12px; }
  .search.is-open input { display: block; }
  .grid { grid-template-columns: 1fr; gap: 12px; }
  .detail { padding: 24px 20px 20px; }
  .detail h2 { font-size: 19px; }
  .modal { padding: 14px; }
  .modal__panel { max-height: calc(100vh - 28px); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ============================================================
   运行状态徽标（可随时改：正常 / 内测 / Bug 修复中 / 维护 / 已下线）
   ============================================================ */

.status--bugfix   { color: #c2412f; background: rgba(214, 69, 49, 0.11); }
.status--maintain { color: #7c5ad6; background: rgba(124, 90, 214, 0.13); }
.status--offline  { color: #6b7280; background: rgba(107, 114, 128, 0.14); }

@media (prefers-color-scheme: dark) {
  .status--bugfix   { color: #ff9385; }
  .status--maintain { color: #b7a2ff; }
  .status--offline  { color: #9aa2b1; }
}

/* ============================ 通用区块 ============================ */

.section { margin: 56px 0 0; }

.section__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.section__head h2 {
  margin: 0;
  font-size: 19px;
  font-weight: 680;
  letter-spacing: -0.01em;
}

.section__head p { margin: 5px 0 0; font-size: 13px; color: var(--text-2); }

/* ============================ 支持开发 ============================ */

.support {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  padding: 26px 28px;
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.support::before {
  content: "";
  position: absolute;
  top: -120px;
  right: -60px;
  width: 340px;
  height: 340px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(232, 80, 107, 0.18), transparent 66%);
  pointer-events: none;
}

.support__text { position: relative; max-width: 640px; }

.support__text b { display: block; margin-bottom: 6px; font-size: 16px; font-weight: 680; }

.support__text p {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.78;
  color: var(--text-2);
}

.support__actions { position: relative; display: flex; gap: 10px; flex-wrap: wrap; }

.btn--heart {
  background: linear-gradient(135deg, #ff8a9a, #e8506b);
  color: #fff;
  border: 1px solid transparent;
  box-shadow: 0 8px 22px rgba(232, 80, 107, 0.3);
}

.btn--heart:hover { box-shadow: 0 10px 28px rgba(232, 80, 107, 0.4); color: #fff; }

.support-fab {
  position: fixed;
  right: 20px;
  bottom: calc(22px + env(safe-area-inset-bottom));
  z-index: 45;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 11px 16px;
  border: none;
  border-radius: 99px;
  background: linear-gradient(135deg, #ff8a9a, #e8506b);
  color: #fff;
  font-size: 13px;
  font-weight: 650;
  box-shadow: 0 10px 26px rgba(232, 80, 107, 0.34);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.support-fab:hover { transform: translateY(-2px); box-shadow: 0 14px 32px rgba(232, 80, 107, 0.42); }
.support-fab[hidden] { display: none; }
.support-fab svg { width: 15px; height: 15px; }

/* ============================ 留言板 ============================ */

.gb {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 392px;
  gap: 22px;
  align-items: start;
}

.gb__list { display: flex; flex-direction: column; gap: 12px; }

.gb-item {
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--shadow-xs);
  animation: cardIn 0.34s ease both;
}

.gb-item__top {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 12px;
  color: var(--text-3);
}

.gb-avatar {
  width: 26px;
  height: 26px;
  flex: none;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 650;
  color: #fff;
  background: linear-gradient(145deg, #8b8dff, #5a5ce0);
}

.gb-item__name { font-size: 13px; font-weight: 620; color: var(--text); }
.gb-item__tool {
  padding: 1px 8px;
  border-radius: 99px;
  font-size: 11px;
  background: var(--brand-soft);
  color: var(--brand-text);
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.gb-item__time { margin-left: auto; flex: none; }

.gb-item__body {
  font-size: 13.5px;
  line-height: 1.72;
  color: var(--text-2);
  white-space: pre-wrap;
  word-break: break-word;
}

.gb-item__reply {
  margin-top: 10px;
  padding: 10px 12px;
  border-left: 2px solid var(--brand);
  border-radius: 0 8px 8px 0;
  background: var(--surface-2);
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--text-2);
  white-space: pre-wrap;
  word-break: break-word;
}

.gb-item__reply b {
  display: block;
  margin-bottom: 3px;
  font-size: 11px;
  color: var(--brand-text);
}

.gb-empty {
  padding: 34px 22px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--r-lg);
  text-align: center;
  font-size: 13px;
  color: var(--text-3);
  background: var(--surface-2);
}

.gb-form {
  position: sticky;
  top: 86px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.gb-form h3 { margin: 0 0 4px; font-size: 15px; font-weight: 660; }
.gb-form__lead { margin: 0 0 6px; font-size: 12.5px; color: var(--text-2); }

.gb-form label {
  display: block;
  margin: 12px 0 6px;
  font-size: 12px;
  font-weight: 620;
  color: var(--text-2);
}

.gb-form input,
.gb-form textarea {
  width: 100%;
  padding: 9px 11px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--surface-2);
  color: var(--text);
  font-size: 13.5px;
  outline: none;
  transition: border-color 0.16s, box-shadow 0.16s, background 0.16s;
}

.gb-form input:focus,
.gb-form textarea:focus {
  border-color: var(--brand);
  background: var(--surface);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 15%, transparent);
}

.gb-form textarea { min-height: 96px; resize: vertical; line-height: 1.65; }

/* 蜜罐字段：正常访客看不见，机器人会填 */
.gb-form .hp {
  position: absolute;
  left: -9999px;
  width: 0;
  height: 0;
  opacity: 0;
  pointer-events: none;
}

.gb-form__foot {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  flex-wrap: wrap;
}

.gb-form__hint { font-size: 11.5px; line-height: 1.6; color: var(--text-3); }

.gb-form__ok {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 12.5px;
  background: rgba(18, 165, 148, 0.1);
  color: #0f8b7a;
}

.gb-form__ok[hidden] { display: none; }

/* ============================ 详情页状态提示 ============================ */

.detail__health {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin-top: 14px;
  padding: 11px 13px;
  border: 1px solid transparent;
  border-radius: 12px;
  font-size: 12.5px;
  line-height: 1.68;
}

.detail__health b { font-weight: 680; }

.detail__health--bugfix {
  color: #a83a29;
  background: rgba(214, 69, 49, 0.08);
  border-color: rgba(214, 69, 49, 0.22);
}

.detail__health--maintain {
  color: #5f45a8;
  background: rgba(124, 90, 214, 0.09);
  border-color: rgba(124, 90, 214, 0.22);
}

.detail__health--beta {
  color: #96600c;
  background: rgba(240, 160, 25, 0.1);
  border-color: rgba(240, 160, 25, 0.25);
}

.detail__health--offline {
  color: var(--text-2);
  background: var(--surface-2);
  border-color: var(--line-strong);
}

@media (prefers-color-scheme: dark) {
  .detail__health--bugfix   { color: #ffa294; }
  .detail__health--maintain { color: #c3b1ff; }
  .detail__health--beta     { color: #f5c274; }
}

/* ============================ 捐助弹层 ============================ */

.donate { padding: 6px 4px 4px; text-align: center; }
.donate h2 { margin: 0; font-size: 20px; font-weight: 720; letter-spacing: -0.01em; }

.donate__lead {
  margin: 10px auto 0;
  max-width: 440px;
  font-size: 13.5px;
  line-height: 1.82;
  color: var(--text-2);
  white-space: pre-wrap;
}

.donate__qr {
  display: block;
  width: 196px;
  height: 196px;
  margin: 20px auto 8px;
  padding: 8px;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.donate__note {
  margin: 4px auto 0;
  max-width: 420px;
  font-size: 12px;
  line-height: 1.7;
  color: var(--text-3);
  white-space: pre-wrap;
}

.donate__links {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 18px;
}

.donate__link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 16px;
  border: 1px solid var(--line-strong);
  border-radius: 99px;
  background: var(--surface);
  font-size: 13px;
  font-weight: 620;
  transition: transform 0.16s, border-color 0.16s, color 0.16s;
}

.donate__link:hover {
  transform: translateY(-1px);
  border-color: var(--brand);
  color: var(--brand-text);
}

.donate__link small { font-weight: 400; color: var(--text-3); font-size: 11px; }

.donate__thanks {
  margin-top: 18px;
  font-size: 12px;
  color: var(--text-3);
}

@media (max-width: 860px) {
  .gb { grid-template-columns: 1fr; }
  .gb-form { position: static; }
}

@media (max-width: 620px) {
  .support { padding: 22px 20px; }
  .support__actions { width: 100%; }
  .support__actions .btn { flex: 1; justify-content: center; }
  .support-fab { right: 14px; bottom: calc(14px + env(safe-area-inset-bottom)); padding: 10px 14px; font-size: 12px; }
  .section { margin-top: 44px; }
}

/* 页脚文字按钮 */
.linkbtn {
  padding: 0;
  border: none;
  background: none;
  color: var(--text-3);
  font-size: 12.5px;
  transition: color 0.16s;
}
.linkbtn:hover { color: var(--brand-text); }
.linkbtn[hidden] { display: none; }
