/* ==========================================================================
   银河信誉 · 全站共享样式 /assets/site.css
   星图层：reset → 变量 → 排版 → 容器 → 头部 → 页脚 → 通用组件 → 响应式
   ========================================================================== */

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

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

body {
  margin: 0;
  min-height: 100vh;
  background-color: #0B1026;
  background-image:
    radial-gradient(1100px 620px at 82% -12%, rgba(42, 35, 80, 0.72), transparent 62%),
    radial-gradient(760px 520px at 2% 4%, rgba(95, 224, 208, 0.05), transparent 60%);
  background-repeat: no-repeat;
  background-attachment: fixed;
  color: #E8ECF7;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.8;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.28;
  letter-spacing: 0.03em;
  color: var(--warm);
}

p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
dl, dt, dd { margin: 0; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; }
img, svg, video { display: block; max-width: 100%; }
hr { border: 0; }

::selection {
  background: rgba(95, 224, 208, 0.3);
  color: #F7F9FF;
}

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

/* 2. 变量 ---------------------------------------------------------------- */
:root {
  --deep:   #0B1026;
  --ink:    #05070F;
  --nebula: #2A2350;
  --silver: #E8ECF7;
  --cyan:   #5FE0D0;
  --amber:  #F2B35C;
  --sky:    #7C8BB0;
  --dust:   #A7B0C8;
  --warm:   #F7F9FF;

  --font-display: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", system-ui, sans-serif;
  --font-body: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-serif: "Songti SC", "Noto Serif SC", "Source Han Serif SC", Georgia, "Times New Roman", serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;

  --container: 1180px;
  --gutter: clamp(18px, 4vw, 56px);
  --edge: rgba(124, 139, 176, 0.24);
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* 3. 容器与主内容 --------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

#main-content {
  display: block;
  scroll-margin-top: 128px;
}

#main-content:focus {
  outline: 0;
}

/* 4. 跳转链接 ------------------------------------------------------------ */
.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 200;
  padding: 10px 18px;
  background: var(--cyan);
  color: #04121A;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.08em;
  border-radius: 2px;
  transform: translateY(-180%);
  transition: transform 0.25s var(--ease);
}

.skip-link:focus,
.skip-link:focus-visible {
  transform: translateY(0);
}

/* 5. 头部 ---------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  background: linear-gradient(180deg, rgba(11, 16, 38, 0.96) 0%, rgba(5, 7, 15, 0.93) 100%);
  border-bottom: 1px solid rgba(124, 139, 176, 0.22);
  -webkit-backdrop-filter: blur(12px) saturate(120%);
  backdrop-filter: blur(12px) saturate(120%);
  transition: background 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.site-header.is-scrolled {
  background: linear-gradient(180deg, rgba(8, 12, 30, 0.99) 0%, rgba(5, 7, 15, 0.97) 100%);
  box-shadow: 0 14px 34px rgba(3, 5, 12, 0.6);
}

.header-top {
  display: flex;
  align-items: center;
  gap: clamp(12px, 2vw, 28px);
  padding-block: 14px;
  flex-wrap: wrap;
}

/* 字标 */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
  color: var(--warm);
}

.brand__mark {
  position: relative;
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  border: 1px solid rgba(95, 224, 208, 0.66);
  border-radius: 50%;
  box-shadow: inset 0 0 10px rgba(95, 224, 208, 0.3);
}

.brand__mark::before,
.brand__mark::after {
  content: "";
  position: absolute;
  background: var(--cyan);
  opacity: 0.72;
}

.brand__mark::before {
  left: 50%;
  top: 4px;
  bottom: 4px;
  width: 1px;
  transform: translateX(-50%);
}

.brand__mark::after {
  top: 50%;
  left: 4px;
  right: 4px;
  height: 1px;
  transform: translateY(-50%);
}

.brand__name {
  font-family: var(--font-display);
  font-size: clamp(17px, 1.6vw, 21px);
  font-weight: 700;
  letter-spacing: 0.22em;
  color: var(--warm);
  white-space: nowrap;
}

