@font-face {
  font-family: "Blanka";
  src: url("../assets/fonts/Blanka-Regular.otf") format("opentype");
  font-display: swap;
}

:root {
  --bg: #07040f;
  --bg-2: #120a24;
  --ink: #e9e6ff;
  --muted: #9a91c4;
  --pink: #ff2bd6;
  --cyan: #29f0ff;
  --yellow: #ffd23f;
  --purple: #8a3dff;
  --red: #ff2e4d;
  --pixel: "Press Start 2P", monospace;
  --term: "VT323", monospace;
  --logo: "Blanka", "Press Start 2P", sans-serif; /* ONLY for the S mark */
  --display: "Bungee", "Press Start 2P", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: radial-gradient(ellipse at top, var(--bg-2), var(--bg) 60%) fixed, var(--bg);
  color: var(--ink);
  font-family: var(--term);
  font-size: 22px;
  line-height: 1.35;
  overflow-x: hidden;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }

/* ---------- global CRT + stars ---------- */
.crt-overlay {
  pointer-events: none;
  position: fixed; inset: 0; z-index: 100;
  background:
    repeating-linear-gradient(to bottom, rgba(0,0,0,0) 0, rgba(0,0,0,0) 2px, rgba(0,0,0,.18) 3px),
    radial-gradient(ellipse at center, rgba(0,0,0,0) 60%, rgba(0,0,0,.55) 100%);
  mix-blend-mode: multiply;
}
#stars { position: fixed; inset: 0; width: 100%; height: 100%; z-index: -1; }

.s-mark {
  font-family: var(--logo);
  color: var(--pink);
  text-shadow: 0 0 6px var(--pink), 0 0 18px var(--purple);
  line-height: 1;
}

