/* ============================================================================
   HF GAMES - HOMEPAGE SPECIFIC STYLES (home.css)
   Builds seamlessly upon existing style.css tokens and variables
   ============================================================================ */

/* Gating ad containers by user consent to prevent empty blank space */
html:not([data-ads-allowed="true"]) .page-side-ad-group,
html:not([data-ads-allowed="true"]) .page-side-ad,
.page-side-ad-group[hidden] {
  display: none !important;
}

.page-side-ad {
  display: none;
  position: fixed;
  z-index: 10;
  box-sizing: border-box;
  width: 300px;
  height: 250px;
  line-height: 0;
  overflow: hidden;
  isolation: isolate;
  contain: layout paint;
}

.page-side-ad-slot,
.page-side-ad-frame {
  position: static !important;
  display: block;
  width: 300px !important;
  height: 250px !important;
  max-width: 100%;
  margin: 0 auto;
  border: 0;
  overflow: hidden;
}

.page-side-ad-slot iframe,
.page-side-ad-frame iframe {
  width: 300px !important;
  height: 250px !important;
  max-width: 100%;
  margin: 0 auto;
  border: 0;
  display: block;
}

.page-side-ad-slot-1 {
  top: 100px;
}

.page-side-ad-slot-2 {
  top: 358px;
}

.page-side-ad-slot-3 {
  top: 616px;
}

.page-side-ad-slot-4 {
  top: 874px;
}

.page-side-ad-slot-5 {
  top: 1132px;
}

.page-side-ad-slot-6 {
  top: 1390px;
}

.page-side-ad-left {
  left: max(8px, calc((100vw - 1140px) / 2 - 320px));
}

.page-side-ad-right {
  right: max(8px, calc((100vw - 1140px) / 2 - 320px));
}

@media (min-width: 1800px) {
  .page-side-ad-group {
    display: contents;
  }

  .page-side-ad.ads-desktop-enabled {
    display: block;
  }
}

@media (max-width: 1799px) {
  .page-side-ad-group {
    display: none;
    position: static;
    width: 100%;
    max-width: 100%;
    margin: 8px auto;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: center;
    gap: 8px;
    box-sizing: border-box;
  }

  .page-side-ad-group .page-side-ad {
    position: static !important;
    inset: auto !important;
    z-index: auto !important;
    flex: 0 1 300px;
    width: min(300px, 100%);
    max-width: 100%;
    height: 250px;
    margin: 0;
    transform: none !important;
  }

  .page-side-ad {
    display: none;
    position: static !important;
    inset: auto !important;
    z-index: auto !important;
    width: min(300px, 100%);
    max-width: 100%;
    height: 250px;
    margin: 8px auto;
    transform: none !important;
  }

  .catalog-layout .page-side-ad-group-catalog {
    grid-area: catalog-ad;
    grid-column: 1 / -1;
    width: 100%;
    margin: 8px auto;
  }
}

@media (max-width: 720px) {
  .page-side-ad-group.ads-mobile-narrow-group {
    display: flex;
  }

  .page-side-ad.ads-mobile-narrow-visible {
    display: block;
  }
}

@media (min-width: 721px) and (max-width: 959px) {
  .page-side-ad-group.ads-mobile-medium-group {
    display: flex;
  }

  .page-side-ad.ads-mobile-medium-visible {
    display: block;
  }
}

@media (min-width: 960px) and (max-width: 1799px) {
  .page-side-ad-group.ads-mobile-wide-group {
    display: flex;
  }

  .page-side-ad.ads-mobile-wide-visible {
    display: block;
  }
}

@media (max-width: 768px) {
  .page-side-ad-group {
    margin: 12px auto;
  }
}

@media (max-width: 340px) {
  .page-side-ad-group .page-side-ad,
  .page-side-ad {
    width: min(300px, calc(100vw - 24px)) !important;
    max-width: 100% !important;
  }

  .page-side-ad-slot,
  .page-side-ad-frame {
    width: min(300px, 100%) !important;
    max-width: 100% !important;
  }
}

