:root {
  --ink: #f4f8ff;
  --muted: #9db0cb;
  --gold: #f0c75a;
  --gold-2: #ffe9a8;
  --cyan: #6ed4ff;
  --line: rgba(150, 200, 255, 0.2);
  --deep: #02060f;
  --font-d: "Oxanium", "Noto Sans TC", sans-serif;
  --font-b: "Noto Sans TC", "Oxanium", sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --wrap: 1120px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: var(--font-b);
  background: var(--deep);
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font: inherit; }
.wrap {
  width: min(var(--wrap), calc(100% - 2.4rem));
  margin-inline: auto;
}

/* —— Stage —— */
.stage {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
  background: #02060f;
}
.stage-photo {
  position: absolute;
  inset: -2%;
  background: url("./assets/brand/bg-lux.jpg") center 30% / cover no-repeat;
  filter: saturate(1.18) contrast(1.06) brightness(0.88);
  animation: drift 36s ease-in-out infinite alternate;
}
.stage-veil {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(2, 6, 16, 0.55) 0%, rgba(2, 8, 18, 0.35) 35%, rgba(2, 6, 14, 0.72) 100%),
    radial-gradient(ellipse 80% 50% at 50% 20%, rgba(40, 100, 200, 0.2), transparent 60%);
}
.stage-vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 30%, transparent 25%, rgba(0, 2, 8, 0.82) 100%);
}
.stage-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  mix-blend-mode: screen;
  opacity: 0.45;
}
.stage-glow-l { width: 480px; height: 480px; left: -160px; top: 10%; background: #1656c8; animation: orb 12s var(--ease) infinite alternate; }
.stage-glow-r { width: 420px; height: 420px; right: -120px; top: 0; background: #0c7ab8; animation: orb 14s var(--ease) infinite alternate-reverse; }
.stage-glow-gold { width: 340px; height: 340px; left: 40%; bottom: 5%; background: #c9a23a; opacity: 0.22; animation: orb 16s var(--ease) infinite alternate; }
.stage-sparkles {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(1.6px 1.6px at 18% 22%, rgba(255, 235, 170, 0.8), transparent),
    radial-gradient(1.3px 1.3px at 72% 28%, rgba(180, 230, 255, 0.75), transparent),
    radial-gradient(1.4px 1.4px at 48% 70%, rgba(255, 255, 255, 0.55), transparent),
    radial-gradient(1.2px 1.2px at 88% 62%, rgba(255, 210, 120, 0.7), transparent);
  animation: twinkle 5s ease-in-out infinite;
  mix-blend-mode: screen;
}

@keyframes drift { from { transform: scale(1.02) translateY(0); } to { transform: scale(1.08) translateY(-1.5%); } }
@keyframes orb { from { transform: translate(0,0); } to { transform: translate(24px,-28px); } }
@keyframes twinkle { 0%,100%{opacity:.4} 50%{opacity:1} }
@keyframes rise { from { opacity:0; transform: translateY(24px);} to { opacity:1; transform:none;} }
@keyframes shine { from { transform: translateX(-130%) skewX(-16deg);} to { transform: translateX(230%) skewX(-16deg);} }
@keyframes bob { 0%,100%{ transform: translateY(0);} 50%{ transform: translateY(8px);} }

/* —— Top —— */
.top {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 1rem;
  width: min(var(--wrap), calc(100% - 2.4rem));
  margin: 0.75rem auto 0;
  padding: 0.7rem 1rem;
  border-radius: 999px;
  border: 1px solid rgba(150, 200, 255, 0.18);
  background: rgba(6, 12, 28, 0.55);
  backdrop-filter: blur(16px);
  box-shadow: 0 10px 40px rgba(0,0,0,0.25);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--font-d);
  font-weight: 800;
  letter-spacing: 0.12em;
}
.brand img { width: 36px; height: 36px; filter: drop-shadow(0 0 10px rgba(90,170,255,.45)); }
.nav {
  margin-left: auto;
  display: flex;
  gap: 1.2rem;
  color: var(--muted);
  font-size: 0.9rem;
}
.nav a:hover { color: #fff; }

/* —— Buttons —— */
.btn {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 1.4rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-family: var(--font-d);
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: transform .25s var(--ease), box-shadow .25s;
}
.btn:hover { transform: translateY(-2px); }
.btn-sm { min-height: 38px; padding: 0 1rem; font-size: 0.82rem; color:#dff; border-color: rgba(120,180,255,.3); background: rgba(30,70,140,.35); }
.btn-primary {
  color: #1a1204;
  background: linear-gradient(135deg, #ffe7a0, #f0c75a 45%, #d4a017);
  box-shadow: 0 12px 36px rgba(212,160,23,.35);
}
.btn-ghost {
  color: #e8f4ff;
  border-color: rgba(140,190,255,.35);
  background: rgba(20,40,80,.35);
  backdrop-filter: blur(8px);
}
.btn-shine {
  position: absolute; inset: 0; width: 40%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.5), transparent);
  animation: shine 2.8s ease-in-out infinite;
}

/* —— Hero：单栏居中，一屏一事 —— */
.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: calc(100svh - 88px);
  padding: 3rem 1.2rem 4rem;
  animation: rise .9s var(--ease) both;
}
.hero-logo {
  width: min(120px, 28vw);
  margin-bottom: 1rem;
  filter: drop-shadow(0 12px 40px rgba(80,170,255,.45));
  animation: rise 1s var(--ease) .08s both;
}
.hero-brand {
  margin: 0;
  font-family: var(--font-d);
  font-weight: 800;
  font-size: clamp(4rem, 12vw, 7rem);
  line-height: .9;
  letter-spacing: .08em;
  background: linear-gradient(180deg, #fff 10%, #8fd0ff 55%, #2f7fe8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-title {
  margin: .85rem 0 .9rem;
  font-family: var(--font-d);
  font-weight: 700;
  font-size: clamp(1.25rem, 2.8vw, 1.75rem);
  letter-spacing: .18em;
  color: #e8f2ff;
}
.hero-lead {
  margin: 0 0 1.8rem;
  max-width: 28rem;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.7;
}
.hero-lead em {
  font-style: normal;
  font-family: var(--font-d);
  font-weight: 800;
  color: var(--gold-2);
  text-shadow: 0 0 18px rgba(240,199,90,.4);
}
.hero-cta { display: flex; flex-wrap: wrap; gap: .75rem; justify-content: center; }
.hero-scroll {
  margin-top: 2.8rem;
  color: rgba(180,210,255,.55);
  font-size: 1.2rem;
  animation: bob 2.2s ease-in-out infinite;
}

/* —— Section bar —— */
.sec-bar {
  margin-bottom: 1.25rem;
}
.sec-bar h2 {
  margin: 0 0 .3rem;
  font-family: var(--font-d);
  font-weight: 800;
  font-size: clamp(1.5rem, 3vw, 2rem);
  letter-spacing: .06em;
  background: linear-gradient(90deg, #fff, #9fd2ff 55%, #f0c75a);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.sec-bar p { margin: 0; color: var(--muted); }
.sec-bar-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
}

/* —— Showcase posters —— */
.showcase {
  padding: 1rem 0 3rem;
}
.showcase-frame {
  position: relative;
  aspect-ratio: 21 / 9;
  min-height: 220px;
  max-height: 420px;
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid rgba(160,210,255,.22);
  box-shadow: 0 24px 70px rgba(0,0,0,.4);
}
.showcase-slides { position: absolute; inset: 0; }
.showcase-slide {
  position: absolute;
  inset: 0;
  background: center / cover no-repeat;
  opacity: 0;
  transform: scale(1.05);
  transition: opacity 1s ease, transform 5.5s ease;
}
.showcase-slide.is-on { opacity: 1; transform: scale(1); }
.showcase-dots {
  position: absolute;
  left: 0; right: 0; bottom: 14px;
  display: flex;
  justify-content: center;
  gap: 8px;
  z-index: 2;
}
.showcase-dots button {
  width: 8px; height: 8px;
  border-radius: 50%;
  border: 0;
  padding: 0;
  background: rgba(255,255,255,.35);
  cursor: pointer;
}
.showcase-dots button.on { background: var(--gold); width: 22px; border-radius: 6px; }

/* —— Games —— */
.games { padding: 1rem 0 2.5rem; }
.cat-tabs { display: flex; flex-wrap: wrap; gap: .45rem; }
.cat-tab {
  min-height: 38px;
  padding: 0 1rem;
  border-radius: 999px;
  border: 1px solid rgba(120,180,255,.22);
  background: rgba(8,18,40,.55);
  color: var(--muted);
  cursor: pointer;
}
.cat-tab.is-on {
  color: #1a1204;
  font-weight: 800;
  border-color: transparent;
  background: linear-gradient(135deg, #ffe7a0, #f0c75a 50%, #3a8fff);
}
.game-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}
.game-item {
  display: flex;
  flex-direction: column;
  padding: 0;
  border: 1px solid rgba(130,180,255,.16);
  border-radius: 16px;
  overflow: hidden;
  background: rgba(6,14,32,.72);
  color: inherit;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 14px 36px rgba(0,0,0,.28);
  transition: transform .28s var(--ease), box-shadow .28s, border-color .28s;
}
.game-item:hover {
  transform: translateY(-6px);
  border-color: rgba(180,220,255,.4);
  box-shadow: 0 22px 48px rgba(0,0,0,.4), 0 0 30px rgba(47,143,255,.15);
}
.game-cover {
  position: relative;
  aspect-ratio: 16 / 11;
  overflow: hidden;
  background: #0a1428;
}
.game-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .45s var(--ease);
}
.game-item:hover .game-cover img { transform: scale(1.07); }
.game-body { padding: .85rem .9rem 1rem; display: flex; flex-direction: column; gap: .35rem; flex: 1; }
.game-top { display: flex; align-items: center; justify-content: space-between; gap: .4rem; }
.game-name { font-family: var(--font-d); font-weight: 700; font-size: 1rem; letter-spacing: .02em; }
.game-badge {
  display: inline-flex; align-items: center; gap: .15rem;
  font-size: .64rem; font-weight: 700; letter-spacing: .06em;
  padding: .15rem .4rem; border-radius: 5px;
}
.game-badge img { width: 11px; height: 11px; }
.game-badge.hot { color:#1a1204; background: linear-gradient(135deg,#ffe7a0,#f0a83a); }
.game-badge.new { color:#041820; background: linear-gradient(135deg,#9ef0ff,#3bc4ff); }
.game-desc { margin: 0; color: var(--muted); font-size: .82rem; line-height: 1.5; flex: 1; }
.game-meta {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: .2rem; font-size: .7rem; letter-spacing: .12em; text-transform: uppercase;
  color: rgba(150,190,230,.7);
}
.game-go { color: var(--cyan); font-family: var(--font-d); font-weight: 700; letter-spacing: .06em; }

/* —— Gift —— */
.gift { padding: 1rem 0 3.5rem; }
.gift-panel {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.1rem 1.5rem;
  padding: 1.35rem 1.5rem;
  border-radius: 20px;
  border: 1px solid rgba(240,199,90,.28);
  background:
    linear-gradient(120deg, rgba(40,70,130,.4), rgba(20,30,55,.65)),
    radial-gradient(circle at 0% 50%, rgba(240,199,90,.18), transparent 45%);
  box-shadow: 0 18px 50px rgba(0,0,0,.3);
}
.gift-coin { width: 52px; height: 52px; object-fit: contain; filter: drop-shadow(0 6px 16px rgba(240,180,40,.4)); }
.gift-copy { flex: 1; min-width: 200px; }
.gift-copy h2 {
  margin: 0 0 .35rem;
  font-family: var(--font-d);
  font-size: 1.35rem;
  letter-spacing: .06em;
}
.gift-copy p { margin: 0; color: var(--muted); line-height: 1.6; }
.gift-copy strong { color: var(--gold-2); font-family: var(--font-d); }

/* —— Footer —— */
.foot {
  border-top: 1px solid var(--line);
  padding: 1.5rem 0 2.5rem;
  color: var(--muted);
  font-size: .85rem;
}
.foot-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .8rem;
}
.foot-brand {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  color: #fff;
  font-family: var(--font-d);
  font-weight: 800;
  letter-spacing: .12em;
}

@media (max-width: 1020px) {
  .game-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 760px) {
  .nav { display: none; }
  .game-grid { grid-template-columns: repeat(2, 1fr); gap: .75rem; }
  .showcase-frame { aspect-ratio: 16 / 9; max-height: none; }
  .gift-panel { justify-content: center; text-align: center; }
  .gift-copy { flex: 1 1 100%; }
}
@media (max-width: 420px) {
  .game-grid { grid-template-columns: 1fr; }
  .hero-cta { width: 100%; }
  .hero-cta .btn { flex: 1; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
