@import url("https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,400;0,600;0,700;1,600&display=swap");

/* =========================
   Home page theme tokens
   ========================= */
:root {
  --color-text: #f8f3ff;
  --color-muted: #c8c1dd;
  --color-panel: rgba(17, 16, 34, 0.82);
  --color-panel-strong: rgba(25, 22, 48, 0.92);
  --color-panel-border: rgba(255, 255, 255, 0.12);
  --color-accent: #5cf2ff;
  --color-accent-2: #ff8e3c;
  --color-accent-3: #ffe15a;
  --bg: #12091d;
  --bg-deep: #090612;
  --panel: var(--color-panel);
  --panel-strong: var(--color-panel-strong);
  --panel-border: var(--color-panel-border);
  --text: var(--color-text);
  --muted: var(--color-muted);
  --accent: var(--color-accent);
  --accent-2: var(--color-accent-2);
  --accent-3: var(--color-accent-3);
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.42);
  --display-font: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
  --body-font: "Poppins", "Trebuchet MS", "Segoe UI", sans-serif;
  --mono-font: "Courier New", monospace;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--text);
  font-family: var(--body-font);
  background:
    radial-gradient(circle at 15% 20%, rgba(92, 242, 255, 0.16), transparent 30%),
    radial-gradient(circle at 85% 18%, rgba(255, 142, 60, 0.2), transparent 28%),
    radial-gradient(circle at 50% 120%, rgba(255, 225, 90, 0.12), transparent 32%),
    linear-gradient(180deg, #1a102a 0%, #0d0815 55%, #06050b 100%);
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: auto;
  width: 28rem;
  height: 28rem;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(18px);
  opacity: 0.22;
  z-index: -1;
}

body::before {
  top: -8rem;
  left: -10rem;
  background: radial-gradient(circle, rgba(92, 242, 255, 0.9), transparent 65%);
}

body::after {
  right: -10rem;
  bottom: -8rem;
  background: radial-gradient(circle, rgba(255, 142, 60, 0.88), transparent 65%);
}

a {
  color: inherit;
}

/* =========================
   Home shell and decoration
   ========================= */
.page-shell {
  position: relative;
  z-index: 0;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 64px;
}

/* —— Home: asset-driven dressing —— */
body.home-page {
  background:
    radial-gradient(circle at 8% 88%, rgba(58, 129, 0, 0.22), transparent 42%),
    radial-gradient(circle at 92% 78%, rgba(244, 197, 49, 0.1), transparent 38%),
    radial-gradient(circle at 15% 20%, rgba(92, 242, 255, 0.16), transparent 30%),
    radial-gradient(circle at 85% 18%, rgba(255, 142, 60, 0.2), transparent 28%),
    radial-gradient(circle at 50% 120%, rgba(255, 225, 90, 0.12), transparent 32%),
    linear-gradient(180deg, #1a102a 0%, #0d0815 55%, #06050b 100%);
}

body.home-page .nav,
body.home-page main {
  position: relative;
  z-index: 1;
}


.card-art-memory {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.card-art-memory img {
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(244, 197, 49, 0.08));
  border: 1px solid rgba(244, 197, 49, 0.25);
}

.card--rps {
  border-top: 3px solid rgba(92, 242, 255, 0.45);
}

.card--whack {
  border-top: 3px solid rgba(96, 200, 58, 0.55);
}

.card--memory {
  border-top: 3px solid rgba(244, 197, 49, 0.55);
}


/* =========================
   Navigation
   ========================= */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
  padding: 14px 18px;
  border: 1px solid var(--panel-border);
  border-radius: 999px;
  background: rgba(14, 12, 26, 0.78);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(16px);
}

.brand,
.nav a {
  text-decoration: none;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--display-font);
  font-size: 1.25rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  overflow: hidden;
  border-radius: 14px;
  background:
    radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.35), transparent 55%),
    linear-gradient(145deg, #ffe566, #f4c531 48%, #c9a012);
  border: 2px solid rgba(255, 255, 255, 0.35);
  box-shadow: 0 10px 26px rgba(244, 197, 49, 0.28);
}

