* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background: #111111;
  color: #ffffff;
  min-height: 100vh;
  overflow: hidden;
}

a {
  color: inherit;
}

.site-wrapper {
  width: min(1100px, calc(100% - 32px));
  height: 100vh;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
}

header {
  padding: 48px 0 32px;
  text-align: center;
  border-bottom: 2px solid #f69039;
}

.logo {
  max-width: 380px;
  width: 80%;
  height: auto;
  display: block;
  margin: 0 auto 28px;
}

.contact-link {
  display: inline-block;
  text-decoration: none;
  letter-spacing: 0.04em;
  color: #dddddd;
  border: 1px solid #333;
  padding: 10px 18px;
  border-radius: 999px;
  transition: background 0.2s ease, color 0.2s ease;
}

.contact-link:hover {
  background: #ffffff;
  color: #000000;
}

.games-list {
  position: relative;
  display: grid;
  place-items: center;
  padding: 32px 72px 56px;
  overflow: hidden;
  min-height: 0;
  flex: 1;
  perspective: 1200px;
  perspective-origin: 50% 45%;
}

.carousel-stage {
  position: relative;
  width: min(100%, 900px);
  height: clamp(340px, 54vh, 460px);
  transform-style: preserve-3d;
}

.game-row {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: 42% 1fr;
  gap: 24px;
  padding: 18px;
  background: #101010;
  border: 1px solid #242424;
  border-radius: 18px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
  opacity: var(--opacity, 0);
  z-index: var(--z-index, 1);
  pointer-events: none;
  transform:
    translateX(calc(var(--offset, 0) * 48%))
    translateZ(var(--depth, -260px))
    rotateY(calc(var(--offset, 0) * -42deg))
    scale(var(--scale, 0.82));
  transform-style: preserve-3d;
  transition:
    opacity 0.35s ease,
    transform 0.55s cubic-bezier(0.2, 0.75, 0.2, 1);
}

.game-row[data-active] {
  pointer-events: auto;
}

.media-box {
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-width: 0;
  min-height: 100%;
}

.game-image {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
  border-radius: 14px;
  background: #222;
}

.info-box {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 100%;
  padding: 4px 0;
}

.game-title {
  margin: 0 0 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid #f69039;
  font-size: clamp(1.4rem, 2vw, 2rem);
  line-height: 1.1;
}

.game-description {
  margin: 0;
  color: #d0d0d0;
  line-height: 1.55;
  max-width: 62ch;
}

.platforms {
  margin-top: 0;
}

.platforms-label {
  display: block;
  margin-bottom: 10px;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #888;
}

.platform-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.platform-tags span {
  padding: 6px 12px;
  border-radius: 999px;
  background: #1c1c1c;
  border: 1px solid #333;
  color: #eeeeee;
  font-size: 0.9rem;
}

.buttons {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  margin-top: 28px;
}

.secondary-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.media-box .secondary-actions {
  margin-top: auto;
}

.mobile-secondary-actions {
  display: none;
}

