/* ============================================================
   麒麟娱乐登录 · 共享站点样式  /assets/site.css
   玄青底 / 鎏金强调 / 朱砂状态
   ============================================================ */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body { margin: 0; }

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

ul, ol { margin: 0; padding: 0; }

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

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

table { width: 100%; border-collapse: collapse; }

a { color: inherit; }

/* ---------- 2. 变量 ---------- */
:root {
  --void: #070b10;
  --ink-900: #0b1219;
  --ink-800: #101a23;
  --ink-700: #16222d;
  --ink-600: #1e2d3a;

  --line: rgba(198, 220, 240, 0.12);
  --line-strong: rgba(198, 220, 240, 0.24);

  --paper: #e7eef5;
  --paper-dim: #a3b4c4;
  --paper-mute: #6d8093;

  --gold: #d6a441;
  --gold-hi: #f1ce79;
  --gold-dim: rgba(214, 164, 65, 0.14);

  --cinnabar: #c23c2c;
  --cinnabar-hi: #ea6350;
  --cinnabar-dim: rgba(194, 60, 44, 0.14);

  --shadow-hard: 6px 6px 0 rgba(0, 0, 0, 0.5);
  --focus: #f1ce79;

  --wrap: 1180px;
  --gutter: 20px;

  --serif: "Songti SC", "Source Han Serif SC", "Noto Serif SC", SimSun, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Courier New", monospace;
}

/* ---------- 3. 基础版式 ---------- */
html { scrollbar-color: var(--gold) var(--ink-900); }

body {
  min-height: 100vh;
  background-color: var(--void);
  background-image:
    radial-gradient(820px 460px at 82% -6%, rgba(214, 164, 65, 0.12), transparent 60%),
    radial-gradient(720px 620px at -6% 4%, rgba(28, 86, 116, 0.18), transparent 62%),
    repeating-linear-gradient(118deg, rgba(198, 220, 240, 0.03) 0 1px, transparent 1px 15px);
  background-repeat: no-repeat, no-repeat, repeat;
  color: var(--paper);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.75;
  font-feature-settings: "palt" 1;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.005em;
  color: var(--paper);
}

h1 { font-size: clamp(2.05rem, 5vw, 3.5rem); font-weight: 800; }
h2 { font-size: clamp(1.5rem, 2.8vw, 2.05rem); }
h3 { font-size: clamp(1.15rem, 1.8vw, 1.4rem); }
h4 { font-size: 1.05rem; }

p { margin-bottom: 1em; }
p:last-child { margin-bottom: 0; }

::selection { background: var(--gold); color: #08101a; }

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* ---------- 4. 跳过链接 ---------- */
.skip-link {
  position: absolute;
  top: -72px;
  left: 16px;
  z-index: 200;
  padding: 11px 18px;
  background: var(--gold);
  color: #08101a;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  transition: top 0.2s ease;
}

.skip-link:focus { top: 10px; }

/* ---------- 5. 容器 ---------- */
.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ---------- 6. 头部 ---------- */
.site-head {
  position: sticky;
  top: 0;
  z-index: 80;
}

.head-rail {
  background: var(--ink-900);
  border-bottom: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--paper-mute);
}

.rail-inner {
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 34px;
}

.rail-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-inline-end: auto;
  color: var(--gold-hi);
  text-transform: uppercase;
  white-space: nowrap;
}

.dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--cinnabar-hi);
  box-shadow: 0 0 0 3px rgba(194, 60, 44, 0.22);
}

.rail-meta { white-space: nowrap; }

.rail-meta--icp { color: var(--paper-mute); }

.head-bar {
  position: relative;
  background: rgba(11, 18, 25, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line-strong);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.42);
}

.bar-inner {
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 68px;
  padding-block: 10px;
}

/* 品牌 */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
  text-decoration: none;
  color: var(--paper);
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  background: linear-gradient(150deg, var(--gold-hi), #8f6520);
  color: #08101a;
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 800;
  box-shadow: 3px 3px 0 rgba(194, 60, 44, 0.85);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1;
}

