/* ============================================================
   Where Winds Meet — NetEase account-linking guide
   Self-contained, no external assets. Dark neon-night theme.
   Content lives on a frosted panel so it stays readable over
   the animated (later: video) background.
   ============================================================ */

:root {
  --bg:        #0a0713;
  --bg-2:      #100a1f;
  --panel:     rgba(14, 10, 26, 0.72);
  --surface:   rgba(28, 19, 51, 0.55);
  --border:    rgba(176, 140, 255, 0.16);
  --border-2:  rgba(176, 140, 255, 0.30);

  --text:      #efeafc;
  --text-body: #d7cff0;
  --text-dim:  #b3a9d6;
  --text-mute: #877aad;

  --accent:    #ff5bd8;   /* magenta */
  --accent-2:  #a479ff;   /* violet   */
  --accent-3:  #63d1ff;   /* cyan link */
  --red:       #ff5a63;   /* the RED NetEase button */
  --glow:      rgba(255, 91, 216, 0.45);

  --radius:    18px;
  --radius-sm: 12px;
  --maxw:      740px;
  --font: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", "Roboto", Arial, sans-serif;

  --shadow:     0 24px 70px -24px rgba(0,0,0,0.85);
  --shadow-glow: 0 12px 40px -12px var(--glow);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--font); color: var(--text);
  background: var(--bg); line-height: 1.7; font-size: 17px;
  overflow-x: hidden; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
::selection { background: rgba(255, 91, 216, 0.32); color: #fff; }
img { max-width: 100%; display: block; }
b { color: #fff; font-weight: 650; }

/* ---------- reading progress ---------- */
.progress { position: fixed; inset: 0 0 auto 0; height: 3px; z-index: 60; pointer-events: none; }
.progress span {
  display: block; height: 100%; width: 0;
  background: linear-gradient(90deg, var(--accent-2), var(--accent));
  box-shadow: 0 0 12px var(--glow); transition: width 0.1s linear;
}

/* ---------- animated background (looping video) ---------- */
.bg {
  position: fixed; inset: 0; z-index: -2; overflow: hidden;
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%); /* fallback before video paints */
}
.bg__video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; }
.bg__veil {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(8,5,16,0.62) 0%, rgba(8,5,16,0.40) 40%, rgba(8,5,16,0.68) 100%),
    radial-gradient(120% 90% at 72% 20%, rgba(126,58,196,0.18), transparent 60%);
}
.bg__particles { position: absolute; inset: 0; width: 100%; height: 100%; }

/* ---------- HERO ---------- */
.hero {
  position: relative; min-height: 78svh;
  display: flex; flex-direction: column; justify-content: center;
  text-align: center;
  padding: clamp(64px, 9vh, 110px) clamp(24px, 6vw, 72px) clamp(84px, 12vh, 132px);
  overflow: hidden;
}
.hero__scrim {
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    linear-gradient(180deg, rgba(10,7,19,0.28) 0%, transparent 34%, rgba(10,7,19,0.52) 100%),
    radial-gradient(120% 80% at 18% 96%, rgba(157,107,255,0.20), transparent 60%);
}
.hero__inner { position: relative; max-width: var(--maxw); width: 100%; margin: 0 auto;
  animation: rise 1s cubic-bezier(.2,.7,.2,1) both; }
