/* zptkf.com — i社游戏官网导航
   视觉方向：无连线的深空星点 / 近黑 · 银灰 · 少量冷白 / 中央窄卡与紧凑入口矩阵 */

:root {
  --void: #05070c;
  --void-2: #070a11;
  --card: rgba(9, 12, 19, 0.72);
  --cell: rgba(12, 16, 24, 0.66);
  --cell-hi: rgba(22, 28, 40, 0.88);
  --hair: rgba(170, 182, 200, 0.16);
  --hair-hi: rgba(196, 210, 230, 0.42);
  --silver: #aab3c0;
  --silver-dim: #78818f;
  --cool: #eef3fa;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
  --step: clamp(0.9rem, 0.6rem + 1vw, 1.35rem);
}

*,
*::before,
*::after { box-sizing: border-box; }

[hidden] { display: none !important; }

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

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--silver);
  background-color: var(--void);
  /* 静态兜底星尘：Canvas 不可用或初始化失败时仍保留深空质感 */
  background-image:
    radial-gradient(1px 1px at 12% 18%, rgba(238, 243, 250, 0.55), transparent 60%),
    radial-gradient(1px 1px at 78% 12%, rgba(238, 243, 250, 0.4), transparent 60%),
    radial-gradient(1.2px 1.2px at 34% 62%, rgba(238, 243, 250, 0.35), transparent 60%),
    radial-gradient(1px 1px at 88% 74%, rgba(238, 243, 250, 0.45), transparent 60%),
    radial-gradient(1px 1px at 58% 88%, rgba(238, 243, 250, 0.3), transparent 60%),
    radial-gradient(1px 1px at 22% 82%, rgba(238, 243, 250, 0.32), transparent 60%),
    radial-gradient(900px 620px at 72% -8%, rgba(46, 60, 84, 0.42), transparent 70%),
    radial-gradient(760px 560px at 8% 104%, rgba(32, 42, 62, 0.4), transparent 70%),
    linear-gradient(180deg, #05070c 0%, #070a11 48%, #04060a 100%);
  background-attachment: scroll;
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC",
    "Source Han Sans SC", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.75;
  letter-spacing: 0.01em;
}

/* ---------- 深空星点画布 ---------- */

.starfield {
  position: fixed;
  inset: 0;
  z-index: 0;
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
  touch-action: auto;
}

/* ---------- 页面骨架：中央窄卡 ---------- */

.deck {
  position: relative;
  z-index: 1;
  width: min(100% - 2.25rem, 800px);
  margin: 0 auto;
  padding: clamp(1.75rem, 4vw, 3.25rem) 0 clamp(2rem, 5vw, 3.5rem);
}

.masthead,
.panel,
.foot {
  background: var(--card);
  border: 1px solid var(--hair);
  border-radius: 3px;
  box-shadow: var(--shadow);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.masthead {
  padding: clamp(1rem, 3vw, 1.5rem) var(--step) clamp(1.25rem, 3vw, 1.75rem);
}

.masthead__bar {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-height: 2rem;
}

.masthead__rule {
  flex: 1 1 auto;
  height: 1px;
  background: linear-gradient(90deg, var(--hair-hi), rgba(170, 182, 200, 0));
}

/* ---------- 背景动画开关 ---------- */

.motion {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
  padding: 0.45rem 0.85rem;
  color: var(--silver);
  font: inherit;
  font-size: 0.8125rem;
  line-height: 1.2;
  letter-spacing: 0.06em;
  background: rgba(16, 21, 31, 0.9);
  border: 1px solid var(--hair);
  border-radius: 999px;
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

.motion:hover,
.motion:focus-visible {
  color: var(--cool);
  border-color: var(--hair-hi);
  background: rgba(26, 33, 46, 0.95);
}

.motion__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--silver-dim);
  box-shadow: 0 0 0 0 rgba(238, 243, 250, 0);
  transition: background-color 0.2s ease, box-shadow 0.2s ease;
}

.motion.is-running .motion__dot {
  background: var(--cool);
  box-shadow: 0 0 8px 1px rgba(238, 243, 250, 0.55);
}

/* ---------- 站名区 ---------- */

.brand {
  display: flex;
  align-items: center;
  gap: clamp(0.85rem, 2.5vw, 1.25rem);
  margin-top: clamp(1rem, 3vw, 1.5rem);
}

.brand__mark {
  flex: 0 0 auto;
  width: clamp(56px, 13vw, 72px);
  height: auto;
  border-radius: 50%;
  background: #fff;
  border: 1px solid var(--hair-hi);
  box-shadow: 0 0 22px rgba(160, 180, 210, 0.16);
}

