﻿/* ==================================================================
   白山茶 · 手控绽放
   设计基调：墨绿夜色 + 玉白花色 + 一点点金
   ================================================================== */

:root {
  --ink: #040b08;
  --ink-2: #07130f;
  --paper: #f3f7f5;
  --mist: rgba(219, 238, 231, 0.66);
  --mist-dim: rgba(210, 232, 224, 0.38);
  --line: rgba(196, 228, 216, 0.16);
  --line-soft: rgba(196, 228, 216, 0.08);
  --gold: #eccb8f;
  --jade: #86d3b2;

  --serif: "Songti SC", "STSong", "Source Han Serif SC", "Noto Serif CJK SC",
    "SimSun", "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;

  --pad: clamp(18px, 3vw, 40px);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
  overscroll-behavior: none;
}

body {
  touch-action: none;
  cursor: default;
}

/* ---------------- 舞台 ---------------- */
.stage {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(120% 90% at 50% 42%, #071410 0%, #040c09 44%, #020604 100%);
}

#gl-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: 2;
}

/* 极细的噪点 + 暗角，压住数字感 */
.veil {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  background:
    radial-gradient(90% 70% at 50% 45%, transparent 40%, rgba(0, 0, 0, 0.42) 100%);
  mix-blend-mode: multiply;
}

.veil::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}

/* ---------------- 顶栏 ---------------- */
.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: calc(var(--pad) * 0.62) var(--pad);
  pointer-events: none;
}

.topbar > * { pointer-events: auto; }

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  user-select: none;
}

.brand-cn {
  font-family: var(--serif);
  font-size: 17px;
  letter-spacing: 0.34em;
  color: rgba(243, 247, 245, 0.9);
}

.brand-sep {
  width: 28px;
  height: 1px;
  background: linear-gradient(90deg, var(--line), transparent);
}

.brand-en {
  font-size: 9.5px;
  letter-spacing: 0.30em;
  color: var(--mist-dim);
  text-transform: uppercase;
}

.tools { display: flex; gap: 8px; }

.tool {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 32px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--mist);
  font-family: var(--sans);
  font-size: 11.5px;
  letter-spacing: 0.12em;
  cursor: pointer;
  backdrop-filter: blur(8px);
  transition: border-color 220ms, color 220ms, background 220ms;
}

.tool svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.4;
  stroke-linecap: round;
  opacity: 0.8;
}

.tool:hover { border-color: rgba(196, 228, 216, 0.34); color: var(--paper); }
.tool[aria-pressed="false"] { opacity: 0.45; }
.tool-icon {
  width: 32px;
  padding: 0;
  justify-content: center;
  font-family: var(--serif);
  font-size: 13px;
}

/* ---------------- 开场 ---------------- */
.intro {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: var(--pad);
  background:
    radial-gradient(70% 60% at 50% 45%, rgba(9, 26, 20, 0.72) 0%, rgba(3, 9, 7, 0.94) 100%);
  backdrop-filter: blur(2px);
  transition: opacity 900ms cubic-bezier(0.22, 1, 0.36, 1),
    visibility 900ms;
}

.intro.gone {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.intro-glow {
  position: absolute;
  width: min(78vmin, 720px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(134, 211, 178, 0.10) 0%, transparent 62%);
  filter: blur(20px);
  animation: breathe 9s ease-in-out infinite;
  pointer-events: none;
}

@keyframes breathe {
  0%, 100% { transform: scale(0.92); opacity: 0.7; }
  50% { transform: scale(1.06); opacity: 1; }
}

.intro-inner {
  position: relative;
  max-width: 560px;
  text-align: center;
  animation: rise 1100ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

.kicker {
  margin: 0 0 22px;
  font-size: 10.5px;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: var(--mist-dim);
}

.intro h1 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(40px, 8.2vw, 74px);
  line-height: 1.18;
  letter-spacing: 0.10em;
  color: #f7faf8;
  text-shadow: 0 0 60px rgba(180, 235, 214, 0.18);
}

.intro h1 em {
  font-style: normal;
  color: transparent;
  background: linear-gradient(176deg, #ffffff 8%, #dfeee7 48%, #b9d8cb 100%);
  -webkit-background-clip: text;
  background-clip: text;
}

.lede {
  margin: 26px auto 0;
  max-width: 30em;
  font-size: 14px;
  line-height: 2.05;
  letter-spacing: 0.06em;
  color: var(--mist);
}

.actions {
  margin-top: 40px;
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  height: 46px;
  padding: 0 26px;
  border-radius: 999px;
  font-family: var(--sans);
  font-size: 13px;
  letter-spacing: 0.16em;
  cursor: pointer;
  transition: transform 240ms cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 240ms, border-color 240ms, background 240ms;
}

.btn svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.3;
}

.btn-primary {
  border: 1px solid rgba(255, 255, 255, 0.5);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.06));
  color: #ffffff;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.04) inset,
    0 18px 40px -18px rgba(160, 240, 210, 0.55);
  backdrop-filter: blur(10px);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.06) inset,
    0 24px 50px -18px rgba(160, 240, 210, 0.75);
}

