/* ================= RESET ================= */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  background: #ffffff;
  color: #111;
}

.page {
  max-width: 1400px;
  margin: 0 auto;
}

/* ================= CATEGORY ROW ================= */
.category-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 98px;
}

/* ================= CATEGORY CARD ================= */
.category-card {
  flex: 0 0 360px;
  height: 150px;
  padding: 14px 16px;
  border-radius: 18px;
  color: #ffffff;

  display: flex;
  flex-direction: column;
  justify-content: center;



   background-size: contain;      /* 🔥 key change */
  background-repeat: no-repeat;
  background-position: right center;
}

.category-title {
  font-size: 18px;
  font-weight: 700;
}

.category-count {
  font-size: 13px;
  opacity: .9;
}

/* ================= RAIL ================= */
.rail {
width: 100%;
 flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;              /* space between grid and arrow */
  overflow: hidden;
}

/* ================= GAMES ================= */
.games {
 flex: 1;                /* 🔥 key line */
  display: grid;
  grid-auto-flow: column;

  grid-auto-columns: calc((100% - 4 * 12px) / 5);
  gap: 12px;
  height: 150px;

  overflow-x: auto;
  overflow-y: hidden;
  align-items: center;
  scroll-behavior: smooth;
}

.games::-webkit-scrollbar {
  display: none;
}

/* ================= GAME CARD ================= */
.game {
  height: 100%;
  border-radius: 16px;
  background-size: cover;
  background-position: center;
  transition: transform .2s ease;
}

.game:hover {
  transform: translateY(-2px);
}

/* ================= ARROW ================= */
.arrow {
  position: static;       /* 🔥 important */
  width: 36px;
  height: 150px;
  border: none;
  background: rgba(0,0,0,.55);
  color: #fff;
  font-size: 22px;
  cursor: pointer;
  flex-shrink: 0;  
}

/* ================= MOBILE ================= */
@media (max-width: 600px) {

  .category-row {
    flex-direction: column;
    gap: 6px;
    padding: 10px;
  }

  .category-card {
      flex: 0 0 80px;

    width: 100%;
    height: 92px;
    padding: 10px 12px;
  }

  .category-title {
    font-size: 15px;
  }

  .category-count {
    font-size: 11px;
  }

  .games {
    height: 120px;
    grid-auto-columns: 120px;
    gap: 8px;
  }

  .game {
    border-radius: 14px;
  }

  .arrow {
    display: none;
  }
}

.game {
  display: block;
  border-radius: 16px;
  overflow: hidden;
}

.game-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;

  opacity: 0;
  transform: scale(1.02);
  transition: opacity .35s ease, transform .35s ease;
}

.game-img[loading="eager"],
.game-img.complete {
  opacity: 1;
  transform: scale(1);
}

/* Fade-in when loaded */
.game-img:not([loading="eager"]) {
  opacity: 1;
  transform: scale(1);
}
.hero-banner-link {
  display: block;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 48px;
  text-decoration: none;
}

.hero-banner-link picture,
.hero-banner-link img {
  width: 100%;
  display: block;
}

.hero-banner-link img {
  border-radius: 24px;
  object-fit: cover;
  transition: transform .25s ease;
}

.hero-banner-link:hover img {
  transform: scale(1.01);
}

/* Tablet */
@media (max-width: 1024px) {
  .hero-banner-link {
    max-width: 100%;
    padding: 0 16px;
  }

  .hero-banner-link img {
    border-radius: 16px;
  }
}

/* Mobile */
@media (max-width: 600px) {
  .hero-banner-link {
    padding: 0 12px;
  }
}
.nostalgia-section {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;

  padding: 20px 24px;
  background: #ffffff;
  border-radius: 18px;

  max-width: 1400px;
  margin: 0 auto;
}

.nostalgia-left {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.nostalgia-icon {
  font-size: 28px;
  line-height: 1;
}

.nostalgia-section h2 {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 4px;
}

.nostalgia-section p {
  font-size: 15px;
  color: #6b6b6b;
  max-width: 700px;
}

/* BUTTON AS <a> */
.nostalgia-btn {
  padding: 10px 18px;
  background: #000000;
  color: #ffffff;
  border-radius: 999px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  transition: transform .2s ease, box-shadow .2s ease;
}

.nostalgia-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(0,0,0,.2);
}
@media (max-width: 600px) {
  .nostalgia-section {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
  }

  .nostalgia-section h2 {
    font-size: 18px;
  }

  .nostalgia-section p {
    font-size: 13px;
  }

  .nostalgia-btn {
    align-self: flex-start;
  }
}
@media (max-width: 1024px) {
  .nostalgia-section {
    padding: 18px 20px;
  }

  .nostalgia-section p {
    max-width: 100%;
  }
}
.games-section {
  padding: 18px 80px;
  overflow: hidden;
}

.games-scroll {
  display: grid;
  grid-auto-flow: column;              /* horizontal scroll */
  grid-template-rows: repeat(2, 1fr);  /* 🔥 ALWAYS 2 rows */
  gap: 12px;

  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  padding-bottom: 8px;
}

.games-scroll::-webkit-scrollbar {
  display: none;
}

/* GAME CARD */
.game-card {
  width: 160px;
  height: 110px;
  border-radius: 14px;
  overflow: hidden;
  background: #eee;
  flex-shrink: 0;
}

.game-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
@media (max-width: 600px) {
  .game-card {
    width: 130px;
    height: 90px;
  }
  .games-section {
  padding: 18px 20px;
  overflow: hidden;
}
}
@media (max-width: 1024px) {
  .game-card {
    width: 145px;
    height: 100px;
  }
    .games-section {
  padding: 18px 20px;
  overflow: hidden;
}
}
@media (min-width: 1025px) {
  .game-card {
    width: 180px;
    height: 120px;
  }
}
.tags-section {
  background: #fff;
  padding: 24px;
  border-radius: 28px;
  max-width: 1400px;
  margin: auto;
}

