:root {
  --bg: #070816;
  --bg-2: #0c0e24;
  --panel: rgba(18, 20, 48, 0.62);
  --line: rgba(242, 196, 90, 0.22);
  --gold: #f2c45a;
  --gold-hi: #fff3c4;
  --gold-lo: #b9781f;
  --violet: #7b5cff;
  --cyan: #5ad7ff;
  --rose: #ff6b9a;
  --text: #e9e6f5;
  --muted: #9a97b8;
  --danger: #ff7a7a;
  --ok: #7ef0b5;
  --serif: 'Noto Serif TC', 'Cinzel', serif;
  --sans: 'Noto Sans TC', system-ui, sans-serif;
  --display: 'Cinzel', 'Noto Serif TC', serif;
  --ease: cubic-bezier(.22, .8, .2, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
body.loading { overflow: hidden; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
img, video { display: block; max-width: 100%; }
::selection { background: rgba(242, 196, 90, .35); }

/* ---------- 開場 ---------- */
.preloader {
  position: fixed; inset: 0; z-index: 100;
  display: grid; place-items: center; align-content: center; gap: 22px;
  background: radial-gradient(circle at 50% 45%, #15173a, var(--bg) 70%);
  transition: opacity .9s var(--ease), visibility .9s;
}
.preloader.done { opacity: 0; visibility: hidden; }
.preloader-sigil { width: 140px; height: 140px; animation: spin 6s linear infinite; }
.preloader-sigil * {
  fill: none; stroke: var(--gold); stroke-width: 1.5;
  stroke-dasharray: 600; stroke-dashoffset: 600;
  animation: draw 1.6s var(--ease) forwards;
  filter: drop-shadow(0 0 6px rgba(242,196,90,.8));
}
.preloader-sigil *:nth-child(2) { animation-delay: .2s; }
.preloader-sigil *:nth-child(3) { animation-delay: .4s; }
.preloader-sigil *:nth-child(4) { animation-delay: .6s; }
.preloader-text {
  font-family: var(--display); font-weight: 900; font-size: 22px; letter-spacing: .2em;
  padding-left: .2em; color: var(--gold-hi); opacity: 0; animation: fadeUp .8s .6s forwards;
}
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* 必須指定顯示尺寸，否則高 DPI 螢幕上畫布會被放大，星光跑到游標右下方 */
#cursor-fx { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 90; }

/* ---------- 導覽列 ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px clamp(16px, 4vw, 56px);
  transition: background .4s, padding .4s, border-color .4s;
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: rgba(7, 8, 22, .72);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  padding-top: 10px; padding-bottom: 10px;
  border-color: var(--line);
}
.nav-logo { display: flex; align-items: center; }
.nav-logo img {
  height: 64px; width: auto; margin: -8px 0;
  filter: drop-shadow(0 3px 10px rgba(0,0,0,.55));
  transition: height .4s var(--ease), filter .3s;
}
.nav-logo:hover img { filter: drop-shadow(0 3px 10px rgba(0,0,0,.55)) drop-shadow(0 0 12px rgba(167,139,255,.55)); }
.nav.scrolled .nav-logo img { height: 48px; margin: -4px 0; }
.nav-links { display: flex; align-items: center; gap: clamp(14px, 2.4vw, 34px); font-size: 15px; }
.nav-links a { position: relative; color: #cfcbe6; transition: color .3s; }
.nav-links a:not(.nav-cta)::after {
  content: ''; position: absolute; left: 50%; right: 50%; bottom: -6px; height: 1px;
  background: var(--gold); transition: left .35s var(--ease), right .35s var(--ease);
}
.nav-links a:hover { color: var(--gold-hi); }
.nav-links a:hover::after, .nav-links a.active::after { left: 0; right: 0; }
.nav-links a.active { color: var(--gold-hi); }
.nav-cta {
  padding: 7px 18px; border: 1px solid var(--gold); border-radius: 999px; color: var(--gold-hi) !important;
  box-shadow: inset 0 0 12px rgba(242,196,90,.25), 0 0 14px rgba(242,196,90,.15);
  transition: background .3s, box-shadow .3s;
}
.nav-cta:hover { background: rgba(242,196,90,.14); box-shadow: inset 0 0 14px rgba(242,196,90,.4), 0 0 24px rgba(242,196,90,.35); }
.nav-toggle { display: none; width: 40px; height: 40px; position: relative; }
.nav-toggle span { position: absolute; left: 9px; right: 9px; height: 2px; background: var(--gold-hi); border-radius: 2px; transition: transform .3s, opacity .3s; }
.nav-toggle span:nth-child(1) { top: 13px; } .nav-toggle span:nth-child(2) { top: 19px; } .nav-toggle span:nth-child(3) { top: 25px; }
.nav.open .nav-toggle span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav.open .nav-toggle span:nth-child(2) { opacity: 0; }
.nav.open .nav-toggle span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ---------- 按鈕 ---------- */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  padding: 14px 34px; border-radius: 4px; font-weight: 700; letter-spacing: .2em; font-size: 15px;
  overflow: hidden; isolation: isolate; transition: transform .3s var(--ease), box-shadow .3s;
  clip-path: polygon(10px 0, calc(100% - 10px) 0, 100% 50%, calc(100% - 10px) 100%, 10px 100%, 0 50%);
}
.btn span { position: relative; z-index: 2; padding-left: .2em; }
.btn::after {
  content: ''; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,.55) 50%, transparent 70%);
  transform: translateX(-120%); transition: transform .8s var(--ease);
}
.btn:hover::after { transform: translateX(120%); }
.btn:hover { transform: translateY(-2px); }
.btn-gold {
  color: #2a1700;
  background: linear-gradient(180deg, var(--gold-hi), var(--gold) 45%, var(--gold-lo));
  filter: drop-shadow(0 6px 22px rgba(242,196,90,.38));
}
.btn-ghost {
  color: var(--gold-hi);
  background: linear-gradient(180deg, rgba(242,196,90,.16), rgba(242,196,90,.04));
}
.btn-ghost::before {
  content: ''; position: absolute; inset: 1px; z-index: 0; background: rgba(9,10,28,.75);
  clip-path: inherit;
}
.btn-lg { padding: 18px 56px; font-size: 17px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .6; cursor: progress; transform: none; }

/* ---------- 主視覺 ---------- */
.hero {
  position: relative; min-height: 100vh; min-height: 100svh;
  display: grid; place-items: center; overflow: hidden;
  background:
    radial-gradient(ellipse 80% 60% at 50% 110%, rgba(123,92,255,.35), transparent 60%),
    radial-gradient(ellipse 60% 50% at 50% 40%, rgba(30,34,90,.8), transparent 70%),
    linear-gradient(180deg, #05060f 0%, #0a0b22 60%, var(--bg) 100%);
}
#hero-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }

/* 遊戲場景輪播：交叉淡入 + 緩慢推鏡 */
.hero-scenes { position: absolute; inset: 0; overflow: hidden; background: #05060f; }
.hero-scenes .scene {
  position: absolute; inset: -3%;
  background: var(--img) center / cover no-repeat;
  opacity: 0; transition: opacity 2.4s ease; will-change: opacity, transform;
}
.hero-scenes .scene.active, .hero-scenes .scene.leaving { animation: kenburns 16s ease-out forwards; }
.hero-scenes .scene.active { opacity: 1; }
.hero-scenes .scene:nth-child(even).active, .hero-scenes .scene:nth-child(even).leaving { animation-name: kenburns2; }
@keyframes kenburns { from { transform: scale(1.2) translate3d(-2%, 1.5%, 0); } to { transform: scale(1.05) translate3d(1%, -1%, 0); } }
@keyframes kenburns2 { from { transform: scale(1.05) translate3d(1.5%, -1%, 0); } to { transform: scale(1.2) translate3d(-1.5%, 1.5%, 0); } }
.hero-shade {
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(ellipse 50% 42% at 50% 47%, rgba(7, 8, 22, .62), transparent 72%),
    linear-gradient(180deg, rgba(5, 6, 15, .78) 0%, rgba(7, 8, 22, .2) 28%, rgba(7, 8, 22, .3) 62%, var(--bg) 100%),
    linear-gradient(90deg, rgba(5, 6, 15, .55), transparent 28%, transparent 72%, rgba(5, 6, 15, .55));
}

/* 前景角色（愛利西思、利樂、亞莓） */
.hero-chars { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.hc {
  position: absolute; bottom: 0; width: 0; opacity: 0;
  height: min(80vh, 760px);
  filter: drop-shadow(0 24px 40px rgba(0, 0, 0, .65));
  will-change: translate;
}
.hc img { position: absolute; bottom: 0; height: 100%; width: auto; max-width: none; transition: opacity 1.4s ease, transform 1.4s var(--ease); }
.hc img:not(.on) { opacity: 0; transform: translateY(30px) scale(.97); }
.hc-left { left: max(-60px, calc(50% - 820px)); }
.hc-left img { left: 0; }
.hc-right { right: max(-60px, calc(50% - 820px)); }
.hc-right img { right: 0; }
.ready .hc { animation: charIn 1.6s var(--ease) .35s forwards; }
.ready .hc-right { animation-delay: .55s; }
@keyframes charIn { from { opacity: 0; transform: translateY(60px); } to { opacity: 1; transform: none; } }
.hero-aurora { position: absolute; inset: 0; pointer-events: none; filter: blur(70px); opacity: .3; mix-blend-mode: screen; }
.hero-aurora i { position: absolute; border-radius: 50%; animation: float 18s ease-in-out infinite alternate; }
.hero-aurora i:nth-child(1) { width: 46vw; height: 46vw; left: -10vw; top: 10vh; background: radial-gradient(circle, rgba(123,92,255,.55), transparent 65%); }
.hero-aurora i:nth-child(2) { width: 40vw; height: 40vw; right: -8vw; top: -5vh; background: radial-gradient(circle, rgba(90,215,255,.35), transparent 65%); animation-duration: 22s; }
.hero-aurora i:nth-child(3) { width: 36vw; height: 36vw; left: 32vw; bottom: -18vw; background: radial-gradient(circle, rgba(242,196,90,.35), transparent 65%); animation-duration: 26s; }
@keyframes float { to { transform: translate3d(6vw, -4vh, 0) scale(1.15); } }

.hero-sigil {
  position: absolute; width: min(92vmin, 820px); aspect-ratio: 1; left: 50%; top: 50%;
  transform: translate(-50%, -50%); pointer-events: none; opacity: .3;
  will-change: transform;
}
.hero-sigil svg { width: 100%; height: 100%; overflow: visible; }
.hero-sigil .ring { transform-origin: 300px 300px; fill: none; stroke: var(--gold); stroke-width: 1; }
.hero-sigil .thin { stroke-width: .5; stroke-dasharray: 2 6; }
.hero-sigil text { fill: rgba(242,196,90,.75); stroke: none; font-family: var(--display); font-size: 13px; letter-spacing: 6px; }
.hero-sigil .ring-outer { animation: spin 120s linear infinite; }
.hero-sigil .ring-mid { animation: spin 80s linear infinite reverse; opacity: .7; }
.hero-sigil .ring-inner { animation: spin 50s linear infinite; opacity: .5; }
.hero-sigil svg { filter: drop-shadow(0 0 8px rgba(242,196,90,.45)); }

.hero-content { position: relative; z-index: 2; text-align: center; padding: 120px 16px 80px; }
.hero-eyebrow { font-family: var(--display); letter-spacing: .5em; font-size: 13px; color: var(--gold); padding-left: .5em; }
.hero-title {
  display: flex; flex-direction: column; align-items: center; margin: 10px 0 10px;
  font-family: var(--display); font-weight: 900; line-height: .95;
}
.hero-title-top { font-size: clamp(28px, 5.6vw, 74px); letter-spacing: .14em; padding-left: .14em; }
.hero-title-main { font-size: clamp(64px, 10.5vw, 150px); letter-spacing: .05em; padding-left: .05em; }
.hero-title-glyph {
  position: relative; display: inline-block;
  background: linear-gradient(180deg, #fffbe9 0%, var(--gold-hi) 25%, var(--gold) 55%, var(--gold-lo) 85%, #6b3f0c 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 4px 0 rgba(60,30,0,.55)) drop-shadow(0 0 28px rgba(242,196,90,.45));
  opacity: 0; transform: translateY(40px) scale(.9); filter: blur(12px);
}
.hero-title-glyph::after {
  content: attr(data-text); position: absolute; inset: 0;
  background: linear-gradient(105deg, transparent 35%, rgba(255,255,255,.95) 48%, transparent 60%);
  background-size: 300% 100%; background-position: 150% 0;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: shimmer 5s ease-in-out infinite;
}
.hero-title-glyph:nth-child(2)::after { animation-delay: .15s; }
.hero-title-glyph:nth-child(3)::after { animation-delay: .3s; }
.hero-title-glyph:nth-child(4)::after { animation-delay: .45s; }
@keyframes shimmer { 0%, 55% { background-position: 150% 0; } 100% { background-position: -150% 0; } }
.ready .hero-title-glyph {
  animation: glyphIn 1.3s var(--ease) forwards;
}
.ready .hero-title-glyph:nth-child(2) { animation-delay: .12s; }
.ready .hero-title-glyph:nth-child(3) { animation-delay: .24s; }
.ready .hero-title-glyph:nth-child(4) { animation-delay: .36s; }
@keyframes glyphIn {
  to { opacity: 1; transform: none; filter: drop-shadow(0 4px 0 rgba(60,30,0,.55)) drop-shadow(0 0 28px rgba(242,196,90,.45)); }
}
.hero-en { font-family: var(--serif); font-weight: 700; letter-spacing: .45em; padding-left: .45em; color: #d9d3ff; font-size: clamp(13px, 1.6vw, 18px); text-shadow: 0 0 18px rgba(123,92,255,.9); }
.hero-sub { margin-top: 22px; color: #bdb8da; font-size: clamp(14px, 1.5vw, 17px); letter-spacing: .12em; }
.hero-actions { margin-top: 38px; display: flex; gap: 18px; justify-content: center; flex-wrap: wrap; }
.reveal-hero { opacity: 0; transform: translateY(18px); }
.ready .reveal-hero { animation: fadeUp 1s var(--ease) forwards; }
.ready .hero-eyebrow { animation-delay: .1s; }
.ready .hero-en { animation-delay: .7s; }
.ready .hero-sub { animation-delay: .9s; }
.ready .hero-actions { animation-delay: 1.05s; }
.ready .server-status { animation-delay: 1.2s; }

.server-status {
  margin: 34px auto 0; display: inline-flex; align-items: center; gap: 10px;
  padding: 8px 18px; border-radius: 999px; font-size: 13px; color: #c9c5e2;
  background: rgba(12,14,36,.6); border: 1px solid rgba(255,255,255,.08); backdrop-filter: blur(8px);
}
.server-status b { color: var(--gold-hi); font-family: var(--display); }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: #888; box-shadow: 0 0 0 0 currentColor; }
.server-status.online .status-dot { background: var(--ok); color: var(--ok); animation: pulse 2s infinite; }
.server-status.offline .status-dot { background: var(--danger); }
.status-sep { width: 1px; height: 12px; background: rgba(255,255,255,.18); }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(126,240,181,.6); } 100% { box-shadow: 0 0 0 10px rgba(126,240,181,0); } }

.scroll-hint { position: absolute; bottom: 28px; left: 50%; transform: translateX(-50%); z-index: 2; width: 26px; height: 42px; border: 1px solid rgba(242,196,90,.5); border-radius: 14px; }
.scroll-hint span { position: absolute; left: 50%; top: 8px; width: 3px; height: 8px; margin-left: -1.5px; border-radius: 2px; background: var(--gold); animation: scrollHint 1.8s infinite; }
@keyframes scrollHint { 0% { opacity: 0; transform: translateY(0); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(14px); } }

/* ---------- 區塊共用 ---------- */
.section { position: relative; padding: clamp(80px, 12vw, 140px) clamp(16px, 5vw, 64px); max-width: 1280px; margin: 0 auto; }
.section-head { text-align: center; margin-bottom: clamp(40px, 6vw, 70px); }
.section-kicker { display: inline-block; font-family: var(--display); letter-spacing: .5em; padding-left: .5em; font-size: 12px; color: var(--gold); }
.section-title {
  position: relative; display: inline-block; margin-top: 8px;
  font-family: var(--serif); font-weight: 900; font-size: clamp(30px, 4.4vw, 48px); letter-spacing: .14em;
  background: linear-gradient(180deg, #fff, #d8d2f5); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.section-head .section-title { display: block; }
.section-head::after {
  content: ''; display: block; width: 180px; height: 14px; margin: 16px auto 0;
  background:
    linear-gradient(90deg, transparent, var(--gold) 45%, var(--gold) 55%, transparent) center / 100% 1px no-repeat,
    radial-gradient(circle, var(--gold-hi) 0 3px, transparent 4px) center / 14px 14px no-repeat;
}
.section-title.left { display: block; text-align: left; }
.register-copy .section-kicker { display: block; }

.reveal { opacity: 0; transform: translateY(40px); transition: opacity 1s var(--ease), transform 1s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- 最新消息 ---------- */
.news-wrap { max-width: 920px; margin: 0 auto; }
.news-tabs { display: flex; gap: 6px; justify-content: center; margin-bottom: 26px; flex-wrap: wrap; }
.news-tabs button {
  padding: 8px 22px; border-radius: 999px; font-size: 14px; color: var(--muted);
  border: 1px solid rgba(255,255,255,.08); transition: all .3s;
}
.news-tabs button:hover { color: var(--text); border-color: var(--line); }
.news-tabs button.active { color: #2a1700; background: linear-gradient(180deg, var(--gold-hi), var(--gold)); border-color: transparent; }
.news-list { list-style: none; display: grid; gap: 12px; }
.news-item {
  position: relative; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 18px;
  padding: 18px 22px; border-radius: 10px; background: var(--panel); border: 1px solid rgba(255,255,255,.06);
  overflow: hidden; transition: border-color .3s, transform .4s var(--ease), background .3s;
  opacity: 0; transform: translateX(-20px);
}
.news-item.in { opacity: 1; transform: none; transition: opacity .6s var(--ease), transform .6s var(--ease), border-color .3s, background .3s; }
.news-item::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--tag, var(--gold));
  box-shadow: 0 0 14px var(--tag, var(--gold));
}
.news-item:hover { border-color: var(--line); background: rgba(26,28,64,.7); transform: translateX(6px); }
.news-tag { font-size: 12px; padding: 3px 10px; border-radius: 4px; color: var(--tag); border: 1px solid currentColor; white-space: nowrap; }
.news-item[data-type="notice"] { --tag: var(--gold); }
.news-item[data-type="event"] { --tag: var(--rose); }
.news-item[data-type="maint"] { --tag: var(--cyan); }
.news-title { font-weight: 500; }
.news-title small { display: block; color: var(--muted); font-size: 13px; font-weight: 400; margin-top: 2px; }
.news-date { font-family: var(--display); color: var(--muted); font-size: 14px; white-space: nowrap; }
.news-item.hidden { display: none; }

/* ---------- 特色 ---------- */
.features { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; perspective: 1000px; }
.feature {
  position: relative; padding: 36px 26px 30px; border-radius: 14px; text-align: center;
  background: linear-gradient(180deg, rgba(14,15,40,.55), rgba(10,11,30,.94) 62%), var(--img, none) center top / cover no-repeat;
  border: 1px solid rgba(255,255,255,.07); overflow: hidden;
  transform-style: preserve-3d; transition: transform .5s var(--ease), border-color .4s, opacity 1s var(--ease);
}
.feature::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(400px circle at var(--mx, 50%) var(--my, 0%), rgba(242,196,90,.18), transparent 45%);
  opacity: 0; transition: opacity .4s;
}
.feature:hover { border-color: var(--line); }
.feature:hover::before { opacity: 1; }
.feature-icon {
  width: 72px; height: 72px; margin: 0 auto 20px; display: grid; place-items: center; border-radius: 50%;
  background: radial-gradient(circle, rgba(242,196,90,.18), transparent 70%);
  border: 1px solid var(--line); transform: translateZ(40px);
}
.feature-icon svg { width: 34px; height: 34px; fill: none; stroke: var(--gold); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; filter: drop-shadow(0 0 6px rgba(242,196,90,.6)); }
.feature h3 { font-family: var(--serif); font-size: 21px; letter-spacing: .14em; margin-bottom: 10px; transform: translateZ(30px); }
.feature p { color: var(--muted); font-size: 14.5px; transform: translateZ(20px); }

/* ---------- 英雄介紹 ---------- */
.section-heroes { max-width: 1320px; }
.showcase { display: grid; grid-template-columns: 1.35fr 1fr; gap: clamp(24px, 4vw, 60px); align-items: center; }
.showcase-stage { position: relative; }
.stage-frame {
  position: relative; aspect-ratio: 16 / 11; border-radius: 6px; overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: 0 30px 80px rgba(0,0,0,.6), 0 0 60px rgba(123,92,255,.25), inset 0 0 0 1px rgba(255,255,255,.04);
  background: #000;
}
.stage-bg {
  position: absolute; inset: -2%; background: var(--img) center / cover no-repeat;
  transition: opacity .6s ease; animation: kenburns 20s ease-in-out infinite alternate;
}
.stage-bg::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(7,8,22,.1), rgba(7,8,22,.45) 60%, rgba(7,8,22,.85)); }
.stage-art {
  position: absolute; left: 50%; bottom: 0; height: 94%; width: auto; max-width: 96%; object-fit: contain; object-position: bottom;
  transform: translateX(-50%); filter: drop-shadow(0 18px 30px rgba(0,0,0,.65));
  transition: opacity .35s, transform .6s var(--ease);
}
.stage-frame.switching .stage-art { opacity: 0; transform: translateX(-46%) scale(.97); }
.stage-frame.switching .stage-bg { opacity: .3; }
.stage-frame::after { /* 暗角 */
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse at center, transparent 60%, rgba(5,6,15,.6));
}
.skill-preview {
  position: absolute; right: 16px; bottom: 16px; z-index: 3; width: 32%; margin: 0;
  border: 1px solid var(--line); border-radius: 6px; overflow: hidden; background: #000;
  box-shadow: 0 12px 30px rgba(0,0,0,.6);
}
.skill-preview video { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; transition: opacity .35s; }
.stage-frame.switching .skill-preview video { opacity: 0; }
.skill-preview figcaption {
  position: absolute; left: 6px; top: 6px; padding: 1px 7px; border-radius: 3px;
  font-size: 11px; letter-spacing: .15em; color: var(--gold-hi); background: rgba(7,8,22,.72);
}
.job-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.job-tabs button {
  padding: 6px 16px; border-radius: 999px; font-size: 13px; letter-spacing: .1em; color: var(--muted);
  border: 1px solid rgba(255,255,255,.12); transition: color .3s, border-color .3s, background .3s;
}
.job-tabs button:hover { color: var(--text); border-color: var(--line); }
.job-tabs small { margin-right: 6px; font-size: 11px; opacity: .65; letter-spacing: .05em; }
.job-tabs button.active { color: #2a1700; border-color: transparent; background: linear-gradient(180deg, var(--gold-hi), var(--gold)); }
.corner { position: absolute; width: 26px; height: 26px; border: 2px solid var(--gold); z-index: 2; filter: drop-shadow(0 0 6px rgba(242,196,90,.7)); }
.corner.tl { top: 10px; left: 10px; border-right: 0; border-bottom: 0; }
.corner.tr { top: 10px; right: 10px; border-left: 0; border-bottom: 0; }
.corner.bl { bottom: 10px; left: 10px; border-right: 0; border-top: 0; }
.corner.br { bottom: 10px; right: 10px; border-left: 0; border-top: 0; }
.stage-nav {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 3;
  width: 46px; height: 46px; border-radius: 50%; font-size: 28px; line-height: 1;
  background: rgba(7,8,22,.65); border: 1px solid var(--line); color: var(--gold-hi);
  backdrop-filter: blur(6px); transition: background .3s, transform .3s;
}
.stage-nav:hover { background: rgba(242,196,90,.2); }
.stage-nav.prev { left: -23px; } .stage-nav.next { right: -23px; }
.showcase-info { position: relative; }
.hero-index { font-family: var(--display); color: var(--gold); letter-spacing: .3em; font-size: 13px; }
.hero-name {
  font-family: var(--serif); font-weight: 900; font-size: clamp(40px, 5.5vw, 68px); letter-spacing: .1em; line-height: 1.15; margin-top: 6px;
  background: linear-gradient(180deg, #fff 20%, var(--gold-hi) 60%, var(--gold)); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-name-en { font-family: var(--display); letter-spacing: .5em; color: #b9b2ea; font-size: 15px; margin-top: 2px; }
.hero-class { display: inline-block; margin-top: 18px; padding: 4px 14px; border: 1px solid var(--line); border-radius: 3px; color: var(--gold-hi); font-size: 14px; letter-spacing: .2em; background: rgba(242,196,90,.07); }
.hero-desc { margin-top: 18px; color: #c4c0de; font-size: 16px; max-width: 46ch; }
.showcase-info.swap > * { animation: infoIn .7s var(--ease) both; }
.showcase-info.swap > :nth-child(2) { animation-delay: .05s; }
.showcase-info.swap > :nth-child(3) { animation-delay: .1s; }
.showcase-info.swap > :nth-child(4) { animation-delay: .15s; }
.showcase-info.swap > :nth-child(5) { animation-delay: .2s; }
@keyframes infoIn { from { opacity: 0; transform: translateX(24px); filter: blur(6px); } to { opacity: 1; transform: none; filter: none; } }

.roster {
  margin-top: 48px; display: grid; grid-template-columns: repeat(10, 1fr); gap: 10px;
}
.roster button {
  position: relative; aspect-ratio: 1; border-radius: 6px; overflow: hidden;
  border: 1px solid rgba(255,255,255,.08); background: radial-gradient(circle at 50% 35%, #2b2866, #0b0c22 75%);
  transition: transform .35s var(--ease), border-color .3s, box-shadow .3s;
}
.roster img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 12%; opacity: .55; filter: saturate(.7); transition: opacity .3s, filter .3s, transform .5s var(--ease); }
.roster span {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 14px 4px 4px; font-size: 12px; text-align: center;
  background: linear-gradient(transparent, rgba(5,6,15,.9)); color: #ddd;
}
.roster button:hover { transform: translateY(-4px); border-color: var(--line); }
.roster button:hover img { opacity: .9; filter: none; transform: scale(1.06); }
.roster button.active { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold), 0 0 22px rgba(242,196,90,.45); }
.roster button.active img { opacity: 1; filter: none; }
.roster button.active span { color: var(--gold-hi); }

/* ---------- 下載 ---------- */
.download { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(24px, 4vw, 56px); align-items: center; }
.download-card {
  position: relative; padding: 54px 36px; text-align: center; border-radius: 16px; overflow: hidden;
  background: linear-gradient(160deg, rgba(40,32,96,.8), rgba(12,13,34,.9));
  border: 1px solid var(--line);
}
.download-glow {
  position: absolute; inset: -40%; pointer-events: none; opacity: .5;
  background: conic-gradient(from 0deg, transparent, rgba(242,196,90,.35), transparent 30%, rgba(123,92,255,.4), transparent 60%);
  animation: spin 10s linear infinite;
}
.download-card::after { content: ''; position: absolute; inset: 1px; border-radius: 15px; background: linear-gradient(160deg, #1a1748, #0b0c22); z-index: 0; }
.download-card > :not(.download-glow) { position: relative; z-index: 1; }
.download-card h3 { font-family: var(--serif); font-size: 26px; letter-spacing: .12em; }
.download-meta { color: var(--muted); margin: 6px 0 30px; }
.download-note { margin-top: 22px; color: var(--muted); font-size: 14px; }
.download-alt { display: block; margin-top: 18px; font-size: 14px; color: var(--gold-hi); opacity: .85; text-decoration: underline; text-underline-offset: 4px; text-decoration-color: rgba(242,196,90,.4); }
.download-alt:hover { opacity: 1; }
code { font-family: Consolas, monospace; color: var(--gold-hi); background: rgba(242,196,90,.1); padding: 1px 6px; border-radius: 4px; }
.steps { list-style: none; display: grid; gap: 14px; }
.steps li { display: flex; gap: 18px; align-items: flex-start; padding: 18px 20px; border-radius: 10px; background: var(--panel); border: 1px solid rgba(255,255,255,.06); }
.step-no { font-family: var(--display); font-weight: 900; font-size: 28px; line-height: 1; color: transparent; -webkit-text-stroke: 1px var(--gold); min-width: 46px; }
.steps h4 { font-family: var(--serif); letter-spacing: .1em; font-size: 17px; }
.steps p { color: var(--muted); font-size: 14.5px; }
.steps li:nth-child(2) { transition-delay: .08s; } .steps li:nth-child(3) { transition-delay: .16s; } .steps li:nth-child(4) { transition-delay: .24s; }
.reqs { margin-top: 40px; display: grid; grid-template-columns: repeat(5, 1fr); border: 1px solid rgba(255,255,255,.07); border-radius: 12px; overflow: hidden; }
.reqs div { padding: 18px; text-align: center; background: rgba(12,14,36,.5); }
.reqs div + div { border-left: 1px solid rgba(255,255,255,.07); }
.reqs span { display: block; font-size: 12px; color: var(--muted); letter-spacing: .2em; }
.reqs b { font-weight: 500; font-size: 14.5px; }

/* ---------- 註冊 ---------- */
.section-register { max-width: none; overflow: hidden; background: radial-gradient(ellipse 70% 60% at 70% 50%, rgba(123,92,255,.18), transparent 70%); }
#register-canvas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.register { position: relative; max-width: 1180px; margin: 0 auto; display: grid; grid-template-columns: 1fr 460px; gap: clamp(30px, 6vw, 90px); align-items: center; }
.register-copy p { color: #c4c0de; margin-top: 22px; }
.perks { list-style: none; margin-top: 14px; display: grid; gap: 12px; }
.perks li { display: flex; align-items: center; gap: 12px; color: #d9d5ef; }
.perks li::before { content: ''; width: 10px; height: 10px; transform: rotate(45deg); background: var(--gold); box-shadow: 0 0 10px var(--gold); }
.perks b { font-family: var(--display); color: var(--gold-hi); font-size: 20px; }
.register-card {
  position: relative; padding: 40px 36px 34px; border-radius: 18px;
  background: linear-gradient(170deg, rgba(30,30,76,.82), rgba(10,11,30,.9));
  border: 1px solid var(--line); backdrop-filter: blur(16px);
  box-shadow: 0 40px 100px rgba(0,0,0,.55), 0 0 0 1px rgba(255,255,255,.03) inset, 0 0 80px rgba(123,92,255,.18);
}
.register-card::before {
  content: ''; position: absolute; top: -1px; left: 20%; right: 20%; height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold-hi), transparent); filter: blur(.5px);
}
.register-card h3 { font-family: var(--serif); font-size: 24px; letter-spacing: .2em; text-align: center; margin-bottom: 26px; }
.field { display: block; margin-bottom: 18px; }
.field-label { display: block; font-size: 13px; color: var(--muted); letter-spacing: .14em; margin-bottom: 7px; }
.field-row { position: relative; display: block; }
.field input {
  width: 100%; padding: 13px 16px; border-radius: 8px; font: inherit; font-size: 15px; color: var(--text);
  background: rgba(5,6,18,.65); border: 1px solid rgba(255,255,255,.1); outline: none;
  transition: border-color .3s, box-shadow .3s, background .3s;
}
.field-row input { padding-right: 64px; }
.field input::placeholder { color: #5f5c7d; }
.field input:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(242,196,90,.15), 0 0 20px rgba(242,196,90,.12); background: rgba(5,6,18,.85); }
.field.bad input { border-color: var(--danger); box-shadow: 0 0 0 3px rgba(255,122,122,.12); }
.field.good input { border-color: rgba(126,240,181,.6); }
.eye { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); font-size: 12px; color: var(--muted); padding: 4px 8px; border-radius: 4px; }
.eye:hover { color: var(--gold-hi); }
.field-hint { display: block; min-height: 18px; font-size: 12.5px; margin-top: 5px; color: var(--muted); }
.field.bad .field-hint { color: var(--danger); }
.field.good .field-hint { color: var(--ok); }
.strength { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; margin-top: 8px; }
.strength i { height: 3px; border-radius: 2px; background: rgba(255,255,255,.08); transition: background .3s, box-shadow .3s; }
.strength[data-level="1"] i:nth-child(-n+1) { background: var(--danger); }
.strength[data-level="2"] i:nth-child(-n+2) { background: #ffb35c; }
.strength[data-level="3"] i:nth-child(-n+3) { background: var(--gold); }
.strength[data-level="4"] i { background: var(--ok); box-shadow: 0 0 8px rgba(126,240,181,.5); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.agree { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: var(--muted); margin: 4px 0 22px; cursor: pointer; }
.agree input { appearance: none; flex: none; width: 18px; height: 18px; margin-top: 2px; border: 1px solid var(--line); border-radius: 4px; background: rgba(5,6,18,.6); display: grid; place-items: center; cursor: pointer; transition: background .2s; }
.agree input:checked { background: var(--gold); border-color: var(--gold); }
.agree input:checked::after { content: ''; width: 5px; height: 9px; border: solid #2a1700; border-width: 0 2px 2px 0; transform: rotate(45deg) translate(-1px, -1px); }
.agree.bad { color: var(--danger); }
.form-msg { min-height: 22px; text-align: center; margin-top: 14px; font-size: 14px; }
.form-msg.error { color: var(--danger); }
.form-msg.ok { color: var(--ok); }
.register-card.shake { animation: shake .45s; }
@keyframes shake { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }

/* ---------- 頁尾 ---------- */
.footer { text-align: center; padding: 60px 16px 40px; border-top: 1px solid rgba(255,255,255,.06); color: var(--muted); font-size: 13px; background: linear-gradient(180deg, transparent, rgba(123,92,255,.06)); }
.footer-logo { font-family: var(--display); font-weight: 900; font-size: 26px; letter-spacing: .12em; padding-left: .12em; color: var(--gold); margin-bottom: 10px; }
.footer-copy { margin-top: 6px; opacity: .6; }

/* ---------- 成功視窗 ---------- */
.modal { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 16px; background: rgba(3,4,12,.72); backdrop-filter: blur(8px); animation: fadeIn .3s; }
.modal[hidden] { display: none; }
@keyframes fadeIn { from { opacity: 0; } }
.modal-card { width: min(420px, 100%); text-align: center; padding: 40px 30px 30px; border-radius: 18px; background: linear-gradient(170deg, #1d1b52, #0b0c22); border: 1px solid var(--line); box-shadow: 0 0 80px rgba(242,196,90,.25); animation: pop .6s var(--ease); }
@keyframes pop { from { opacity: 0; transform: scale(.85) translateY(20px); } }
.modal-sigil svg { width: 96px; height: 96px; margin: 0 auto 12px; fill: none; stroke: var(--gold); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 0 10px rgba(242,196,90,.8)); }
.modal-sigil circle { stroke-dasharray: 330; stroke-dashoffset: 330; animation: draw 1s .1s var(--ease) forwards; }
.modal-sigil path { stroke-dasharray: 80; stroke-dashoffset: 80; animation: draw .6s .8s var(--ease) forwards; }
.modal-card h3 { font-family: var(--serif); font-size: 26px; letter-spacing: .2em; color: var(--gold-hi); }
.modal-card p { color: #c4c0de; margin: 10px 0 26px; }
.modal-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ---------- 帳號管理 ---------- */
.form-links { display: flex; justify-content: center; align-items: center; gap: 10px; margin-top: 16px; font-size: 13px; color: var(--muted); }
.form-links button { color: var(--muted); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(255,255,255,.2); transition: color .2s; }
.form-links button:hover { color: var(--gold-hi); }
.modal-card.account-card { position: relative; width: min(440px, 100%); text-align: left; padding: 34px 30px 26px; max-height: calc(100vh - 32px); overflow-y: auto; }
.account-card h3 { text-align: center; margin-bottom: 18px; }
.modal-x { position: absolute; right: 12px; top: 10px; width: 34px; height: 34px; font-size: 24px; line-height: 1; color: var(--muted); border-radius: 50%; }
.modal-x:hover { color: var(--gold-hi); background: rgba(255,255,255,.06); }
.account-tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 4px; margin-bottom: 22px; border-radius: 10px; background: rgba(5,6,18,.6); border: 1px solid rgba(255,255,255,.06); }
.account-tabs button { padding: 8px 4px; border-radius: 7px; font-size: 14px; color: var(--muted); transition: color .2s, background .2s; }
.account-tabs button:hover { color: var(--text); }
.account-tabs button.active { color: #2a1700; background: linear-gradient(180deg, var(--gold-hi), var(--gold)); font-weight: 700; }
.account-form { display: none; }
.account-form.active { display: block; animation: fadeUp .4s var(--ease); }
.account-note { font-size: 13px; color: var(--muted); margin: -4px 0 16px; line-height: 1.7; }
.account-form .btn { margin-top: 6px; }

/* ---------- 音樂 ---------- */
.music {
  position: fixed; right: 20px; bottom: 20px; z-index: 60; width: 48px; height: 48px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; gap: 3px;
  background: rgba(12,14,36,.75); border: 1px solid var(--line); backdrop-filter: blur(8px);
  transition: box-shadow .3s;
}
.music:hover { box-shadow: 0 0 20px rgba(242,196,90,.35); }
.music span { width: 3px; height: 6px; border-radius: 2px; background: var(--gold); transition: height .3s; }
.music.playing span { animation: eq 1s ease-in-out infinite; }
.music.playing span:nth-child(2) { animation-delay: .2s; }
.music.playing span:nth-child(3) { animation-delay: .4s; }
.music.playing span:nth-child(4) { animation-delay: .1s; }
@keyframes eq { 0%, 100% { height: 6px; } 50% { height: 18px; } }

/* ---------- 響應式 ---------- */
@media (max-width: 1080px) {
  .features { grid-template-columns: repeat(2, 1fr); }
  .roster { grid-template-columns: repeat(5, 1fr); }
  .register { grid-template-columns: 1fr; }
  .register-card { max-width: 480px; width: 100%; margin: 0 auto; }
  .register-copy { text-align: center; }
  .section-title.left { text-align: center; }
  .perks { justify-content: center; }
}
@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .nav-logo img, .nav.scrolled .nav-logo img { height: 46px; margin: -4px 0; }
  .nav-links {
    position: fixed; inset: 0 0 auto 0; top: 0; flex-direction: column; padding: 90px 24px 34px; gap: 22px; font-size: 18px;
    background: rgba(7,8,22,.96); backdrop-filter: blur(16px); border-bottom: 1px solid var(--line);
    transform: translateY(-105%); transition: transform .5s var(--ease); z-index: -1;
  }
  .nav.open .nav-links { transform: none; }
  .showcase { grid-template-columns: 1fr; }
  .hero-chars { opacity: .4; }
  .hc { height: 54vh; }
  .hc-left { left: -18vw; } .hc-right { right: -18vw; }
  .skill-preview { width: 40%; }
  .stage-nav.prev { left: 8px; } .stage-nav.next { right: 8px; }
  .download { grid-template-columns: 1fr; }
  .reqs { grid-template-columns: repeat(2, 1fr); }
  .reqs div + div { border-left: 0; }
  .reqs div { border-top: 1px solid rgba(255,255,255,.07); }
  .reqs div:nth-child(even) { border-left: 1px solid rgba(255,255,255,.07); }
  .reqs div:first-child, .reqs div:nth-child(2) { border-top: 0; }
  .reqs div:last-child { grid-column: 1 / -1; border-left: 0; }
}
@media (max-width: 560px) {
  .features { grid-template-columns: 1fr; }
  .roster { grid-template-columns: repeat(4, 1fr); gap: 6px; }
  .roster span { font-size: 11px; }
  .news-item { grid-template-columns: 1fr auto; gap: 8px 12px; padding: 16px 16px 16px 20px; }
  .news-tag { justify-self: start; }
  .news-title { grid-column: 1 / -1; grid-row: 2; }
  .news-date { grid-row: 1; grid-column: 2; }
  .register-card { padding: 32px 20px 26px; }
  .hero-actions .btn { padding: 13px 26px; }
  .server-status { flex-wrap: wrap; justify-content: center; }
  .music { right: 14px; bottom: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  html { scroll-behavior: auto; }
}
