:root {
  --bg: #f5f6f8;
  --surface: #ffffff;
  --surface-soft: #f1f2f4;
  --text: #161719;
  --muted: #8d9199;
  --line: #e8eaee;
  --green: #58b947;
  --green-dark: #358d2e;
  --orange: #f4a146;
  --shadow: 0 16px 42px rgba(0, 0, 0, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Microsoft YaHei", "PingFang SC", Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.45;
}

body.detail-open {
  overflow: hidden;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

/* ─── Shell & Header ─── */

.app-shell {
  width: 100%;
  max-width: 480px;
  min-height: 100vh;
  margin: 0 auto;
  padding-bottom: 92px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 78px;
  padding: 22px 16px 12px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(14px);
}

.header-tabs {
  display: flex;
  align-items: flex-end;
  gap: 24px;
}

.header-tab {
  padding: 0;
  border: 0;
  background: transparent;
  color: #5f6268;
  font-size: 22px;
  font-weight: 500;
  letter-spacing: 0;
}

.header-tab.is-active {
  color: var(--text);
  font-size: 28px;
  font-weight: 900;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.icon-button {
  position: relative;
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 0;
  background: transparent;
  color: var(--text);
  font-size: 30px;
}

/* ─── Search Icon (shared) ─── */

.icon-search {
  position: relative;
  display: block;
  width: 22px;
  height: 22px;
  border: 3px solid currentColor;
  border-radius: 50%;
}

.icon-search::after {
  position: absolute;
  top: 14px;
  left: 14px;
  width: 10px;
  height: 3px;
  border-radius: 99px;
  background: currentColor;
  content: "";
  transform: rotate(45deg);
}

/* ─── Back Icon ─── */

.icon-back {
  display: block;
  width: 18px;
  height: 18px;
  border-left: 3px solid currentColor;
  border-bottom: 3px solid currentColor;
  transform: rotate(45deg);
}

/* ─── Feed ─── */

.feed {
  padding: 0 16px 24px;
}

/* ─── Hero Carousel ─── */

.hero-section {
  margin: 0 -16px;
}

.hero-carousel {
  position: relative;
  min-height: 94px;
  overflow: hidden;
}

.hero-card {
  position: relative;
  display: none;
  width: 100%;
  min-height: 94px;
  padding: 0;
  overflow: hidden;
  border: 0;
  background: #d9eef7;
  text-align: left;
}

.hero-card.is-active {
  display: block;
}

.hero-card img {
  width: 100%;
  height: 120px;
  object-fit: cover;
}

.hero-card::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.66), rgba(255, 255, 255, 0.04));
  content: "";
}

.hero-card strong,
.hero-card small,
.hero-badge {
  position: absolute;
  z-index: 1;
  left: 94px;
}

.hero-card strong {
  top: 28px;
  max-width: 210px;
  overflow: hidden;
  color: #b58c2d;
  font-size: 21px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.8);
}

.hero-card small {
  top: 74px;
  max-width: 230px;
  overflow: hidden;
  color: #24313a;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hero-badge {
  top: 58px;
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  padding: 0 12px;
  border-radius: 5px;
  background: #000;
  color: #fff;
  font-size: 13px;
  font-weight: 800;
}

.hero-dots {
  display: flex;
  justify-content: center;
  gap: 5px;
  height: 34px;
  padding-top: 13px;
}

.hero-dot {
  width: 14px;
  height: 4px;
  border: 0;
  border-radius: 99px;
  background: #d9d9d9;
}

.hero-dot.is-active {
  width: 18px;
  background: #8b8b8b;
}

/* ─── Quick Grid ─── */

.quick-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 6px;
}

.quick-card {
  position: relative;
  min-height: 58px;
  padding: 12px 8px;
  overflow: hidden;
  border: 0;
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--text);
  text-align: left;
}

