/* KOSMOS CATEGORY IMAGES V1. Decorative visuals only. No links, text, game data or behavior changed. */

:is(.category-shelf, .subscription-shelf):has(a:is([href="/categories/vse-igry"], [href^="/categories/vse-igry?"])),
:is(.collection-index-card, .collection-related nav > a):is([href="/categories/vse-igry"], [href^="/categories/vse-igry?"]) {
  --kosmos-category-image: url("/media/images/ee4f5934d1cfc2eb53f0-960.webp");
}

:is(.category-shelf, .subscription-shelf):has(a:is([href="/categories/top-20"], [href^="/categories/top-20?"])),
:is(.collection-index-card, .collection-related nav > a):is([href="/categories/top-20"], [href^="/categories/top-20?"]) {
  --kosmos-category-image: url("/media/images/542ab897ed1f3338614a-960.webp");
}

:is(.category-shelf, .subscription-shelf):has(a:is([href="/categories/novinki"], [href^="/categories/novinki?"])),
:is(.collection-index-card, .collection-related nav > a):is([href="/categories/novinki"], [href^="/categories/novinki?"]) {
  --kosmos-category-image: url("/media/images/740004f617ed4f2335a8-960.webp");
}

:is(.category-shelf, .subscription-shelf):has(a:is([href="/categories/igry-na-dvoih"], [href^="/categories/igry-na-dvoih?"])),
:is(.collection-index-card, .collection-related nav > a):is([href="/categories/igry-na-dvoih"], [href^="/categories/igry-na-dvoih?"]) {
  --kosmos-category-image: url("/media/images/ce104715c33db85a1d4b-960.webp");
}

:is(.category-shelf, .subscription-shelf):has(a:is([href="/categories/shutery-na-dvoih"], [href^="/categories/shutery-na-dvoih?"])),
:is(.collection-index-card, .collection-related nav > a):is([href="/categories/shutery-na-dvoih"], [href^="/categories/shutery-na-dvoih?"]) {
  --kosmos-category-image: url("/media/images/e4ea0789358ad17aa356-960.webp");
}

:is(.category-shelf, .subscription-shelf):has(a:is([href="/categories/sport-i-faitingi"], [href^="/categories/sport-i-faitingi?"])),
:is(.collection-index-card, .collection-related nav > a):is([href="/categories/sport-i-faitingi"], [href^="/categories/sport-i-faitingi?"]) {
  --kosmos-category-image: url("/media/images/45557976240524cd2cd1-960.webp");
}

:is(.category-shelf, .subscription-shelf):has(a:is([href="/categories/igry-na-4-igrokov"], [href^="/categories/igry-na-4-igrokov?"])),
:is(.collection-index-card, .collection-related nav > a):is([href="/categories/igry-na-4-igrokov"], [href^="/categories/igry-na-4-igrokov?"]) {
  --kosmos-category-image: url("/media/images/447e57972e11535a6f24-960.webp");
}

:is(.category-shelf, .subscription-shelf):has(a:is([href="/categories/syuzhetnye-igry"], [href^="/categories/syuzhetnye-igry?"])),
:is(.collection-index-card, .collection-related nav > a):is([href="/categories/syuzhetnye-igry"], [href^="/categories/syuzhetnye-igry?"]) {
  --kosmos-category-image: url("/media/images/c9dcf3f6cd76a016e60e-960.webp");
}

:is(.category-shelf, .subscription-shelf):has(a:is([href="/categories/shutery"], [href^="/categories/shutery?"])),
:is(.collection-index-card, .collection-related nav > a):is([href="/categories/shutery"], [href^="/categories/shutery?"]) {
  --kosmos-category-image: url("/media/images/2e540c99fd084c9a72fc-960.webp");
}

:is(.category-shelf, .subscription-shelf):has(a:is([href="/categories/horrory"], [href^="/categories/horrory?"])),
:is(.collection-index-card, .collection-related nav > a):is([href="/categories/horrory"], [href^="/categories/horrory?"]) {
  --kosmos-category-image: url("/media/images/b0e0656fead318b8ed02-960.webp");
}

