/* ==================================================
   ŽAIDIMŲ PUSLAPIS
   Visos klasės atskiros nuo kategorijos.css
================================================== */

.games-page {
  --game-purple: #7d3dd8;
  --game-purple-dark: #6426bd;
  --game-purple-light: #f4edff;
  --game-text: #11131a;
  --game-muted: #686475;
  --game-border: #e8e1ed;
  --game-background: #fbf9fd;

  color: var(--game-text);
  background: #fff;
  font-family: "Manrope", Arial, sans-serif;
}

.games-page * {
  box-sizing: border-box;
}

.game-shell {
  width: min(1180px, calc(100% - 96px));
  margin-inline: auto;
}


/* ==================================================
   ŽAIDIMŲ SĄRAŠAS
================================================== */

.game-list {
  padding: 35px 0 85px;
}

.game-breadcrumbs {
  margin-bottom: 28px;
  padding: 11px 0;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  border-bottom: 1px solid var(--game-border);
  color: #777180;
  font-size: 12px;
  font-weight: 700;
}

.game-breadcrumbs i {
  color: #aaa3b1;
  font-size: 8px;
}

.game-breadcrumbs span[aria-current="page"] {
  color: var(--game-purple-dark);
}

.game-breadcrumbs a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

.game-breadcrumbs a:hover {
  color: var(--game-purple);
}

.game-list__header {
  margin-bottom: 18px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}

.game-list__header h1 {
  margin: 0;
  font-size: clamp(27px, 3vw, 36px);
  line-height: 1.12;
  letter-spacing: -0.035em;
}

.game-list__count {
  padding: 9px 13px;
  flex-shrink: 0;
  border: 1px solid var(--game-border);
  border-radius: 50px;
  color: var(--game-muted);
  background: #fff;
  font-size: 12px;
  font-weight: 700;
}

.game-list__empty {
  margin: 28px 0 0;
  padding: 26px;
  text-align: center;
  border: 1px dashed var(--game-border);
  border-radius: 16px;
  color: var(--game-muted);
  background: var(--game-background);
  font-size: 14px;
  font-weight: 700;
}


/* ==================================================
   ŽAIDIMŲ GRIDAS
================================================== */

.game-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}

.game-card {
  min-width: 0;
}

.game-card__link {
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  color: inherit;
  text-decoration: none;
  border: 1px solid var(--game-border);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 7px 25px rgba(37, 18, 56, 0.055);
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease,
    border-color 0.25s ease;
}

.game-card__link:hover {
  transform: translateY(-5px);
  border-color: rgba(125, 61, 216, 0.35);
  box-shadow: 0 16px 38px rgba(55, 25, 82, 0.12);
}

.game-card__link:focus-visible {
  outline: 3px solid rgba(125, 61, 216, 0.28);
  outline-offset: 3px;
}


/* ==================================================
   KORTELĖS NUOTRAUKA
================================================== */

.game-card__media {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: #eeeaf2;
}

.game-card__media::after {
  position: absolute;
  inset: auto 0 0;
  height: 35%;
  content: "";
  background: linear-gradient(
    transparent,
    rgba(16, 8, 22, 0.15)
  );
  pointer-events: none;
}

.game-card__media img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.game-card__link:hover .game-card__media img {
  transform: scale(1.045);
}

.game-card__badge {
  position: absolute;
  z-index: 1;
  top: 13px;
  left: 13px;
  max-width: calc(100% - 26px);
  padding: 7px 10px;
  border-radius: 50px;
  color: #fff;
  background: rgba(25, 17, 29, 0.72);
  box-shadow: 0 4px 12px rgba(15, 7, 20, 0.16);
  backdrop-filter: blur(8px);
  font-size: 10px;
  font-weight: 800;
}

