* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  min-height: 100vh;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  background: radial-gradient(ellipse at 50% 0%, #1a2744 0%, #0a0e17 55%, #050608 100%);
  color: #e8ecf4;
  line-height: 1.65;
  padding: 24px 20px 48px;
}

.wrap {
  max-width: 880px;
  margin: 0 auto;
}

.top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 32px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(255, 210, 80, 0.2);
}

.brand {
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: #ffd850;
  text-decoration: none;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 0.92rem;
}

.nav a {
  color: #9aa8c0;
  text-decoration: none;
}

.nav a:hover,
.nav a.active {
  color: #ffd850;
}

.hero {
  text-align: center;
  margin-bottom: 40px;
}

.hero h1 {
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  margin-bottom: 10px;
  color: #fff;
}

.hero p {
  color: #9aa8c0;
  max-width: 520px;
  margin: 0 auto;
}

.section-title {
  font-size: 0.82rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #7a8aa8;
  margin-bottom: 16px;
}

.games {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
  margin-bottom: 40px;
}

.game-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 20px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 210, 80, 0.18);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s, transform 0.15s;
}

.game-card:hover {
  border-color: rgba(255, 210, 80, 0.45);
  transform: translateY(-2px);
}

.game-card img {
  width: 96px;
  height: 96px;
  border-radius: 20px;
  object-fit: cover;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.game-card h2 {
  font-size: 1.25rem;
  color: #fff;
}

.game-card p {
  color: #9aa8c0;
  font-size: 0.95rem;
  flex: 1;
}

.game-card .cta {
  color: #ffd850;
  font-size: 0.92rem;
  font-weight: 600;
}

/* Game detail page */
.game-feature-wrap {
  margin-bottom: 28px;
}

.game-feature {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 16px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.45);
}

.game-hero {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  align-items: flex-start;
  margin-bottom: 32px;
}

.game-hero img {
  width: 128px;
  height: 128px;
  border-radius: 24px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
}

.game-hero-text h1 {
  font-size: clamp(1.6rem, 4vw, 2rem);
  margin-bottom: 8px;
  color: #fff;
}

.tagline {
  color: #ffd850;
  font-size: 1.05rem;
  margin-bottom: 12px;
}

.meta {
  font-size: 0.88rem;
  color: #7a8aa8;
}

.meta code {
  color: #9aa8c0;
  font-size: 0.85rem;
}

h2 {
  font-size: 1.12rem;
  margin: 28px 0 10px;
  color: #ffd850;
}

p, li {
  color: #c5d0e4;
  margin-bottom: 12px;
}

ul {
  padding-left: 1.25rem;
  margin-bottom: 16px;
}

.features {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
  margin: 20px 0 28px;
}

.feature {
  padding: 14px 16px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.feature strong {
  display: block;
  color: #fff;
  margin-bottom: 4px;
  font-size: 0.95rem;
}

.feature span {
  color: #9aa8c0;
  font-size: 0.88rem;
}

.links-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 16px 0 8px;
}

.btn {
  display: inline-block;
  padding: 10px 16px;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid rgba(255, 210, 80, 0.35);
  color: #ffd850;
  background: rgba(255, 210, 80, 0.08);
}

.btn:hover {
  background: rgba(255, 210, 80, 0.16);
}

.btn-muted {
  border-color: rgba(255, 255, 255, 0.12);
  color: #c5d0e4;
  background: rgba(255, 255, 255, 0.04);
}

footer {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 210, 80, 0.15);
  font-size: 0.88rem;
  color: #7a8aa8;
}

footer a {
  color: #9aa8c0;
  text-decoration: none;
}

.info-table {
  width: 100%;
  border-collapse: collapse;
  margin: 12px 0 24px;
  font-size: 0.92rem;
}

.info-table th,
.info-table td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  color: #c5d0e4;
  vertical-align: top;
}

.info-table th {
  color: #9aa8c0;
  font-weight: 600;
  width: 38%;
}

