body[data-page="games"] {
  --games-green: #75ffb7;
  --games-green-strong: #95ffd0;
  --games-green-soft: rgba(117, 255, 183, 0.18);
  --games-panel: rgba(4, 10, 10, 0.92);
  --games-panel-strong: rgba(6, 16, 15, 0.97);
  background:
    radial-gradient(circle at 50% 0%, rgba(51, 198, 123, 0.16), transparent 34rem),
    radial-gradient(circle at 18% 24%, rgba(117, 255, 183, 0.08), transparent 26rem),
    linear-gradient(180deg, #030505 0%, #020303 52%, #010202 100%);
}

body[data-page="games"] .games-showcase {
  position: relative;
  isolation: isolate;
  width: min(920px, calc(100% - clamp(1rem, 4vw, 2.2rem)));
  display: grid;
  justify-items: center;
  gap: clamp(0.9rem, 1.8vw, 1.25rem);
  padding:
    calc(var(--rina-header-send-overhang, 28px) + var(--rina-header-send-drop, 15px) + clamp(1.1rem, 2.5vh, 1.85rem))
    0
    clamp(1.1rem, 2.4vh, 1.55rem);
}

body[data-page="games"] .games-showcase::before {
  content: "";
  position: absolute;
  inset: -1.5rem -1rem 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 14%, rgba(117, 255, 183, 0.12), transparent 28rem),
    linear-gradient(180deg, rgba(255, 255, 255, 0.015), transparent 42%);
  opacity: 0.92;
}

body[data-page="games"] .games-hero {
  display: grid;
  width: min(100%, 34rem);
  justify-items: center;
  align-items: center;
  gap: 0.62rem;
  text-align: center;
}

body[data-page="games"] .games-title-lockup {
  width: 100%;
  display: grid;
  justify-items: center;
  gap: 0.55rem;
}

body[data-page="games"] .games-kicker {
  margin: 0;
  color: rgba(117, 255, 183, 0.86);
  font: 700 clamp(0.85rem, 1.5vw, 1rem)/1 var(--font-body, "Inter", sans-serif);
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

body[data-page="games"] .games-glitch-title {
  position: relative;
  display: inline-block;
  margin: 0;
  color: var(--games-green);
  font-family: var(--font-rina, "MountainKingRegular", "Times New Roman", serif);
  font-size: clamp(2.55rem, 4.2vw, 3.8rem);
  line-height: 0.88;
  letter-spacing: 0;
  text-transform: uppercase;
  -webkit-text-stroke: 1px rgba(0, 0, 0, 0.88);
  text-shadow:
    0 0 0 #000,
    2px 0 0 rgba(0, 0, 0, 0.84),
    -2px 0 0 rgba(0, 0, 0, 0.84),
    0 2px 0 rgba(0, 0, 0, 0.84),
    0 -2px 0 rgba(0, 0, 0, 0.84),
    0 0 16px rgba(117, 255, 183, 0.28),
    0 0 36px rgba(117, 255, 183, 0.18);
  animation:
    gamesTitleDrift 5.4s steps(1, end) infinite,
    gamesTitleGlow 2.8s ease-in-out infinite;
}

body[data-page="games"] .games-glitch-title::before,
body[data-page="games"] .games-glitch-title::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  pointer-events: none;
  mix-blend-mode: screen;
  opacity: 0;
}

body[data-page="games"] .games-glitch-title::before {
  color: #b6ffd8;
  text-shadow: 0 0 18px rgba(182, 255, 216, 0.32);
  animation: gamesTitleSliceA 3.4s steps(1, end) infinite;
}

body[data-page="games"] .games-glitch-title::after {
  color: #4dff9a;
  text-shadow: 0 0 18px rgba(77, 255, 154, 0.34);
  animation: gamesTitleSliceB 3.8s steps(1, end) infinite;
}

body[data-page="games"] .games-title-lockup > p:last-child {
  margin: 0;
  max-width: 22rem;
  color: rgba(229, 243, 236, 0.74);
  font-size: clamp(0.82rem, 0.95vw, 0.92rem);
  line-height: 1.32;
  text-align: center;
}

body[data-page="games"] .games-hero-line {
  width: min(100%, 18rem);
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(117, 255, 183, 0.5), transparent);
  box-shadow: 0 0 16px rgba(117, 255, 183, 0.18);
}

body[data-page="games"] .games-hero-line:first-child {
  background: linear-gradient(90deg, transparent, rgba(117, 255, 183, 0.5), transparent);
}

body[data-page="games"] .games-card-grid {
  display: grid;
  width: min(100%, 760px);
  grid-template-columns: repeat(2, minmax(0, 1fr));
  justify-content: center;
  align-items: start;
  gap: clamp(0.7rem, 1.4vw, 0.85rem);
  margin: 0 auto;
}