.quick-card span {
  display: block;
  overflow: hidden;
  font-size: 16px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quick-card small {
  display: block;
  margin-top: 4px;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quick-icon {
  position: absolute;
  right: 10px;
  bottom: 10px;
  width: 27px;
  height: 27px;
  opacity: 0.72;
}

.quick-icon.case {
  border: 3px solid #4d4f55;
  border-radius: 5px;
}

.quick-icon.gift {
  border: 3px solid #4d4f55;
  border-radius: 6px;
}

/* ─── Content Sections ─── */

.content-section {
  margin-top: 28px;
}

.section-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.section-title-row h1,
.section-title-row h2 {
  margin: 0;
  color: var(--text);
  font-size: 25px;
  font-weight: 900;
  letter-spacing: 0;
}

.more-button {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #26282d;
  font-size: 17px;
}

.more-button::after {
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-left: 7px;
  border-top: 2px solid currentColor;
  border-right: 2px solid currentColor;
  content: "";
  transform: rotate(45deg);
}

/* ─── Game Cards Grid ─── */

.recommend-grid,
.promo-grid,
.upcoming-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 26px 16px;
}

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

.game-cover,
.upcoming-cover {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 8px;
  background: #e7e9ec;
}

.game-cover img,
.upcoming-cover img {
  width: 100%;
  aspect-ratio: 16 / 7.4;
  object-fit: cover;
}

.coupon-tag {
  position: absolute;
  left: 0;
  bottom: 0;
  display: inline-flex;
  min-height: 25px;
  align-items: center;
  padding: 0 8px;
  border-radius: 0 5px 0 0;
  background: var(--orange);
  color: #fff;
  font-size: 13px;
  font-weight: 900;
}

.game-title,
.upcoming-title {
  display: block;
  width: 100%;
  margin-top: 9px;
  padding: 0;
  overflow: hidden;
  border: 0;
  background: transparent;
  color: var(--text);
  font-size: 20px;
  font-weight: 900;
  line-height: 1.25;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ─── Price Line ─── */

.price-line {
  display: flex;
  align-items: center;
  gap: 4px;
  min-height: 26px;
  margin-top: 5px;
  overflow: hidden;
  white-space: nowrap;
}

.price {
  color: #111;
  font-size: 18px;
  font-weight: 900;
}

.price.discount {
  color: var(--green);
}

.price.free {
  color: var(--green);
}

.price.muted {
  color: var(--muted);
  font-size: 14px;
}

.price-label {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 6px;
  border-radius: 3px;
  background: var(--green);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}

.price-line del {
  color: #a8abb1;
  font-size: 14px;
}

.price-line b {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  padding: 0 5px;
  border-radius: 2px;
  background: #33353a;
  color: #fff;
  font-size: 13px;
}

.game-meta,
.upcoming-card small {
  margin: 6px 0 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ─── Promo Feature ─── */

.promo-feature {
  margin-bottom: 26px;
}

.promo-hero {
  position: relative;
  display: block;
  width: 100%;
  min-height: 220px;
  padding: 0;
  overflow: hidden;
  border: 4px solid var(--green);
  border-radius: 8px;
  background: #111;
  color: #fff;
  text-align: left;
}

.promo-hero > img {
  width: 100%;
  height: 220px;
  object-fit: cover;
}

.promo-hero::after {
  position: absolute;
  inset: auto 0 0;
  height: 112px;
  background: linear-gradient(0deg, rgba(61, 157, 52, 0.98), rgba(61, 157, 52, 0));
  content: "";
}

.history-tag {
  position: absolute;
  z-index: 1;
  top: 0;
  left: 0;
  padding: 8px 12px;
  border-radius: 0 0 8px 0;
  background: var(--green);
  color: #fff;
  font-size: 18px;
  font-weight: 900;
}

.promo-info {
  position: absolute;
  z-index: 2;
  right: 16px;
  bottom: 14px;
  left: 16px;
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 12px;
  align-items: end;
}

.promo-info img {
  width: 54px;
  height: 54px;
  border-radius: 6px;
  object-fit: cover;
}

.promo-info strong {
  display: block;
  overflow: hidden;
  font-size: 22px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.promo-info small {
  display: block;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.88);
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.promo-price {
  grid-column: 2 / 3;
  color: #fff;
}

.promo-price .price,
.promo-price del {
  color: #fff;
}

.promo-price b {
  background: rgba(255, 255, 255, 0.2);
}

/* ─── Upcoming Cards ─── */

.upcoming-card p {
  margin: 9px 0 0;
  color: #969aa2;
  font-size: 16px;
}

.upcoming-card p strong {
  color: var(--text);
  font-weight: 900;
}

/* ─── Bottom Nav ─── */

.bottom-nav {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 32;
  display: flex;
  justify-content: center;
  max-width: 480px;
  margin: 0 auto;
  padding: 8px 12px 12px;
  border-top: 1px solid var(--line);
  background: rgba(249, 250, 252, 0.96);
  backdrop-filter: blur(12px);
}

.bottom-item {
  display: grid;
  min-width: 112px;
  min-height: 52px;
  place-items: center;
  border: 0;
  background: transparent;
  color: #8c9097;
  font-size: 12px;
  font-weight: 700;
}

.bottom-item.is-active {
  color: #111;
}

.bottom-item strong {
  font-size: 13px;
}

.nav-symbol {
  display: block;
  width: 26px;
  height: 26px;
}

.nav-symbol.cross {
  position: relative;
}

.nav-symbol.cross::before,
.nav-symbol.cross::after {
  position: absolute;
  top: 11px;
  left: 0;
  width: 28px;
  height: 5px;
  border-radius: 99px;
  background: currentColor;
  content: "";
}

.nav-symbol.cross::before {
  transform: rotate(45deg);
}

.nav-symbol.cross::after {
  transform: rotate(-45deg);
}

/* ─── Search Panel ─── */

.search-panel {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 18px 12px;
  background: rgba(0, 0, 0, 0.36);
}

.search-panel.is-open {
  display: flex;
}

.search-card {
  width: 100%;
  max-width: 480px;
  max-height: calc(100vh - 36px);
  overflow: auto;
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.search-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px 4px;
}

.search-head strong {
  font-size: 22px;
}

.search-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 74px;
  gap: 8px;
  padding: 12px 16px;
}

.search-form input {
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: none;
}

.search-form button {
  border: 0;
  border-radius: 8px;
  background: var(--green);
  color: #fff;
  font-weight: 900;
}

.filter-row {
  display: grid;
  gap: 10px;
  padding: 0 16px 10px;
}

.filter-row label {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
}

.filter-row input[type="range"] {
  flex: 1;
}

.checkbox-label {
  justify-content: flex-start;
}

.search-status {
  min-height: 24px;
  margin: 0;
  padding: 0 16px 10px;
  color: var(--muted);
  font-size: 13px;
}

.search-results {
  display: grid;
  gap: 10px;
  padding: 0 16px 18px;
}

.search-result button {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 12px;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: left;
}

.search-result img {
  width: 112px;
  aspect-ratio: 16 / 7.5;
  border-radius: 8px;
  object-fit: cover;
}

.search-result strong,
.search-result small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.search-result strong {
  font-size: 16px;
}

.search-result small {
  margin-top: 6px;
  color: var(--muted);
}

/* ─── Detail View ─── */

.detail-view {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: none;
  justify-content: center;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.3);
}

.detail-view.is-open {
  display: flex;
}

.detail-scroll {
  width: 100%;
  max-width: 480px;
  height: 100vh;
  overflow-y: auto;
  background: var(--surface);
}

.detail-loading {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 24px;
  color: var(--muted);
  text-align: center;
}

.detail-loading strong {
  display: block;
  color: var(--text);
  font-size: 22px;
}

/* ─── Detail Top Header ─── */

.detail-top {
  position: relative;
  min-height: 92px;
  padding: 24px 16px 14px;
  overflow: hidden;
  background: #4f4f5b;
  color: #fff;
}

.detail-top::before {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(37, 39, 48, 0.82), rgba(37, 39, 48, 0.74)),
    var(--detail-bg) center / cover;
  filter: blur(2px);
  content: "";
  transform: scale(1.04);
}

.detail-nav {
  position: relative;
  z-index: 1;
}

.detail-nav.split-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.detail-nav.split-action button {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 0;
  background: rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  color: #fff;
}

/* ─── Detail Tabs ─── */

.detail-tabs {
  display: flex;
  padding: 8px 16px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.detail-tabs button {
  min-width: 82px;
  min-height: 38px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #22242a;
  font-size: 20px;
  font-weight: 800;
}

.detail-tabs button.is-active {
  background: #464753;
  color: #fff;
}

/* ─── Media Stage ─── */

.media-stage {
  position: relative;
  background: #f2f3f5;
}

.media-stage img,
.media-stage video {
  width: 100%;
  aspect-ratio: 16 / 8.1;
  object-fit: cover;
  background: #111;
}

.media-strip {
  display: grid;
  grid-auto-columns: 76px;
  grid-auto-flow: column;
  gap: 6px;
  padding: 8px 16px 0;
  overflow-x: auto;
}

.media-strip button {
  position: relative;
  padding: 0;
  overflow: hidden;
  border: 2px solid transparent;
  border-radius: 5px;
  background: #eef0f2;
}

.media-strip button.is-active {
  border-color: var(--green);
}

.media-strip img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.media-strip span {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.24);
}

.media-strip span::after {
  border-top: 7px solid transparent;
  border-bottom: 7px solid transparent;
  border-left: 11px solid #fff;
  content: "";
}

/* ─── Detail Price Card (Dual style) ─── */

.detail-price-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  margin: 12px 16px 18px;
  padding: 12px 14px;
  border-radius: 8px;
  color: #fff;
}