.brand__track {
  position: relative;
  width: clamp(26px, 4vw, 54px);
  height: 1px;
  background: linear-gradient(90deg, rgba(95, 224, 208, 0.9), rgba(95, 224, 208, 0));
}

.brand__track::after {
  content: "";
  position: absolute;
  right: -2px;
  top: -2px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 10px rgba(242, 179, 92, 0.85);
}

.version-tag {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.1em;
  color: var(--amber);
  white-space: nowrap;
  border: 1px solid rgba(242, 179, 92, 0.42);
  border-radius: 999px;
  background: rgba(242, 179, 92, 0.08);
}

.header-note {
  flex: 1 1 0;
  min-width: 0;
  margin: 0;
  padding-left: 18px;
  border-left: 1px solid rgba(124, 139, 176, 0.3);
  font-size: 12.5px;
  letter-spacing: 0.22em;
  color: var(--sky);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

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

/* 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 16px;
  font-family: inherit;
  font-size: 13.5px;
  letter-spacing: 0.1em;
  color: var(--silver);
  background: transparent;
  border: 1px solid rgba(124, 139, 176, 0.42);
  border-radius: 2px;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.25s var(--ease), border-color 0.25s var(--ease),
              background 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

.btn:hover {
  color: var(--warm);
  border-color: var(--cyan);
  box-shadow: inset 0 0 0 1px rgba(95, 224, 208, 0.25);
}

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

.btn--solid {
  background: var(--cyan);
  border-color: var(--cyan);
  color: #04121A;
  font-weight: 600;
}

.btn--solid:hover {
  background: #7BF0E2;
  border-color: #7BF0E2;
  color: #04121A;
  box-shadow: 0 10px 26px rgba(95, 224, 208, 0.3);
}

.btn--copy {
  color: var(--dust);
  border-style: dashed;
}

.btn__dot {
  flex: 0 0 auto;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 8px rgba(95, 224, 208, 0.9);
}

.btn__label {
  display: inline-block;
}

.btn.is-copied {
  color: var(--amber);
  border-color: rgba(242, 179, 92, 0.7);
  border-style: solid;
}

.btn.is-copied .btn__dot {
  background: var(--amber);
  box-shadow: 0 0 8px rgba(242, 179, 92, 0.9);
}

/* 移动菜单按钮 */
.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 38px;
  padding: 0;
  background: transparent;
  border: 1px solid rgba(124, 139, 176, 0.42);
  border-radius: 2px;
  cursor: pointer;
  transition: border-color 0.25s var(--ease);
}

.nav-toggle:hover { border-color: var(--cyan); }

.nav-toggle__bars {
  position: relative;
  display: block;
  width: 18px;
  height: 1px;
  background: var(--silver);
  transition: background 0.2s var(--ease);
}

.nav-toggle__bars::before,
.nav-toggle__bars::after {
  content: "";
  position: absolute;
  left: 0;
  width: 18px;
  height: 1px;
  background: var(--silver);
  transition: transform 0.3s var(--ease), top 0.3s var(--ease), background 0.2s var(--ease);
}

.nav-toggle__bars::before { top: -6px; }
.nav-toggle__bars::after  { top: 6px; }

.nav-toggle[aria-expanded="true"] .nav-toggle__bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::before {
  top: 0;
  background: var(--cyan);
  transform: rotate(45deg);
}
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::after {
  top: 0;
  background: var(--cyan);
  transform: rotate(-45deg);
}

/* 星轨导航 */
.header-nav {
  border-top: 1px solid rgba(124, 139, 176, 0.14);
}

.nav-list {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: clamp(10px, 2.2vw, 34px);
}

.nav-item { position: relative; }

.nav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 16px 2px;
  font-size: 14.5px;
  letter-spacing: 0.12em;
  color: var(--dust);
  transition: color 0.25s var(--ease);
}

.nav-index {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  color: rgba(124, 139, 176, 0.85);
  transition: color 0.25s var(--ease);
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: 12px;
  height: 1px;
  background: linear-gradient(90deg, var(--cyan), rgba(95, 224, 208, 0));
  transition: right 0.35s var(--ease);
}

