:root {
  --cyan: #6ee7ff;
  --violet: #a78bfa;
  --amber: #ffc36b;
  --text: #eef6f9;
  --muted: #8fa3ad;
  --glass: rgba(6, 12, 16, .55);
  --edge: rgba(110, 231, 255, .22);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; overflow: hidden; }
body {
  background: #02040a;
  color: var(--text);
  font-family: Inter, "Noto Sans SC", "Noto Sans TC", "Microsoft YaHei", sans-serif;
  -webkit-tap-highlight-color: transparent;
}
#galaxy-canvas { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; }
.vignette {
  position: fixed; inset: 0; z-index: 1; pointer-events: none;
  background: radial-gradient(ellipse at center, transparent 45%, rgba(0, 2, 6, .78) 100%);
}
/* HUD 四角取景框 */
.hud-frame { position: fixed; inset: 14px; z-index: 2; pointer-events: none; opacity: .6; }
.hud-frame i { position: absolute; width: 26px; height: 26px; border: 1px solid var(--edge); }
.hud-frame i:nth-child(1) { top: 0; left: 0; border-right: 0; border-bottom: 0; }
.hud-frame i:nth-child(2) { top: 0; right: 0; border-left: 0; border-bottom: 0; }
.hud-frame i:nth-child(3) { bottom: 0; left: 0; border-right: 0; border-top: 0; }
.hud-frame i:nth-child(4) { bottom: 0; right: 0; border-left: 0; border-top: 0; }

.home-button {
  position: fixed; top: 20px; left: 20px; width: 48px; height: 48px; z-index: 10000;
  display: grid; place-items: center;
  color: rgba(255,255,255,.72);
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 50%;
  background: rgba(6,12,16,.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  text-decoration: none;
  touch-action: none;
  user-select: none;
  transition: color .25s, border-color .25s;
}
.home-button:hover { color: #fff; border-color: var(--cyan); }
.home-button svg { width: 20px; height: 20px; fill: currentColor; }

/* 标题 */
.title-section {
  position: fixed; top: 26px; left: 50%; transform: translateX(-50%);
  z-index: 10; text-align: center; pointer-events: none; width: max-content; max-width: 92vw;
}
.title-section h1 {
  font-family: "Space Grotesk", Inter, sans-serif;
  font-size: clamp(26px, 4.6vw, 52px);
  font-weight: 700;
  letter-spacing: .12em;
  background: linear-gradient(100deg, #fff 10%, var(--cyan) 45%, var(--violet) 80%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 26px rgba(110, 231, 255, .35));
}
.subtitle {
  margin-top: 6px;
  color: var(--muted);
  font: 500 clamp(10px, 1.4vw, 12px)/1 "Space Grotesk", sans-serif;
  letter-spacing: .34em;
  text-transform: uppercase;
}
.subtitle b { color: var(--cyan); font-weight: 600; }

/* 数据面板(桌面右侧) */
.data-panels {
  position: fixed; top: 118px; right: 26px; z-index: 10;
  display: flex; flex-direction: column; gap: 12px; width: 248px;
}
.data-panel {
  background: var(--glass);
  border: 1px solid var(--edge);
  border-radius: 12px;
  padding: 16px 18px;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.panel-title {
  display: flex; align-items: center; gap: 8px;
  color: var(--cyan);
  font: 600 10px/1 "Space Grotesk", sans-serif;
  letter-spacing: .26em; text-transform: uppercase;
  margin-bottom: 12px;
}
.panel-title::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; box-shadow: 0 0 8px currentColor; }
.data-item { display: flex; justify-content: space-between; align-items: baseline; padding: 3px 0; font-size: 12.5px; }
.data-label { color: var(--muted); }
.data-value { color: var(--text); font: 600 12.5px "Space Grotesk", sans-serif; letter-spacing: .04em; }
.data-value.hot { color: var(--amber); }

/* 说明卡(桌面左下) */
.info-tooltip {
  position: fixed; left: 26px; bottom: 96px; z-index: 10; max-width: 300px;
  background: var(--glass); border: 1px solid var(--edge); border-radius: 12px;
  padding: 16px 18px;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  pointer-events: none;
}
.info-tooltip h3 { color: var(--cyan); font: 600 11px/1 "Space Grotesk", sans-serif; letter-spacing: .22em; text-transform: uppercase; margin-bottom: 9px; }
.info-tooltip p { color: var(--muted); font-size: 12.5px; line-height: 1.75; }

/* 控制台 */
.control-panel {
  position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%); z-index: 20;
  display: flex; gap: 8px; padding: 8px;
  background: var(--glass); border: 1px solid var(--edge); border-radius: 999px;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.control-btn {
  padding: 10px 22px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 999px;
  color: var(--muted);
  font: 600 12px/1 "Space Grotesk", "Noto Sans SC", sans-serif;
  letter-spacing: .12em;
  white-space: nowrap;
  cursor: pointer;
  transition: color .2s, background .2s, border-color .2s;
}
.control-btn:hover { color: var(--text); }
.control-btn.active { color: #041016; background: var(--cyan); box-shadow: 0 0 22px rgba(110, 231, 255, .45); }
.control-btn.ghost.active { color: var(--cyan); background: rgba(110,231,255,.1); border-color: var(--edge); box-shadow: none; }

footer {
  position: fixed; right: 26px; bottom: 20px; z-index: 10;
  text-align: right; pointer-events: none;
}
footer p, footer a { color: #fff; font-size: 11px; line-height: 1.7; text-decoration: none; pointer-events: all; }

@media (max-width: 820px) {
  .title-section { top: 20px; }
  /* 手机:右侧面板变为底部紧凑数据条,星系居中不被遮挡 */
  .data-panels {
    top: auto; right: auto; bottom: 92px; left: 50%; transform: translateX(-50%);
    flex-direction: row; gap: 8px; width: calc(100vw - 24px); max-width: 560px;
  }
  .data-panel { flex: 1 1 0; min-width: 0; padding: 10px 12px; border-radius: 10px; }
  .panel-title { font-size: 9px; letter-spacing: .18em; margin-bottom: 7px; }
  .data-item { font-size: 11px; padding: 2px 0; gap: 6px; }
  .data-item.optional { display: none; }
  .data-label { white-space: nowrap; }
  .data-value { font-size: 11px; white-space: nowrap; }
  .info-tooltip { display: none; }
  .control-panel { bottom: 46px; }
  .control-btn { padding: 9px 16px; font-size: 11px; }
  /* 提高优先级压过全站页脚统一层的 13px,避免两行挤到控制台 */
  footer { right: 0; left: 0; bottom: 8px; text-align: center; }
  body footer p, body footer a { display: inline; margin: 0 4px; font-size: 10px !important; line-height: 1.4 !important; }
}
@media (max-width: 400px) {
  .control-btn { padding: 8px 12px; letter-spacing: .06em; }
  .data-panels { bottom: 104px; }
}