.btn-ghost {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--mist);
}

.btn-ghost:hover { border-color: rgba(196, 228, 216, 0.34); color: var(--paper); }

.fineprint {
  margin: 30px 0 0;
  font-size: 10.5px;
  letter-spacing: 0.16em;
  color: rgba(210, 232, 224, 0.28);
}

.fineprint.warn { color: rgba(236, 203, 143, 0.75); }

/* ---------------- HUD ---------------- */
.hud {
  position: fixed;
  left: var(--pad);
  bottom: calc(var(--pad) * 0.8);
  z-index: 30;
  width: 208px;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 700ms ease, transform 700ms ease;
  pointer-events: none;
}

.hud.on { opacity: 1; transform: none; }

.hud-top {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.hud-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.25);
  box-shadow: 0 0 0 0 rgba(255, 255, 255, 0);
  transition: background 400ms, box-shadow 400ms;
}

.hud-dot.live {
  background: var(--jade);
  box-shadow: 0 0 12px 1px rgba(134, 211, 178, 0.65);
}

.hud-state {
  font-family: var(--serif);
  font-size: 15px;
  letter-spacing: 0.22em;
  color: rgba(243, 247, 245, 0.92);
}

.hud-mode {
  margin-left: auto;
  font-size: 9.5px;
  letter-spacing: 0.2em;
  color: rgba(210, 232, 224, 0.34);
  text-transform: uppercase;
}

.meter {
  position: relative;
  height: 1px;
  background: var(--line);
  overflow: hidden;
}

.meter i {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0%;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.5), var(--gold));
  box-shadow: 0 0 10px rgba(236, 203, 143, 0.6);
  transition: width 90ms linear;
}

.hud-nums {
  display: flex;
  gap: 18px;
  margin-top: 9px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.04em;
  color: rgba(210, 232, 224, 0.46);
}

.hud-nums em {
  font-style: normal;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  margin-right: 6px;
  color: rgba(210, 232, 224, 0.28);
}

.hud-nums b { font-weight: 500; color: rgba(243, 247, 245, 0.8); }

/* ---------------- 提示 ---------------- */
.hint {
  position: fixed;
  left: 50%;
  bottom: calc(var(--pad) * 0.9);
  transform: translateX(-50%) translateY(6px);
  z-index: 29;
  font-size: 11px;
  letter-spacing: 0.24em;
  color: rgba(219, 238, 231, 0.42);
  opacity: 0;
  transition: opacity 800ms ease, transform 800ms ease;
  pointer-events: none;
  white-space: nowrap;
}

.hint.on { opacity: 1; transform: translateX(-50%); }

/* ---------------- 帮助 ---------------- */
.help {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: var(--pad);
  background: rgba(2, 8, 6, 0.72);
  backdrop-filter: blur(10px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 320ms ease, visibility 320ms;
}

.help.on { opacity: 1; visibility: visible; }

.help-card {
  width: min(420px, 100%);
  padding: 30px 30px 24px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(14, 32, 26, 0.92), rgba(6, 16, 13, 0.94));
  box-shadow: 0 40px 90px -40px rgba(0, 0, 0, 0.9);
}

.help-card h2 {
  margin: 0 0 20px;
  font-family: var(--serif);
  font-weight: 400;
  font-size: 20px;
  letter-spacing: 0.22em;
  color: rgba(243, 247, 245, 0.92);
}

.help-card ul { margin: 0 0 24px; padding: 0; list-style: none; }