/* Editorial Hero Banner */
.hf-hero {
  position: relative;
  min-height: 480px;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  margin-bottom: 2.75rem;
  box-shadow: var(--card-shadow);
  background-color: var(--panel);
  display: flex;
  align-items: flex-end;
}

.hf-hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
  filter: brightness(0.65) contrast(1.05);
  transition: transform 6s cubic-bezier(0.16, 1, 0.3, 1);
}

.hf-hero:hover .hf-hero-bg {
  transform: scale(1.03);
}

.hf-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(17, 19, 21, 0.2) 0%, rgba(17, 19, 21, 0.75) 55%, var(--bg) 100%);
  pointer-events: none;
}

[data-theme="light"] .hf-hero-overlay {
  background: linear-gradient(180deg, rgba(244, 245, 246, 0.3) 0%, rgba(244, 245, 246, 0.85) 60%, var(--bg) 100%);
}

.hf-hero-content {
  position: relative;
  z-index: 5;
  padding: 3rem 2.5rem;
  max-width: 820px;
}

.hf-hero-badge-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin-bottom: 1rem;
}

.badge-featured {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--accent);
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 6px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.badge-low-end {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #10b981;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 6px;
  letter-spacing: 0.04em;
}

.hf-hero-title {
  font-size: clamp(2rem, 4.5vw, 3.4rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0.5rem 0 1rem;
  color: var(--text-bright);
  text-transform: none;
}

.hf-hero-desc {
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--text);
  margin-bottom: 1.75rem;
  max-width: 680px;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}

[data-theme="light"] .hf-hero-desc {
  text-shadow: none;
  color: #2b3034;
}

.hf-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* Category Browsing Chips Grid */
.category-chips-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 180px));
  gap: 10px 12px;
  margin-top: 1rem;
  margin-bottom: 2.75rem;
}

.category-chip {
  display: flex;
  min-height: 76px;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.84rem;
  transition: all 0.15s ease;
  box-shadow: var(--card-shadow);
}

.category-chip > div {
  min-width: 0;
  line-height: 1.2;
}

.category-chip > div > span {
  display: block;
}

.category-chip:hover {
  background: var(--panel2);
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}

.category-chip i {
  color: var(--accent);
  flex: 0 0 20px;
  font-size: 1.05rem;
  text-align: center;
}

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

  .category-chip {
    min-height: 68px;
    padding: 10px;
  }
}

/* Enhanced Game Grid */
.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
  margin-top: 1.25rem;
  margin-bottom: 3rem;
}

@media (max-width: 1199px) {
  .home-featured-games-grid > .hf-game-card:nth-child(n + 7) {
    display: none;
  }
}

.hf-game-card {
  display: flex;
  flex-direction: column;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--card-shadow);
  transition: all 0.2s var(--ease-spring);
  text-decoration: none;
  color: inherit;
  position: relative;
}

.hf-game-card:hover {
  border-color: var(--line-strong);
  transform: translateY(-4px);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
}

.hf-game-card-thumb-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: var(--bg-subtle);
  overflow: hidden;
}

.hf-game-card-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.hf-game-card:hover .hf-game-card-thumb {
  transform: scale(1.05);
}

.card-badge-container {
  position: absolute;
  top: 10px;
  left: 10px;
  right: 10px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  pointer-events: none;
}

.badge-pill {
  padding: 3px 8px;
  border-radius: 5px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.badge-pill.featured {
  background: var(--accent);
  color: #ffffff;
}

.badge-pill.low-spec {
  background: rgba(16, 185, 129, 0.9);
  color: #ffffff;
}

.badge-pill.year {
  background: rgba(17, 19, 21, 0.85);
  color: var(--muted);
  border: 1px solid var(--line);
}

.hf-game-card-body {
  padding: 1.1rem 1.25rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.hf-game-card-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-bright);
  margin: 0 0 0.4rem 0;
  line-height: 1.3;
  transition: color 0.15s ease;
}

.hf-game-card:hover .hf-game-card-title {
  color: var(--accent);
}

.hf-game-card-dev {
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 0.75rem;
}