.brand-name {
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.brand-sub {
  margin-top: 5px;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.32em;
  color: var(--gold);
}

/* 导航 */
.nav { margin-inline-start: auto; }

.nav-list {
  display: flex;
  align-items: stretch;
  gap: 2px;
  list-style: none;
}

.nav-item { display: flex; }

.nav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 13px;
  font-size: 14px;
  font-weight: 500;
  color: var(--paper-dim);
  text-decoration: none;
  border: 1px solid transparent;
  transition: color 0.18s ease, background-color 0.18s ease, border-color 0.18s ease;
}

.nav-idx {
  align-self: flex-start;
  margin-top: 3px;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.04em;
  color: var(--paper-mute);
  transition: color 0.18s ease;
}

.nav-label { white-space: nowrap; }

.nav-link:hover {
  color: var(--paper);
  background: rgba(214, 164, 65, 0.08);
  border-color: rgba(214, 164, 65, 0.26);
}

.nav-link[aria-current="page"] {
  color: var(--gold-hi);
  background: var(--gold-dim);
  border-color: rgba(214, 164, 65, 0.46);
}

.nav-link[aria-current="page"] .nav-idx { color: var(--cinnabar-hi); }

.nav-link[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 13px;
  right: 13px;
  bottom: 3px;
  height: 2px;
  background: var(--gold);
}

/* 移动端按钮 */
.nav-toggle {
  display: none;
  align-items: center;
  gap: 10px;
  margin-inline-start: auto;
  padding: 10px 14px;
  background: transparent;
  border: 1px solid var(--line-strong);
  color: var(--paper);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: border-color 0.18s ease, color 0.18s ease, background-color 0.18s ease;
}

.nav-toggle:hover {
  border-color: var(--gold);
  color: var(--gold-hi);
  background: rgba(214, 164, 65, 0.08);
}

.nav-toggle-bars {
  display: grid;
  gap: 4px;
  width: 18px;
}

.nav-toggle-bars i {
  display: block;
  height: 2px;
  background: currentColor;
}

.nav-toggle-text { white-space: nowrap; }

/* 阅读进度 */
.progress {
  position: absolute;
  left: 0;
  bottom: -1px;
  z-index: 5;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--cinnabar), var(--gold-hi));
}

/* ---------- 7. 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 22px;
  font-family: var(--sans);
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.02em;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.16s ease, background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}

.btn--solid {
  background: linear-gradient(150deg, var(--gold-hi), var(--gold));
  color: #08101a;
  box-shadow: 4px 4px 0 rgba(194, 60, 44, 0.9);
}

.btn--solid:hover {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 rgba(194, 60, 44, 0.9);
}

.btn--ghost {
  background: rgba(231, 238, 245, 0.03);
  border-color: var(--line-strong);
  color: var(--paper);
}

.btn--ghost:hover {
  border-color: var(--gold);
  color: var(--gold-hi);
  background: rgba(214, 164, 65, 0.09);
}

.btn--sm {
  padding: 9px 15px;
  font-size: 13px;
}

/* ---------- 8. 面包屑 ---------- */
.crumbs { padding-block: 14px; }

.crumbs ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  list-style: none;
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.08em;
  color: var(--paper-mute);
}

.crumbs li {
  display: flex;
  align-items: center;
  gap: 10px;
}

.crumbs li + li::before {
  content: "/";
  color: rgba(198, 220, 240, 0.3);
}

.crumbs a {
  color: var(--paper-dim);
  text-decoration: none;
}

.crumbs a:hover { color: var(--gold-hi); }

.crumbs [aria-current="page"] { color: var(--gold); }

/* ---------- 9. 区块与题头 ---------- */
.section { padding-block: clamp(44px, 6vw, 84px); }
.section--tight { padding-block: clamp(28px, 4vw, 52px); }
.section--line { border-top: 1px solid var(--line); }

.page-head {
  padding-block: clamp(34px, 5vw, 64px) clamp(20px, 3vw, 36px);
  border-bottom: 1px solid var(--line);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold);
}