@keyframes rise { from { opacity: 0; transform: translateY(22px); } }
.hero__eyebrow {
  margin: 0 0 18px; letter-spacing: 0.34em; font-size: 12.5px; font-weight: 600;
  color: var(--accent); text-shadow: 0 0 18px var(--glow); padding-left: 0.34em; /* optical center for tracked caps */
}
.hero__title {
  margin: 0 auto; font-size: clamp(25px, 3.9vw, 45px); line-height: 1.18; font-weight: 800;
  letter-spacing: -0.02em; max-width: min(97vw, 960px); text-wrap: pretty;
  background: linear-gradient(180deg, #fff 0%, #f4ecff 55%, #dcc4ff 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 8px 40px rgba(255,91,216,0.30));
}
.hero__lead { margin: 22px auto 0; max-width: 42ch; font-size: clamp(16px, 2.2vw, 20px); color: var(--text-dim); text-wrap: balance; }

.hero__scroll {
  position: absolute; left: 50%; bottom: 24px; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  text-decoration: none; color: var(--text-mute); font-size: 11px; letter-spacing: 0.28em;
  animation: bob 2.4s ease-in-out infinite;
}
@keyframes bob { 50% { transform: translate(-50%, 8px); } }
.hero__scroll-mouse { width: 22px; height: 34px; border: 1.5px solid rgba(184,174,222,0.5); border-radius: 12px; position: relative; }
.hero__scroll-mouse span { position: absolute; left: 50%; top: 7px; width: 3px; height: 6px; border-radius: 2px;
  background: var(--accent); transform: translateX(-50%); animation: wheel 1.8s ease-in-out infinite; }
@keyframes wheel { 0%,100% { opacity: 0; transform: translate(-50%,0); } 40% { opacity: 1; transform: translate(-50%,8px); } }

/* ---------- article shell + readable panel ---------- */
.wrap { max-width: calc(var(--maxw) + 48px); margin: 0 auto;
  padding: clamp(20px, 4vw, 40px) clamp(16px, 4vw, 24px) 30px; }
.sheet {
  position: relative; isolation: isolate;
  border-radius: 24px;
  padding: clamp(72px, 9vw, 96px) clamp(20px, 5vw, 48px) clamp(28px, 5vw, 52px);
  margin-top: clamp(-16px, -2vw, -8px);
}
/* frosted backing on a pseudo so it can fade in at the top (soft transition,
   no hard border line) while the text content stays fully crisp */
.sheet::before {
  content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit;
  background: var(--panel);
  -webkit-backdrop-filter: blur(16px) saturate(125%);
  backdrop-filter: blur(16px) saturate(125%);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 96px);
  mask-image: linear-gradient(to bottom, transparent 0, #000 96px);
}
.sheet > p { color: var(--text-body); margin: 0 0 20px; font-size: 17.5px; line-height: 1.78; }
.sheet > p:last-of-type { margin-bottom: 0; }
.lede { font-size: 19px !important; line-height: 1.7 !important; color: var(--text) !important; }

.lnk {
  color: var(--accent-3); text-decoration: none; font-weight: 600;
  background: linear-gradient(var(--accent-3), var(--accent-3)) no-repeat left bottom / 100% 1.5px;
  padding-bottom: 1px; transition: color .2s, background-size .2s, text-shadow .2s;
}
.lnk:hover { color: #a9e6ff; text-shadow: 0 0 14px rgba(99,209,255,0.5); }
.hl { color: var(--accent-2); font-weight: 650; }
.hl-red { color: var(--red); font-weight: 750; text-shadow: 0 0 16px rgba(255,90,99,0.45); }

/* ---------- screenshots ---------- */
.shot { margin: 30px 0; }
.shot--narrow { max-width: 360px; margin-left: auto; margin-right: auto; }
.shot__frame {
  border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--border-2); box-shadow: var(--shadow);
  background: #0c0918; line-height: 0;
  transition: border-color .3s, box-shadow .3s, transform .3s cubic-bezier(.2,.7,.2,1);
}
.shot__frame img { width: 100%; height: auto; cursor: zoom-in; }
.shot__frame:hover { border-color: var(--accent); box-shadow: var(--shadow-glow); transform: translateY(-2px); }
.shot figcaption { margin-top: 12px; color: var(--text-mute); font-size: 13.5px; text-align: center; line-height: 1.5; }

/* ---------- lightbox (zoom screenshots) ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 100; cursor: zoom-out;
  display: flex; align-items: center; justify-content: center; padding: 4vmin;
  background: rgba(6, 4, 12, 0.88);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  opacity: 0; visibility: hidden; transition: opacity .32s ease, visibility 0s linear .32s;
}
.lightbox.open { opacity: 1; visibility: visible; transition: opacity .32s ease; }
.lightbox__img {
  max-width: min(1120px, 96vw); max-height: 92vh; width: auto; height: auto;
  border-radius: 14px; border: 1px solid var(--border-2);
  box-shadow: 0 30px 90px -20px rgba(0,0,0,0.9);
  transform: scale(.90); opacity: 0;
  transition: transform .36s cubic-bezier(.2,.85,.25,1), opacity .3s ease;
}
.lightbox.open .lightbox__img { transform: scale(1); opacity: 1; }
.lightbox__close {
  position: fixed; top: 18px; right: 20px; width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center; cursor: pointer; font-size: 16px; color: var(--text);
  border: 1px solid var(--border-2); background: var(--surface);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  transition: box-shadow .3s, border-color .3s, transform .2s;
}
.lightbox__close:hover { border-color: var(--accent); box-shadow: var(--shadow-glow); transform: rotate(90deg); }

/* ---------- closing note ---------- */
.done {
  margin: 18px 0 4px; padding: 26px 24px; text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  border-radius: var(--radius); border: 1px solid var(--border-2);
  background: linear-gradient(135deg, rgba(255,91,216,0.14), rgba(164,121,255,0.10));
  box-shadow: var(--shadow-glow);
}
.done__spark { font-size: 24px; color: var(--accent); text-shadow: 0 0 20px var(--glow); margin: 0; line-height: 1; }
.done p { margin: 0; font-size: 19px; font-weight: 650; color: #fff; line-height: 1.55; }
.heart { color: var(--red); text-shadow: 0 0 14px rgba(255,90,99,0.6); animation: pulse 1.8s ease-in-out infinite; display: inline-block; }
@keyframes pulse { 50% { transform: scale(1.18); } }

/* ---------- footer ---------- */
.footer { text-align: center; padding: 46px 20px 80px; max-width: var(--maxw); margin: 0 auto; }
.footer__line { width: 60px; height: 2px; margin: 0 auto 22px; border-radius: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent); }
.footer__txt { margin: 0; color: var(--text-dim); font-size: 14.5px; }

/* ---------- to-top ---------- */
.totop {
  position: fixed; right: 22px; bottom: 22px; z-index: 50; width: 46px; height: 46px; border-radius: 50%;
  display: grid; place-items: center; line-height: 1;
  cursor: pointer; border: 1px solid var(--border-2); color: var(--text); font-size: 20px;
  background: var(--surface); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  opacity: 0; transform: translateY(12px) scale(.9); pointer-events: none;
  transition: opacity .3s, transform .3s, box-shadow .3s;
}
.totop.show { opacity: 1; transform: none; pointer-events: auto; }
.totop:hover { box-shadow: var(--shadow-glow); border-color: var(--accent); }

/* ---------- reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s ease, transform .7s cubic-bezier(.2,.7,.2,1); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- responsive ---------- */
@media (max-width: 640px) {
  body { font-size: 16px; }
  .hero { padding-left: 22px; padding-right: 22px; }
  .sheet > p { font-size: 16.5px; }
  .lede { font-size: 17.5px !important; }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}
