/* =========================
   Games card hover effect
   index.html の Gamesカード用
========================= */

.games-card {
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.games-card::before {
  content: "";
  position: absolute;
  inset: -30%;
  z-index: 0;
  background:
    linear-gradient(90deg, transparent 48%, rgba(216, 255, 95, .16) 49%, rgba(216, 255, 95, .16) 51%, transparent 52%),
    linear-gradient(0deg, transparent 48%, rgba(110, 168, 255, .12) 49%, rgba(110, 168, 255, .12) 51%, transparent 52%),
    radial-gradient(circle at 25% 25%, rgba(216, 255, 95, .18), transparent 30%),
    radial-gradient(circle at 74% 72%, rgba(110, 168, 255, .16), transparent 32%);
  background-size: 58px 58px, 58px 58px, auto, auto;
  opacity: 0;
  transform: scale(1.05) rotate(-2deg);
  filter: blur(2px);
  transition:
    opacity .32s ease,
    transform .55s ease,
    filter .55s ease;
  pointer-events: none;
}

.games-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(145deg, rgba(9, 9, 9, .12), rgba(9, 9, 9, .68));
  opacity: 0;
  transition: opacity .28s ease;
  pointer-events: none;
}

.games-card:hover {
  border-color: rgba(216, 255, 95, .56);
}

.games-card:hover::before {
  opacity: 1;
  transform: scale(1) rotate(0deg);
  filter: blur(.5px);
}

.games-card:hover::after {
  opacity: 1;
}

.games-card > * {
  position: relative;
  z-index: 2;
}


/* =========================
   Games page loader
   games.html 用
========================= */

.games-loader {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: grid;
  place-items: center;
  background:
    linear-gradient(90deg, rgba(244,239,231,.035) 1px, transparent 1px),
    linear-gradient(0deg, rgba(244,239,231,.035) 1px, transparent 1px),
    radial-gradient(circle at 50% 50%, rgba(216, 255, 95, .13), transparent 34%),
    var(--bg);
  background-size: 62px 62px, 62px 62px, auto, auto;
  overflow: hidden;
  animation: gamesLoaderExit .85s ease forwards;
  animation-delay: 1.85s;
}

.games-loader-mark {
  position: relative;
  z-index: 2;
  display: flex;
  gap: 5px;
  align-items: center;
  font-size: clamp(66px, 11vw, 140px);
  font-weight: 900;
  letter-spacing: -0.09em;
}

.games-loader-mark span {
  display: inline-block;
  color: var(--ink);
  text-shadow: 0 0 38px rgba(216, 255, 95, .20);
  animation: gameLetterStep 1.35s ease-in-out infinite;
}

.games-loader-mark span:nth-child(1) {
  color: var(--accent);
}

.games-loader-mark span:nth-child(2) {
  animation-delay: .1s;
}

.games-loader-mark span:nth-child(3) {
  color: var(--blue);
  animation-delay: .2s;
}

.games-loader-mark span:nth-child(4) {
  animation-delay: .3s;
}

.game-pixels {
  position: absolute;
  display: grid;
  grid-template-columns: repeat(4, 14px);
  gap: 8px;
  margin-top: 220px;
}

.game-pixels span {
  width: 14px;
  height: 14px;
  border-radius: 4px;
  background: var(--accent);
  opacity: .5;
  animation: gamePixelBlink 1.2s ease-in-out infinite;
}

.game-pixels span:nth-child(2) {
  background: var(--blue);
  animation-delay: .15s;
}

.game-pixels span:nth-child(3) {
  background: var(--pink);
  animation-delay: .3s;
}

.game-pixels span:nth-child(4) {
  animation-delay: .45s;
}

.games-loader p {
  position: absolute;
  margin-top: 292px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .2em;
  opacity: .72;
}

@keyframes gameLetterStep {
  0%, 100% {
    transform: translateY(0);
  }

  45% {
    transform: translateY(-12px);
  }
}

@keyframes gamePixelBlink {
  0%, 100% {
    transform: scale(.75);
    opacity: .35;
  }

  50% {
    transform: scale(1.05);
    opacity: .95;
  }
}

@keyframes gamesLoaderExit {
  0% {
    opacity: 1;
  }

  100% {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
  }
}