.eyebrow::before {
  content: "";
  width: 32px;
  height: 1px;
  background: var(--gold);
}

.lede {
  max-width: 62ch;
  font-size: clamp(1rem, 1.4vw, 1.1rem);
  color: var(--paper-dim);
}

.prose {
  max-width: 70ch;
  font-size: 16px;
  line-height: 1.85;
  color: var(--paper-dim);
}

.prose h2 { margin: 1.8em 0 0.6em; color: var(--paper); }
.prose h3 { margin: 1.5em 0 0.5em; color: var(--paper); }
.prose strong { color: var(--paper); }

.prose a {
  color: var(--gold-hi);
  text-decoration: underline;
  text-decoration-color: rgba(214, 164, 65, 0.4);
  text-underline-offset: 4px;
}

.prose ul,
.prose ol {
  display: grid;
  gap: 0.45em;
  margin-bottom: 1.1em;
  padding-inline-start: 1.3em;
}

.divider {
  height: 1px;
  border: 0;
  background: var(--line);
}

.hairline { height: 1px; background: var(--line); }

.mono { font-family: var(--mono); letter-spacing: 0.1em; }
.dim { color: var(--paper-dim); }
.gold { color: var(--gold-hi); }

.vert-note {
  writing-mode: vertical-rl;
  font-family: var(--serif);
  font-size: 12px;
  letter-spacing: 0.32em;
  color: var(--paper-mute);
}

/* ---------- 10. 网格 ---------- */
.grid {
  display: grid;
  gap: clamp(14px, 1.8vw, 22px);
}

.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

/* ---------- 11. 卡片 ---------- */
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: clamp(18px, 2.2vw, 26px);
  background: var(--ink-800);
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow-hard);
}

.card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.card__title {
  font-family: var(--serif);
  font-size: 1.12rem;
  font-weight: 700;
  color: var(--paper);
}

.card__body {
  font-size: 14.5px;
  color: var(--paper-dim);
}

.card__foot {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.card--gold { border-color: rgba(214, 164, 65, 0.42); }

.card--gold::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: var(--gold);
}

.card--rule::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 44px;
  height: 3px;
  background: var(--cinnabar);
}

/* ---------- 12. 标签与数据 ---------- */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 9px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--paper-dim);
  border: 1px solid var(--line-strong);
}

.tag--gold {
  color: var(--gold-hi);
  border-color: rgba(214, 164, 65, 0.48);
  background: var(--gold-dim);
}

.tag--red {
  color: var(--cinnabar-hi);
  border-color: rgba(194, 60, 44, 0.48);
  background: var(--cinnabar-dim);
}

.stat { display: grid; gap: 6px; }

.stat__num {
  font-family: var(--mono);
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.02em;
  color: var(--gold-hi);
}

.stat__label {
  font-size: 12.5px;
  letter-spacing: 0.06em;
  color: var(--paper-mute);
}

/* ---------- 13. 图片容器 ---------- */
.media {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background-color: var(--ink-700);
  border: 1px solid var(--line-strong);
}

.media > img,
.media > picture > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(155deg, rgba(7, 11, 16, 0) 48%, rgba(214, 164, 65, 0.16) 100%);
}

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

.media--hatch {
  background-image: repeating-linear-gradient(135deg, rgba(198, 220, 240, 0.055) 0 2px, transparent 2px 10px);
}

/* ---------- 14. 页脚 ---------- */
.site-foot {
  position: relative;
  margin-top: clamp(56px, 8vw, 110px);
  background: linear-gradient(180deg, var(--ink-900) 0%, var(--void) 100%);
  border-top: 1px solid var(--line-strong);
}

.site-foot::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  width: clamp(120px, 22vw, 280px);
  height: 2px;
  background: linear-gradient(90deg, var(--cinnabar), var(--gold-hi));
}

.foot-grid {
  display: grid;
  grid-template-columns: 1.5fr 0.9fr 0.9fr 1.3fr;
  gap: clamp(24px, 3vw, 44px);
  padding: clamp(40px, 5vw, 64px) 0 clamp(28px, 4vw, 40px);
}