.button {
  min-width: 140px;
  text-align: center;
  border: 0;
  text-decoration: none;
  padding: 12px 16px;
  border-radius: 999px;
  font-weight: 700;
  font: inherit;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button-page {
  align-self: center;
  min-width: 170px;
  background: #ffffff;
  color: #000000;
  padding: 15px 24px;
  font-size: 1.02rem;
}

.button-page:hover {
  background: #dcdcdc;
}

.button-secondary,
.button-press {
  background: transparent;
  color: #ffffff;
  border: 1px solid #444;
  min-width: 112px;
  padding: 9px 14px;
  font-size: 0.92rem;
}

.button-secondary:hover,
.button-press:hover {
  background: #ffffff;
  color: #000000;
}

.button-secondary:not([href]),
.button-secondary[href=""] {
  display: none;
}

.carousel-control {
  position: absolute;
  top: 50%;
  z-index: 20;
  width: 54px;
  height: 54px;
  border: 1px solid #444;
  border-radius: 999px;
  background: rgba(16, 16, 16, 0.78);
  color: #ffffff;
  font-weight: 700;
  font-size: 1.35rem;
  cursor: pointer;
  transform: translateY(-50%);
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.carousel-control:hover {
  background: #ffffff;
  border-color: #ffffff;
  color: #000000;
  transform: translateY(-50%) scale(1.04);
}

.carousel-control-prev {
  left: 0;
}

.carousel-control-next {
  right: 0;
}

.carousel-dots {
  position: absolute;
  bottom: 20px;
  left: 50%;
  z-index: 20;
  display: flex;
  gap: 10px;
  transform: translateX(-50%);
}

.carousel-dots button {
  width: 10px;
  height: 10px;
  padding: 0;
  border: 1px solid #777;
  border-radius: 999px;
  background: transparent;
  cursor: pointer;
}

.carousel-dots button[data-active] {
  background: #f69039;
  border-color: #f69039;
}

footer {
  padding: 32px 0 48px;
  text-align: center;
  color: #999;
  border-top: 1px solid #f69039;
}

.social-links {
  display: flex;
  justify-content: center;
  gap: 18px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.social-links a {
  color: #cccccc;
  text-decoration: none;
  font-size: 0.95rem;
}

.social-links a:hover {
  color: #ffffff;
  text-decoration: underline;
}

.copyright {
  margin: 0;
  font-size: 0.9rem;
}

@media (max-width: 800px) {
  header {
    padding-top: 34px;
  }

  .games-list {
    padding: 24px 0 54px;
    overflow-x: hidden;
    overflow-y: auto;
    perspective: 900px;
  }

  .carousel-stage {
    width: 100%;
    height: min(640px, calc(100% - 54px));
    min-height: 0;
  }

  .game-row {
    grid-template-columns: 1fr;
    gap: 18px;
    padding: 16px;
    overflow-y: visible;
    transform:
      translateX(calc(var(--offset, 0) * 28%))
      translateZ(var(--depth, -240px))
      rotateY(calc(var(--offset, 0) * -28deg))
      scale(var(--scale, 0.82));
  }

  .game-title {
    font-size: 1.45rem;
  }

  .game-description {
    font-size: 0.95rem;
    line-height: 1.45;
  }

  .buttons {
    flex-direction: column;
    align-items: stretch;
    margin-top: 18px;
  }

  .button-page {
    width: 100%;
  }

  .button-secondary {
    width: auto;
  }

  .media-box .secondary-actions {
    display: none;
  }

  .mobile-secondary-actions {
    display: flex;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 10px;
  }

  .mobile-secondary-actions .button-secondary {
    flex: 1 1 0;
    min-width: 0;
  }

  .carousel-control {
    top: auto;
    bottom: 10px;
    width: 48px;
    height: 48px;
    transform: none;
  }

  .carousel-control:hover {
    transform: scale(1.04);
  }

  .carousel-control-prev {
    left: calc(50% - 86px);
  }

  .carousel-control-next {
    right: calc(50% - 86px);
  }

  .carousel-dots {
    bottom: 28px;
  }
}

@media (max-width: 640px) {
  .site-wrapper {
    width: min(100%, calc(100% - 20px));
  }

  header {
    padding: 28px 0 24px;
  }

  .logo {
    width: min(78%, 360px);
    margin-bottom: 22px;
  }

  .games-list {
    padding: 18px 0 52px;
  }

  .carousel-stage {
    height: calc(100% - 30px);
  }

  .game-row {
    border-radius: 12px;
    transform:
      translateX(calc(var(--offset, 0) * 18%))
      translateZ(var(--depth, -220px))
      rotateY(calc(var(--offset, 0) * -20deg))
      scale(var(--scale, 0.8));
  }

  .game-image {
    border-radius: 10px;
  }

  footer {
    padding: 22px 0 28px;
  }
}

@media (max-height: 760px) {
  header {
    padding: 22px 0 18px;
  }

  .logo {
    max-width: 300px;
    margin-bottom: 18px;
  }

  footer {
    padding: 18px 0 22px;
  }

  .social-links {
    margin-bottom: 12px;
  }
}