.detail-price-card.discount-green {
  background: var(--green);
}

.detail-price-card.discount-none {
  background: #1e2025;
}

.detail-price-card div span {
  font-size: 18px;
}

.detail-price-card div strong {
  margin-left: 4px;
  font-size: 31px;
  line-height: 1;
}

.detail-price-card p {
  margin: 0;
  font-size: 15px;
  font-weight: 900;
}

.detail-price-card a {
  padding: 10px 12px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.18);
  font-weight: 900;
  white-space: nowrap;
}

/* ─── Detail Main Info ─── */

.detail-main-info {
  display: block;
  padding: 0 16px;
}

.detail-main-info h1 {
  margin: 0;
  overflow-wrap: anywhere;
  font-size: 27px;
  line-height: 1.16;
}

.detail-main-info p {
  margin: 8px 0 0;
  display: block;
  overflow: visible;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.65;
}

/* ─── Detail Tags ─── */

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 18px 16px 8px;
}

.detail-tags span {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  padding: 0 10px;
  border-radius: 5px;
  background: #f5f7f8;
  color: #111;
  font-weight: 800;
}

/* ─── Stat Grid ─── */

.stat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 18px;
  border-top: 1px solid #f0f1f3;
  border-bottom: 1px solid #f0f1f3;
  background: #fbfbfc;
}

