.hero-section {
  position: relative;
  min-height: 292px;
  overflow: hidden;
  margin: 14px 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: var(--card);
  box-shadow: var(--shadow);
  isolation: isolate;
}

.hero-bg,
.hero-bg img,
.hero-scrim {
  position: absolute;
  inset: 0;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.72) saturate(1.08);
  transform: scale(1.02);
  animation: heroImageIn 680ms ease both;
}

.hero-scrim {
  z-index: 1;
  background:
    linear-gradient(90deg, rgba(5, 10, 18, 0.96) 0%, rgba(5, 10, 18, 0.72) 42%, rgba(5, 10, 18, 0.18) 100%),
    linear-gradient(0deg, rgba(5, 10, 18, 0.54), transparent 42%);
}

.hero-content {
  position: relative;
  z-index: 2;
  display: grid;
  align-items: center;
  min-height: 292px;
  padding: 34px 40px;
}

.hero-copy {
  max-width: 620px;
  animation: heroCopyIn 520ms ease both;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  margin: 0 0 10px;
  padding: 0 10px;
  border: 1px solid rgba(181, 255, 61, 0.22);
  border-radius: 999px;
  background: rgba(181, 255, 61, 0.13);
  color: var(--accent);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-title {
  max-width: 680px;
  margin: 0;
  color: #fff;
  font-size: clamp(38px, 4.8vw, 62px);
  font-weight: 900;
  line-height: 0.96;
  letter-spacing: -0.05em;
}

.hero-tagline {
  max-width: 420px;
  margin: 14px 0 0;
  color: #c3d1dd;
  font-size: 14px;
}

.hero-meta,
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.hero-meta {
  margin-top: 18px;
}

.hero-stat {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 0 11px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.32);
  color: #eef6fb;
  font-size: 12px;
  font-weight: 800;
}

.hero-stat svg,
.play-now-btn svg,
.browse-all-btn svg {
  width: 14px;
  height: 14px;
}

.hero-actions {
  margin-top: 18px;
}

.hero-carousel {
  position: absolute;
  right: 18px;
  bottom: 18px;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 8px;
}

.hero-dot {
  width: 24px;
  height: 3px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.36);
}

.hero-dot.active {
  background: var(--accent);
}

.hero-control {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(2, 8, 15, 0.44);
  color: #fff;
  font-weight: 900;
}

.hero-control[data-hero-action="pause"] {
  display: none;
}

.play-now-btn,
.browse-all-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 900;
  text-decoration: none;
}

.play-now-btn {
  background: var(--accent);
  color: #07100b;
  box-shadow: 0 16px 30px rgba(181, 255, 61, 0.2);
}

.browse-all-btn {
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

.category-strip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 0 0 11px;
  scrollbar-width: none;
}

.category-strip::-webkit-scrollbar {
  display: none;
}

.category-strip button {
  min-height: 34px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel-soft);
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.category-strip button.active,
.category-strip button:hover {
  border-color: rgba(181, 255, 61, 0.4);
  background: rgba(181, 255, 61, 0.12);
  color: var(--accent);
}

.game-row {
  margin: 0 0 16px;
}

.market-lower {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 282px;
  gap: 14px;
  align-items: start;
}

.market-feed {
  min-width: 0;
}

.row-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.row-header h3 {
  margin: 0;
  color: var(--text);
  font-size: 18px;
  font-weight: 900;
}

.row-header p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.row-header button,
.row-sort {
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel-soft);
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.compact-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.game-tile {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--card);
  box-shadow: var(--shadow-soft);
}

.tile-link {
  display: grid;
  color: inherit;
  text-decoration: none;
}

.tile-art {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background:
    linear-gradient(135deg, hsl(var(--hue) 55% 24%), hsl(calc(var(--hue) + 48) 52% 34%)),
    var(--card-2);
}

.tile-art::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 44%, rgba(0, 0, 0, 0.44));
}

.tile-art img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.tile-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 7px;
  border-radius: 7px;
  background: var(--accent);
  color: #07100b;
  font-size: 9px;
  font-weight: 900;
  text-transform: uppercase;
}