.hf-game-card-desc {
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.5;
  margin-bottom: 1rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hf-game-card-footer {
  margin-top: auto;
  padding-top: 0.85rem;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.75rem;
}

.hf-game-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.tag-badge {
  padding: 2px 6px;
  background: var(--bg-subtle);
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--muted);
  font-size: 0.7rem;
}

.hf-game-card-more {
  color: var(--accent);
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* How HF Games Works Compact Section */
.how-it-works-section {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 2.25rem;
  margin: 3.5rem 0 2.5rem;
  box-shadow: var(--card-shadow);
}

.how-steps-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.75rem;
  margin-top: 1.75rem;
}

.step-card {
  padding: 1.25rem;
  background: var(--bg-subtle);
  border: 1px solid var(--line);
  border-radius: 10px;
}

.step-num {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--accent);
  margin-bottom: 0.75rem;
  letter-spacing: 0.1em;
}

.step-card h3 {
  font-size: 1.05rem;
  margin: 0 0 0.5rem 0;
  color: var(--text-bright);
}

.step-card p {
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.55;
  margin: 0;
}

/* Games catalog: results beside a compact, storefront-style filter panel */
.catalog-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 240px;
  grid-template-areas:
    "featured featured"
    "catalog-ad catalog-ad"
    "main sidebar";
  align-items: start;
  gap: 1rem;
    width: 100%;
  margin: 0 0 2rem;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.catalog-main {
  grid-area: main;
  min-width: 0;
}

.catalog-featured-carousel {
  grid-area: featured;
  min-width: 0;
  margin-bottom: 0.25rem;
}

.catalog-featured-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.85rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--line);
}

.catalog-featured-heading .eyebrow {
  display: block;
  margin-bottom: 0.2rem;
}

.catalog-featured-heading h1 {
  margin: 0;
  color: var(--text-bright);
  font-size: clamp(1.35rem, 2vw, 1.75rem);
  font-weight: 800;
}

.catalog-featured-description {
  margin: 0.2rem 0 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.catalog-carousel-controls {
  display: flex;
  gap: 0.5rem;
}

.catalog-carousel-button {
  display: inline-grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: var(--panel);
  color: var(--text-bright);
  cursor: pointer;
  transition: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease, opacity 0.15s ease;
}

.catalog-carousel-button:not(:disabled):hover {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.catalog-carousel-button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.catalog-carousel-button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.catalog-featured-track {
  display: grid;
  grid-auto-columns: calc((100% - 3rem) / 4);
  grid-auto-flow: column;
  gap: 1rem;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  padding: 0.15rem 0 0.75rem;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.catalog-featured-track::-webkit-scrollbar {
  display: none;
}

.catalog-featured-card {
  min-width: 0;
  scroll-snap-align: start;
}

@media (prefers-reduced-motion: reduce) {
  .catalog-featured-track {
    scroll-behavior: auto;
  }
}

.catalog-results-count {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin-left: auto;
  text-align: right;
}

.catalog-results-count strong {
  color: var(--text-bright);
  font-size: 0.95rem;
}

.catalog-mobile-filter-button,
.catalog-filter-backdrop,
.catalog-filter-close,
.catalog-mobile-filter-actions {
  display: none;
}

.catalog-toolbar {
  position: sticky;
  isolation: isolate;
  top: 100px;
  z-index: 45;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 48px;
  margin-bottom: 1rem;
  padding: 0.4rem 0 0.75rem;
  border-bottom: 1px solid var(--line);
  background: var(--nav-bg);
}

.catalog-toolbar > .catalog-sort-group {
  flex: 0 0 auto;
  margin: 0;
}

.catalog-toolbar > .catalog-results-count {
  margin-left: auto;
}

@media (min-width: 769px) {
  .catalog-toolbar::before {
    content: "";
    position: absolute;
    top: -32px;
    right: 0;
    left: 0;
    height: 32px;
    background: var(--nav-bg);
  }
}

.catalog-toolbar .catalog-sort-label {
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 500;
  text-transform: none;
}

.catalog-toolbar .catalog-filter-select.compact {
  height: 36px;
  border-color: transparent;
  background: transparent;
  color: var(--text-bright);
  font-size: 0.9rem;
  font-weight: 600;
}

.catalog-toolbar .hf-select-host.compact .hf-select-button {
  justify-content: space-between;
}

.catalog-toolbar .hf-select-host.compact .hf-select-value {
  flex: 1;
  justify-content: flex-start;
  text-align: left;
}

.catalog-toolbar .catalog-select-arrow {
  right: 8px;
}

.catalog-toolbar .catalog-results-count {
  padding: 0;
}

.catalog-sidebar-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.4rem 1rem;
}

.catalog-layout .games-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.25rem 1rem;
  margin-top: 0;
}

.catalog-layout .hf-game-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  box-shadow: var(--card-shadow);
}