body[data-page="games"] .games-card {
  display: grid;
  width: 100%;
  gap: 0.5rem;
  padding: 0.45rem;
  border: 1px solid rgba(117, 255, 183, 0.16);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.018), transparent 54%),
    var(--games-panel);
  box-shadow:
    0 24px 64px rgba(0, 0, 0, 0.34),
    0 0 28px rgba(117, 255, 183, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

body[data-page="games"] .games-card--link {
  color: inherit;
  cursor: pointer;
  text-decoration: none;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

body[data-page="games"] .games-card--link:hover,
body[data-page="games"] .games-card--link:focus-visible {
  transform: translate3d(0, -2px, 0);
  border-color: rgba(149, 255, 208, 0.4);
  box-shadow:
    0 30px 70px rgba(0, 0, 0, 0.36),
    0 0 30px rgba(117, 255, 183, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  outline: none;
}

body[data-page="games"] .games-card--live {
  border-color: rgba(117, 255, 183, 0.3);
  background:
    radial-gradient(circle at 50% 0%, rgba(117, 255, 183, 0.08), transparent 16rem),
    linear-gradient(180deg, rgba(255, 255, 255, 0.022), transparent 54%),
    var(--games-panel-strong);
}

body[data-page="games"] .games-tile {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 1 / 0.86;
  overflow: hidden;
  border: 1px solid rgba(117, 255, 183, 0.28);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.5);
  box-shadow:
    0 18px 42px rgba(0, 0, 0, 0.32),
    0 0 24px rgba(117, 255, 183, 0.08);
  transform: translate3d(0, 0, 0);
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease,
    filter 180ms ease;
}

body[data-page="games"] .games-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent 16%, transparent 72%, rgba(0, 0, 0, 0.26)),
    repeating-linear-gradient(180deg, rgba(117, 255, 183, 0.05) 0 1px, transparent 1px 5px);
}

body[data-page="games"] .games-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

body[data-page="games"] a.games-tile:hover,
body[data-page="games"] a.games-tile:focus-visible {
  transform: translate3d(0, -4px, 0);
  border-color: rgba(149, 255, 208, 0.66);
  box-shadow:
    0 26px 60px rgba(0, 0, 0, 0.38),
    0 0 36px rgba(117, 255, 183, 0.16);
  filter: saturate(1.06) contrast(1.03);
}

body[data-page="games"] a.games-tile:focus-visible {
  outline: 2px solid rgba(149, 255, 208, 0.78);
  outline-offset: 4px;
}

body[data-page="games"] .games-tile--coming-soon {
  filter: saturate(0.82) brightness(0.92);
}