.stat-item {
  min-height: 74px;
  padding: 12px 6px;
  border-right: 1px solid #f0f1f3;
  border-bottom: 1px solid #f0f1f3;
  color: #8b8f97;
  text-align: center;
}

.stat-item strong {
  display: block;
  overflow: hidden;
  color: #60646c;
  font-size: 22px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stat-item span {
  display: block;
  margin-top: 6px;
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ─── Buy Bar ─── */

.buy-bar {
  position: sticky;
  bottom: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  align-items: center;
  margin-top: 24px;
  padding: 12px 16px 16px;
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
}

.single-buy {
  padding: 10px 16px 14px;
}

.buy-bar a {
  display: flex;
  min-height: 52px;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-radius: 8px;
  background: var(--green);
  color: #fff;
  font-size: 24px;
  font-weight: 900;
}

.buy-bar a span {
  font-size: 16px;
  font-weight: 700;
}

/* ─── Empty State ─── */

.empty-state-card {
  padding: 18px;
  border-radius: 8px;
  background: #f4f5f7;
  color: var(--muted);
}

/* ─── List View ─── */

.list-view {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: none;
  justify-content: center;
  background: rgba(0, 0, 0, 0.26);
}

.list-view.is-open {
  display: flex;
}

.list-scroll {
  width: 100%;
  max-width: 480px;
  height: 100vh;
  overflow-y: auto;
  background: var(--surface);
}

.list-header {
  position: sticky;
  top: 0;
  z-index: 2;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  min-height: 76px;
  padding: 18px 16px 10px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
}

.list-back {
  width: 38px;
  height: 38px;
  border: 0;
  background: transparent;
  color: var(--text);
  font-size: 46px;
  line-height: 0.75;
}

.list-header strong,
.list-header span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.list-header strong {
  font-size: 24px;
  font-weight: 900;
}

.list-header span {
  color: var(--muted);
  font-size: 13px;
}

.list-content {
  padding: 16px;
}

.list-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px 14px;
}

.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 0 16px 26px;
}