:is(.category-shelf, .subscription-shelf):has(a:is([href="/categories/igry-dlya-detei"], [href^="/categories/igry-dlya-detei?"])),
:is(.collection-index-card, .collection-related nav > a):is([href="/categories/igry-dlya-detei"], [href^="/categories/igry-dlya-detei?"]) {
  --kosmos-category-image: url("/media/images/c570982145e0e1d257fa-960.webp");
}

:is(.category-shelf, .subscription-shelf):has(a:is([href="/categories/gonki"], [href^="/categories/gonki?"])),
:is(.collection-index-card, .collection-related nav > a):is([href="/categories/gonki"], [href^="/categories/gonki?"]) {
  --kosmos-category-image: url("/media/images/4f4ff0ad9a27adfac114-960.webp");
}

:is(.category-shelf, .subscription-shelf):has(a:is([href="/categories/igry-dlya-devushek"], [href^="/categories/igry-dlya-devushek?"])),
:is(.collection-index-card, .collection-related nav > a):is([href="/categories/igry-dlya-devushek"], [href^="/categories/igry-dlya-devushek?"]) {
  --kosmos-category-image: url("/media/images/2c70bcd223bf3ab708cc-960.webp");
}

:is(.category-shelf, .subscription-shelf):has(a:is([href="/categories/playstation-plus-extra"], [href^="/categories/playstation-plus-extra?"])),
:is(.collection-index-card, .collection-related nav > a):is([href="/categories/playstation-plus-extra"], [href^="/categories/playstation-plus-extra?"]) {
  --kosmos-category-image: url("/media/images/c6537fddf3911ab3a588-960.webp");
}

:is(.category-shelf, .subscription-shelf):has(a:is([href="/categories/ea-play"], [href^="/categories/ea-play?"])),
:is(.collection-index-card, .collection-related nav > a):is([href="/categories/ea-play"], [href^="/categories/ea-play?"]) {
  --kosmos-category-image: url("/media/images/ff0b2ac2b4a3d8cefab4-960.webp");
}