.brand-mark img {
  display: block;
  width: 36px;
  height: 36px;
  object-fit: contain;
}

.nav nav {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 10px;
}

.nav nav a {
  padding: 10px 16px;
  border-radius: 999px;
  color: var(--muted);
  transition: color 0.25s ease, background-color 0.25s ease, transform 0.25s ease;
}

.nav nav a:hover,
.nav nav a:focus-visible {
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
  transform: translateY(-1px);
}

/* =========================
   Main home sections
   ========================= */
.hero,
.games-section,
.leaderboard-section {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--panel-border);
  border-radius: 32px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent 30%),
    var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  animation: section-rise 0.85s ease-in-out both;
}

.games-section {
  animation-delay: 0.1s;
}

.leaderboard-section {
  animation-delay: 0.2s;
}

.hero::before,
.hero::after,
.games-section::before,
.leaderboard-section::before {
  content: "";
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.hero::before {
  top: -100px;
  right: -80px;
  width: 280px;
  height: 280px;
  background: radial-gradient(circle, rgba(92, 242, 255, 0.22), transparent 68%);
}

.hero::after {
  bottom: -120px;
  left: -80px;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(255, 142, 60, 0.18), transparent 68%);
}

.games-section::before,
.leaderboard-section::before {
  inset: auto auto -80px -60px;
  width: 220px;
  height: 220px;
  background: radial-gradient(circle, rgba(255, 225, 90, 0.14), transparent 70%);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  align-items: center;
  gap: 32px;
  padding: 42px;
}

.hero-copy-block {
  position: relative;
  z-index: 1;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.hero-ribbon {
  display: inline-flex;
  align-items: center;
  margin: 0;
  padding: 8px 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--accent-3);
  font-family: var(--mono-font);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero h1,
.section-heading h2,
.card h3 {
  font-family: var(--display-font);
  font-weight: 900;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.hero h1,
.section-heading h2 {
  margin: 14px 0 0;
  line-height: 0.95;
}

.hero h1 {
  max-width: 10ch;
  font-size: clamp(3.4rem, 8vw, 6rem);
}

.hero-copy {
  width: min(640px, 100%);
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 1.06rem;
  line-height: 1.8;
}


.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 30px;
}

.hero-marquee {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.hero-marquee span {
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  color: var(--text);
  font-family: var(--mono-font);
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  animation: marquee-pulse 4s ease-in-out infinite;
}

.hero-marquee span:nth-child(2) {
  animation-delay: 0.2s;
}

.hero-marquee span:nth-child(3) {
  animation-delay: 0.4s;
}

.hero-marquee span:nth-child(4) {
  animation-delay: 0.6s;
}

.hero-marquee span:nth-child(5) {
  animation-delay: 0.8s;
}

.hero-marquee span:nth-child(6) {
  animation-delay: 1s;
}

/* Keyboard visibility: make links/buttons obvious while tabbing */
.btn:focus-visible,
.card-link:focus-visible,
.nav nav a:focus-visible {
  outline: 3px solid rgba(92, 242, 255, 0.8);
  outline-offset: 3px;
}

.hero-showcase {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  perspective: 1000px;
}

.showcase-tile,
.card-art img {
  border: 1px solid rgba(255, 255, 255, 0.12);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.14), transparent 38%),
    rgba(17, 14, 30, 0.82);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.showcase-tile {
  --tile-tilt: -2deg;
  margin: 0;
  padding: 16px;
  border-radius: 24px;
  animation: float-tile 12s ease-in-out infinite;
  transition: transform 0.32s ease, box-shadow 0.32s ease, filter 0.32s ease;
}

.showcase-tile:hover {
  box-shadow: 0 12px 22px rgba(0, 0, 0, 0.18);
  filter: brightness(1.02);
}

.showcase-tile img,
.card-art img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: contain;
  padding: 10px;
  border-radius: 18px;
}

