/* ══════════════════════════════════════════════════════════════════
   主界面（游戏向 · 厚环 + 光块）
   标题在左，作为圆心；右侧两道厚环。
   悬停：两块光（先橙后白）从圆心沿扇区铺到画面外，像丁达尔光。
   没有细线，只有色块与光。
   ══════════════════════════════════════════════════════════════════ */

:root {
  --display: "Noto Sans SC", "Source Han Sans CN", "Source Han Sans SC", "Microsoft YaHei", "PingFang SC", sans-serif;
}

body.home-page {
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* HUD 四角框 */
.hframe { position: fixed; inset: 12px; z-index: 5; pointer-events: none; }
.hframe i {
  position: absolute;
  width: 24px;
  height: 24px;
  border: 1px solid rgba(242, 201, 107, 0.32);
}
.hframe i:nth-child(1) { left: 0; top: 0; border-right: 0; border-bottom: 0; }
.hframe i:nth-child(2) { right: 0; top: 0; border-left: 0; border-bottom: 0; }
.hframe i:nth-child(3) { left: 0; bottom: 0; border-right: 0; border-top: 0; }
.hframe i:nth-child(4) { right: 0; bottom: 0; border-left: 0; border-top: 0; }

/* ── 顶栏 ─────────────────────────────────────────────────────────── */
.hbar {
  flex: none;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 0 clamp(18px, 4vw, 46px);
  border-bottom: 1px solid var(--line);
  background: rgba(8, 9, 12, 0.62);
  backdrop-filter: blur(12px);
  z-index: 20;
}
.hbrand { display: flex; align-items: center; gap: 12px; }
.hbrand__mark {
  width: 20px;
  height: 24px;
  background: var(--gold);
  clip-path: polygon(0 0, 100% 0, 100% 62%, 50% 100%, 0 62%);
  box-shadow: 0 0 18px rgba(242, 201, 107, 0.45);
}
.hbrand__text {
  display: flex;
  align-items: baseline;
  gap: 12px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.22em;
}
.hbrand__text em {
  font-style: normal;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.3em;
  color: var(--ink-faint);
}

.hbar__right { display: flex; align-items: center; gap: 8px; }
.hchip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 30px;
  padding: 0 12px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  color: var(--ink-faint);
  border: 1px solid var(--line);
  border-radius: 999px;
  text-decoration: none;
  white-space: nowrap;
}
.hchip i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: 0.7; }
.hchip.is-live { color: var(--ok); border-color: rgba(95, 224, 168, 0.35); }
.hchip.is-live i { box-shadow: 0 0 8px var(--ok); }
.hchip--link { color: var(--gold); border-color: rgba(242, 201, 107, 0.35); }
.hchip--link:hover { background: rgba(242, 201, 107, 0.1); }

/* ── 主体 ─────────────────────────────────────────────────────────── */
.hub {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  align-items: center;
  padding: 0 clamp(24px, 5vw, 76px);
  overflow: hidden;
}

.hub__left { position: relative; z-index: 2; }

.hub__title {
  margin: 0;
  font-family: var(--display);
  font-weight: 900;
  font-size: clamp(46px, 7.2vw, 104px);
  line-height: 0.94;
  letter-spacing: 0.02em;
  text-shadow: 0 0 60px rgba(0, 0, 0, 0.5);
}
.hub__title em {
  font-style: normal;
  color: var(--gold);
  text-shadow: 0 0 44px rgba(242, 201, 107, 0.4);
}
.hub__left .eyebrow { margin-bottom: 14px; }

/* ── 环 ───────────────────────────────────────────────────────────── */
.radar {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}
.radar__svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}
/* 整块扇形（白框里的任意位置）都能点；图标也算 */
.radar__svg .piece path,
.radar__svg .mark path,
.radar__svg .mark text { pointer-events: all; }
.radar__svg .beam,
.radar__svg .beam path,
.radar__svg .beam text { pointer-events: none; }