/* title spacing */
.tags-title {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 20px;
}

/* wrapper */
.tags-wrapper {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
}

/* tags flow */
.tags-container {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

/* 🔥 EXACT pill sizing */
.tag-pill {
  padding: 10px 20px;
  min-height: 42px;
  border-radius: 999px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  font-size: 14px;
  font-weight: 500;
  color: #111;
  text-decoration: none;
  white-space: nowrap;
}

/* All tags pill */
.all-tags-pill {
  background: #000;
  color: #fff;
  font-weight: 600;
}

/* mobile */
@media (max-width: 600px) {
  .tag-pill {
    padding: 8px 16px;
    min-height: 38px;
    font-size: 13px;
  }
}
/* ================= HEADER ================= */
.site-header {
  width: 100%;
  background: linear-gradient(
    135deg,
    #dff3ff 0%,
    #eaf7ff 35%,
    #f3fbff 65%,
    #ffffff 100%
  );
  border-bottom: 1px solid #d6ecff;
}

/* Centered container */
.header-inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 14px 16px;

  display: flex;
  align-items: center;
}

/* ================= LOGO ================= */
.logo {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.logo img {
  height: 48px;
  width: auto;
  display: block;
}

/* ================= TABLET ================= */
@media (max-width: 1024px) {
  .header-inner {
    padding: 12px 16px;
  }

  .logo img {
    height: 44px;
  }
}

/* ================= MOBILE ================= */
@media (max-width: 600px) {
  .header-inner {
    padding: 10px 14px;
  }

  .logo img {
    height: 36px;
  }
}
/* ================= FOOTER BASE ================= */
.site-footer {
  background: #000;
  color: #aaa;
  width: 100%;
  overflow-x: hidden;
}

/* ================= TOP STRIP ================= */
.footer-top {
  text-align: center;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255,255,255,.15);
}

.footer-top p {
  margin: 0;
  color: #fff;
  font-size: 18px;
  font-weight: 600;
}

/* ================= MAIN FOOTER WRAPPER ================= */
.footer-main {
  max-width: 1100px;          /* 🔥 tighter than before */
  margin: 0 auto;

  padding: 32px 16px 36px;

  display: grid;
  grid-template-columns: 500px  1fr 1fr 1fr; /* 🔥 LOGO COLUMN REDUCED */
  column-gap: 36px;           /* 🔥 GAP REDUCED */
  align-items: start;
}

/* ================= BRAND COLUMN ================= */
.footer-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.footer-logo img {
  height: 54px;
  width: auto;
}

/* Game thumbs */
.footer-thumbs {
  margin-top: 16px;
  display: flex;
  gap: 12px;
}

.footer-thumbs img {
  width: 64px;
  height: 64px;
  border-radius: 12px;
  object-fit: cover;
}

/* ================= FOOTER COLUMNS ================= */
.footer-col h4 {
  display: flex;
  align-items: center;
  gap: 8px;

  color: #fff;
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 12px;
}

.footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-col li {
  margin-bottom: 9px;
}

.footer-col a {
  color: #aaa;
  text-decoration: none;
  font-size: 15px;
  transition: color .15s ease;
}

.footer-col a:hover {
  color: #fff;
}

/* ================= DESKTOP LARGE ================= */
@media (min-width: 1280px) {
  .footer-main {
    max-width: 1160px;
    column-gap: 40px;
  }
}

/* ================= TABLET ================= */
@media (max-width: 1024px) {

  .footer-main {
    grid-template-columns: 1fr 1fr;
    column-gap: 28px;
    row-gap: 32px;
  }

  .footer-brand {
    grid-column: 1 / -1;
    align-items: center;
    text-align: center;
  }

  .footer-thumbs {
    justify-content: center;
  }

  .footer-col {
    text-align: center;
  }
}

/* ================= MOBILE ================= */
@media (max-width: 640px) {

  .footer-main {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
  }

  .footer-brand {
    align-items: center;
    text-align: center;
  }

  .footer-col {
    width: 100%;
    text-align: center;
  }

  /* Horizontal compact lists */
  .footer-col ul {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px 14px;
  }

  .footer-col li {
    margin: 0;
  }

  .footer-col a {
    font-size: 14px;
    white-space: nowrap;
  }

  .footer-thumbs img {
    width: 56px;
    height: 56px;
  }
}




/* ======================================================
   GLOBAL NO HORIZONTAL SCROLL (SITE-WIDE FIX)
   ====================================================== */
html, body {
  max-width: 100%;
  overflow-x: hidden;
}

/* Prevent any child from forcing width */
*,
*::before,
*::after {
  box-sizing: border-box;
  max-width: 100%;
}

/* Media elements safety */
img, video, iframe, canvas, svg {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ======================================================
   RESPONSIVE PADDING FIXES (REAL CULPRITS)
   ====================================================== */

/* Tablet */
@media (max-width: 1024px) {
  .category-row {
    padding: 10px 24px;   /* ✅ reduced safely */
  }

  .games-section {
    padding: 18px 24px;
  }

 
}

/* Mobile */
@media (max-width: 600px) {
  .category-row {
    padding: 10px 12px;
  }

  .games-section {
    padding: 16px 12px;
  }

 
}

/* ======================================================
   FLEX / GRID SAFETY
   ====================================================== */

/* Prevent flex children from overflowing */
.category-row,
.rail,
.tags-wrapper,
.tags-container{
  max-width: 100%;
  overflow-x: hidden;
}

/* Horizontal scroll sections stay inside screen */
.games-scroll {
  padding-right: 2px; /* avoids scrollbar cut */
}