.nav-link:hover { color: var(--warm); }
.nav-link:hover::after { right: 0; }
.nav-link:hover .nav-index { color: var(--cyan); }

.nav-item--anchor .nav-link { color: var(--silver); }

.nav-item--anchor .nav-link::before {
  content: "";
  flex: 0 0 auto;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 0 3px rgba(95, 224, 208, 0.14);
}

.nav-link[aria-current="page"] {
  color: var(--warm);
  font-weight: 600;
}

.nav-link[aria-current="page"]::after {
  right: 0;
  background: linear-gradient(90deg, var(--amber), rgba(242, 179, 92, 0));
}

.nav-link[aria-current="page"] .nav-index { color: var(--amber); }

/* 滚动星轨进度线 */
.scroll-rail {
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, var(--cyan), var(--amber));
  transform: scaleX(0);
  transform-origin: 0 50%;
  opacity: 0.9;
  pointer-events: none;
}

/* 6. 页脚 ---------------------------------------------------------------- */
.site-footer {
  position: relative;
  overflow: hidden;
  padding-top: clamp(40px, 6vw, 76px);
  background: linear-gradient(180deg, #05070F 0%, #080C1E 58%, #0B1026 100%);
  border-top: 1px solid rgba(124, 139, 176, 0.22);
  color: var(--dust);
}

.footer-orbit {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(520px 260px at 88% 0%, rgba(95, 224, 208, 0.1), transparent 70%),
    radial-gradient(680px 340px at 8% 112%, rgba(42, 35, 80, 0.9), transparent 72%);
}

.footer-orbit::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(167, 176, 200, 0.2) 1px, transparent 1px);
  background-size: 44px 44px;
  opacity: 0.35;
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 38%, #000);
  mask-image: linear-gradient(180deg, transparent, #000 38%, #000);
}

.footer-main {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(240px, 1.5fr) repeat(3, minmax(150px, 1fr));
  gap: clamp(24px, 4vw, 52px);
}

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

.footer-brand-name {
  margin: 0;
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 700;
  letter-spacing: 0.24em;
  color: var(--warm);
}

.footer-desc {
  margin: 0;
  max-width: 30ch;
  font-size: 14px;
  line-height: 1.9;
  color: var(--dust);
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}

.footer-col-title {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0;
  font-family: var(--font-body);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.24em;
  color: var(--silver);
}

.footer-col-title::before {
  content: "";
  flex: 0 0 auto;
  width: 16px;
  height: 1px;
  background: var(--cyan);
}

.footer-list {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.footer-link {
  display: inline-block;
  font-size: 14px;
  letter-spacing: 0.05em;
  color: var(--dust);
  border-bottom: 1px solid transparent;
  transition: color 0.22s var(--ease), border-color 0.22s var(--ease);
}

.footer-link:hover {
  color: var(--cyan);
  border-bottom-color: rgba(95, 224, 208, 0.5);
}

.footer-contact {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.footer-contact-key {
  font-size: 11px;
  letter-spacing: 0.22em;
  color: var(--sky);
}

.footer-contact-val {
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--silver);
  word-break: break-word;
}

.copy-line {
  padding: 0;
  border-bottom: 1px dashed rgba(124, 139, 176, 0.55);
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.02em;
  text-align: left;
  color: var(--cyan);
  cursor: pointer;
  word-break: break-all;
  transition: color 0.22s var(--ease), border-color 0.22s var(--ease);
}

.copy-line:hover {
  color: var(--amber);
  border-bottom-color: rgba(242, 179, 92, 0.7);
}

.copy-line.is-copied {
  color: var(--amber);
  border-bottom-color: rgba(242, 179, 92, 0.9);
}

.copy-line__text {
  font: inherit;
  color: inherit;
}

.footer-base {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 26px;
  margin-top: clamp(30px, 5vw, 60px);
  padding-block: 20px 26px;
  border-top: 1px solid rgba(124, 139, 176, 0.18);
  font-size: 12px;
  letter-spacing: 0.1em;
  color: rgba(167, 176, 200, 0.78);
}

.footer-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 18px;
  margin: 0;
}

