:root {
  --bg: #0b0618;
  --bg-2: #160c2e;
  --text: #ece6ff;
  --muted: #a59bc9;
  --pink: #ff3df0;
  --cyan: #36f1ff;
  --yellow: #ffe14d;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(ellipse at 50% -10%, rgba(255, 61, 240, 0.25), transparent 60%),
    linear-gradient(180deg, var(--bg-2), var(--bg) 70%);
  color: var(--text);
  font-family: "Space Grotesk", system-ui, sans-serif;
  line-height: 1.5;
}

/* faint CRT scanlines over everything */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.18) 0 1px, transparent 1px 3px);
}

/* ---------- header ---------- */

.marquee {
  text-align: center;
  padding: 4.5rem 1.25rem 2.5rem;
}

.insert-coin {
  font-family: "Press Start 2P", monospace;
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--yellow);
  margin: 0 0 1.5rem;
  animation: blink 1.2s steps(1) infinite;
}

@keyframes blink { 50% { opacity: 0; } }

h1 {
  font-family: "Press Start 2P", monospace;
  font-weight: 400;
  font-size: clamp(1.6rem, 6vw, 3.2rem);
  line-height: 1.35;
  margin: 0;
  color: var(--cyan);
  text-shadow: 0 0 6px var(--cyan), 0 0 24px rgba(54, 241, 255, 0.6);
}

h1 span {
  color: var(--pink);
  text-shadow: 0 0 6px var(--pink), 0 0 24px rgba(255, 61, 240, 0.6);
}

.tagline {
  color: var(--muted);
  max-width: 32rem;
  margin: 1.5rem auto 0;
  font-size: 1.05rem;
}

/* ---------- game cards ---------- */

main {
  max-width: 60rem;
  margin: 0 auto;
  padding: 1rem 1.25rem 3rem;
}

.cabinets {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 20rem));
  justify-content: center;
  gap: 1.5rem;
}

.cabinet a {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 1.25rem;
  border: 2px solid color-mix(in srgb, var(--glow) 55%, transparent);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  color: inherit;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.cabinet a:hover,
.cabinet a:focus-visible {
  transform: translateY(-4px);
  border-color: var(--glow);
  box-shadow: 0 0 0 1px var(--glow), 0 0 28px color-mix(in srgb, var(--glow) 45%, transparent);
  outline: none;
}

.cabinet h2 {
  font-family: "Press Start 2P", monospace;
  font-weight: 400;
  font-size: 1rem;
  margin: 1.1rem 0 0.6rem;
  color: var(--glow);
}

.cabinet p {
  margin: 0 0 1.1rem;
  color: var(--muted);
  font-size: 0.95rem;
  flex: 1;
}

.play {
  align-self: flex-start;
  font-family: "Press Start 2P", monospace;
  font-size: 0.7rem;
  padding: 0.7rem 1rem;
  border-radius: 8px;
  background: var(--glow);
  color: var(--bg);
}

/* ---------- little "screens" drawn in CSS ---------- */

.screen {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: 8px;
  background: #05020d;
  border: 1px solid rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

/* Bricky Break */
.bricks {
  position: absolute;
  top: 14%;
  left: 10%;
  right: 10%;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}
.bricks i { height: 12px; border-radius: 2px; background: var(--glow-2); box-shadow: 0 0 8px var(--glow-2); }
.bricks i:nth-child(n+5) { background: var(--glow); box-shadow: 0 0 8px var(--glow); }
.bricks i:nth-child(3) { visibility: hidden; }

.ball {
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 10px #fff;
  animation: bounce 2.4s ease-in-out infinite alternate;
}
@keyframes bounce {
  0%   { left: 20%; top: 70%; }
  50%  { left: 55%; top: 42%; }
  100% { left: 78%; top: 72%; }
}

.paddle {
  position: absolute;
  bottom: 10%;
  width: 26%;
  height: 8px;
  border-radius: 4px;
  background: var(--yellow);
  box-shadow: 0 0 10px var(--yellow);
  animation: paddle 2.4s ease-in-out infinite alternate;
}
@keyframes paddle { from { left: 8%; } to { left: 66%; } }

/* Tile Blast */
.tiles {
  position: absolute;
  inset: 12% 24%;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 5px;
}
.tiles i { border-radius: 3px; background: rgba(255, 255, 255, 0.06); }
.tiles .r { background: #ff4d6d; box-shadow: 0 0 8px #ff4d6d; }
.tiles .b { background: #4d8bff; box-shadow: 0 0 8px #4d8bff; }
.tiles .g { background: #45ff8a; box-shadow: 0 0 8px #45ff8a; }
.tiles .p { background: #b04dff; box-shadow: 0 0 8px #b04dff; }
.tiles .g { animation: pop 1.6s ease-in-out infinite; }
@keyframes pop { 50% { transform: scale(0.8); filter: brightness(1.6); } }

/* ---------- footer ---------- */

footer {
  text-align: center;
  padding: 0 1.25rem 3rem;
  color: var(--muted);
  font-size: 0.9rem;
}

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