/* ==========================================================================
   模板 5 · 寻搜极简风 —— 基础层
   设计取自「寻搜」前台：单张 960px 渐变卡片 + 居中标题 + 深色实心搜索按钮。
   令牌集中在 :root，改主色只需改 --xs-brand / --xs-brand-dark / --xs-accent。
   ========================================================================== */

:root {
  --xs-brand: #2563eb;
  --xs-brand-dark: #1d4ed8;
  --xs-brand-soft: #eef4ff;
  --xs-accent: #7c3aed;
  --xs-bg: #f6f7fb;
  --xs-surface: #ffffff;
  --xs-text: #111827;
  --xs-text-2: #1f2937;
  --xs-muted: #6b7280;
  --xs-faint: #9aa2b1;
  --xs-line: #e6e8ef;
  --xs-line-2: #f1f2f7;
  --xs-success: #059669;
  --xs-warning: #d97706;
  --xs-danger: #dc2626;

  --xs-radius: 14px;
  --xs-radius-sm: 10px;
  --xs-shadow-sm: 0 2px 8px rgba(17, 24, 39, .05);
  --xs-shadow: 0 10px 30px rgba(17, 24, 39, .07);
  --xs-shadow-card: 0 34px 70px rgba(23, 37, 84, .1), 0 6px 18px rgba(23, 37, 84, .05);
  --xs-content: 1180px;
  --xs-card: 960px;
  --xs-header-h: 62px;
  --xs-grad-text: linear-gradient(96deg, #2563eb, #4f46e5 55%, #7c3aed);
}

* { box-sizing: border-box; }

html { scrollbar-gutter: stable; -webkit-text-size-adjust: 100%; }

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

body {
  background: var(--xs-bg);
  color: var(--xs-text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  /* 撑满视口，内容少时页脚也贴底，不会紧贴卡片 */
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

body > main { flex: 1; }

a { color: inherit; text-decoration: none; }
button { font-family: inherit; font-size: inherit; cursor: pointer; }
img { max-width: 100%; }

[hidden] { display: none !important; }

.xs-sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.xs-shell { min-height: 100vh; display: flex; flex-direction: column; }
.xs-shell > main { flex: 1; }

.xs-container {
  width: 100%;
  max-width: var(--xs-content);
  margin: 0 auto;
  padding: 0 20px;
}

/* ------------------------------- 顶栏 ------------------------------- */

.xs-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, .86);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid rgba(230, 232, 239, .9);
}

.xs-header__inner {
  display: flex;
  align-items: center;
  justify-content: center;
  height: var(--xs-header-h);
  gap: 18px;
}

.xs-brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-weight: 800;
  font-size: 21px;
  letter-spacing: 3px;
  color: var(--xs-text);
}

.xs-brand img { height: 26px; width: auto; display: block; }

/* ------------------------------- 首页 ------------------------------- */

.xs-home { padding-bottom: 56px; }