.footer-meta span { white-space: nowrap; }

/* 7. 页面可复用积木 ------------------------------------------------------ */
.kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  font-size: 11.5px;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--cyan);
}

.kicker::before {
  content: "";
  flex: 0 0 auto;
  width: 22px;
  height: 1px;
  background: currentColor;
}

.section-index {
  display: block;
  font-family: var(--font-mono);
  font-size: clamp(44px, 7vw, 88px);
  font-weight: 700;
  line-height: 0.85;
  letter-spacing: 0.02em;
  color: rgba(124, 139, 176, 0.28);
}

.rule-stars {
  position: relative;
  height: 1px;
  margin-block: clamp(28px, 5vw, 56px);
  background: linear-gradient(90deg,
    transparent,
    rgba(124, 139, 176, 0.42) 18%,
    rgba(124, 139, 176, 0.42) 82%,
    transparent);
}

.rule-stars::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 0 4px rgba(95, 224, 208, 0.12);
  transform: translate(-50%, -50%);
}

.panel {
  position: relative;
  padding: clamp(20px, 3vw, 32px);
  background: linear-gradient(160deg, rgba(42, 35, 80, 0.72), rgba(11, 16, 38, 0.86));
  border: 1px solid rgba(124, 139, 176, 0.26);
  border-radius: 3px;
  transition: border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.panel:hover {
  border-color: rgba(95, 224, 208, 0.6);
  box-shadow: 0 14px 40px rgba(3, 5, 12, 0.55);
}

.spotlight-num {
  font-family: var(--font-mono);
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.1;
  letter-spacing: 0.02em;
  color: var(--amber);
  text-shadow: 0 0 26px rgba(242, 179, 92, 0.35);
}

.media-frame {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border: 1px solid rgba(124, 139, 176, 0.24);
  border-radius: 3px;
  background: linear-gradient(150deg, #141A38 0%, #0B1026 46%, #2A2350 100%);
}

.media-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(232, 236, 247, 0.22) 1px, transparent 1px);
  background-size: 26px 26px;
  opacity: 0.5;
  pointer-events: none;
}

.media-frame__img,
.media-frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

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

/* 8. 响应式 -------------------------------------------------------------- */
@media (max-width: 1024px) {
  .footer-main {
    grid-template-columns: 1fr 1fr;
    gap: 34px 28px;
  }
}

@media (max-width: 900px) {
  .nav-toggle { display: inline-flex; }
  .header-note { display: none; }
  .header-top { flex-wrap: nowrap; gap: 10px; padding-block: 12px; }
  .brand { gap: 9px; }
  .brand__track { display: none; }
  .header-actions { gap: 8px; }

  .header-nav {
    max-height: 0;
    overflow: hidden;
    visibility: hidden;
    opacity: 0;
    transition: max-height 0.38s var(--ease), opacity 0.3s var(--ease), visibility 0.38s var(--ease);
  }

  .header-nav[data-open] {
    max-height: 72vh;
    overflow-y: auto;
    visibility: visible;
    opacity: 1;
  }

  .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding-block: 6px;
  }

  .nav-item { border-bottom: 1px solid rgba(124, 139, 176, 0.12); }
  .nav-item:last-child { border-bottom: 0; }

  .nav-link {
    width: 100%;
    padding: 15px 4px;
    font-size: 15px;
  }

  .nav-link::after { bottom: 9px; }
}

@media (max-width: 560px) {
  .footer-main { grid-template-columns: 1fr; }
  .footer-base { flex-direction: column; align-items: flex-start; }
  .footer-desc { max-width: none; }
}

@media (max-width: 520px) {
  .btn--copy { display: none; }
}

@media (max-width: 420px) {
  .version-tag { display: none; }
  .brand__name { letter-spacing: 0.16em; }
}

/* 9. 动效偏好 ------------------------------------------------------------ */
@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-rail { transition: none; }
}
