/* ============================================================
   bet9登录 — 共享样式表 /assets/site.css
   暗夜终端刊头 · 近单色靛紫体系 · 粗野主义 Bento
   ============================================================ */

/* ---------- 1. Reset ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  background-color: #070818;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: transparent;
  isolation: isolate;
}

h1, h2, h3, h4, h5, h6, p, ul, ol, figure, blockquote, dl, dd {
  margin: 0;
}

ul, ol { padding: 0; list-style: none; }

img, svg, video, canvas {
  display: block;
  max-width: 100%;
  height: auto;
}

button, input, select, textarea {
  font: inherit;
  color: inherit;
  margin: 0;
}

button { background: none; border: 0; }

a { color: inherit; text-decoration: none; }

details > summary { list-style: none; }

/* ---------- 2. 变量 ---------- */
:root {
  color-scheme: dark;

  --ink-950: #070818;
  --ink-900: #101335;
  --ink-800: #191D4A;
  --violet-700: #2A2360;
  --violet-600: #3B3080;
  --cyan-400: #35E0D2;
  --cyan-200: #A6F5EE;
  --gold-400: #F0B65E;
  --mist-200: #C6CBE6;
  --white-050: #F2F5FF;
  --hairline: rgba(166, 245, 238, 0.14);
  --shade: #03040f;

  --font-display: "Archivo Narrow", "Saira Condensed", "PingFang SC",
    "Hiragino Sans GB", "Source Han Sans SC", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  --font-body: "Source Han Sans SC", "Noto Sans SC", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-mono: "JetBrains Mono", "IBM Plex Mono", ui-monospace, SFMono-Regular,
    Menlo, Consolas, "Source Han Mono SC", "Noto Sans Mono CJK SC", monospace;

  --wrap: 1240px;
  --gutter: 16px;
  --section: 64px;
  --edge: 2px solid var(--violet-700);
  --shadow-1: 6px 6px 0 var(--shade);
  --shadow-2: 8px 8px 0 var(--shade);
  --fast: 140ms;
  --base: 180ms;
}

/* ---------- 3. 基础排版 ---------- */
body {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.75;
  color: var(--mist-200);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: 0.01em;
  color: var(--white-050);
  text-wrap: balance;
}

h1 { font-size: clamp(2.4rem, 5vw, 3.8rem); }
h2 { font-size: clamp(1.6rem, 2.6vw, 2.2rem); }
h3 { font-size: 1.15rem; line-height: 1.3; }
h4 { font-size: 1rem; line-height: 1.35; }

p { max-width: 68ch; }

strong { color: var(--white-050); font-weight: 600; }

code, kbd, samp, .mono {
  font-family: var(--font-mono);
  font-size: 0.85em;
  letter-spacing: 0.08em;
}

::selection {
  background: var(--cyan-400);
  color: var(--ink-950);
}

/* 页面背景点阵纹理 */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image: radial-gradient(rgba(166, 245, 238, 0.1) 1px, transparent 1px);
  background-size: 24px 24px;
  opacity: 0.55;
  -webkit-mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.85), rgba(0, 0, 0, 0.25) 60%, transparent);
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.85), rgba(0, 0, 0, 0.25) 60%, transparent);
}

/* ---------- 4. 焦点与可访问 ---------- */
:focus-visible {
  outline: 2px solid var(--cyan-400);
  outline-offset: 2px;
  border-radius: 0;
}

.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;
}

.skip-link {
  position: fixed;
  top: 0;
  left: 50%;
  z-index: 200;
  transform: translate(-50%, -140%);
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 20px;
  background: var(--cyan-400);
  color: var(--ink-950);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  border: 2px solid var(--ink-950);
  transition: transform var(--fast) ease-out;
}

.skip-link:focus {
  transform: translate(-50%, 0);
}

/* ---------- 5. 通用容器与分区 ---------- */
.wrap {
  width: min(100% - (var(--gutter) * 2), var(--wrap));
  margin-inline: auto;
}

.section {
  padding-block: var(--section);
}

.section__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px 32px;
  padding-bottom: 20px;
  margin-bottom: 32px;
  border-bottom: 2px solid var(--violet-700);
}

.section__head p {
  max-width: 46ch;
  font-size: 0.92rem;
}

.eyebrow {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cyan-200);
  margin-bottom: 10px;
}