.xs-hero {
  position: relative;
  padding: 52px 0 6px;
  background:
    radial-gradient(760px 320px at 50% -80px, #e6eeff 0, rgba(230, 238, 255, 0) 72%),
    linear-gradient(180deg, #f4f7fd, #f6f7fb 60%);
}

.xs-hero__inner { display: flex; justify-content: center; }

.xs-card {
  position: relative;
  flex: 0 1 var(--xs-card);
  width: 100%;
  margin: 0 auto;
  padding: 46px 56px 38px;
  text-align: center;
  background: linear-gradient(180deg, #fff, #fcfdff);
  border: 1px solid #e6eaf4;
  border-radius: 28px;
  box-shadow: var(--xs-shadow-card);
  overflow: hidden;
}

/* 卡片顶部的柔光，别用纯白，否则标题那一段会显得发灰 */
.xs-card::before {
  content: "";
  position: absolute;
  width: 520px;
  height: 520px;
  top: -300px;
  left: 50%;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(79, 70, 229, .1), transparent 62%);
  pointer-events: none;
}

.xs-card > * { position: relative; }

.xs-hero__title {
  margin: 0;
  font-size: 46px;
  line-height: 1.2;
  letter-spacing: -.6px;
  font-weight: 800;
}

.xs-hero__title em {
  font-style: normal;
  background: var(--xs-grad-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.xs-hero__sub {
  max-width: 640px;
  margin: 14px auto 0;
  font-size: 15px;
  line-height: 1.8;
  color: #667085;
}

/* ---------------------------- 搜索框 ---------------------------- */

.xs-search { margin: 28px auto 0; max-width: 640px; }

.xs-searchbox {
  display: flex;
  align-items: center;
  background: #fff;
  border: 1px solid #e3e8f2;
  border-radius: 16px;
  padding: 7px 7px 7px 20px;
  box-shadow: 0 10px 26px rgba(23, 37, 84, .07);
  transition: border-color .2s ease, box-shadow .2s ease;
}

.xs-searchbox:focus-within {
  border-color: #b9cdf7;
  box-shadow: 0 10px 26px rgba(37, 99, 235, .12);
}

.xs-searchbox input {
  flex: 1;
  min-width: 0;
  border: none;
  outline: none;
  background: transparent;
  font-size: 15px;
  color: var(--xs-text);
  padding: 11px 0;
}

.xs-searchbox input::placeholder { color: #9aa2b1; }

.xs-searchbox__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex: none;
  border: none;
  border-radius: 12px;
  padding: 12px 26px;
  background: var(--xs-text);
  color: #fff;
  font-size: 14.5px;
  font-weight: 600;
  white-space: nowrap;
  box-shadow: 0 10px 22px rgba(17, 24, 39, .16);
  transition: background .18s ease, transform .15s ease, box-shadow .18s ease;
}

.xs-searchbox__btn:hover {
  background: #1f2937;
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(17, 24, 39, .22);
}

.xs-searchbox__btn svg { width: 16px; height: 16px; flex: none; }

/* ---------------------------- 热词 ---------------------------- */

.xs-hot {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.xs-hot__label { font-size: 12.5px; color: #98a0ae; margin-right: 2px; }

.xs-hot__chip {
  font-size: 12.5px;
  color: #4b5563;
  padding: 4px 11px;
  border-radius: 999px;
  background: #f7f8fc;
  border: 1px solid #ebedf4;
  transition: all .15s ease;
}

.xs-hot__chip:hover {
  color: var(--xs-brand-dark);
  background: var(--xs-brand-soft);
  border-color: #cfddfb;
}

/* ---------------------------- 统计 ---------------------------- */

.xs-divider {
  height: 1px;
  margin: 28px 0 24px;
  background: linear-gradient(90deg, transparent, #e7eaf2 20%, #e7eaf2 80%, transparent);
}

.xs-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.xs-stat {
  background: #fbfcff;
  border: 1px solid #eef1f7;
  border-radius: 14px;
  padding: 14px 10px 12px;
}

.xs-stat b {
  display: block;
  font-size: 24px;
  line-height: 1.25;
  letter-spacing: -.4px;
  font-variant-numeric: tabular-nums;
  color: #101828;
}

.xs-stat span { display: block; margin-top: 3px; font-size: 11.5px; color: #8b93a3; }

/* ------------------------- 悬浮求助按钮 ------------------------- */

.xs-side {
  position: fixed;
  top: 50%;
  right: max(28px, calc((100vw - 960px) / 2 - 88px));
  transform: translateY(-50%);
  z-index: 30;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.xs-side__btn {
  width: 54px;
  height: 74px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 1px solid #e6ebf3;
  border-radius: 16px;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 18px 42px rgba(30, 41, 59, .13);
  color: #64748b;
  font-size: 12px;
  letter-spacing: 3px;
  backdrop-filter: blur(12px);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.xs-side__btn:hover {
  transform: translate(-3px);
  border-color: #c7d7f7;
  box-shadow: 0 22px 50px rgba(37, 99, 235, .18);
}

.xs-side__btn svg {
  width: 20px;
  height: 20px;
  flex: none;
  fill: none;
  stroke: var(--xs-brand);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.xs-side__btn span { writing-mode: vertical-rl; text-orientation: upright; }

/* ---------------------------- 页脚 ---------------------------- */

.xs-footer {
  border-top: 1px solid var(--xs-line);
  background: #fff;
  padding: 26px 0;
  color: var(--xs-muted);
  font-size: 12.5px;
  text-align: center;
  line-height: 1.9;
}

.xs-footer a { color: var(--xs-brand); }
.xs-footer a:hover { text-decoration: underline; }
.xs-footer p { margin: 0; }
.xs-footer__links { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; margin-top: 4px; }

/* ---------------------------- 按钮 ---------------------------- */

.xs-btn {
  border: 1px solid var(--xs-line);
  background: #fff;
  border-radius: 10px;
  padding: 9px 16px;
  font-size: 13.5px;
  color: var(--xs-text);
  transition: all .15s ease;
}

.xs-btn:hover { border-color: var(--xs-brand); color: var(--xs-brand); }

.xs-btn--primary {
  background: linear-gradient(135deg, var(--xs-brand), var(--xs-brand-dark));
  border-color: transparent;
  color: #fff;
  font-weight: 600;
}

.xs-btn--primary:hover { color: #fff; box-shadow: 0 6px 16px rgba(37, 99, 235, .28); }

.xs-btn:disabled { opacity: .6; cursor: not-allowed; }

/* ---------------------------- 弹窗 ---------------------------- */

html.xs-modal-open, html.xs-modal-open body { overflow: hidden; }

.xs-mask {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(15, 23, 42, .55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: xsFade .16s ease;
}

.xs-modal {
  width: 100%;
  max-width: 460px;
  max-height: 88vh;
  overflow: auto;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 24px 60px rgba(15, 23, 42, .28);
  padding: 22px;
  animation: xsPop .2s ease;
  overscroll-behavior: contain;
}

.xs-modal--wide { max-width: 560px; }

.xs-modal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.xs-modal__title { font-size: 17px; font-weight: 700; margin: 0; }

.xs-modal__close {
  border: none;
  background: #f3f4f6;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  color: var(--xs-muted);
  font-size: 17px;
  line-height: 1;
  display: grid;
  place-items: center;
}

.xs-modal__close:hover { background: #e5e7eb; color: var(--xs-text); }

.xs-label { font-size: 12.5px; color: var(--xs-muted); margin-bottom: 6px; }

.xs-linkrow { display: flex; gap: 8px; }

.xs-linkrow input {
  flex: 1;
  min-width: 0;
  border: 1px solid var(--xs-line);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 13.5px;
  background: #f9fafc;
  color: var(--xs-text);
}

.xs-copy {
  border: none;
  border-radius: 10px;
  padding: 0 16px;
  background: var(--xs-brand);
  color: #fff;
  font-size: 13.5px;
  font-weight: 600;
  white-space: nowrap;
}

.xs-copy:hover { background: var(--xs-brand-dark); }

.xs-qr {
  position: relative;
  margin-top: 22px;
  padding: 18px 14px 12px;
  border: 1px solid var(--xs-line);
  border-radius: 12px;
  background: #fff;
  text-align: center;
}

.xs-qr__pan {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translate(-50%, -50%);
  padding: 0 8px;
  background: #fff;
  color: var(--xs-muted);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.6;
  white-space: nowrap;
}

.xs-qr__code { width: 168px; height: 168px; margin: 6px auto 0; }
.xs-qr__code svg,
.xs-qr__code img { display: block; width: 100%; height: 100%; }
.xs-qr p { margin: 10px 0 0; font-size: 12.5px; color: var(--xs-muted); }

.xs-hint {
  margin-top: 14px;
  font-size: 12.5px;
  color: var(--xs-muted);
  background: #f8fafc;
  border: 1px dashed var(--xs-line);
  border-radius: 10px;
  padding: 10px 12px;
  line-height: 1.6;
}

.xs-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 26px 0 14px;
  color: var(--xs-muted);
  font-size: 13.5px;
  text-align: center;
}

.xs-spinner {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 3px solid #e8eefb;
  border-top-color: var(--xs-brand);
  animation: xsSpin .85s linear infinite;
}

.xs-modal__actions { display: flex; gap: 10px; margin-top: 14px; }

/* 表单 */
.xs-field { display: block; margin-bottom: 12px; }
.xs-field > span { display: block; font-size: 12.5px; color: var(--xs-muted); margin-bottom: 6px; }
.xs-field > span b { color: var(--xs-danger); font-weight: 600; }
.xs-field > span small { color: var(--xs-faint); font-size: 11px; }

.xs-field input,
.xs-field textarea {
  width: 100%;
  border: 1px solid var(--xs-line);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 13.5px;
  font-family: inherit;
  color: var(--xs-text);
  background: #f9fafc;
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}

.xs-field input:focus,
.xs-field textarea:focus {
  border-color: #b9cdf7;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .1);
}

.xs-field textarea { resize: vertical; min-height: 72px; }

/* ---------------------------- Toast ---------------------------- */

.xs-toast {
  position: fixed;
  left: 50%;
  bottom: 40px;
  transform: translate(-50%, 12px);
  z-index: 120;
  max-width: min(88vw, 420px);
  padding: 10px 18px;
  border-radius: 999px;
  background: rgba(17, 24, 39, .92);
  color: #fff;
  font-size: 13px;
  line-height: 1.5;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
}

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

/* ---------------------------- 动效 ---------------------------- */

@keyframes xsFade { from { opacity: 0; } }
@keyframes xsPop { from { opacity: 0; transform: translateY(10px) scale(.98); } }
@keyframes xsSpin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}