.about-list {
  padding-left: 1.25rem;
  margin: 8px 0 20px;
}

.about-list li {
  margin-bottom: 8px;
  color: #c5d0e4;
}

.promo-box {
  padding: 14px 16px;
  border-radius: 12px;
  background: rgba(255, 210, 80, 0.06);
  border: 1px solid rgba(255, 210, 80, 0.2);
  margin: 12px 0 20px;
  color: #e8ecf4;
  font-size: 0.95rem;
}

.screenshots-carousel {
  --carousel-gap: 14px;
  --carousel-visible: 3;
  position: relative;
  margin: 16px 0 28px;
  padding: 0 44px;
}

.carousel-viewport {
  overflow: hidden;
}

.carousel-track {
  display: flex;
  gap: var(--carousel-gap);
  transition: transform 0.38s ease;
  will-change: transform;
}

.carousel-slide {
  flex: 0 0 auto;
  margin: 0;
}

.carousel-slide img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.carousel-slide-clickable img {
  cursor: zoom-in;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.carousel-slide-clickable img:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45);
}

.carousel-slide-clickable img:focus-visible {
  outline: 2px solid #ffd850;
  outline-offset: 3px;
}

.carousel-slide figcaption {
  margin-top: 8px;
  font-size: 0.82rem;
  color: #7a8aa8;
  text-align: center;
}

.carousel-btn {
  position: absolute;
  top: 42%;
  transform: translateY(-50%);
  z-index: 2;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(255, 210, 80, 0.35);
  border-radius: 50%;
  background: rgba(10, 14, 23, 0.85);
  color: #ffd850;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.carousel-btn:hover:not(:disabled) {
  background: rgba(255, 210, 80, 0.14);
}

.carousel-btn:disabled {
  opacity: 0.35;
  cursor: default;
}

.carousel-prev { left: 0; }
.carousel-next { right: 0; }

@media (max-width: 560px) {
  .screenshots-carousel {
    padding: 0 36px;
  }

  .carousel-btn {
    width: 32px;
    height: 32px;
    font-size: 1.2rem;
  }
}

body.lightbox-open {
  overflow: hidden;
}

.screenshot-lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
}

.screenshot-lightbox[hidden] {
  display: none;
}

.screenshot-lightbox-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(4, 8, 18, 0.88);
  cursor: zoom-out;
}

.screenshot-lightbox-panel {
  position: relative;
  z-index: 1;
  width: min(420px, 100%);
  max-height: calc(100vh - 48px);
  display: flex;
  align-items: center;
  gap: 8px;
}

.screenshot-lightbox-figure {
  margin: 0;
  flex: 1;
  min-width: 0;
  max-height: calc(100vh - 48px);
  display: flex;
  flex-direction: column;
}

.screenshot-lightbox-img {
  display: block;
  width: 100%;
  height: auto;
  max-height: calc(100vh - 120px);
  object-fit: contain;
  border-radius: 16px;
  border: 1px solid rgba(255, 210, 80, 0.25);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.55);
}

.screenshot-lightbox-caption {
  margin-top: 10px;
  text-align: center;
  color: #c8d4ea;
  font-size: 0.95rem;
}

.screenshot-lightbox-close {
  position: absolute;
  top: -12px;
  right: -4px;
  z-index: 2;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(255, 210, 80, 0.35);
  border-radius: 50%;
  background: rgba(10, 14, 23, 0.95);
  color: #ffd850;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}

.screenshot-lightbox-nav {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(255, 210, 80, 0.35);
  border-radius: 50%;
  background: rgba(10, 14, 23, 0.85);
  color: #ffd850;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  padding: 0;
}

.screenshot-lightbox-nav:disabled {
  opacity: 0.35;
  cursor: default;
}

@media (max-width: 560px) {
  .screenshot-lightbox-panel {
    width: 100%;
  }

  .screenshot-lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
  }

  .screenshot-lightbox-prev {
    left: 0;
  }

  .screenshot-lightbox-next {
    right: 0;
  }
}