/* ---------- 6. 页头 · 居中刊头 ---------- */
.site-header {
  --head-pad: 18px;
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(7, 8, 24, 0.92);
  border-bottom: 2px solid var(--violet-700);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.site-header.is-scrolled {
  --head-pad: 8px;
}

.header-inner {
  width: min(100% - (var(--gutter) * 2), var(--wrap));
  margin-inline: auto;
  padding-top: var(--head-pad);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  grid-template-rows: auto auto auto;
  align-items: center;
  column-gap: 20px;
  transition: padding-top var(--base) ease-out;
}

.header-left {
  grid-column: 1;
  grid-row: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.pulse-dot {
  flex: none;
  width: 8px;
  height: 8px;
  background: var(--cyan-400);
  box-shadow: 0 0 10px rgba(53, 224, 210, 0.7);
}

.domain-mark {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: var(--cyan-200);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.brand {
  grid-column: 2;
  grid-row: 1;
  justify-self: center;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 2px 0 4px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.5rem, 2.6vw, 2.05rem);
  line-height: 1;
  letter-spacing: 0.04em;
  color: var(--white-050);
  transition: color var(--fast) ease-out;
}

.brand:hover { color: var(--cyan-200); }

.brand__rule {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--cyan-400);
  transition: background-color var(--fast) ease-out;
}

.brand:hover .brand__rule { background: var(--gold-400); }

.header-tools {
  grid-column: 3;
  grid-row: 1;
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 14px;
}

.jump {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 4px 0 10px;
  background: var(--ink-900);
  border: 1px solid var(--violet-700);
  transition: border-color var(--fast) ease-out;
}

.jump:focus-within { border-color: var(--cyan-400); }

.jump__label {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  color: var(--cyan-200);
  white-space: nowrap;
}

.jump__input {
  width: 60px;
  height: 30px;
  padding: 0 4px;
  border: 0;
  background: transparent;
  color: var(--gold-400);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-align: center;
}

.jump__input::placeholder { color: var(--violet-600); }
.jump__input:focus { outline: none; }

.tool-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: var(--mist-200);
  border-bottom: 1px solid transparent;
  transition: color var(--fast) ease-out, border-color var(--fast) ease-out;
}

.tool-link:hover {
  color: var(--white-050);
  border-bottom-color: var(--cyan-400);
}

.tool-link--accent { color: var(--cyan-200); }

.nav-toggle {
  display: none;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  min-width: 44px;
  padding: 0 12px;
  background: var(--ink-800);
  border: 2px solid var(--violet-700);
  color: var(--white-050);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: transform var(--fast) ease-out, box-shadow var(--fast) ease-out,
    border-color var(--fast) ease-out;
}

.nav-toggle:hover {
  transform: translate(-2px, -2px);
  box-shadow: 4px 4px 0 var(--shade);
  border-color: var(--cyan-400);
}

.nav-toggle__bars {
  width: 16px;
  height: 2px;
  background: var(--cyan-400);
  box-shadow: 0 -5px 0 var(--cyan-400), 0 5px 0 var(--cyan-400);
}

.site-nav {
  grid-column: 1 / -1;
  grid-row: 2;
  margin-top: 8px;
  padding-bottom: 4px;
}

.site-nav__list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2px 4px;
}

.site-nav__list a {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 14px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.02em;
  color: var(--mist-200);
  transition: color var(--fast) ease-out, background-color var(--fast) ease-out;
}

.site-nav__list a:hover {
  color: var(--white-050);
  background: rgba(59, 48, 128, 0.35);
}

.site-nav__list a[aria-current="page"] {
  color: var(--white-050);
  background: rgba(53, 224, 210, 0.08);
}

.site-nav__list a[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 6px;
  height: 2px;
  background: var(--cyan-400);
}

.index-status {
  grid-column: 1 / -1;
  grid-row: 3;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: var(--gold-400);
  padding-bottom: 4px;
}

.index-status:empty { display: none; }