.catalog-layout .hf-game-card:hover {
  border-color: var(--line-strong);
  transform: translateY(-4px);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
}

.catalog-layout .hf-game-card-thumb-wrap {
  aspect-ratio: 16 / 9;
}

.catalog-layout .hf-game-card-body {
  padding: 1rem;
}

.catalog-layout .hf-game-card-title {
  margin-bottom: 0.4rem;
  font-size: 1rem;
}

.catalog-layout .hf-game-card-dev {
  margin-bottom: 0.75rem;
}

.catalog-layout .hf-game-card-desc {
  margin-bottom: 1rem;
  font-size: 0.82rem;
}

.catalog-layout .hf-game-card-footer {
  padding-top: 0.75rem;
}

.catalog-load-more {
  display: grid;
  justify-items: center;
  gap: 0.65rem;
  padding: 1.5rem 0 0.5rem;
}

.catalog-load-more > .btn {
  min-width: 160px;
}

.catalog-load-more > [role="status"] {
  color: var(--muted);
  font-size: 0.78rem;
}

.catalog-sidebar {
  grid-area: sidebar;
  position: sticky;
  top: 100px;
  max-height: calc(100vh - 100px);
  overflow: visible;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: var(--nav-bg);
}

.catalog-sidebar-heading > h2 {
  margin: 0.75rem 0;
  color: var(--accent);
  font-size: 0.9rem;
  line-height: 1.2;
}

.catalog-keyword-filter {
  position: relative;
  margin: 0 1rem 0.75rem;
}

.catalog-search-suggestions:not([hidden]) {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  left: 0;
  z-index: 20;
  display: grid;
  max-height: 280px;
  overflow-y: auto;
  padding: 4px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--panel-solid);
  box-shadow: var(--card-shadow);
}

.catalog-search-suggestion {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  min-width: 0;
  padding: 0.65rem 0.75rem;
  border-radius: 5px;
  color: var(--text-bright);
  font-size: 0.82rem;
  text-decoration: none;
}

.catalog-search-suggestion:hover,
.catalog-search-suggestion:focus-visible {
  outline: none;
  background: var(--panel2);
}

.catalog-search-suggestion-year {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 0.72rem;
}

.catalog-keyword-filter > i {
  position: absolute;
  top: 50%;
  left: 0.75rem;
  transform: translateY(-50%);
  color: var(--muted);
  font-size: 0.8rem;
  pointer-events: none;
}

.catalog-keyword-filter input {
  width: 100%;
  height: 40px;
  padding: 0 0.75rem 0 2.35rem;
  border: 1px solid transparent;
  border-radius: 6px;
  outline: none;
  background: var(--bg-subtle);
  color: var(--text-bright);
  font: inherit;
  font-size: 0.85rem;
}

.catalog-keyword-filter input::placeholder {
  color: var(--muted);
}

.catalog-keyword-filter input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-glow);
}

.catalog-archive-filter {
  display: grid;
  gap: 0.55rem;
  padding: 1rem;
  border-top: 1px solid var(--line-strong);
}

.catalog-archive-filter > label {
  color: var(--accent);
  font-size: 0.9rem;
  font-weight: 600;
}

.catalog-archive-filter .hf-select-button {
  justify-content: space-between;
  text-align: left;
}