/* 环体：厚重的色块，没有描边 */
.slab {
  fill: rgba(255, 255, 255, 0.045);
  stroke: none;
  cursor: pointer;
  transition: fill 0.3s;
}
.item.is-active .slab { fill: rgba(255, 255, 255, 0.08); }
.slab--locked { cursor: not-allowed; fill: rgba(255, 255, 255, 0.025); }

/* 两块纯色：橙先扫过，白跟上（白停在 82%，留一圈橙边） */
.block {
  stroke: none;
  pointer-events: none;
}
.block--hot { opacity: 0.85; }
.block--cool { opacity: 0.95; }

.block-mask {
  fill: #fff;
  transform-box: fill-box;
  transform-origin: center;
  transform: scale(var(--s0, 0.5));
  transition: transform 0.52s cubic-bezier(0.25, 0.82, 0.3, 1);
}
.item.is-active .block-mask { transform: scale(var(--s1, 1)); }
.block-mask--cool { transition-delay: 0.22s; }

/* ── 功能全名 ─────────────────────────────────────────────────────── */
.radar__labels { position: absolute; inset: 0; }

.tag {
  position: absolute;
  left: var(--lx);
  top: var(--y);
  transform: translateY(-50%);
  padding-right: 24px;
  opacity: 1;
  pointer-events: auto;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  background: none;
  border: 0;
  font: inherit;
  text-align: left;
  appearance: none;
  -webkit-appearance: none;
}
.tag--locked { cursor: not-allowed; }

/* 名字：底色是暗的，激活时一道白色从左擦到右 —— 就是"被色块扫过、展开" */
.tag__name {
  position: relative;
  display: inline-block;
  font-family: var(--display);
  font-weight: 900;
  font-size: clamp(22px, 2.1vw, 32px);
  letter-spacing: 0.12em;
  line-height: 1.15;
  color: rgba(255, 255, 255, 0.24);
  white-space: nowrap;
  transition: color 0.3s;
}
.tag__name::after {
  content: attr(data-text);
  position: absolute;
  left: 0;
  top: 0;
  white-space: nowrap;
  color: #ffffff;
  clip-path: inset(0 100% 0 0);
  transition: clip-path 0.5s cubic-bezier(0.3, 0.86, 0.35, 1) 0.14s;
}
.tag.is-active .tag__name { color: rgba(255, 255, 255, 0.34); }
.tag.is-active .tag__name::after { clip-path: inset(0 0 0 0); }

.tag__en {
  display: block;
  margin-top: 4px;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.36em;
  color: var(--ink-faint);
  transition: color 0.3s 0.24s;
}
.tag.is-active .tag__en { color: rgba(255, 255, 255, 0.55); }

.tag__lock {
  display: inline-block;
  margin-top: 5px;
  padding: 2px 7px;
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.18em;
  color: var(--ink-faint);
  background: rgba(255, 255, 255, 0.04);
}

/* ── 窄屏回退列表 ─────────────────────────────────────────────────── */
.hub__list { display: none; }

/* ── 底栏 ─────────────────────────────────────────────────────────── */
.hfoot {
  flex: none;
  height: 42px;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 0 clamp(18px, 4vw, 46px);
  border-top: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--ink-faint);
  background: rgba(8, 9, 12, 0.6);
}
.hfoot__spacer { flex: 1; }

/* ── 关于 ─────────────────────────────────────────────────────────── */
.about {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  pointer-events: none;
}
.about__scrim {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity 0.24s;
}
.about__panel {
  position: relative;
  width: min(620px, 92vw);
  padding: 30px clamp(22px, 3vw, 36px) 28px;
  border: 1px solid var(--line-strong);
  border-top: 2px solid var(--gold);
  background: linear-gradient(180deg, #131820, var(--bg-2));
  transform: translateY(14px);
  opacity: 0;
  transition: opacity 0.24s, transform 0.24s;
}
.about.is-open { pointer-events: auto; }
.about.is-open .about__scrim { opacity: 1; }
.about.is-open .about__panel { opacity: 1; transform: none; }
.about__close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  font-size: 20px;
  line-height: 1;
  color: var(--ink-dim);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  cursor: pointer;
}
.about__close:hover { color: var(--ink); border-color: var(--gold); }
.about__panel h2 { margin: 0 0 10px; font-size: 26px; letter-spacing: 0.1em; }
.about__desc { margin: 0 0 20px; font-size: 13px; line-height: 1.9; color: var(--ink-dim); }
.about__kv {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  margin: 0 0 18px;
  background: var(--line);
  border: 1px solid var(--line);
}
.about__kv > div { padding: 11px 13px; background: var(--bg-2); }
.about__kv dt {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.16em;
  color: var(--ink-faint);
}
.about__kv dd { margin: 3px 0 0; font-size: 12.5px; color: var(--ink-dim); }
.about__foot { margin: 0; font-size: 10.5px; line-height: 1.7; color: var(--ink-faint); }