/* ---------- 7. 通用按钮与标签 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 22px;
  background: var(--ink-800);
  border: 2px solid var(--violet-700);
  color: var(--white-050);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: transform var(--fast) ease-out, box-shadow var(--fast) ease-out,
    border-color var(--fast) ease-out, background-color var(--fast) ease-out;
}

.btn:hover {
  transform: translate(-2px, -2px);
  box-shadow: var(--shadow-2);
  border-color: var(--cyan-400);
}

.btn--primary {
  background: var(--cyan-400);
  border-color: var(--cyan-400);
  color: var(--ink-950);
}

.btn--primary:hover {
  border-color: var(--cyan-200);
  background: var(--cyan-200);
}

.btn--ghost {
  background: transparent;
  border-color: var(--violet-600);
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  background: var(--ink-900);
  border: 1px solid var(--violet-700);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: var(--cyan-200);
  white-space: nowrap;
}

.tag--gold {
  color: var(--gold-400);
  border-color: rgba(240, 182, 94, 0.42);
}

/* ---------- 8. 面包屑 ---------- */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding-top: 20px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  color: var(--mist-200);
}

.breadcrumb li {
  display: flex;
  align-items: center;
  gap: 6px;
}

.breadcrumb li:not(:first-child)::before {
  content: "/";
  color: var(--violet-600);
}

.breadcrumb a:hover { color: var(--cyan-200); }

.breadcrumb li:last-child { color: var(--white-050); }

/* ---------- 9. 卡片 / Bento ---------- */
.card {
  padding: 24px;
  background: var(--ink-800);
  border: var(--edge);
  box-shadow: var(--shadow-1);
  transition: transform var(--fast) ease-out, box-shadow var(--fast) ease-out,
    border-color var(--fast) ease-out;
}

.card:hover {
  transform: translate(-2px, -2px);
  box-shadow: var(--shadow-2);
  border-color: var(--violet-600);
}

.card__title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--white-050);
  margin-bottom: 8px;
}

.card__meta {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: var(--gold-400);
}

/* ---------- 10. 横向主题带 ---------- */
.theme-band {
  display: flex;
  align-items: center;
  min-height: 88px;
  padding-block: 12px;
  background: var(--ink-900);
  border-top: 2px solid var(--violet-700);
  border-bottom: 2px solid var(--violet-700);
}

.theme-band .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 28px;
}

/* ---------- 11. 图片容器 ---------- */
.media {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: var(--ink-900);
  border: var(--edge);
}

.media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media--square { aspect-ratio: 1 / 1; }
.media--wide { aspect-ratio: 21 / 9; }
.media--tall { aspect-ratio: 3 / 4; }

.media__glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(120% 90% at 88% 8%, rgba(53, 224, 210, 0.16), transparent 62%),
    radial-gradient(90% 80% at 6% 96%, rgba(59, 48, 128, 0.42), transparent 66%);
}

/* ---------- 12. 折叠面板 ---------- */
.panel {
  background: var(--ink-800);
  border: var(--edge);
}

.panel__summary {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 56px;
  padding: 0 18px;
  cursor: pointer;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--white-050);
  transition: background-color var(--fast) ease-out;
}

.panel__summary::-webkit-details-marker { display: none; }

.panel__summary:hover { background: rgba(59, 48, 128, 0.35); }

.panel__summary::after {
  content: "+";
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 1rem;
  color: var(--cyan-400);
}

.panel[open] > .panel__summary {
  border-bottom: 2px solid var(--violet-700);
}

.panel[open] > .panel__summary::after { content: "\2013"; }

.panel__body {
  padding: 18px;
  font-size: 0.95rem;
  animation: panel-in var(--base) ease-out;
}

@keyframes panel-in {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: none; }
}

/* ---------- 13. 编号索引列 ---------- */
.index-list {
  display: grid;
  gap: 0;
  border-top: var(--edge);
}

.index-item {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 16px;
  padding: 20px 0;
  border-bottom: 1px solid var(--hairline);
  transition: background-color var(--fast) ease-out;
}

.index-item:hover { background: rgba(25, 29, 74, 0.55); }

.index-item__num {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  color: var(--gold-400);
  padding-top: 2px;
}

.is-flagged {
  outline: 2px solid var(--cyan-400);
  outline-offset: 4px;
}

/* ---------- 14. 页脚 ---------- */
.site-footer {
  position: relative;
  z-index: 1;
  margin-top: var(--section);
  background: var(--ink-900);
  border-top: 2px solid var(--violet-700);
}

.footer-inner {
  width: min(100% - (var(--gutter) * 2), var(--wrap));
  margin-inline: auto;
  padding: 56px 0 28px;
}

.footer-masthead {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px 20px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--hairline);
}