.catalog-recent-archive {
  display: grid;
  gap: 0.6rem;
  margin-top: 0.5rem;
}

.catalog-recent-archive > h3 {
  margin: 0;
  color: var(--accent);
  font-size: 0.88rem;
  font-weight: 700;
}

.catalog-recent-archive-list {
  display: grid;
}

.catalog-recent-archive-list:not(.is-fit-measured) .catalog-recent-archive-item:nth-child(n + 4) {
  display: none;
}

.catalog-recent-archive-list.is-fit-measured .catalog-recent-archive-item {
  display: grid;
}

.catalog-recent-archive-item {
  display: grid;
  gap: 0.15rem;
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--line);
  color: var(--text);
  text-decoration: none;
}

.catalog-recent-archive-item:first-child {
  padding-top: 0.25rem;
}

.catalog-recent-archive-item:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.catalog-recent-archive-title {
  color: var(--text-bright);
  font-size: 0.84rem;
  font-weight: 700;
  line-height: 1.4;
}

.catalog-recent-archive-developer,
.catalog-recent-archive-date {
  color: var(--muted);
  font-size: 0.73rem;
  line-height: 1.35;
}

.catalog-recent-archive-item:hover .catalog-recent-archive-title {
  color: var(--accent);
}

.catalog-filter-section {
  border-top: 1px solid var(--line-strong);
}

.catalog-filter-section > summary {
  display: flex;
  min-height: 56px;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  color: var(--text-bright);
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
  list-style: none;
}

.catalog-filter-section > summary::-webkit-details-marker {
  display: none;
}

.catalog-filter-selected-count {
  display: inline-flex;
  width: 20px;
  height: 20px;
  align-items: center;
  justify-content: center;
  margin-left: auto;
  border-radius: 50%;
  background: var(--panel2);
  color: var(--text-bright);
  font-size: 0.72rem;
  font-weight: 700;
}

.catalog-filter-section > summary > i {
  color: var(--muted);
  font-size: 0.72rem;
  transition: transform 0.18s ease;
}

.catalog-filter-section[open] > summary > i {
  transform: rotate(180deg);
}

.catalog-filter-section > summary:hover {
  background: var(--panel2);
}

.catalog-filter-section-content {
  display: grid;
  gap: 0.6rem;
  padding: 0 1rem 1rem;
}

.catalog-filter-check-list {
  max-height: 320px;
  overflow-y: auto;
  gap: 0;
  padding: 0 0.75rem 0.75rem;
  overscroll-behavior: contain;
}

.catalog-sidebar-checkbox {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text);
  cursor: pointer;
  font-size: 0.84rem;
}

.catalog-filter-check-list .catalog-sidebar-checkbox {
  min-height: 36px;
  padding: 0.25rem 0.35rem;
  color: var(--muted);
}

.catalog-filter-check-list .catalog-sidebar-checkbox:hover {
  color: var(--text-bright);
}

.catalog-filter-check-list .catalog-sidebar-checkbox input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.catalog-filter-check-list .catalog-sidebar-checkbox span {
  position: relative;
  min-height: 20px;
  padding-left: 1.85rem;
}

.catalog-filter-check-list .catalog-sidebar-checkbox span::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  width: 18px;
  height: 18px;
  border: 1px solid var(--muted);
  border-radius: 5px;
  background: var(--bg-subtle);
  transform: translateY(-50%);
  transition: background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.catalog-filter-check-list .catalog-sidebar-checkbox span::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 6px;
  width: 5px;
  height: 9px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  opacity: 0;
  transform: translateY(-65%) rotate(45deg);
  transition: opacity 0.15s ease;
}

.catalog-filter-check-list .catalog-sidebar-checkbox input:checked + span::before {
  border-color: var(--blue);
  background: var(--blue);
}

.catalog-filter-check-list .catalog-sidebar-checkbox input:checked + span::after {
  opacity: 1;
}

.catalog-filter-check-list .catalog-sidebar-checkbox input:focus-visible + span::before {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px var(--blue-glow);
}

