:root {
  --ink: #f4e9ff;
  --dim: rgba(244, 233, 255, 0.55);
  --accent: #ff8fd8;
  --accent-2: #8fe9ff;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: #04010a;
  color: var(--ink);
  font-family: ui-sans-serif, system-ui, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
}

#app { position: fixed; inset: 0; }
#app canvas { display: block; width: 100%; height: 100%; }

/* ---------- HUD ---------- */
.hud {
  position: fixed;
  left: clamp(20px, 4vw, 56px);
  top: clamp(20px, 4vw, 52px);
  pointer-events: none;
  z-index: 5;
  opacity: 0;
  transform: translateY(10px);
  animation: hud-in 1.6s cubic-bezier(.2, .8, .2, 1) 0.35s forwards;
}

.hud__eyebrow {
  font-size: 11px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--dim);
  margin-bottom: 12px;
}

.hud__title {
  margin: 0;
  font-size: clamp(30px, 4.6vw, 54px);
  font-weight: 300;
  letter-spacing: 0.18em;
  line-height: 1.05;
  background: linear-gradient(100deg, #fff0fa 0%, #ff9ade 42%, #8fe9ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 24px rgba(255, 110, 200, 0.35));
}

.hud__sub {
  margin-top: 12px;
  font-size: 11px;
  letter-spacing: 0.22em;
  color: var(--dim);
  font-variant-numeric: tabular-nums;
}

.hint {
  position: fixed;
  right: clamp(20px, 4vw, 56px);
  bottom: clamp(20px, 4vw, 48px);
  z-index: 5;
  font-size: 11px;
  letter-spacing: 0.24em;
  color: rgba(244, 233, 255, 0.34);
  pointer-events: none;
  opacity: 0;
  animation: hud-in 1.6s ease 1.1s forwards;
}

/* ---------- vignette ---------- */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  background:
    radial-gradient(120% 90% at 50% 46%, transparent 40%, rgba(2, 0, 8, 0.72) 100%);
}

/* ---------- loader ---------- */
.loader {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 22px;
  background: radial-gradient(90% 70% at 50% 40%, #12061c 0%, #04010a 70%);
  transition: opacity 1.1s ease, visibility 1.1s;
}

.loader.is-done { opacity: 0; visibility: hidden; }

.loader__ring {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  border: 1px solid rgba(255, 143, 216, 0.22);
  border-top-color: #ff8fd8;
  border-right-color: #8fe9ff;
  animation: spin 1.15s linear infinite;
  box-shadow: 0 0 42px rgba(255, 120, 210, 0.35),
    inset 0 0 22px rgba(143, 233, 255, 0.18);
}

.loader__text {
  font-size: 12px;
  letter-spacing: 0.3em;
  color: rgba(244, 233, 255, 0.6);
}

@keyframes spin { to { transform: rotate(360deg); } }

@keyframes hud-in {
  to { opacity: 1; transform: none; }
}

@media (max-width: 640px) {
  .hud__sub { display: none; }
  .hint { letter-spacing: 0.16em; }
}