/* ── 扇形块：双层白边 + 投影 ─────────────────────────────────────── */
.piece {
  filter: drop-shadow(0 7px 16px rgba(0, 0, 0, 0.62)) drop-shadow(0 1px 2px rgba(0, 0, 0, 0.8));
  cursor: pointer;
}
.piece__face {
  fill: rgba(255, 255, 255, 0.055);
  stroke: rgba(255, 255, 255, 0.86);
  stroke-linejoin: miter;
}
.piece__line {
  fill: none;
  stroke: rgba(255, 255, 255, 0.34);
  stroke-linejoin: miter;
}

/* ── 光束：以扇形两侧为界，从内缘扫到画面外 ─────────────────────── */
.beam { pointer-events: none; }
.beam__fill--hot { fill: rgba(255, 106, 26, 0.55); }
.beam__fill--cool { fill: rgba(255, 255, 255, 0.72); }

.beam-mask {
  fill: #fff;
  transform-box: fill-box;
  transform-origin: center;
  /* 过渡由 JS 的 rAF 驱动，这里不要加 transition */
}
/* 擦除遮罩的圆必须是黑的：CSS 的 fill 会盖掉属性上的 fill="#000" */
.beam-mask--erase { fill: #000; }

.beam__name {
  fill: #0b0d10;
  font-family: var(--display);
  font-weight: 900;
  letter-spacing: 0.14em;
  dominant-baseline: middle;
}

/* 被光扫过的扇区：图标与两个字反色成深色 */
.mark__icon,
.mark__label { transition: stroke 0.3s, fill 0.3s; }
.mark.is-lit .mark__icon { stroke: #0b0d10; }
.mark.is-lit .mark__label { fill: #0b0d10; }
.piece.is-lit .piece__face { fill: rgba(255, 255, 255, 0.16); }

/* ── 扇区上的图标与名字 ───────────────────────────────────────────── */
.mark__icon {
  fill: none;
  stroke: #ffffff;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.mark__label {
  fill: #ffffff;
  font-family: var(--display);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
}

/* ── 环的姿态由手机倾角驱动（见 home.js），无动画 ──────────────────── */
.ring-group {
  will-change: transform;
}

/* 版本角标：固定在左下，任何尺寸都不会被裁掉 */
.build-badge {
  position: fixed;
  left: 14px;
  bottom: 52px;
  z-index: 60;
  padding: 3px 8px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  color: #0b0d10;
  background: #f2c96b;
  pointer-events: none;
}

/* ── 响应式 ───────────────────────────────────────────────────────── */
@media (max-width: 1100px) {
  .tag__name { font-size: 20px; }
}

@media (max-width: 980px) {
  .hub { padding: 0 14px; }
  .hub__title { font-size: clamp(34px, 9vw, 64px); }
  .hub__left .eyebrow { font-size: 7.5px; letter-spacing: 0.2em; }
  .hfoot { font-size: 9px; gap: 10px; }
  .hfoot #foot-table { display: none; }
  .build-badge { left: 10px; bottom: 48px; }
}

@media (max-width: 640px) {
  .hbar { height: 56px; }
  .hbrand__text em { display: none; }
  .hfoot { font-size: 9px; gap: 10px; }
  .hfoot #foot-table { display: none; }
  .about__kv { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .hub__title { text-shadow: none; }
}
