.chooser {
  position: relative;
  display: grid;
  grid-template-rows: 1fr auto;
  min-height: 100svh;
}

.chooser__top {
  position: absolute;
  inset: 0 0 auto;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 32px 16px;
  text-align: center;
  pointer-events: none;
  background: linear-gradient(to bottom, rgba(7, 9, 13, 0.75), transparent);
}

.chooser__top a {
  pointer-events: auto;
}

.chooser__top .logo {
  font-size: 24px;
}

.chooser__top .logo img {
  width: 42px;
  height: 42px;
}

.chooser__ask {
  color: var(--muted);
  font: 500 17px/1 var(--font-display);
}

.games {
  position: relative;
  display: flex;
  min-height: 600px;
}

.game {
  position: relative;
  flex: 1 1 0;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  isolation: isolate;
  color: inherit;
  text-decoration: none;
}

.game__art {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
  filter: brightness(0.7) saturate(0.95);
  transition: transform 1.4s cubic-bezier(0.2, 0.7, 0.2, 1), filter 0.6s, opacity 1.2s ease;
}

/* The CS2 half crossfades through server screenshots (shared/rotate.js). */
.game__art.is-off {
  opacity: 0;
}

.game::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(to top, rgba(7, 9, 13, 0.96) 0%, rgba(7, 9, 13, 0.7) 32%, rgba(7, 9, 13, 0.1) 65%, rgba(7, 9, 13, 0.55) 100%);
}

.game::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 3px;
  opacity: 0.5;
  transition: opacity 0.4s, height 0.4s;
}

.game--fivem::after {
  background: linear-gradient(90deg, #b07cff, #ff6fa8, #ffc35a);
}

.game--cs2::after {
  background: linear-gradient(90deg, var(--sun-2), var(--sun-1), var(--ct));
}

.game:hover .game__art,
.game:focus-visible .game__art {
  transform: scale(1.1);
  filter: brightness(0.9) saturate(1.1);
}

.game:hover::after,
.game:focus-visible::after {
  opacity: 1;
  height: 5px;
}

.games:has(.game:hover) .game:not(:hover) .game__art {
  filter: brightness(0.38) saturate(0.6);
}

.game:focus-visible {
  outline-offset: -4px;
}

.game__body {
  width: 100%;
  max-width: 640px;
  padding: clamp(28px, 5vw, 72px);
  padding-bottom: clamp(36px, 6vw, 80px);
}

.game__platform {
  display: inline-block;
  padding: 8px 14px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  font: 600 12px/1 var(--font-display);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.game__title {
  margin: 20px 0 14px;
  font: 800 clamp(40px, 5vw, 80px)/0.95 var(--font-display);
  text-align: right;
  text-transform: uppercase;
}

/* Two solid colors per title: gradient text (background-clip: text) goes dark under dark-mode extensions. */
.game__title span {
  display: block;
}

.game--fivem .game__title span:first-child {
  color: #ffc35a;
}

.game--fivem .game__title span:last-child {
  color: #ff7eb3;
}

.game--cs2 .game__title span:last-child {
  color: var(--sun-1);
}

.game__text {
  max-width: 440px;
  color: #d3dae5;
  font-size: 18px;
}

.game__live {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  font-size: 15px;
}

.game__live[hidden] {
  display: none;
}

.game__live b {
  font-weight: 500;
}

.game__cta {
  display: flex;
  width: max-content;
  margin-top: 24px;
}

.game:hover .game__cta svg {
  transform: translateX(-4px);
}

.games__or {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 60px;
  height: 60px;
  border: 1px solid var(--line-2);
  border-radius: 50%;
  background: rgba(7, 9, 13, 0.85);
  backdrop-filter: blur(10px);
  box-shadow: 0 0 0 10px rgba(7, 9, 13, 0.35);
  font: 700 17px/1 var(--font-display);
  translate: -50% -50%;
  pointer-events: none;
}

.games::after {
  content: "";
  position: absolute;
  inset: 0 auto 0 50%;
  width: 1px;
  background: linear-gradient(to bottom, transparent, var(--line-2) 30%, var(--line-2) 70%, transparent);
  pointer-events: none;
}

.chooser__foot {
  padding: 14px 16px;
  border-top: 1px solid var(--line);
  color: var(--dim);
  font-size: 13px;
  text-align: center;
}

@media (max-width: 820px) {
  .games {
    flex-direction: column;
    min-height: 0;
  }

  .game {
    min-height: 58svh;
  }

  .game--fivem {
    padding-top: 140px;
  }

  .games::after {
    inset: 50% 0 auto;
    width: auto;
    height: 1px;
    background: linear-gradient(to right, transparent, var(--line-2) 30%, var(--line-2) 70%, transparent);
  }

  .games__or {
    width: 52px;
    height: 52px;
    font-size: 15px;
  }

  .game__text {
    font-size: 16px;
  }
}