.showcase-tile figcaption {
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.9rem;
}

.btn,
.card-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 800;
  text-decoration: none;
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.btn {
  border: none;
  background: linear-gradient(135deg, var(--accent-3), var(--accent-2));
  color: #1d1025;
  box-shadow: 0 16px 30px rgba(255, 142, 60, 0.24);
}

.btn:hover,
.btn:focus-visible,
.card-link:hover,
.card-link:focus-visible {
  transform: translateY(-2px) scale(1.005);
}

.card-link:hover,
.card-link:focus-visible {
  box-shadow: 0 10px 20px rgba(92, 242, 255, 0.14);
}

.btn:active,
.card-link:active {
  transform: translateY(0) scale(0.99);
}

.games-section,
.leaderboard-section {
  margin-top: 28px;
  padding: 34px 28px 38px;
}

.section-heading {
  position: relative;
  z-index: 1;
  margin-bottom: 24px;
}

.section-heading h2 {
  font-size: clamp(2rem, 4vw, 3rem);
}

.games,
.leaderboard-grid {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.leaderboard-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.leaderboard-list li + li {
  margin-top: 10px;
}

.leaderboard-list li {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
}

.leaderboard-name {
  color: var(--text);
  font-weight: 600;
}

.leaderboard-score {
  color: var(--accent-3);
  font-family: var(--display-font);
  letter-spacing: 0.04em;
}

.leaderboard-empty {
  color: var(--muted);
}

.leaderboard-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 18px;
}

.leaderboard-clear-btn {
  min-height: 44px;
  padding: 10px 18px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  font-weight: 700;
  box-shadow: none;
}

.leaderboard-clear-btn:hover,
.leaderboard-clear-btn:focus-visible {
  border-color: rgba(92, 242, 255, 0.45);
  background: rgba(255, 255, 255, 0.1);
}

.card {
  position: relative;
  overflow: hidden;
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 26px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), transparent 34%),
    var(--panel-strong);
  transition: transform 0.28s ease, border-color 0.28s ease, box-shadow 0.28s ease;
}

.card::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 120px;
  height: 120px;
  background: radial-gradient(circle, rgba(92, 242, 255, 0.16), transparent 72%);
  pointer-events: none;
  z-index: 0;
}

.card:hover,
.card:focus-within {
  transform: translateY(-4px);
  border-color: rgba(255, 255, 255, 0.18);
  box-shadow: 0 18px 30px rgba(0, 0, 0, 0.2);
}

.card-art {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}

.card-art-single {
  grid-template-columns: 1fr;
}

