/* SGS games library polish: scoped to /games-library.html */

.hero {
  position: relative;
  overflow: hidden;
  padding-bottom: 26px;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 10px max(20px, calc(50% - 520px)) auto;
  height: 220px;
  border: 1px solid rgba(0, 168, 120, 0.16);
  background:
    linear-gradient(135deg, rgba(0, 168, 120, 0.16), transparent 38%),
    radial-gradient(circle at 74% 22%, rgba(255, 255, 255, 0.09), transparent 30%);
  opacity: 0.55;
  pointer-events: none;
}

.hero > * {
  position: relative;
  z-index: 1;
}

.game-hero-stats {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 24px auto 0;
}

.game-hero-stats span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 8px 14px;
  border: 1px solid rgba(0, 168, 120, 0.22);
  background: rgba(14, 14, 14, 0.72);
  color: var(--text-dim);
  font-size: 0.85rem;
}

.game-hero-stats strong {
  color: #fff;
  font-size: 1rem;
}

.quick-play-shell {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto 22px;
  padding: 20px;
  border: 1px solid rgba(0, 168, 120, 0.18);
  background: linear-gradient(180deg, rgba(21, 21, 21, 0.92), rgba(10, 10, 10, 0.92));
}

.quick-play-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.quick-play-kicker {
  color: var(--accent-light);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  margin-bottom: 3px;
}

.quick-play-head h2 {
  color: var(--text-white);
  font-family: var(--font-display);
  font-size: clamp(1.55rem, 3vw, 2.2rem);
  font-weight: 400;
  line-height: 1.05;
}

.quick-play-account {
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--text-white);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 1.6px;
  padding: 9px 13px;
  text-decoration: none;
  text-transform: uppercase;
  white-space: nowrap;
}

.quick-play-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.quick-play-card {
  position: relative;
  min-height: 174px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.11);
  background: #101010;
  color: var(--text-white);
  text-decoration: none;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.quick-play-card:hover {
  transform: translateY(-3px);
  border-color: rgba(0, 201, 142, 0.7);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.32);
}

.quick-play-art {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: saturate(1.08) contrast(1.04);
  transform: scale(1.02);
  transition: transform 0.25s ease;
}

.quick-play-card:hover .quick-play-art {
  transform: scale(1.08);
}

.quick-play-art::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 24%, rgba(0, 0, 0, 0.84) 100%);
}

.quick-play-copy {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
}

.quick-play-copy strong,
.quick-play-copy small {
  display: block;
}

.quick-play-copy strong {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 500;
  line-height: 1.1;
}

.quick-play-copy small {
  color: var(--text-dim);
  font-size: 0.78rem;
  margin-top: 3px;
}

.library-toolbar {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) auto;
  gap: 14px;
  align-items: end;
  margin: 0 0 24px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(14, 14, 14, 0.72);
}

.library-search span {
  display: block;
  color: var(--text-dim);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  margin-bottom: 7px;
}

.library-search input {
  width: 100%;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(0, 0, 0, 0.34);
  color: #fff;
  font-size: 0.95rem;
  outline: none;
  padding: 0 14px;
}

.library-search input:focus {
  border-color: rgba(0, 201, 142, 0.74);
  box-shadow: 0 0 0 3px rgba(0, 168, 120, 0.12);
}

.library-filter-pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px;
}

.library-filter {
  min-height: 36px;
  padding: 7px 11px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: transparent;
  color: var(--text-dim);
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.library-filter:hover,
.library-filter.active {
  border-color: rgba(0, 201, 142, 0.72);
  background: rgba(0, 168, 120, 0.12);
  color: #fff;
}

.showcase-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.showcase-card {
  grid-template-columns: 1fr;
  grid-template-rows: 174px auto;
  min-height: 100%;
}

.showcase-img {
  min-height: 174px;
}

.showcase-img::after {
  background: linear-gradient(180deg, transparent 45%, rgba(11, 11, 11, 0.82));
}

.showcase-content {
  padding: 18px;
  justify-content: start;
}

.showcase-title {
  font-size: 1.3rem;
}

.showcase-desc {
  display: -webkit-box;
  min-height: 4.8em;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.showcase-tag {
  font-size: 0.72rem;
}

.library-note {
  text-align: center;
  color: var(--text-dim);
  font-size: var(--text-sm);
  padding: 28px 0 0;
  letter-spacing: 1px;
}

.game-row {
  min-height: 62px;
}

.game-row[hidden],
.chapter-accordion[hidden],
.showcase-card[hidden] {
  display: none !important;
}

@media (max-width: 980px) {
  .quick-play-grid,
  .showcase-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .library-toolbar {
    grid-template-columns: 1fr;
  }

  .library-filter-pills {
    justify-content: flex-start;
  }
}

@media (max-width: 640px) {
  .hero {
    padding: 36px 18px 20px;
  }

  .quick-play-shell {
    width: calc(100% - 24px);
    padding: 14px;
  }

  .quick-play-head {
    align-items: start;
    flex-direction: column;
  }

  .quick-play-grid,
  .showcase-grid {
    grid-template-columns: 1fr;
  }

  .quick-play-card {
    min-height: 132px;
  }

  .showcase-card {
    grid-template-rows: 150px auto;
  }

  .showcase-img {
    min-height: 150px;
  }

  .library-toolbar {
    padding: 12px;
  }
}