.foot-brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
}

.brand--foot .brand-mark { box-shadow: 4px 4px 0 rgba(194, 60, 44, 0.85); }

.foot-lede {
  max-width: 34ch;
  font-size: 14px;
  color: var(--paper-dim);
}

.foot-sig {
  font-size: 10.5px;
  letter-spacing: 0.3em;
  color: var(--paper-mute);
}

.foot-col {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.foot-title {
  margin-bottom: 16px;
  padding-bottom: 10px;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--gold);
  border-bottom: 1px solid var(--line);
}

.foot-list {
  display: grid;
  gap: 9px;
  list-style: none;
}

.foot-list a {
  display: inline-block;
  font-size: 14px;
  color: var(--paper-dim);
  text-decoration: none;
  transition: color 0.16s ease, transform 0.16s ease;
}

.foot-list a::before {
  content: "›";
  margin-inline-end: 8px;
  font-family: var(--mono);
  color: var(--line-strong);
}

.foot-list a:hover {
  color: var(--gold-hi);
  transform: translateX(3px);
}

.foot-dl { display: grid; gap: 4px; }

.foot-dl dt {
  margin-top: 10px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
}

.foot-dl dt:first-child { margin-top: 0; }

.foot-dl dd {
  margin: 0;
  font-size: 14px;
  color: var(--paper-dim);
  word-break: break-all;
}

.foot-base {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 0 26px;
  border-top: 1px solid var(--line);
  font-size: 11.5px;
  color: var(--paper-mute);
}

.foot-mono {
  font-family: var(--mono);
  letter-spacing: 0.14em;
}

/* 返回页首 */
.to-top {
  position: fixed;
  right: clamp(14px, 3vw, 30px);
  bottom: clamp(14px, 3vw, 30px);
  z-index: 90;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 11px 16px;
  background: var(--ink-800);
  border: 1px solid var(--line-strong);
  color: var(--paper);
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: 0.12em;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s ease, border-color 0.22s ease, color 0.22s ease;
}

.to-top[data-show] {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.to-top:hover {
  border-color: var(--gold);
  color: var(--gold-hi);
}

.to-top-mark {
  font-size: 14px;
  color: var(--gold);
}

/* ---------- 15. 响应式 ---------- */
@media (max-width: 980px) {
  .nav-toggle { display: inline-flex; }

  .nav {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    margin: 0;
    display: none;
    background: var(--ink-900);
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line-strong);
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.55);
  }

  .nav[data-open] { display: block; }

  .nav-list {
    flex-direction: column;
    gap: 0;
    padding: 8px 0;
  }

  .nav-item { display: block; }

  .nav-link {
    padding: 15px var(--gutter);
    font-size: 15px;
    border: 0;
    border-left: 3px solid transparent;
  }

  .nav-idx {
    align-self: center;
    margin-top: 0;
  }

  .nav-link:hover { background: rgba(214, 164, 65, 0.07); }

  .nav-link[aria-current="page"] {
    border-left-color: var(--gold);
    background: var(--gold-dim);
  }

  .nav-link[aria-current="page"]::after { display: none; }

  .foot-grid { grid-template-columns: 1fr 1fr; }

  .grid--3,
  .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
  .rail-meta--icp { display: none; }

  .rail-inner { gap: 12px; }

  .bar-inner {
    gap: 12px;
    min-height: 62px;
  }

  .brand-name { font-size: 15.5px; }
  .brand-sub { letter-spacing: 0.24em; }
}

@media (max-width: 640px) {
  :root { --gutter: 16px; }

  .grid--2,
  .grid--3,
  .grid--4 { grid-template-columns: 1fr; }

  .foot-grid { grid-template-columns: 1fr; }

  .foot-base {
    justify-content: flex-start;
    padding-bottom: 22px;
  }
}

/* ---------- 16. 动效偏好 ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }

  .to-top {
    transform: none;
    transition: none;
  }
}