.card-tag {
  display: inline-flex;
  align-items: center;
  margin-bottom: 14px;
  padding: 7px 11px;
  border-radius: 999px;
  background: rgba(92, 242, 255, 0.12);
  color: var(--accent);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.card h3 {
  margin: 0 0 12px;
  font-size: 1.45rem;
}

.card p {
  margin: 0 0 18px;
  color: var(--muted);
  line-height: 1.7;
}

.card-note {
  color: var(--accent-3);
  font-size: 0.92rem;
}

.card-link {
  width: fit-content;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
}

@keyframes section-rise {
  from {
    opacity: 0;
    transform: translateY(16px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes float-tile {
  0%,
  100% {
    transform: translateY(0) rotate(var(--tile-tilt, -2deg));
  }

  50% {
    transform: translateY(-4px) rotate(var(--tile-tilt, -2deg));
  }
}

.tile-rock {
  --tile-tilt: -2deg;
}

.tile-paper {
  --tile-tilt: 3deg;
  animation-delay: 0.4s;
}

.tile-scissors {
  --tile-tilt: 2deg;
  animation-delay: 0.8s;
}

.tile-mole {
  --tile-tilt: -3deg;
  animation-delay: 1.2s;
}

@keyframes marquee-pulse {
  0%,
  100% {
    transform: translateY(0);
    box-shadow: none;
  }

  50% {
    transform: translateY(-2px);
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.14);
  }
}

/* =========================
   Footer
   ========================= */
.footer {
  width: min(1180px, calc(100% - 32px));
  margin: 36px auto 24px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.footer-container {
  display: grid;
  grid-template-columns: 1.2fr 0.9fr 0.9fr;
  gap: 24px;
  align-items: start;
  padding: 20px 24px;
  border: 1px solid var(--panel-border);
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent 36%),
    rgba(12, 9, 24, 0.78);
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(14px);
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
  color: var(--text);
  text-decoration: none;
  font-family: var(--display-font);
  font-size: 1.2rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.footer-tagline {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.6;
  max-width: 30ch;
  font-style: italic;
}

.footer-links h3,
.footer-social h3 {
  margin: 0 0 12px;
  color: var(--text);
  font-size: 0.92rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.footer-links ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-links li + li {
  margin-top: 10px;
}

.footer-links a,
.footer-social-list a {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.25s ease, text-shadow 0.25s ease, transform 0.25s ease;
}

.footer-links a:hover,
.footer-links a:focus-visible,
.footer-social-list a:hover,
.footer-social-list a:focus-visible {
  color: var(--accent);
  text-shadow: 0 0 14px rgba(92, 242, 255, 0.35);
  transform: translateX(2px);
}

.footer-links a:focus-visible,
.footer-social-list a:focus-visible {
  outline: 2px solid rgba(92, 242, 255, 0.8);
  outline-offset: 2px;
  border-radius: 8px;
}

.footer-social-list {
  display: grid;
  gap: 10px;
}

.footer-social-list a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
}

.footer-social-list i {
  font-size: 1.15rem;
}

.footer-bottom {
  margin-top: 12px;
  text-align: center;
}

.footer-bottom p {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
}

.scroll-top-btn {
  position: fixed;
  right: 20px;
  bottom: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(255, 225, 90, 0.92), rgba(255, 142, 60, 0.92));
  color: #1a102a;
  box-shadow: 0 10px 22px rgba(255, 142, 60, 0.3);
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  z-index: 9;
}

.scroll-top-btn:hover,
.scroll-top-btn:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 12px 22px rgba(255, 142, 60, 0.32);
}

.scroll-top-btn i {
  font-size: 1.3rem;
}

/* =========================
   Responsive
   ========================= */

@media (max-width: 980px) {
  .hero {
    grid-template-columns: 1fr;
  }

  .hero h1 {
    max-width: none;
  }

  .games,
  .leaderboard-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .page-shell {
    width: min(100% - 20px, 1180px);
    padding-top: 18px;
  }

  .nav {
    flex-direction: column;
    align-items: flex-start;
    border-radius: 24px;
  }

  .hero,
  .games-section,
  .leaderboard-section {
    border-radius: 24px;
  }

  .hero {
    padding: 26px 18px 24px;
  }

  .games-section,
  .leaderboard-section {
    padding: 24px 18px 28px;
  }

  .leaderboard-actions {
    justify-content: center;
  }

  .hero-showcase {
    grid-template-columns: 1fr 1fr;
  }

  .showcase-tile {
    padding: 12px;
  }

  .nav nav {
    width: 100%;
  }

  .nav nav a {
    padding-inline: 14px;
  }

  .footer {
    width: min(100% - 20px, 1180px);
    margin-top: 28px;
  }

  .footer-container {
    grid-template-columns: 1fr;
    gap: 18px;
    padding: 18px;
    border-radius: 20px;
  }

  .footer-bottom p {
    font-size: 0.8rem;
  }

  .scroll-top-btn {
    right: 14px;
    bottom: 14px;
    width: 40px;
    height: 40px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 1.2s !important;
    transition-duration: 0.2s !important;
  }
}