.game-card__badge--new {
  background: linear-gradient(135deg, #9852e6, #7231cb);
}


/* ==================================================
   KORTELĖS TURINYS
================================================== */

.game-card__body {
  min-height: 320px;
  padding: 20px 18px 18px;
  display: flex;
  flex: 1;
  flex-direction: column;
}

.game-card__body h2 {
  margin: 0 0 9px;
  font-size: 19px;
  line-height: 1.2;
  letter-spacing: -0.025em;
}

.game-card__description {
  margin: 0;
  display: -webkit-box;
  overflow: hidden;
  color: var(--game-muted);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.58;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
}


/* ==================================================
   ŽAIDIMO INFORMACIJA
   Visos eilutės rodomos viena po kita
================================================== */

.game-card__info {
  margin-top: 18px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}

.game-card__info-item {
  min-height: 24px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #4f4959;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.3;
}

/*
 * Didesnės informacinės ikonos:
 * fa-mobile-screen-button
 * fa-user-slash
 * fa-clock
 */
.game-card__info-icon {
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  display: inline-grid;
  place-items: center;
  color: var(--game-purple);
  font-size: 18px;
  line-height: 1;
}

.game-card__info-icon i {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  color: inherit;
  font-size: 18px;
  line-height: 1;
}


/* ==================================================
   KAINA IR VEIKSMO RODYKLĖ
   Kairėje – pinigų ikona + kaina.
   Dešinėje – rodyklė kaip kategorijos.css kortelėje.
================================================== */

.game-card__price-row {
  width: 100%;
  margin-top: 2px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.game-card__price {
  min-width: 0;
  padding: 9px 12px;
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  gap: 9px;
  border: 1px solid rgba(125, 61, 216, 0.14);
  border-radius: 12px;
  color: var(--game-purple-dark);
  background: linear-gradient(
    135deg,
    #faf7ff,
    var(--game-purple-light)
  );
  box-shadow: 0 5px 14px rgba(101, 38, 189, 0.08);
  font-size: 14px;
  font-weight: 800;
  line-height: 1.15;
  white-space: nowrap;
}

/* fa-solid fa-money-bill-wave */
.game-card__price-icon {
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  display: inline-grid;
  place-items: center;
  color: var(--game-purple);
  font-size: 18px;
  line-height: 1;
}

.game-card__price-icon i {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  color: inherit;
  font-size: 18px;
  line-height: 1;
}

.game-card__price-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}


/* ==================================================
   RODYKLĖ

   Tokia pati hover logika kaip kategorijos.css:
   - įprastai violetinė ant šviesaus violetinio fono;
   - užvedus ant kortelės balta ant violetinio fono.
================================================== */

.game-card__action {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  color: var(--game-purple);
  background: var(--game-purple-light);
  font-size: 18px;
  box-shadow: none;
  transition:
    color 0.2s ease,
    background 0.2s ease,
    transform 0.2s ease;
}

.game-card__action i {
  display: block;
  color: inherit;
  background: none;
  border-radius: 0;
  font-size: 18px;
  line-height: 1;
}

/* Užvedus ant visos kortelės keičiasi rodyklės spalvos */
.game-card__link:hover .game-card__action {
  color: #fff;
  background: var(--game-purple);
  transform: translateX(2px);
}


/* Klaviatūros navigacijai */
.game-card__link:focus-visible .game-card__action {
  color: #fff;
  background: var(--game-purple);
}


/* Sena apatinė dalis nenaudojama */
.game-card__bottom {
  display: none;
}


/* ==================================================
   RESPONSIVE DIZAINAS
================================================== */

@media (max-width: 1100px) {
  .game-shell {
    width: calc(100% - 48px);
  }
}

@media (max-width: 920px) {
  .game-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .game-card__body {
    min-height: 300px;
  }
}

@media (max-width: 600px) {
  .game-shell {
    width: calc(100% - 24px);
  }

  .game-list {
    padding: 30px 0 55px;
  }

  .game-breadcrumbs {
    margin-bottom: 20px;
    padding: 9px 0;
    font-size: 10px;
  }

  .game-list__header {
    margin-bottom: 18px;
    align-items: flex-start;
  }

  .game-list__header h1 {
    font-size: 27px;
  }

  .game-list__count {
    display: none;
  }

  .game-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .game-card__link {
    border-radius: 16px;
  }

  .game-card__body {
    min-height: 0;
    padding: 19px 17px 17px;
  }

  .game-card__body h2 {
    font-size: 20px;
  }

  .game-card__description {
    font-size: 14px;
  }
}