/* ---------- top bar ---------- */
.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 24px;
  background: linear-gradient(to bottom, rgba(7,4,15,.92), rgba(7,4,15,0));
  backdrop-filter: blur(2px);
}
.topbar-logo { text-decoration: none; font-size: 34px; }
.topbar nav { display: flex; align-items: center; gap: 22px; }
.topbar nav a {
  font-family: var(--pixel); font-size: 11px; text-decoration: none;
  text-transform: uppercase; letter-spacing: 1px; color: var(--muted);
  transition: color .15s, text-shadow .15s;
}
.topbar nav a:hover { color: var(--cyan); text-shadow: 0 0 8px var(--cyan); }
.yt-pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 14px; border-radius: 4px;
  background: var(--red); color: #fff !important;
  box-shadow: 0 0 14px rgba(255,46,77,.6);
}
.yt-pill:hover { text-shadow: none !important; filter: brightness(1.15); }
.yt-pill svg { width: 16px; height: 16px; fill: currentColor; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--pixel); font-size: 13px; text-transform: uppercase;
  text-decoration: none; letter-spacing: 1px;
  padding: 16px 22px; border: 3px solid currentColor;
  background: transparent; cursor: pointer;
  transition: transform .1s, box-shadow .15s, background .15s;
}
.btn:active { transform: translateY(2px); }
.btn-primary { color: var(--yellow); box-shadow: 0 0 12px rgba(255,210,63,.5), inset 0 0 12px rgba(255,210,63,.25); }
.btn-primary:hover { background: var(--yellow); color: var(--bg); box-shadow: 0 0 30px var(--yellow); }
.btn-ghost { color: var(--cyan); }
.btn-ghost:hover { background: rgba(41,240,255,.12); box-shadow: 0 0 20px rgba(41,240,255,.5); }
.btn-yt { color: #fff; background: var(--red); border-color: var(--red); border-radius: 6px; box-shadow: 0 0 22px rgba(255,46,77,.6); }
.btn-yt:hover { box-shadow: 0 0 40px var(--red); filter: brightness(1.1); }
.btn-yt svg { width: 22px; height: 22px; fill: currentColor; }
:focus-visible { outline: 3px dashed var(--cyan); outline-offset: 4px; }

/* ---------- hero ---------- */
.hero {
  position: relative; min-height: 100vh; min-height: 100svh;
  display: grid; place-items: center; text-align: center;
  padding: 100px 16px 80px; overflow: hidden;
}
.hero-inner { position: relative; z-index: 2; }
.hero-sun {
  position: absolute; left: 50%; bottom: 34%; width: min(520px, 80vw); aspect-ratio: 1;
  transform: translate(-50%, 50%); border-radius: 50%;
  background: linear-gradient(to bottom, var(--yellow), var(--pink) 55%, var(--purple));
  -webkit-mask: repeating-linear-gradient(to bottom, #000 0 18px, transparent 18px 26px);
          mask: repeating-linear-gradient(to bottom, #000 0 18px, transparent 18px 26px);
  opacity: .35; filter: blur(.5px);
}
.hero-grid {
  position: absolute; left: -50%; right: -50%; bottom: 0; height: 45%;
  background:
    linear-gradient(to top, rgba(255,43,214,.7) 2px, transparent 2px) 0 0 / 100% 48px,
    linear-gradient(to right, rgba(255,43,214,.7) 2px, transparent 2px) 0 0 / 60px 100%;
  transform: perspective(300px) rotateX(62deg);
  transform-origin: bottom;
  animation: grid-move 1.2s linear infinite;
  -webkit-mask: linear-gradient(to top, #000 30%, transparent);
          mask: linear-gradient(to top, #000 30%, transparent);
}
@keyframes grid-move { to { background-position: 0 48px, 0 0; } }

.hero-kicker { font-family: var(--pixel); font-size: 12px; color: var(--cyan); letter-spacing: 2px; margin: 0 0 22px; }
.blink { animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

.logo {
  position: relative; margin: 0;
  font-family: var(--display); font-weight: normal;
  font-size: clamp(36px, 9.5vw, 128px); line-height: 1;
  letter-spacing: .02em;
  color: #fff;
  background: linear-gradient(to bottom, #fff6c8 0%, var(--yellow) 30%, #ff7a59 55%, var(--pink) 80%, #c13bff 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 2px rgba(255,255,255,.5)) drop-shadow(0 0 14px rgba(255,43,214,.75)) drop-shadow(0 0 40px rgba(138,61,255,.6));
  animation: flicker 6s infinite;
}
.logo::before, .logo::after {
  -webkit-text-fill-color: currentColor; background: none;
  content: attr(data-text); position: absolute; inset: 0;
  pointer-events: none; opacity: .7; mix-blend-mode: screen;
}
.logo::before { color: var(--cyan); text-shadow: none; animation: glitch-a 3.5s infinite steps(1); }
.logo::after  { color: var(--pink); text-shadow: none; animation: glitch-b 3.5s infinite steps(1); }
@keyframes glitch-a {
  0%, 92%, 100% { transform: none; clip-path: inset(0 0 100% 0); }
  93% { transform: translate(-4px, 1px); clip-path: inset(10% 0 60% 0); }
  95% { transform: translate(3px, -1px); clip-path: inset(55% 0 20% 0); }
  97% { transform: translate(-2px, 0); clip-path: inset(30% 0 45% 0); }
}
@keyframes glitch-b {
  0%, 92%, 100% { transform: none; clip-path: inset(0 0 100% 0); }
  94% { transform: translate(4px, -1px); clip-path: inset(65% 0 5% 0); }
  96% { transform: translate(-3px, 1px); clip-path: inset(5% 0 75% 0); }
}
@keyframes flicker {
  0%, 18%, 22%, 25%, 53%, 57%, 100% { opacity: 1; }
  20%, 24%, 55% { opacity: .55; }
}
.hero-sub {
  font-family: var(--pixel); font-size: clamp(14px, 2.4vw, 22px);
  letter-spacing: .9em; margin: 18px 0 0; padding-left: .9em;
  color: var(--cyan); text-shadow: 0 0 10px var(--cyan);
}
.hero-lead { max-width: 520px; margin: 28px auto 34px; color: var(--muted); font-size: 24px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 16px; justify-content: center; }
.scroll-hint {
  position: absolute; bottom: 22px; left: 50%; transform: translateX(-50%);
  color: var(--pink); font-size: 18px; animation: bob 1.4s ease-in-out infinite; z-index: 2;
}
@keyframes bob { 50% { transform: translate(-50%, 8px); } }

/* ---------- section heads ---------- */
.section-head { text-align: center; margin-bottom: 56px; }
.neon-title {
  font-family: var(--pixel); font-weight: normal; text-transform: uppercase;
  font-size: clamp(18px, 3.4vw, 30px); margin: 0 0 14px;
  color: var(--yellow);
  text-shadow: 0 0 6px var(--yellow), 0 0 22px rgba(255,210,63,.6);
}
.neon-red { color: #ff6b81; text-shadow: 0 0 6px var(--red), 0 0 22px rgba(255,46,77,.6); }
.section-sub { margin: 0; color: var(--muted); }
.credits { color: var(--cyan); }

/* ---------- arcade floor ---------- */
.arcade { position: relative; padding: 110px 16px 0; overflow: hidden; }
.cabinets {
  position: relative; z-index: 2;
  display: flex; flex-wrap: wrap; justify-content: center; align-items: flex-end;
  gap: 48px 40px; max-width: 1200px; margin: 0 auto;
}
.floor {
  height: 140px; margin-top: -30px;
  background:
    repeating-conic-gradient(#150c2b 0 25%, #0b0617 0 50%) 0 0 / 60px 60px;
  transform: perspective(400px) rotateX(55deg); transform-origin: top;
  -webkit-mask: linear-gradient(to bottom, #000, transparent);
          mask: linear-gradient(to bottom, #000, transparent);
}

/* ---------- cabinet ---------- */
.cabinet {
  --c: var(--pink);
  position: relative; width: 260px; flex: 0 0 auto;
  text-decoration: none; color: var(--ink);
  display: flex; flex-direction: column; align-items: center;
  transition: transform .25s cubic-bezier(.2,.8,.3,1.3);
  filter: drop-shadow(0 30px 30px rgba(0,0,0,.6));
}
.cabinet:not(.locked):hover, .cabinet:not(.locked):focus-visible { transform: translateY(-10px); }
.cabinet:focus-visible { outline: none; }
.cabinet:focus-visible .marquee { outline: 3px dashed var(--c); outline-offset: 4px; }

.cab-top {
  width: 100%; height: 22px;
  background: linear-gradient(#2a1d4a, #1a1030);
  clip-path: polygon(6% 0, 94% 0, 100% 100%, 0 100%);
}
.marquee {
  width: 100%; height: 64px; display: grid; place-items: center;
  padding: 0 12px; text-align: center;
  background:
    linear-gradient(to bottom, rgba(255,255,255,.18), transparent 40%),
    color-mix(in srgb, var(--c) 30%, #0b0617);
  border: 3px solid var(--c);
  box-shadow: 0 0 18px var(--c), inset 0 0 20px color-mix(in srgb, var(--c) 60%, transparent);
  font-family: var(--display); font-size: 22px; line-height: 1; text-transform: uppercase;
  color: #fff; text-shadow: 0 0 6px var(--c), 0 0 16px var(--c);
  overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
}
.cab-body {
  width: 92%;
  background:
    linear-gradient(to right, rgba(0,0,0,.45), transparent 12%, transparent 88%, rgba(0,0,0,.45)),
    linear-gradient(#22173d, #140c27);
  border-left: 3px solid color-mix(in srgb, var(--c) 55%, #000);
  border-right: 3px solid color-mix(in srgb, var(--c) 55%, #000);
  padding: 16px 16px 0;
}
.bezel {
  background: #050308; padding: 12px; border-radius: 6px;
  box-shadow: inset 0 0 0 2px #2d2245, inset 0 0 20px #000;
}
.screen {
  position: relative; aspect-ratio: 4 / 3; overflow: hidden;
  border-radius: 14px / 18px; background: #000;
  box-shadow: 0 0 18px color-mix(in srgb, var(--c) 45%, transparent);
}
.screen canvas, .screen img, .screen video { display: block; width: 100%; height: 100%; object-fit: cover; image-rendering: pixelated; }
.screen::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    repeating-linear-gradient(to bottom, transparent 0 2px, rgba(0,0,0,.35) 2px 3px),
    radial-gradient(ellipse at 30% 20%, rgba(255,255,255,.14), transparent 45%),
    radial-gradient(ellipse at center, transparent 55%, rgba(0,0,0,.6));
}
.screen-label {
  position: absolute; left: 0; right: 0; bottom: 10px; z-index: 1;
  text-align: center; font-family: var(--pixel); font-size: 9px; color: #fff;
  text-shadow: 0 0 6px var(--c);
  animation: blink 1s steps(1) infinite;
}
.cabinet:hover .screen-label { animation-duration: .35s; }

.panel {
  position: relative; width: 112%; margin-left: -6%;
  height: 58px; margin-top: 16px;
  background: linear-gradient(#34265a, #1b1233);
  clip-path: polygon(4% 0, 96% 0, 100% 100%, 0 100%);
  display: flex; align-items: center; justify-content: center; gap: 44px;
  border-bottom: 4px solid color-mix(in srgb, var(--c) 70%, #000);
}
.stick { position: relative; width: 28px; height: 28px; }
.stick::before { /* base */
  content: ""; position: absolute; left: 2px; right: 2px; bottom: -4px; height: 10px;
  border-radius: 50%; background: #0a0612;
}
.stick::after { /* ball */
  content: ""; position: absolute; left: 4px; top: -8px; width: 20px; height: 20px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff8, transparent 40%), var(--red);
  box-shadow: 0 10px 0 -7px #999;
  transition: transform .2s;
}
.cabinet:hover .stick::after { transform: translateX(-5px) rotate(-10deg); }
.btns { display: flex; gap: 8px; }
.btns span {
  width: 16px; height: 16px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff9, transparent 45%), var(--b, var(--cyan));
  box-shadow: 0 3px 0 rgba(0,0,0,.5);
}
.btns span:nth-child(1) { --b: var(--c); }
.btns span:nth-child(2) { --b: var(--yellow); }
.btns span:nth-child(3) { --b: var(--cyan); }

.cab-lower {
  width: 92%; padding: 18px 16px 20px;
  background:
    linear-gradient(to right, rgba(0,0,0,.45), transparent 12%, transparent 88%, rgba(0,0,0,.45)),
    linear-gradient(#1a1030, #0d0819);
  border-left: 3px solid color-mix(in srgb, var(--c) 55%, #000);
  border-right: 3px solid color-mix(in srgb, var(--c) 55%, #000);
  display: flex; flex-direction: column; align-items: center; gap: 12px;
}
.tagline { font-size: 19px; color: var(--muted); text-align: center; min-height: 2.7em; margin: 0; display: grid; place-items: center; }
.coin-door { display: flex; gap: 12px; }
.coin {
  width: 42px; height: 54px; border-radius: 4px;
  background: linear-gradient(#2b2140, #150e24); border: 2px solid #3a2d58;
  display: grid; place-items: center; position: relative;
}
.coin::before { content: ""; width: 4px; height: 20px; background: #000; border-radius: 2px; box-shadow: 0 0 0 1px #4a3a6e; }
.coin::after {
  content: "25¢"; position: absolute; top: 4px; font-family: var(--pixel); font-size: 6px;
  color: #ff5a4e; text-shadow: 0 0 4px #ff5a4e;
}
.cabinet:hover .coin::after { color: var(--yellow); text-shadow: 0 0 6px var(--yellow); }
.play-tag {
  font-family: var(--pixel); font-size: 11px; color: var(--c);
  padding: 8px 12px; border: 2px solid var(--c); letter-spacing: 1px;
  box-shadow: 0 0 10px color-mix(in srgb, var(--c) 50%, transparent);
  transition: background .15s, color .15s;
}
.cabinet:hover .play-tag { background: var(--c); color: var(--bg); }
.cab-base { width: 96%; height: 14px; background: #07040d; border-radius: 0 0 4px 4px; }

.cabinet.locked { cursor: not-allowed; }
.cabinet.locked .marquee, .cabinet.locked .panel, .cabinet.locked .cab-body, .cabinet.locked .cab-lower { filter: saturate(.35) brightness(.7); }
.cabinet.locked .play-tag { color: var(--muted); border-color: #3a2d58; box-shadow: none; }
.cabinet.locked:hover .play-tag { background: none; color: var(--muted); }

/* ---------- YouTube / channel ---------- */
.channel {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 60px; align-items: center;
  max-width: 1100px; margin: 0 auto; padding: 120px 16px;
}
.tv {
  position: relative; padding: 26px 26px 50px; border-radius: 22px;
  background: linear-gradient(145deg, #3a2a1d, #1e140c);
  box-shadow: 0 30px 60px rgba(0,0,0,.6), inset 0 2px 0 rgba(255,255,255,.08);
}
.tv-screen {
  position: relative; aspect-ratio: 4/3; border-radius: 26px / 34px; overflow: hidden;
  background: #0b0412; box-shadow: inset 0 0 40px #000, 0 0 30px rgba(255,46,77,.35);
}
.tv-static {
  position: absolute; inset: -50%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.5'/%3E%3C/svg%3E");
  opacity: .22; animation: static .25s steps(4) infinite;
}
@keyframes static {
  0% { transform: translate(0,0); } 25% { transform: translate(-8%,5%); }
  50% { transform: translate(6%,-7%); } 75% { transform: translate(-4%,-3%); }
}
.tv-screen::after {
  content: ""; position: absolute; inset: 0;
  background: repeating-linear-gradient(to bottom, transparent 0 2px, rgba(0,0,0,.35) 2px 3px),
              radial-gradient(ellipse at center, transparent 50%, rgba(0,0,0,.7));
}
.tv-content {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 10px; z-index: 1; text-align: center; padding: 16px;
}
.s-mark-big { font-size: clamp(70px, 12vw, 130px); margin-bottom: 18px; }
.tv-title { font-family: var(--display); font-weight: normal; margin: 0; font-size: clamp(22px, 3.4vw, 36px); color: #fff; text-shadow: 0 0 10px var(--pink); }
.tv-live { font-family: var(--pixel); font-size: 9px; margin: 6px 0 0; color: #fff; display: flex; gap: 8px; align-items: center; }
.rec-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--red); box-shadow: 0 0 10px var(--red); animation: blink 1s steps(1) infinite; }
.tv-knobs { position: absolute; bottom: 14px; right: 30px; display: flex; gap: 12px; }
.tv-knobs span { width: 22px; height: 22px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #777, #222); }
.channel-copy p { color: var(--muted); font-size: 24px; margin: 0 0 30px; }
.channel-copy .handle { font-family: var(--pixel); font-size: 10px; margin: 18px 0 0; color: #6c6394; }

/* ---------- footer ---------- */
.footer {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px;
  padding: 28px 24px; border-top: 2px solid #1f1538;
  font-family: var(--pixel); font-size: 10px; color: #6c6394;
}
.footer p { margin: 0; display: flex; align-items: center; gap: 8px; }
.footer .s-mark { font-size: 18px; }
.hiscore span { color: var(--yellow); }

/* ---------- responsive ---------- */
@media (max-width: 820px) {
  .channel { grid-template-columns: minmax(0, 1fr); gap: 40px; padding: 90px 16px; text-align: center; }
  .channel-copy .btn { justify-content: center; }
  .topbar { padding: 10px 16px; }
  .topbar nav { gap: 14px; }
  .topbar nav a:not(.yt-pill) { display: none; }
}
@media (max-width: 600px) {
  .channel-copy .btn-yt {
    display: flex; justify-content: center; gap: 12px; width: 100%;
    padding: 20px 12px; font-size: 10px; white-space: nowrap;
  }
  .channel-copy .btn-yt svg { width: 26px; height: 26px; }
  .tv-live { font-size: 8px; flex-wrap: wrap; justify-content: center; }
  .footer { flex-direction: column; align-items: center; text-align: center; line-height: 1.8; }
  .footer p { flex-wrap: wrap; justify-content: center; }
}
@media (max-width: 360px) {
  .cabinet { width: 240px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}