body[data-page="games"] .games-tile__state {
  position: absolute;
  top: 0.8rem;
  right: 0.8rem;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  min-height: 2rem;
  padding: 0 0.72rem;
  border: 1px solid rgba(176, 199, 186, 0.26);
  border-radius: 999px;
  background: rgba(5, 10, 10, 0.8);
  color: rgba(244, 255, 248, 0.92);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

body[data-page="games"] .games-tile__state--live {
  border-color: rgba(117, 255, 183, 0.42);
  color: var(--games-green-strong);
  box-shadow: 0 0 18px rgba(117, 255, 183, 0.16);
}

body[data-page="games"] .games-card__copy {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  padding: 0 0.12rem 0.02rem;
}

body[data-page="games"] .games-card__copy-main {
  min-width: 0;
}

body[data-page="games"] .games-card__copy h2 {
  margin: 0 0 0.25rem;
  color: rgba(246, 255, 250, 0.96);
  font-size: clamp(0.94rem, 1.2vw, 1.1rem);
  line-height: 1;
}

body[data-page="games"] .games-card__copy p {
  margin: 0;
  color: rgba(220, 234, 228, 0.7);
  font-size: 0.68rem;
  line-height: 1.2;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

body[data-page="games"] .games-card__cta {
  display: inline-flex;
  align-items: center;
  min-height: 2rem;
  padding: 0 0.72rem;
  border-radius: 999px;
  border: 1px solid rgba(117, 255, 183, 0.22);
  background: rgba(9, 17, 15, 0.86);
  color: var(--games-green-strong);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
}

body[data-page="games"] .games-card__cta--muted {
  border-color: rgba(214, 224, 220, 0.12);
  color: rgba(214, 224, 220, 0.52);
}

body[data-page="games"].is-home-embed .games-showcase {
  align-content: center;
  min-height: 100svh;
  height: 100svh;
  max-height: 100svh;
  padding: clamp(0.75rem, 2vh, 1.2rem) clamp(0.8rem, 2.4vw, 1.5rem);
  overflow: hidden;
}

body[data-page="games"].is-home-embed .games-hero {
  gap: 0.8rem;
}

body[data-page="games"].is-home-embed .games-card-grid {
  width: min(100%, 760px);
  gap: clamp(0.55rem, 1.8vw, 0.8rem);
}

body[data-page="games"].is-home-embed .games-card {
  width: 100%;
  gap: 0.48rem;
  padding: 0.42rem;
}

body[data-page="games"].is-home-embed .games-card__copy p {
  font-size: 0.68rem;
}

body[data-page="games"].is-home-embed .games-card__cta {
  min-height: 2.2rem;
  padding-inline: 0.72rem;
  font-size: 0.72rem;
}

@media (max-width: 980px) {
  body[data-page="games"] .games-card-grid {
    width: min(100%, 720px);
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  body[data-page="games"] .games-showcase {
    width: min(100%, calc(100% - 1rem));
    gap: 0.9rem;
    padding-top: calc(var(--rina-header-send-overhang, 28px) + var(--rina-header-send-drop, 15px) + 1rem);
  }

  body[data-page="games"] .games-hero {
    gap: 0.7rem;
  }

  body[data-page="games"] .games-glitch-title {
    font-size: clamp(2.1rem, 11vw, 2.9rem);
  }

  body[data-page="games"] .games-title-lockup > p:last-child {
    max-width: 18rem;
    font-size: 0.84rem;
  }

  body[data-page="games"] .games-card__copy {
    flex-direction: column;
    align-items: flex-start;
  }

  body[data-page="games"] .games-card-grid {
    grid-template-columns: 1fr;
    width: min(100%, 23.5rem);
  }
}

@media (max-width: 860px) {
  body[data-page="games"].is-home-embed .games-showcase {
    align-content: start;
    padding: calc(8.55rem + env(safe-area-inset-top, 0px)) 0.72rem calc(6.2rem + env(safe-area-inset-bottom, 0px));
    gap: 0.55rem;
  }

  body[data-page="games"].is-home-embed .games-hero {
    grid-template-columns: 1fr;
    gap: 0.45rem;
  }

  body[data-page="games"].is-home-embed .games-kicker,
  body[data-page="games"].is-home-embed .games-title-lockup > p:last-child {
    display: none;
  }

  body[data-page="games"].is-home-embed .games-glitch-title {
    font-size: clamp(2rem, 8vw, 2.75rem);
  }

  body[data-page="games"].is-home-embed .games-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body[data-page="games"].is-home-embed .games-card__copy {
    gap: 0.5rem;
  }

  body[data-page="games"].is-home-embed .games-card__copy p {
    display: none;
  }

  body[data-page="games"].is-home-embed .games-card__copy h2 {
    font-size: 1rem;
  }
}

@media (max-width: 430px) {
  body[data-page="games"] .games-card-grid {
    grid-template-columns: 1fr;
  }

  body[data-page="games"].is-home-embed .games-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (prefers-reduced-motion: reduce) {
  body[data-page="games"] .games-glitch-title,
  body[data-page="games"] .games-glitch-title::before,
  body[data-page="games"] .games-glitch-title::after,
  body[data-page="games"] .games-tile {
    animation: none !important;
    transition: none !important;
  }
}

@keyframes gamesTitleGlow {
  0%,
  100% {
    text-shadow:
      0 0 0 #000,
      2px 0 0 rgba(0, 0, 0, 0.84),
      -2px 0 0 rgba(0, 0, 0, 0.84),
      0 2px 0 rgba(0, 0, 0, 0.84),
      0 -2px 0 rgba(0, 0, 0, 0.84),
      0 0 16px rgba(117, 255, 183, 0.28),
      0 0 36px rgba(117, 255, 183, 0.18);
  }

  50% {
    text-shadow:
      0 0 0 #000,
      2px 0 0 rgba(0, 0, 0, 0.84),
      -2px 0 0 rgba(0, 0, 0, 0.84),
      0 2px 0 rgba(0, 0, 0, 0.84),
      0 -2px 0 rgba(0, 0, 0, 0.84),
      0 0 22px rgba(117, 255, 183, 0.4),
      0 0 44px rgba(117, 255, 183, 0.22);
  }
}

@keyframes gamesTitleDrift {
  0%,
  40%,
  100% {
    transform: translate3d(0, 0, 0);
  }

  42% {
    transform: translate3d(1px, -1px, 0);
  }

  44% {
    transform: translate3d(-1px, 1px, 0);
  }

  76% {
    transform: translate3d(1px, 0, 0);
  }
}

@keyframes gamesTitleSliceA {
  0%,
  23%,
  29%,
  100% {
    opacity: 0;
    transform: translate3d(0, 0, 0);
    clip-path: inset(0 0 0 0);
  }

  24% {
    opacity: 0.94;
    transform: translate3d(4px, -1px, 0);
    clip-path: inset(6% 0 72% 0);
  }

  26% {
    opacity: 0.68;
    transform: translate3d(-3px, 1px, 0);
    clip-path: inset(46% 0 26% 0);
  }
}

@keyframes gamesTitleSliceB {
  0%,
  51%,
  58%,
  100% {
    opacity: 0;
    transform: translate3d(0, 0, 0);
    clip-path: inset(0 0 0 0);
  }

  52% {
    opacity: 0.88;
    transform: translate3d(-5px, 1px, 0);
    clip-path: inset(58% 0 10% 0);
  }

  55% {
    opacity: 0.62;
    transform: translate3d(3px, -1px, 0);
    clip-path: inset(18% 0 55% 0);
  }
}