.brand__title {
  margin: 0;
  color: var(--cool);
  font-size: clamp(1.6rem, 1.15rem + 2.1vw, 2.45rem);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: 0.06em;
  text-shadow: 0 0 26px rgba(190, 210, 240, 0.22);
}

.lede {
  margin: clamp(1rem, 3vw, 1.4rem) 0 0;
  padding-left: 0.9rem;
  border-left: 1px solid var(--hair-hi);
  color: var(--silver);
  font-size: 0.95rem;
}

/* ---------- 面板 ---------- */

.main {
  display: block;
}

.panel {
  margin-top: 0.9rem;
  padding: clamp(1.1rem, 3vw, 1.6rem) var(--step) clamp(1.25rem, 3vw, 1.7rem);
}

.panel__title {
  margin: 0 0 1rem;
  padding-bottom: 0.7rem;
  border-bottom: 1px solid var(--hair);
  color: var(--cool);
  font-size: clamp(1.02rem, 0.9rem + 0.5vw, 1.2rem);
  font-weight: 600;
  letter-spacing: 0.08em;
}

/* ---------- 紧凑入口矩阵（发丝分隔线） ---------- */

.matrix {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(178px, 1fr));
  gap: 1px;
  margin: 0;
  padding: 1px;
  list-style: none;
  background: var(--hair);
  border: 1px solid var(--hair);
  border-radius: 2px;
  overflow: hidden;
}

.matrix__cell {
  display: flex;
  background: var(--cell);
}

.entry {
  position: relative;
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  width: 100%;
  min-height: 62px;
  padding: 0.85rem 0.95rem;
  color: var(--silver);
  text-decoration: none;
  transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.entry::after {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 2px;
  height: 100%;
  background: var(--cool);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.entry__idx {
  flex: 0 0 auto;
  color: var(--silver-dim);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Courier New", monospace;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  transition: color 0.2s ease;
}

.entry__name {
  font-size: 0.95rem;
  line-height: 1.5;
  word-break: break-word;
}

.entry:hover,
.entry:focus-visible {
  background: var(--cell-hi);
  color: var(--cool);
}

.entry:hover .entry__idx,
.entry:focus-visible .entry__idx {
  color: var(--cool);
}

.entry:hover::after,
.entry:focus-visible::after {
  opacity: 0.85;
}

.entry:active {
  transform: translateY(1px);
}

/* ---------- 辅助内容 ---------- */

.notes {
  margin: 0;
  padding: 0;
  list-style: none;
}

.note {
  display: flex;
  gap: 0.75rem;
  padding: 0.85rem 0;
  border-top: 1px solid var(--hair);
}

.note:first-child {
  border-top: 0;
  padding-top: 0;
}

.note:last-child {
  padding-bottom: 0;
}

.note__no {
  flex: 0 0 auto;
  margin-top: 0.62rem;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--hair-hi);
  overflow: hidden;
  text-indent: -99em;
}

.note p {
  margin: 0;
  font-size: 0.92rem;
}

.note strong {
  color: var(--cool);
  font-weight: 600;
  letter-spacing: 0.03em;
}

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

.foot {
  margin-top: 0.9rem;
  padding: clamp(1rem, 3vw, 1.4rem) var(--step);
}

.foot__note {
  margin: 0;
  color: var(--silver-dim);
  font-size: 0.85rem;
}

.foot__copy {
  margin: 0.75rem 0 0;
  padding-top: 0.75rem;
  border-top: 1px solid var(--hair);
  color: var(--silver-dim);
  font-size: 0.8rem;
  letter-spacing: 0.05em;
}

/* ---------- 焦点可见性 ---------- */

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--cool);
  outline-offset: 2px;
}

/* ---------- 窄屏 ---------- */

@media (max-width: 560px) {
  .deck {
    width: min(100% - 1.25rem, 800px);
  }

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

  .entry {
    min-height: 54px;
    align-items: center;
  }

  .brand {
    gap: 0.75rem;
  }

  .lede {
    font-size: 0.9rem;
  }
}

@media (max-width: 380px) {
  body {
    font-size: 15px;
  }

  .motion {
    padding: 0.4rem 0.7rem;
    font-size: 0.75rem;
  }

  .entry {
    padding: 0.7rem 0.75rem;
  }
}

/* ---------- 减少运动 ---------- */

@media (prefers-reduced-motion: reduce) {
  .entry,
  .entry::after,
  .motion,
  .motion__dot {
    transition-duration: 0.01ms;
  }

  .entry:active {
    transform: none;
  }
}