.favorite-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.32);
  color: #fff;
}

.favorite-btn.active {
  background: rgba(255, 105, 135, 0.2);
  color: #ff7892;
}

.favorite-btn svg {
  width: 15px;
  height: 15px;
}

.tile-body {
  display: grid;
  gap: 7px;
  padding: 11px;
}

.tile-title,
.tile-tagline {
  margin: 0;
}

.tile-title {
  color: var(--text);
  font-size: 14px;
  font-weight: 900;
  line-height: 1.15;
}

.tile-tagline {
  min-height: 32px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.tile-tags,
.tile-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
}

.tile-tag {
  padding: 3px 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--soft);
  font-size: 9px;
  font-weight: 800;
}

.tile-meta {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}

.tile-meta span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.tile-meta svg {
  width: 12px;
  height: 12px;
}

.tile-play {
  margin-left: auto;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--accent);
  color: #07100b;
}

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

.collection-card {
  position: relative;
  min-height: 104px;
  overflow: hidden;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(135deg, hsla(var(--hue) 70% 45% / 0.38), transparent 60%),
    var(--card);
  box-shadow: var(--shadow-soft);
}

.collection-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(5, 10, 18, 0.1), rgba(5, 10, 18, 0.62));
}

.collection-bg {
  position: absolute;
  inset: -12px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  opacity: 0.78;
  mix-blend-mode: screen;
  filter: blur(3px) saturate(1.25);
  transform: scale(1.04);
}

.collection-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 24px;
  filter: saturate(1.12) brightness(0.74);
}

.collection-img.layer-1 {
  transform: scale(1.08);
}

.collection-img.layer-2 {
  transform: scale(1.16);
}

.collection-tag {
  display: inline-flex;
  margin-bottom: 18px;
  color: var(--accent);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.collection-card strong,
.collection-card p {
  position: relative;
  z-index: 1;
  display: block;
  margin: 0;
}

.collection-tag,
.collection-card button {
  position: relative;
  z-index: 1;
}

.collection-card p {
  color: var(--muted);
  font-size: 11px;
}

.collection-card button {
  float: right;
  min-height: 26px;
  margin-top: 8px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  font-size: 10px;
  font-weight: 800;
}

.market-rail {
  display: grid;
  grid-template-columns: 1fr;
  align-items: start;
  gap: 12px;
  margin: 0 0 16px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.rail-card {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.015)),
    var(--card-2);
  box-shadow: var(--shadow-soft);
}

.rail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.rail-head h3 {
  margin: 0;
  font-size: 13px;
}

.rail-head button {
  border: 0;
  background: transparent;
  color: var(--accent-blue);
  font-size: 10px;
  font-weight: 800;
}

.rail-list,
.friend-list {
  display: grid;
  gap: 9px;
}

.rail-game,
.trending-row,
.friend-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.rail-game img,
.trending-row img {
  width: 42px;
  height: 32px;
  border-radius: 8px;
  object-fit: cover;
}

.rail-copy,
.trending-row,
.friend-row {
  min-width: 0;
}