.footer-brand {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  line-height: 1;
  letter-spacing: 0.03em;
  color: var(--white-050);
  transition: color var(--fast) ease-out;
}

.footer-brand:hover { color: var(--cyan-200); }

.footer-domain {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  color: var(--cyan-200);
  max-width: none;
}

.footer-ver {
  margin-left: auto;
  padding: 3px 10px;
  border: 1px solid rgba(240, 182, 94, 0.42);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: var(--gold-400);
}

.footer-cols {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 32px 40px;
  padding: 40px 0;
}

.footer-col__title {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cyan-200);
  margin-bottom: 14px;
}

.footer-col__list li {
  font-size: 0.88rem;
  line-height: 1.6;
  padding: 3px 0;
  color: var(--mist-200);
  overflow-wrap: anywhere;
}

.footer-col__list a {
  display: inline-block;
  border-bottom: 1px solid transparent;
  transition: color var(--fast) ease-out, border-color var(--fast) ease-out;
}

.footer-col__list a:hover {
  color: var(--cyan-200);
  border-bottom-color: var(--cyan-400);
}

.footer-col__list--meta li {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  letter-spacing: 0.04em;
}

.copy-btn {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0;
  background: none;
  border: 0;
  border-bottom: 1px dashed var(--violet-700);
  color: var(--mist-200);
  font-family: var(--font-mono);
  font-size: 0.76rem;
  letter-spacing: 0.04em;
  text-align: left;
  cursor: pointer;
  transition: color var(--fast) ease-out, border-color var(--fast) ease-out;
}

.copy-btn:hover {
  color: var(--gold-400);
  border-bottom-color: var(--gold-400);
}

.footer-base {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 32px;
  padding-top: 24px;
  border-top: 1px solid var(--hairline);
}

.footer-base__note {
  max-width: 60ch;
  font-size: 0.82rem;
  color: var(--mist-200);
  opacity: 0.8;
}

.footer-base__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 20px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
}

.footer-base__copy { max-width: none; color: var(--mist-200); }

.footer-base__icp {
  max-width: none;
  padding: 2px 8px;
  border: 1px solid rgba(240, 182, 94, 0.32);
  color: var(--gold-400);
}

/* ---------- 15. 响应式 ---------- */
@media (max-width: 1023px) {
  :root { --section: 48px; }

  .footer-cols {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px 32px;
  }
}

@media (max-width: 960px) {
  .header-inner {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: auto auto auto;
    column-gap: 12px;
  }

  .header-left { display: none; }

  .brand {
    grid-column: 1;
    grid-row: 1;
    justify-self: start;
    align-items: flex-start;
    font-size: 1.45rem;
  }

  .header-tools { grid-column: 2; grid-row: 1; gap: 10px; }

  .tool-link { display: none; }

  .jump { height: 38px; padding: 0 2px 0 8px; }
  .jump__label { display: none; }
  .jump__input { width: 54px; height: 28px; font-size: 0.8rem; }

  .nav-toggle { display: inline-flex; }

  .site-nav {
    grid-column: 1 / -1;
    grid-row: 2;
    margin-top: 12px;
    padding-bottom: 10px;
    border-top: 1px solid var(--hairline);
  }

  .site-nav:not([data-open]) { display: none; }

  .site-nav__list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  .site-nav__list li + li { border-top: 1px solid var(--hairline); }

  .site-nav__list a {
    min-height: 48px;
    padding: 0 4px;
    justify-content: flex-start;
  }

  .site-nav__list a[aria-current="page"] { background: rgba(53, 224, 210, 0.06); }

  .site-nav__list a[aria-current="page"]::after {
    left: 0;
    right: auto;
    top: 12px;
    bottom: 12px;
    width: 2px;
    height: auto;
  }

  .index-status { grid-row: 3; }

  .panel__summary { min-height: 52px; font-size: 1rem; }
}

@media (max-width: 640px) {
  :root { --section: 40px; }

  .wrap { width: min(100% - 32px, var(--wrap)); }

  .header-inner,
  .footer-inner { width: min(100% - 32px, var(--wrap)); }

  .footer-cols {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .footer-base { flex-direction: column; align-items: flex-start; }

  .index-item {
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 12px;
  }

  .btn { width: 100%; }
}

/* ---------- 16. 动效降级 ---------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
  }

  .card:hover,
  .btn:hover,
  .nav-toggle:hover {
    transform: none;
  }
}
