/* Sephix LIVE: the TikTok LIVE games hub - in sephix.world's look (night blue, neon grid, cyan / purple /
   gold, Silkscreen + Chakra Petch + Russo One, a voxel 3D world behind the hero) */
:root {
  --bg: #05060d; --panel: #0b0e1c; --line: #1b2140;
  --cyan: #2fe6ff; --blue: #3a6bff; --purple: #a64dff; --gold: #ffc23d; --green: #5ee05a;
  --text: #e8f4ff; --muted: #8a93b8;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; overflow-x: clip; }
body { background: var(--bg); color: var(--text); font-family: "Chakra Petch", system-ui, sans-serif; min-height: 100vh; }
body::before { content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background:
    radial-gradient(ellipse at 15% 10%, rgba(58, 107, 255, .18), transparent 50%),
    radial-gradient(ellipse at 85% 80%, rgba(166, 77, 255, .15), transparent 50%),
    linear-gradient(rgba(47, 230, 255, .04) 1px, transparent 1px) 0 0 / 32px 32px,
    linear-gradient(90deg, rgba(47, 230, 255, .04) 1px, transparent 1px) 0 0 / 32px 32px; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }
main, header, footer { position: relative; z-index: 1; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
#scene { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: 0; pointer-events: none; display: block; }

/* loader */
body.loading { overflow: hidden; }
.loader { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; background: radial-gradient(ellipse at 50% 40%, #11143a, #03040a 70%);
  transition: opacity .8s ease, transform .9s cubic-bezier(.6, 0, .2, 1); }
.loader.out { opacity: 0; transform: scale(1.08); pointer-events: none; }
.ld-inner { width: min(360px, 86vw); text-align: center; }
.ld-av { width: 96px; height: 96px; border-radius: 20px; border: 3px solid var(--purple); box-shadow: 0 0 34px rgba(166, 77, 255, .6); animation: ldPulse 1.6s ease-in-out infinite; }
@keyframes ldPulse { 50% { box-shadow: 0 0 54px rgba(47, 230, 255, .7); transform: translateY(-4px); } }
.ld-title { font: 28px Silkscreen; letter-spacing: 6px; margin: 18px 0 22px; }
.ld-title b { color: var(--cyan); text-shadow: 0 0 14px rgba(47, 230, 255, .8); }
.ld-bar { display: grid; grid-template-columns: repeat(20, 1fr); gap: 3px; padding: 5px; border: 2px solid rgba(47, 230, 255, .6); border-radius: 6px; box-shadow: 0 0 18px rgba(47, 230, 255, .25); }
.ld-bar i { height: 14px; background: #141a3a; border-radius: 1px; transition: background .3s, box-shadow .3s; }
.ld-bar i.on { background: var(--cyan); box-shadow: 0 0 8px var(--cyan); }
.ld-bar i.on:nth-child(3n) { background: var(--purple); box-shadow: 0 0 8px var(--purple); }
.ld-bar i.on:nth-child(5n) { background: var(--gold); box-shadow: 0 0 8px var(--gold); }
.ld-row { display: flex; justify-content: space-between; margin-top: 10px; font: 12px Silkscreen; letter-spacing: 1px; color: var(--muted); }
.ld-row span:last-child { color: var(--gold); }

/* nav */
nav { display: flex; align-items: center; justify-content: space-between; padding: 18px 0; gap: 16px; }
.brand { display: flex; align-items: center; gap: 12px; font-family: Silkscreen; font-size: 22px; letter-spacing: 2px; }
.brand img { width: 44px; height: 44px; border-radius: 10px; border: 2px solid var(--cyan); box-shadow: 0 0 14px rgba(47, 230, 255, .5); }
.brand b { color: var(--cyan); }
.nav-links { display: flex; gap: 22px; font-weight: 600; color: var(--muted); flex-wrap: wrap; }
.nav-links a { display: inline-block; transition: color .35s, transform .45s cubic-bezier(.2, .9, .25, 1.3), text-shadow .35s; }
.nav-links a:hover { color: var(--cyan); transform: translateY(-3px) scale(1.08); text-shadow: 0 0 14px rgba(47, 230, 255, .8); }

/* hero: the 3D world behind, the title floating in 3D on the right */
.hero { position: relative; margin-top: 6px; aspect-ratio: 3 / 1; }
.hero:not(.webgl) { border-radius: 18px; overflow: hidden; background: #03040a url(assets/giftgallop-banner.jpg) center / cover no-repeat; }
.hero-text { position: absolute; inset: 0; display: flex; align-items: center; justify-content: flex-end; padding-right: 6%; perspective: 900px; pointer-events: none; }
.hero:not(.webgl) .hero-text { background: linear-gradient(90deg, transparent 30%, rgba(5, 6, 13, .85)); }
.ht-inner { position: relative; transform-style: preserve-3d; transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform .6s cubic-bezier(.2, .8, .2, 1);
  padding: clamp(14px, 2.2vw, 30px) clamp(18px, 3vw, 44px); text-align: center; animation: htFloat 6s ease-in-out infinite; }
.ht-inner::before { content: ""; position: absolute; inset: 0; border: 2px solid rgba(47, 230, 255, .75); border-radius: 14px; transform: translateZ(-20px);
  box-shadow: 0 0 18px rgba(47, 230, 255, .45), inset 0 0 18px rgba(47, 230, 255, .2); }
.ht-inner::after { content: ""; position: absolute; inset: 8px; border: 1px solid rgba(166, 77, 255, .55); border-radius: 10px; transform: translateZ(-40px); }
@keyframes htFloat { 50% { translate: 0 -8px; } }
.ht-line { display: block; white-space: nowrap; }
.ht-top { font: 700 clamp(14px, 2.2vw, 32px) "Chakra Petch"; letter-spacing: .18em; color: var(--cyan); transform: translateZ(40px); text-shadow: 0 0 12px rgba(47, 230, 255, .8); }
.ht-top .br { color: var(--purple); text-shadow: 0 0 12px rgba(166, 77, 255, .9); }
.ht-main { font: 400 clamp(24px, 4.3vw, 62px) / 1.05 "Russo One", sans-serif; color: #f2fbff; transform: translateZ(80px); margin: .12em 0;
  text-shadow: 0 1px 0 #bdf3ff, 0 2px 0 #8fe4f7, 0 3px 0 #5cc9e6, 0 4px 0 #3aa6cf, 0 5px 0 #2a7fb0, 0 6px 0 #1d5a8a, 0 7px 0 #143e66,
    0 10px 14px rgba(0, 0, 0, .7), 0 0 30px rgba(47, 230, 255, .55); }
.ht-line .ch { display: inline-block; }
.ht-line .ch.sp { width: .35em; }
/* pixel-particle title (pixels.js): the DOM letters stay for layout and screen readers, a canvas draws them -
   flat in the frame's plane, so the text always stays inside its frame */
.ht-pix { position: absolute; pointer-events: none; filter: drop-shadow(0 0 10px rgba(47, 230, 255, .45)); }
.hero.pix .ht-line, .hero.pix .ht-line .br { color: transparent !important; text-shadow: none !important; transform: none; }
.fx-pix { position: fixed; inset: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 60; }
.ht-sub { font: 600 clamp(12px, 2vw, 30px) "Chakra Petch"; letter-spacing: .28em; color: var(--gold); transform: translateZ(50px); text-shadow: 0 2px 0 #a8741a, 0 0 16px rgba(255, 194, 61, .7); }

.hero-meta { display: flex; align-items: center; gap: 24px; padding: 28px 0 8px; flex-wrap: wrap; }
.avatar { width: 110px; height: 110px; border-radius: 20px; border: 3px solid var(--purple); position: relative; z-index: 2; flex: none; box-shadow: 0 0 30px rgba(166, 77, 255, .6); background: var(--bg); }
.hero-meta h1 { font-family: Silkscreen; font-size: clamp(26px, 4vw, 40px); letter-spacing: 3px; }
.hero-meta h1 span { color: var(--cyan); text-shadow: 0 0 18px rgba(47, 230, 255, .7); }
.hero-meta p { color: var(--muted); font-size: 17px; max-width: 52ch; }
.stats { display: flex; gap: 14px; margin-left: auto; flex-wrap: wrap; }
.stat { background: rgba(11, 14, 28, .82); border: 1px solid var(--line); border-radius: 12px; padding: 12px 18px; min-width: 110px; text-align: center; transition: border-color .4s, box-shadow .4s; }
.stat:hover { border-color: var(--gold); box-shadow: 0 10px 30px rgba(255, 194, 61, .18); }
.stat b { display: block; font-family: Silkscreen; font-size: 24px; color: var(--gold); text-shadow: 0 0 10px rgba(255, 194, 61, .5); }
.stat small { color: var(--muted); text-transform: uppercase; letter-spacing: 1px; font-size: 11px; }

/* sections */
.sec-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin: 56px 0 22px; flex-wrap: wrap; }
.sec-head h2 { font-family: Silkscreen; font-size: 26px; letter-spacing: 2px; }
.sec-head h2::before { content: "< "; color: var(--cyan); }
.sec-head h2::after { content: " >"; color: var(--purple); }
.filters { display: flex; gap: 8px; flex-wrap: wrap; }
.filters button { background: rgba(11, 14, 28, .85); border: 1px solid var(--line); color: var(--muted); border-radius: 8px; padding: 8px 14px; font: 600 14px "Chakra Petch"; cursor: pointer;
  transition: transform .45s cubic-bezier(.2, .9, .25, 1.3), box-shadow .4s, border-color .35s, color .35s, background .35s; }
.filters button:hover { transform: translateY(-3px) scale(1.06); border-color: var(--cyan); color: var(--cyan); box-shadow: 0 8px 22px rgba(47, 230, 255, .22); }
.filters button.on { color: var(--bg); background: var(--cyan); border-color: var(--cyan); }

/* game cards */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 22px; }
.card { background: linear-gradient(180deg, rgba(14, 18, 38, .94), rgba(9, 11, 23, .94)); border: 1px solid var(--line); border-radius: 16px; position: relative;
  display: flex; flex-direction: column; transition: border-color .45s, box-shadow .5s; }
.card:hover { border-color: var(--cyan); box-shadow: 0 30px 60px rgba(0, 0, 0, .5), 0 0 40px rgba(47, 230, 255, .25); }
.card[hidden] { display: none; }
.cover { position: relative; aspect-ratio: 16 / 9; background: #111 center / cover no-repeat; border-radius: 16px 16px 0 0; overflow: hidden; }
.cover::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 40%, rgba(9, 11, 23, .95)); }
.cover-soon { background: radial-gradient(ellipse at 50% 40%, rgba(166, 77, 255, .35), transparent 60%), linear-gradient(rgba(47, 230, 255, .08) 1px, transparent 1px) 0 0 / 24px 24px, linear-gradient(90deg, rgba(47, 230, 255, .08) 1px, transparent 1px) 0 0 / 24px 24px, #070914; }
.cover .q { position: absolute; inset: 0; display: grid; place-items: center; font: 96px Silkscreen; color: rgba(166, 77, 255, .7); text-shadow: 0 0 30px rgba(166, 77, 255, .8); animation: blink 1.8s infinite; }
.badge { position: absolute; top: 12px; left: 12px; z-index: 1; font: 700 11px Silkscreen; letter-spacing: 1px; padding: 5px 9px; border-radius: 6px; background: rgba(0, 0, 0, .7); border: 1px solid; }
.badge.live { color: var(--green); border-color: var(--green); }
.badge.live::before { content: "● "; }
.badge.soon { color: var(--gold); border-color: var(--gold); }
.num { position: absolute; top: 12px; right: 12px; z-index: 1; font: 700 12px Silkscreen; color: var(--cyan); }
.card-top { display: flex; gap: 14px; align-items: center; padding: 0 18px; margin-top: -34px; position: relative; z-index: 1; }
.card-top img, .mystery { width: 64px; height: 64px; border-radius: 12px; border: 2px solid var(--gold); object-fit: cover; background: #000; box-shadow: 0 0 14px rgba(255, 194, 61, .4); }
.mystery { display: grid; place-items: center; font: 30px Silkscreen; color: var(--gold); }
.card-top h3 { font-family: Silkscreen; font-size: 20px; letter-spacing: 1px; }
.card-top .kind { font: 10px Silkscreen; letter-spacing: 1px; color: var(--cyan); }
.card-body { padding: 14px 18px 18px; display: flex; flex-direction: column; gap: 14px; flex: 1; }
.card-body p { color: var(--muted); font-size: 15px; line-height: 1.45; flex: 1; }
.chips { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; }
.chips li { font: 600 12px "Chakra Petch"; color: var(--cyan); border: 1px solid rgba(47, 230, 255, .35); border-radius: 6px; padding: 3px 8px; background: rgba(47, 230, 255, .06); }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
.btn { flex: 1; display: inline-block; text-align: center; padding: 10px 14px; border-radius: 8px; font: 700 14px "Chakra Petch"; letter-spacing: .5px; border: 1px solid var(--line); background: var(--panel);
  transition: transform .45s cubic-bezier(.2, .9, .25, 1.4), box-shadow .4s, border-color .35s, color .35s, filter .35s; }
.btn:hover { border-color: var(--cyan); color: var(--cyan); transform: translateY(-4px) scale(1.05); box-shadow: 0 10px 24px rgba(47, 230, 255, .25); }
.btn.play { background: linear-gradient(90deg, var(--blue), var(--purple)); border: 0; color: #fff; }
.btn.play:hover { filter: brightness(1.2); color: #fff; box-shadow: 0 10px 28px rgba(166, 77, 255, .45); }
.btn.discord { flex-basis: 100%; color: #b4bbff; border-color: rgba(88, 101, 242, .55); background: rgba(88, 101, 242, .14); }
.btn.discord:hover { color: #fff; border-color: #5865f2; box-shadow: 0 10px 24px rgba(88, 101, 242, .4); }
.btn.big { flex: none; padding: 14px 26px; font-size: 16px; }
.btn[aria-disabled=true] { opacity: .35; pointer-events: none; }

/* featured game */
.feature { display: grid; grid-template-columns: 1fr 1.1fr; gap: 24px; margin: 70px 0 0; padding: 28px; border-radius: 18px; position: relative;
  background: linear-gradient(135deg, rgba(18, 10, 38, .82), rgba(10, 15, 36, .78) 60%, rgba(6, 26, 34, .8)); border: 1px solid rgba(166, 77, 255, .45); box-shadow: 0 0 40px rgba(166, 77, 255, .18);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.soon-tag { display: inline-block; font: 700 12px Silkscreen; letter-spacing: 2px; color: var(--gold); border: 1px solid var(--gold); border-radius: 6px; padding: 5px 10px; animation: blink 1.6s infinite; }
.live-tag { color: var(--green); border-color: var(--green); }
@keyframes blink { 50% { opacity: .45; } }
.feature h2 { font-family: Silkscreen; font-size: clamp(26px, 3.6vw, 38px); margin: 14px 0 10px; letter-spacing: 2px; }
.feature h2 span { color: var(--purple); text-shadow: 0 0 18px rgba(166, 77, 255, .7); }
.feat-text > p { color: var(--muted); line-height: 1.6; margin-bottom: 18px; }
.feats { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 20px; }
.feats li { background: rgba(6, 8, 18, .7); border: 1px solid var(--line); border-radius: 10px; padding: 12px; color: var(--muted); font-size: 14px; line-height: 1.4; transition: border-color .4s, box-shadow .45s; }
.feats li:hover { border-color: var(--cyan); box-shadow: 0 0 22px rgba(47, 230, 255, .18); }
.feats i { font-style: normal; font-size: 20px; margin-right: 6px; }
.feats b { display: block; color: var(--text); margin-bottom: 4px; }
.feat-shots { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: auto auto; gap: 10px; }
.feat-shots img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 16 / 9; border-radius: 12px; border: 1px solid var(--line); transition: transform .5s, border-color .4s; }
.feat-shots img:first-child { grid-column: 1 / -1; }
.feat-shots img:hover { transform: scale(1.03); border-color: var(--cyan); }

/* how it works (the roadmap style) */
.rm { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; position: relative; padding-top: 26px; }
.rm::before { content: ""; position: absolute; left: 10px; right: 10px; top: 8px; height: 3px; border-radius: 3px;
  background: linear-gradient(90deg, var(--cyan), var(--purple)); box-shadow: 0 0 10px rgba(47, 230, 255, .4); }
.rm-step { position: relative; background: rgba(11, 14, 28, .85); border: 1px solid var(--line); border-radius: 14px; padding: 18px 16px 16px; transition: border-color .4s, box-shadow .45s; }
.rm-step:hover { border-color: var(--cyan); box-shadow: 0 16px 34px rgba(0, 0, 0, .45), 0 0 22px rgba(47, 230, 255, .18); }
.rm-dot { position: absolute; top: -26px; left: 18px; width: 16px; height: 16px; border-radius: 3px; background: var(--cyan); border: 2px solid #fff; transform: rotate(45deg); box-shadow: 0 0 12px var(--cyan); }
.rm-step small { font: 11px Silkscreen; letter-spacing: 2px; color: var(--muted); }
.rm-step h3 { font: 20px Silkscreen; letter-spacing: 1px; margin: 6px 0 10px; }
.rm-step p { color: var(--muted); font-size: 14px; line-height: 1.45; }
.rm-step.now { border-color: var(--cyan); background: linear-gradient(160deg, rgba(47, 230, 255, .12), rgba(11, 14, 28, .9) 55%); }
.rm-step.now h3 { color: var(--cyan); text-shadow: 0 0 14px rgba(47, 230, 255, .6); }

/* coming */
.about { display: grid; grid-template-columns: 1.4fr 1fr; gap: 22px; align-items: center; margin: 70px 0 40px; background: rgba(11, 14, 28, .78); border: 1px solid var(--line); border-radius: 18px; padding: 28px;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.about h2 { font-family: Silkscreen; font-size: 26px; margin-bottom: 12px; }
.about h2 span { color: var(--gold); }
.about p { color: var(--muted); line-height: 1.6; }
.focus { background: linear-gradient(135deg, rgba(255, 194, 61, .12), rgba(166, 77, 255, .08)); border: 1px solid rgba(255, 194, 61, .35); border-radius: 12px; padding: 18px; display: grid; gap: 10px; }
.focus b { font-family: Silkscreen; font-size: 13px; letter-spacing: 1px; color: var(--gold); }
.focus p { color: var(--text); opacity: .85; }

.foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 30px 20px 44px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; flex-wrap: wrap; }
.foot .brand { font-size: 18px; color: var(--text); }
.foot .brand img { width: 34px; height: 34px; }

/* smooth 3D hover (hub.js) */
.tilt { transform-style: preserve-3d; will-change: transform; }
.tilt::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity .5s;
  background: radial-gradient(circle at var(--gx, 50%) var(--gy, 50%), rgba(255, 255, 255, .14), transparent 48%); }
.tilt.hovering::after { opacity: 1; }
.reveal { opacity: 0; transform: perspective(1200px) rotateX(16deg) translateY(60px) scale(.97); transform-origin: 50% 0; transition: opacity .9s ease, transform 1.1s cubic-bezier(.2, .8, .2, 1); }
.reveal.in { opacity: 1; transform: none; }

@media (max-width: 900px) {
  .feature, .about { grid-template-columns: 1fr; }
  .rm { grid-template-columns: 1fr 1fr; }
  .rm::before { display: none; }
  .rm-dot { display: none; }
  .stats { margin-left: 0; }
}
@media (max-width: 600px) {
  .nav-links { gap: 14px; font-size: 14px; }
  .hero { aspect-ratio: 4 / 3; }
  .grid { grid-template-columns: 1fr; }
  .rm, .feats { grid-template-columns: 1fr; }
  .avatar { width: 80px; height: 80px; }
}
@media (prefers-reduced-motion: reduce) {
  .ht-inner, .ld-av, .soon-tag, .cover .q { animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
}