.pagination button {
  width: 38px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--text);
  font-weight: 800;
}

.pagination button.is-active {
  border-color: var(--green);
  background: var(--green);
  color: #fff;
}

.epic-list {
  display: grid;
  gap: 14px;
}

.epic-card {
  display: grid;
  grid-template-columns: 128px minmax(0, 1fr);
  gap: 12px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.epic-card img {
  width: 128px;
  aspect-ratio: 16 / 9;
  border-radius: 8px;
  object-fit: cover;
}

.epic-card strong {
  display: block;
  overflow-wrap: anywhere;
  font-size: 18px;
}

.epic-card p {
  display: -webkit-box;
  margin: 6px 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.epic-card span {
  display: block;
  color: var(--green);
  font-size: 13px;
  font-weight: 800;
}

.epic-card a {
  grid-column: 2 / 3;
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  justify-content: center;
  border-radius: 7px;
  background: #111;
  color: #fff;
  font-size: 13px;
  font-weight: 800;
}

/* ─── Skeleton Loading ─── */

.skeleton-card {
  min-height: 130px;
  border-radius: 8px;
  background: linear-gradient(90deg, #eff1f4, #f8f9fa, #eff1f4);
  background-size: 220% 100%;
  animation: shimmer 1.2s infinite;
}

@keyframes shimmer {
  to {
    background-position: -220% 0;
  }
}

/* ═══════════════════════════════════════════
   Responsive — Tablet / Medium Screens
   ═══════════════════════════════════════════ */

@media (min-width: 520px) {
  .app-shell,
  .detail-scroll,
  .list-scroll,
  .bottom-nav {
    max-width: 520px;
  }

  .hero-card img {
    height: 140px;
  }

  .game-cover img,
  .upcoming-cover img {
    aspect-ratio: 16 / 7;
  }
}

@media (min-width: 768px) {
  body {
    background: #e9ebef;
  }

  .app-shell {
    max-width: 720px;
    border-radius: 12px;
    margin-top: 16px;
    margin-bottom: 16px;
    min-height: calc(100vh - 32px);
  }

  .detail-scroll,
  .list-scroll {
    max-width: 720px;
  }

  .bottom-nav {
    max-width: 720px;
    border-radius: 0 0 12px 12px;
  }

  .recommend-grid,
  .promo-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px 18px;
  }

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

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

  .hero-card img {
    height: 160px;
  }

  .hero-card strong {
    font-size: 24px;
    max-width: 320px;
  }

  .hero-card small {
    max-width: 340px;
  }

  .search-card {
    max-width: 560px;
  }

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

  .stat-item {
    border-right: 1px solid #f0f1f3;
  }

  .stat-item:last-child {
    border-right: 0;
  }
}

@media (min-width: 1024px) {
  .app-shell {
    max-width: 860px;
  }

  .detail-scroll,
  .list-scroll {
    max-width: 860px;
  }

  .bottom-nav {
    max-width: 860px;
  }

  .recommend-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 22px 18px;
  }

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

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

  .hero-card img {
    height: 200px;
  }

  .hero-card strong {
    font-size: 28px;
    max-width: 400px;
  }

  .media-stage img,
  .media-stage video {
    aspect-ratio: 16 / 7;
  }
}

/* ═══════════════════════════════════════════
   Responsive — Mobile / Small Screens
   ═══════════════════════════════════════════ */

@media (max-width: 380px) {
  .feed {
    padding-right: 12px;
    padding-left: 12px;
  }

  .quick-grid {
    gap: 8px;
  }

  .quick-card {
    padding: 10px 6px;
  }

  .game-title,
  .upcoming-title {
    font-size: 17px;
  }

  .recommend-grid,
  .promo-grid {
    gap: 20px 12px;
  }

  .hero-card strong {
    left: 74px;
    font-size: 18px;
    max-width: 160px;
  }

  .hero-card small {
    left: 74px;
    max-width: 170px;
  }

  .hero-badge {
    left: 74px;
  }

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

  .detail-price-card {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .detail-price-card a {
    justify-self: center;
  }
}