/* Compact cinematic banners on the home category shelves. */
.category-shelf .category-shelf-heading,
.subscription-shelf .subscription-heading {
  position: relative;
  isolation: isolate;
  box-sizing: border-box;
  min-height: 188px;
  padding: 26px 28px;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 18px;
  overflow: hidden;
  background-color: #101217;
  background-image: linear-gradient(90deg,rgba(8,10,15,.98) 0%,rgba(8,10,15,.88) 32%,rgba(8,10,15,.40) 66%,rgba(8,10,15,.26) 100%), var(--kosmos-category-image);
  background-size: 100% 100%, 65% auto;
  background-position: center, right center;
  background-repeat: no-repeat;
  box-shadow: 0 10px 36px rgba(0,0,0,.15);
}
.category-shelf .category-shelf-heading {
  grid-template-columns: minmax(0,1fr) auto;
  align-content: center;
  align-items: end;
  row-gap: 12px;
}
.category-shelf .category-shelf-heading > .category-shelf-link {
  grid-column: 1 / -1;
  max-width: 78%;
  gap: 16px;
  align-items: flex-start;
  color: #fff;
  text-shadow: 0 2px 16px rgba(0,0,0,.55);
}
.category-shelf .category-shelf-heading > .category-shelf-link > strong {
  font-size: clamp(25px,2.6vw,36px);
  line-height: 1.14;
  letter-spacing: -.035em;
}
.category-shelf .category-shelf-heading > .category-shelf-link > b { color: #ff79a2; flex-shrink: 0; }
.category-shelf .category-shelf-heading > p {
  color: #e2e5ec;
  margin: 0;
  font-size: 12px;
  line-height: 1.55;
  max-width: 550px;
}
.category-shelf .category-shelf-controls { grid-column: 2; grid-row: 2; }
.category-shelf .category-shelf-controls small,
.subscription-shelf .subscription-controls small { color: #f4f5f8; }
.category-shelf .category-shelf-controls button,
.subscription-shelf .subscription-controls button {
  color: #fff;
  border-color: rgba(255,255,255,.45);
  background: rgba(8,10,15,.82);
}
.category-shelf .category-shelf-controls button:hover,
.subscription-shelf .subscription-controls button:hover { background: #ff247b; color: #fff; }
.subscription-shelf .subscription-heading-copy { max-width: 760px; }
.subscription-shelf .subscription-heading-copy p { color: #e2e5ec; font-size: 12px; }
.subscription-shelf .subscription-heading-copy span { color: #f2c1d2; }
.subscription-shelf .subscription-heading-copy h3 { color: #fff; line-height: 1.14; }
.subscription-shelf .subscription-controls { align-self: end; }

/* Every category index card uses the same curated landscape as its banner. */
.collection-index-grid > .collection-index-card {
  background: #13151b;
  border-color: rgba(255,255,255,.15);
}
.collection-index-grid > .collection-index-card > img { display: none; }
.collection-index-grid > .collection-index-card::before {
  content: "";
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  flex-shrink: 0;
  background-color: #1c2028;
  background-image: linear-gradient(0deg,rgba(19,21,27,.24),transparent 65%),var(--kosmos-category-image);
  background-size: cover;
  background-position: center;
}
.collection-index-grid > .collection-index-card:hover { border-color: #ff4d91; }
.collection-index-grid > .collection-index-card h2 { color: #fff; }
.collection-index-grid > .collection-index-card p { color: #c6c9d2; }

/* Related collection cards retain their exact original link text and target. */
.collection-related nav > a {
  box-sizing: border-box;
  align-items: flex-end;
  min-height: 178px;
  padding: 22px 20px;
  border-color: rgba(255,255,255,.2);
  background-color: #101217;
  background-image: linear-gradient(0deg,rgba(6,8,12,.94) 0%,rgba(6,8,12,.83) 38%,rgba(6,8,12,.22) 100%),var(--kosmos-category-image);
  background-size: cover;
  background-position: center;
  color: #fff;
  font-size: 15px;
  line-height: 1.4;
  text-shadow: 0 1px 8px #000;
}
.collection-related nav > a:hover {
  background-color: #101217;
  background-image: linear-gradient(0deg,rgba(6,8,12,.94) 0%,rgba(6,8,12,.83) 38%,rgba(6,8,12,.22) 100%),var(--kosmos-category-image);
  border-color: #ff4d91;
}
.collection-related nav > a span { color: #ff91b2; flex-shrink: 0; }
.category-shelf-link:focus-visible,
.collection-index-card:focus-visible,
.collection-related nav > a:focus-visible,
.subscription-heading a:focus-visible {
  outline: 3px solid #ff8db5;
  outline-offset: 4px;
}
@media (max-width: 680px) {
  .category-shelf .category-shelf-heading,
  .subscription-shelf .subscription-heading {
    min-height: 190px;
    padding: 22px 18px;
    border-radius: 15px;
    background-image: linear-gradient(90deg,rgba(8,10,15,.88),rgba(8,10,15,.48)),linear-gradient(0deg,rgba(8,10,15,.6),transparent 80%),var(--kosmos-category-image);
    background-size: cover;
    background-position: center;
  }
  .category-shelf .category-shelf-heading { grid-template-columns: minmax(0,1fr); align-content: end; row-gap: 9px; }
  .category-shelf .category-shelf-heading > .category-shelf-link { max-width: 100%; grid-column: 1; gap: 10px; }
  .category-shelf .category-shelf-heading > .category-shelf-link > strong { font-size: clamp(23px,6.2vw,30px); line-height: 1.18; }
  .category-shelf .category-shelf-heading > p { display: none; }
  .category-shelf .category-shelf-controls { grid-column: 1; grid-row: 2; justify-content: flex-start; }
  .category-shelf .category-shelf-controls small { font-size: 11px; }
  .category-shelf .category-shelf-controls button { display: none; }
  .subscription-shelf .subscription-heading { grid-template-columns: minmax(0,1fr); align-content: end; }
  .subscription-shelf .subscription-heading-copy { align-items: center; }
  .subscription-shelf .subscription-heading-copy h3 { font-size: 25px; }
  .subscription-shelf .subscription-controls { justify-self: start; }
  .collection-related nav > a { min-height: 174px; padding: 18px 14px; font-size: 13px; }
}
@media (prefers-reduced-motion: reduce) {
  .collection-index-grid > .collection-index-card { transition: none; }
}