.catalog-filter-check-list .catalog-sidebar-checkbox input:disabled + span {
  opacity: 0.55;
  cursor: not-allowed;
}

.catalog-sidebar-checkbox input {
  width: 17px;
  height: 17px;
  accent-color: var(--green);
}

.catalog-sidebar-checkbox span {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.catalog-sidebar-checkbox i {
  color: var(--green);
}

.catalog-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin: 2rem 0;
}

.catalog-pagination > span {
  padding: 0 0.35rem;
  color: var(--muted);
  font-size: 0.88rem;
}

.catalog-pagination strong {
  color: var(--text-bright);
}

.catalog-empty-state {
  margin: 2rem auto;
}

/* Homepage featured-game carousel */
.hf-hero-carousel {
  margin-bottom: 2.75rem;
}

.hf-hero-carousel .hf-hero {
  align-items: stretch;
  margin-bottom: 0;
}

.hf-hero-slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.hf-hero-slide.is-active {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}

.hf-hero-link {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  align-items: stretch;
  color: inherit;
  text-decoration: none;
}

.hf-hero-link:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: -5px;
}

.hf-hero-content {
  width: 100%;
  max-width: none;
}

.hf-hero-content.has-screenshots {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 30%);
  align-items: center;
  gap: 2rem;
}

.hf-hero-copy {
  min-width: 0;
}

.hf-hero-screenshots {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.hf-hero-screenshots img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  box-shadow: 0 5px 18px rgba(0, 0, 0, 0.35);
}

.hf-hero-nav {
  position: absolute;
  z-index: 6;
  top: 0;
  display: grid;
  width: 72px;
  height: 100%;
  place-items: center;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #fff;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.hf-hero-nav::before {
  position: absolute;
  z-index: 0;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  background: rgba(17, 19, 21, 0.65);
  content: "";
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.hf-hero-nav i {
  position: relative;
  z-index: 1;
}

.hf-hero-nav:hover,
.hf-hero-nav:focus-visible,
.hf-hero-nav:focus-within {
  opacity: 1;
}

.hf-hero-nav.is-dismissed {
  opacity: 0;
}

.hf-hero-nav:hover::before,
.hf-hero-nav:focus-visible::before,
.hf-hero-nav:focus-within::before {
  border-color: var(--accent);
  background: var(--accent);
}

.hf-hero-nav-prev {
  left: 0;
}

.hf-hero-nav-next {
  right: 0;
}

.hf-hero-indicators {
  display: flex;
  justify-content: center;
  gap: 5px;
  padding: 12px 8px 0;
}

.hf-hero-indicator {
  width: 14px;
  height: 8px;
  flex: 0 1 14px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: #414a52;
  cursor: pointer;
  transition: flex-basis 0.2s ease, background-color 0.2s ease;
}

.hf-hero-indicator.is-active {
  flex-basis: 16px;
  background: #fff;
}

.hf-hero-nav:focus-visible,
.hf-hero-indicator:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

@media (min-width: 769px) {
  .hf-hero-carousel .hf-hero-content {
    padding-right: 4.5rem;
    padding-left: 4.5rem;
  }
}

@media (max-width: 768px) {
  .hf-hero-carousel .hf-hero {
    min-height: 500px;
  }

  .hf-hero-carousel .hf-hero-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-end;
    padding: 3.75rem 1rem 1.25rem;
  }

  .hf-hero-content.has-screenshots {
    gap: 0;
  }

  .hf-hero-screenshots {
    display: none;
  }

  .hf-hero-desc {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 4;
    line-clamp: 4;
    overflow: hidden;
    margin-bottom: 1rem;
    font-size: 0.92rem;
    line-height: 1.5;
  }

  .hf-hero-nav {
    display: none;
  }

  .hf-hero-actions {
    gap: 8px;
  }

  .hf-hero-actions .btn {
    min-height: 40px;
  }
}

@media (max-width: 480px) {
  .hf-hero-carousel .hf-hero {
    min-height: 500px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hf-hero-slide,
  .hf-hero-nav,
  .hf-hero-indicator {
    transition: none;
  }
}