.rail-copy strong,
.trending-row strong,
.friend-row strong {
  display: block;
  overflow: hidden;
  color: var(--text);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rail-game a {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: rgba(181, 255, 61, 0.12);
  color: var(--accent);
}

.progress {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 7px;
  align-items: center;
  margin-top: 6px;
  color: var(--soft);
  font-size: 9px;
}

.progress::before {
  content: "";
  grid-column: 1;
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.progress i {
  grid-column: 1;
  grid-row: 1;
  height: 4px;
  border-radius: 999px;
  background: var(--accent);
}

.progress.p-24 i { width: 24%; }
.progress.p-30 i { width: 30%; }
.progress.p-45 i { width: 45%; }
.progress.p-77 i { width: 77%; }

.progress small {
  grid-column: 2;
  grid-row: 1;
}

.rank,
.friend-avatar {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.07);
  color: var(--accent);
  font-size: 10px;
  font-weight: 900;
}

.trending-row {
  grid-template-columns: 24px 32px minmax(0, 1fr) auto;
}

.trending-row img {
  width: 32px;
  height: 32px;
}

.trending-row small,
.friend-row small {
  color: var(--soft);
  font-size: 9px;
}

.friend-row {
  grid-template-columns: 28px minmax(0, 1fr) auto auto;
}

.friend-avatar {
  width: 28px;
  height: 28px;
  background: linear-gradient(135deg, hsl(var(--hue) 70% 44%), hsl(calc(var(--hue) + 44) 72% 34%));
  color: #fff;
}

.overview-status {
  min-height: 20px;
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.overview-status.err {
  color: var(--danger);
}

.overview-empty,
.skeleton-tile {
  min-height: 220px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--panel-soft);
}

.overview-empty {
  display: grid;
  place-items: center;
  gap: 8px;
  padding: 24px;
  color: var(--muted);
  text-align: center;
}

.overview-empty strong {
  color: var(--text);
  font-size: 16px;
}

@media (prefers-color-scheme: light) {
  .hero-section {
    border-color: rgba(39, 73, 92, 0.1);
    background: #fff;
    box-shadow: 0 22px 54px rgba(39, 73, 92, 0.12);
  }

  .hero-bg img {
    filter: brightness(1.08) saturate(0.92);
  }

  .hero-scrim {
    background:
      linear-gradient(90deg, rgba(255, 255, 255, 0.94) 0%, rgba(255, 255, 255, 0.72) 42%, rgba(255, 255, 255, 0.08) 100%),
      linear-gradient(0deg, rgba(255, 255, 255, 0.24), transparent 42%);
  }

  .hero-title {
    color: #111c27;
  }

  .hero-tagline {
    color: #405565;
  }

  .hero-stat {
    border-color: rgba(39, 73, 92, 0.1);
    background: rgba(255, 255, 255, 0.72);
    color: #111c27;
  }

  .browse-all-btn {
    border-color: rgba(39, 73, 92, 0.12);
    background: rgba(255, 255, 255, 0.76);
    color: #111c27;
  }

  .hero-carousel button {
    border-color: rgba(39, 73, 92, 0.12);
    background: rgba(255, 255, 255, 0.7);
    color: #111c27;
  }

  .hero-dot {
    background: rgba(39, 73, 92, 0.2);
  }

  .tile-tag {
    background: rgba(39, 73, 92, 0.05);
  }

  .rail-card {
    background: #ffffff;
    box-shadow: 0 14px 34px rgba(39, 73, 92, 0.08);
  }

  .progress::before {
    background: rgba(39, 73, 92, 0.1);
  }

  .collection-card::after {
    background:
      linear-gradient(90deg, rgba(255, 255, 255, 0.94), rgba(255, 255, 255, 0.72) 54%, rgba(255, 255, 255, 0.38)),
      linear-gradient(180deg, rgba(255, 255, 255, 0.34), rgba(255, 255, 255, 0.78));
  }

  .collection-bg {
    opacity: 0.58;
    mix-blend-mode: normal;
    filter: blur(4px) saturate(1.28) brightness(1.28);
  }

  .collection-img {
    filter: saturate(1.18) brightness(1.22);
  }

  .collection-tag {
    color: #267a2a;
  }

  .collection-card strong {
    color: #111c27;
  }

  .collection-card p {
    color: #405565;
  }

  .collection-card button {
    background: rgba(255, 255, 255, 0.82);
    color: #111c27;
    box-shadow: 0 8px 18px rgba(39, 73, 92, 0.1);
  }
}

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

@media (max-width: 860px) {
  .hero-content {
    min-height: 260px;
    padding: 28px;
  }

  .compact-grid,
  .collection-grid,
  .game-grid {
    grid-template-columns: 1fr;
  }

  .market-rail {
    height: auto;
    grid-template-columns: 1fr;
  }

  .market-lower {
    grid-template-columns: 1fr;
  }
}
