:root {
  --bg: #070707;
  --bg-card: #110808;
  --ink: #f4f0ec;
  --muted: #b8a8a6;
  --red: #ff2b2b;
  --red-hot: #ff4d3a;
  --red-deep: #7a0a0a;
  --line: rgba(255, 43, 43, 0.28);
  --max: 72rem;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Sora, system-ui, sans-serif;
  font-size: 1.02rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  overflow-x: hidden;
}

.noise {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 2;
  opacity: 0.07;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.glow {
  pointer-events: none;
  position: fixed;
  z-index: 0;
  border-radius: 50%;
  filter: blur(80px);
}

.glow-a {
  width: 42rem;
  height: 42rem;
  top: -12rem;
  right: -8rem;
  background: radial-gradient(circle, rgba(255, 43, 43, 0.45), transparent 68%);
  animation: drift 12s ease-in-out infinite;
}

.glow-b {
  width: 28rem;
  height: 28rem;
  bottom: 8%;
  left: -8rem;
  background: radial-gradient(circle, rgba(122, 10, 10, 0.7), transparent 70%);
  animation: drift 16s ease-in-out infinite reverse;
}

.site-header,
main,
.site-footer {
  position: relative;
  z-index: 1;
  width: min(100% - 2.5rem, var(--max));
  margin-inline: auto;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 2rem 0 1.25rem;
}

.logo {
  display: block;
  max-width: 100%;
  line-height: 0;
}

.logo-img {
  display: block;
  width: min(54rem, 100%);
  max-width: 54rem;
  height: auto;
  aspect-ratio: 3840 / 1280;
  object-fit: contain;
}

.games {
  padding: 1.5rem 0 4.5rem;
}

.section-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 1rem 2rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1.1rem;
  border-bottom: 2px solid var(--red);
}

h2 {
  margin: 0;
  font-family: Syne, sans-serif;
  font-size: clamp(1.5rem, 3.2vw, 2.15rem);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: -0.03em;
}

.section-heading p {
  margin: 0;
  max-width: 28rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.game-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: 1rem;
}

.game-card {
  min-height: 15rem;
  padding: 1.5rem;
  border: 1px solid var(--line);
  background: var(--bg-card);
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  position: relative;
  overflow: hidden;
  color: inherit;
  text-decoration: none;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

a.game-card-live {
  cursor: pointer;
}

.game-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--red), transparent);
}

.game-card:hover {
  transform: translateY(-6px) rotate(-0.4deg);
  border-color: var(--red);
  box-shadow: 8px 12px 0 0 var(--red-deep);
}

.game-status {
  align-self: flex-start;
  font-family: Syne, sans-serif;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--red);
}

.game-card h3 {
  margin: 0.4rem 0 0;
  font-family: Syne, sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
}

.game-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.card-art {
  position: relative;
  height: 11.5rem;
  margin: -1.5rem -1.5rem 0.6rem;
  background: #080202;
  overflow: hidden;
  display: grid;
  place-items: center;
}

.mini-board {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  width: 100%;
  height: 100%;
  opacity: 0.4;
}

.mini-board span {
  background: #1a0505;
}

.mini-board span:nth-child(8n + 2),
.mini-board span:nth-child(8n + 4),
.mini-board span:nth-child(8n + 5),
.mini-board span:nth-child(8n + 7) {
  background: #8a1010;
}

.game-logo {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  transform: rotate(-4deg);
}

.game-logo-max {
  width: 5.4rem;
  height: 5.4rem;
  object-fit: cover;
  object-position: 32% 10%;
  border-radius: 50%;
  border: 4px solid #fff4e8;
  background: #1a0a08;
  box-shadow:
    0 0 0 4px var(--red),
    6px 8px 0 0 #3a0404;
  animation: max-wiggle 2.8s ease-in-out infinite;
}

.game-logo-text {
  font-family: Bangers, "Comic Sans MS", sans-serif;
  font-size: 1.55rem;
  letter-spacing: 0.04em;
  color: #fff8f0;
  text-shadow:
    3px 3px 0 #3a0404,
    -1px 0 0 var(--red);
}

.game-card-live:hover .game-logo-max {
  animation: max-bounce 0.55s ease;
}

.card-cta {
  margin-top: auto;
  align-self: flex-start;
  padding: 0.45rem 0.95rem;
  font-family: Syne, sans-serif;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #140404;
  background: var(--red);
  box-shadow: 3px 3px 0 0 var(--red-deep);
}

.game-card-live:hover .card-cta {
  background: var(--red-hot);
}

.site-footer {
  padding: 1.4rem 0 2.2rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.82rem;
}

.site-footer p {
  margin: 0;
}

@keyframes drift {
  0%,
  100% {
    transform: translate(0, 0);
  }
  50% {
    transform: translate(-4%, 6%);
  }
}

@keyframes max-wiggle {
  0%,
  100% {
    transform: rotate(-6deg);
  }
  50% {
    transform: rotate(6deg);
  }
}

@keyframes max-bounce {
  0%,
  100% {
    transform: translateY(0) scale(1) rotate(-6deg);
  }
  40% {
    transform: translateY(-8px) scale(1.08) rotate(4deg);
  }
}

@media (max-width: 40rem) {
  .logo-img {
    width: 100%;
    max-width: 100%;
  }

  .site-header {
    padding: 1.25rem 0 0.75rem;
  }
}