.help-card li {
  display: flex;
  align-items: baseline;
  gap: 14px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line-soft);
  font-size: 12.5px;
  color: var(--mist);
}

.help-card li b {
  flex: 0 0 84px;
  font-weight: 500;
  letter-spacing: 0.1em;
  color: rgba(243, 247, 245, 0.9);
}

kbd {
  flex: 0 0 84px;
  font-family: var(--mono);
  font-size: 10px;
  padding: 3px 7px;
  border: 1px solid var(--line);
  border-radius: 5px;
  color: var(--mist);
  letter-spacing: 0.12em;
  text-align: center;
}

/* ---------------- toast ---------------- */
.toast {
  position: fixed;
  left: 50%;
  top: calc(var(--pad) * 1.6);
  transform: translate(-50%, -12px);
  z-index: 60;
  max-width: min(440px, 88vw);
  padding: 11px 20px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(9, 22, 17, 0.9);
  backdrop-filter: blur(10px);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--mist);
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 380ms ease, transform 380ms ease;
}

.toast.on { opacity: 1; transform: translate(-50%, 0); }

/* ---------------- 手部捕捉小窗 ---------------- */
.pip {
  position: fixed;
  right: var(--pad);
  bottom: calc(var(--pad) * 0.8);
  z-index: 31;
  width: 236px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(6, 16, 13, 0.82);
  backdrop-filter: blur(12px);
  box-shadow: 0 30px 70px -34px rgba(0, 0, 0, 0.95),
    0 0 0 1px rgba(255, 255, 255, 0.02) inset;
  overflow: hidden;
  opacity: 0;
  transform: translateY(10px) scale(0.98);
  pointer-events: none;
  transition: opacity 620ms cubic-bezier(0.22, 1, 0.36, 1),
    transform 620ms cubic-bezier(0.22, 1, 0.36, 1);
}

.pip.on {
  opacity: 1;
  transform: none;
}

.pip-head {
  display: flex;
  align-items: center;
  gap: 7px;
  height: 30px;
  padding: 0 11px;
  border-bottom: 1px solid var(--line-soft);
}

.pip-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.22);
  transition: background 300ms, box-shadow 300ms;
}

.pip-dot.live {
  background: var(--jade);
  box-shadow: 0 0 9px 1px rgba(134, 211, 178, 0.8);
  animation: pipPulse 1.7s ease-in-out infinite;
}

@keyframes pipPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}

.pip-title {
  font-size: 9.5px;
  letter-spacing: 0.22em;
  color: rgba(219, 238, 231, 0.62);
}

.pip-head em {
  margin-left: auto;
  font-style: normal;
  font-size: 9px;
  letter-spacing: 0.16em;
  color: rgba(210, 232, 224, 0.36);
}

.pip-body {
  position: relative;
  aspect-ratio: 4 / 3;
  background: #030a08;
}

.pip-body canvas {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
}

.pip-foot {
  display: flex;
  align-items: center;
  gap: 9px;
  height: 28px;
  padding: 0 11px;
}

.pip-bar {
  position: relative;
  flex: 1;
  height: 1px;
  background: var(--line);
  overflow: hidden;
}

.pip-bar i {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0%;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.55), var(--gold));
  transition: width 90ms linear;
}

.pip-foot b {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  color: rgba(243, 247, 245, 0.72);
  min-width: 30px;
  text-align: right;
}

/* ---------------- 移动端 ---------------- */
@media (max-width: 720px) {
  .brand-en, .brand-sep { display: none; }
  .intro h1 { font-size: clamp(34px, 11vw, 52px); }
  .lede { font-size: 13px; line-height: 1.95; }
  .hud { width: 168px; }
  .hint { font-size: 10px; letter-spacing: 0.18em; bottom: calc(var(--pad) * 0.7); }
  .btn { height: 44px; padding: 0 20px; }
  .help-card { padding: 24px 20px 18px; }
  .pip { width: 148px; bottom: calc(var(--pad) * 0.65); }
  .pip-foot { height: 24px; }
  .pip-head { height: 26px; }
}

@media (max-height: 520px) {
  .intro h1 { font-size: 34px; }
  .lede { display: none; }
  .actions { margin-top: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  .intro-glow { animation: none; }
  .intro-inner { animation: none; }
  * { transition-duration: 0.01ms !important; }
}


