:root {
  color-scheme: dark;
  --bg: #0a1124;
  --ink: #f5f7ff;
  --muted: #a8b0c9;
  --cyan: #00bfff;
  --surface: #15203b;
  --play-gradient: linear-gradient(270deg, #00bfff 0%, #2d93ff 100%);
  --ui-font: "OPPO Sans 4.0", "OPPO Sans", system-ui, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0;
  color: var(--ink);
  background: #070e1c;
  font: 13px/1.45 var(--ui-font);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button, a { touch-action: manipulation; }
button { cursor: pointer; }
img { display: block; max-width: 100%; }
a:focus-visible, button:focus-visible, .carousel-track:focus-visible {
  outline: 2px solid #b49aff;
  outline-offset: 2px;
}
.page {
  max-width: 460px;
  margin: auto;
  min-height: 100vh;
  padding: 0 16px 24px;
  background: radial-gradient(ellipse 400px 250px at 0 0, #20326688, transparent 90%), var(--bg);
}
.brand-header { height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.brand { display: flex; align-items: center; gap: 7px; }
.brand img { width: 34px; height: auto; }
.brand strong { font-size: 24px; letter-spacing: -.7px; font-style: italic; font-weight: 800; }
.brand-header > span { font-size: 11px; color: #bcb3f9; }
.module { margin: 0 0 16px; }
.module h2 { color: rgba(255,255,255,.9); font-size: 16px; font-weight: 600; line-height: 22px; margin: 0 0 16px; }
.game-card, .feature-info, .grid-meta { min-width: 0; }
.game-card img[data-src] { opacity: 0; }
.media {
  position: relative;
  overflow: hidden;
  aspect-ratio: var(--slot, 1);
  border-radius: 12px;
  background: #141d32;
  isolation: isolate;
}
.media > img, .media > a, .media > a > img, .media > .poster-link, .poster-link > img {
  display: block;
  width: 100%;
  height: 100%;
}
.media img { object-fit: cover; object-position: center var(--focus-y, 50%); }
.media .poster-motion {
  position: absolute;
  inset: 0;
  object-fit: cover;
  pointer-events: none;
  opacity: 0;
  transition: opacity .18s ease;
}
.media .poster-motion.is-playing { opacity: 1; }
@media (prefers-reduced-motion: reduce) { .media .poster-motion { transition: none; } }
.hero .media { --slot: 328/178; }
.grid2 .media { --slot: 160/100; --focus-y: 24%; border-radius: 0; }
.portrait-grid .media { --slot: 158/198; --focus-y: 28%; border-radius: 16px; }
.feature .media { --slot: 192/137; border-radius: 12px; }
.rating {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 14px;
  font-weight: 800;
  line-height: 18px;
  color: var(--cyan);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 1px 3px #000e, 0 0 6px #00142c;
}
.rating .star { font-size: 1em; line-height: 1; }
.media-rating, .media-caption {
  position: absolute;
  inset: auto 0 0;
  display: flex;
  align-items: center;
  pointer-events: none;
  background: linear-gradient(transparent, #030b21df);
}
.media-rating { justify-content: center; padding: 16px 5px 4px; }
.media-caption { gap: 8px; padding: 20px 10px 7px; }
.hero-caption {
  gap: 10px;
  padding: 25px 14px 8px;
  background: linear-gradient(transparent, #030b21 110%);
}
.hero-caption .overlay-name {
  font-size: clamp(14px, 4vw, 17px);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -.016em;
  color: #fff;
}
.hero-caption .rating { font-size: 15px; font-weight: 750; letter-spacing: -.02em; }
.hero-caption .play {
  min-width: 56px;
  min-height: 30px;
  font-size: 14px;
  font-weight: 700;
  line-height: 20px;
}
.portrait-caption { padding: 18px 9px 8px; gap: 5px; }
.media-caption .play { pointer-events: auto; }
.media-caption .rating { flex-shrink: 0; }
.game-name, .overlay-name {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 500;
  line-height: 22px;
  color: rgba(255,255,255,.9);
}
.overlay-name { flex: 1; font-size: 14px; text-shadow: 0 1px 3px #000; }
.portrait-caption .overlay-name { font-size: 12px; }
.play {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  min-width: 55px;
  min-height: 30px;
  padding: 4px 12px;
  border: 0;
  border-radius: 16px;
  background: var(--play-gradient);
  color: #fff;
  font: 600 14px/22px var(--ui-font);
  white-space: nowrap;
}
.play::before { content: ""; position: absolute; inset: -6px -1px; }
.play:hover { filter: brightness(1.1); }
.play:active { filter: brightness(.92); }
button[data-action="poster"] { padding: 0; border: 0; background: none; }
.detail-open { overflow: hidden; }
.detail-sheet {
  position: fixed;
  inset: auto 0 0;
  width: min(100%, 460px);
  max-width: none;
  max-height: 100%;
  max-height: 100dvh;
  margin: 0 auto;
  padding: 0;
  border: 1px solid #29385c;
  border-bottom: 0;
  border-radius: 22px 22px 0 0;
  background: var(--bg);
  color: var(--ink);
  box-shadow: 0 -12px 48px #0006;
  overscroll-behavior: contain;
}
.detail-sheet[open] { animation: detail-enter .24s ease-out; }
.detail-sheet::backdrop { background: #030817b8; }
.detail-panel { padding: 16px 16px 0; }
.detail-header {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 44px;
  gap: 12px;
  align-items: center;
  margin-bottom: 14px;
}
.detail-icon { width: 48px; height: 48px; object-fit: cover; border-radius: 12px; }
.detail-header h2 { margin: 0; font-size: 17px; line-height: 1.25; overflow-wrap: anywhere; }
#detail-close {
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: var(--surface);
  color: var(--ink);
  font-size: 24px;
  line-height: 1;
}
.detail-media {
  position: relative;
  aspect-ratio: 16/9;
  overflow: hidden;
  border-radius: 14px;
  background: #070e1c;
}
.has-portrait-video .detail-media {
  aspect-ratio: auto;
  height: min(45vh, 360px);
  height: min(45dvh, 360px);
}
.detail-media img, .detail-media video {
  display: block;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.detail-media video { background: #070e1c; opacity: 0; }
.detail-media video.is-playing { opacity: 1; }
.detail-footer {
  position: sticky;
  bottom: 0;
  padding: 14px 0 calc(14px + env(safe-area-inset-bottom, 0px));
  background: var(--bg);
}
.detail-footer .play { width: 100%; min-height: 44px; }
.detail-store { display: block; padding-top: 8px; text-align: center; color: #b2c9ec; font-size: 12px; }
@keyframes detail-enter { from { transform: translateY(100%); } }
@media (prefers-reduced-motion: reduce) { .detail-sheet[open] { animation: none; } }
.game-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 4px 0 2px;
}
.grid2, .grid3, .grid4, .portrait-grid { display: grid; }
.grid2 { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
.grid3 { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px 8px; }
.grid4 { grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px 8px; }
.portrait-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.grid3 .game-name, .grid4 .game-name { margin: 5px 0 0; text-align: center; }
.grid4 .rating { font-size: 13px; }
.grid4 .media img { object-fit: contain; }
.grid4 .media-rating { padding-top: 12px; }
.grid2 .game-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 16px;
  background: var(--surface);
}
.grid-info { flex: 1; display: flex; flex-direction: column; min-height: 77px; padding: 8px 8px 12px; gap: 4px; }
.grid-info .game-name, .feature-info .game-name { font-weight: 600; line-height: 18px; }
.grid-info-bottom { margin-top: auto; display: flex; justify-content: space-between; align-items: flex-end; gap: 4px; }
.grid-meta { flex: 1; display: grid; gap: 3px; }
.feature {
  display: grid;
  grid-template-columns: minmax(0,12fr) minmax(0,7fr);
  align-items: stretch;
  gap: 8px;
  padding: 8px;
  border-radius: 16px;
  background: var(--surface);
}
.feature-info { display: flex; align-self: stretch; flex-direction: column; gap: 3px; }
.feature-icon { width: 24px; height: 24px; border-radius: 6px; object-fit: cover; }
.feature-actions { display: flex; margin-top: auto; padding-top: 3px; }
.feature-actions .play { width: 100%; }
.description {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 14px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow-wrap: anywhere;
}
.grid-meta .description { -webkit-line-clamp: 1; }
.game-tags { display: flex; gap: 3px; overflow: hidden; }
.game-tags:empty { display: none; }
.game-tags span {
  display: block;
  min-width: 0;
  padding: 0 4px;
  border: 1px solid #a8b0c947;
  border-radius: 4px;
  font-size: 9px;
  line-height: 12px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.poster-carousel {
  position: relative;
  --center-width: 67.07317%;
  --carousel-gap: 12px;
}
.hero-carousel { --center-width: 100%; }
.hero-indicators {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 26px;
}
.hero-indicator {
  display: grid;
  place-items: center;
  width: 17px;
  height: 26px;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: transparent;
}
.hero-indicator::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 99px;
  background: #a4aec5;
}
.hero-indicator[aria-current="true"]::before { width: 13px; background: #fff; }
.hero-carousel .carousel-arrow { top: calc((100% - 26px) / 2); }
.carousel-track {
  display: flex;
  gap: var(--carousel-gap);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  overscroll-behavior-x: contain;
  touch-action: pan-x pan-y;
}
.carousel-track::-webkit-scrollbar { display: none; }
.carousel-track.is-sliding { scroll-snap-type: none; }
.carousel-track::before, .carousel-track::after { content: ""; flex: 0 0 max(0px, calc((100% - var(--center-width))/2 - var(--carousel-gap))); }
.hero-carousel .carousel-track::before, .hero-carousel .carousel-track::after { content: none; }
.carousel-track > .game-card { flex: 0 0 var(--center-width); scroll-snap-align: center; }
.carousel-track .media { border-radius: 12px; }
.poster-carousel:not(.hero-carousel) .media { transition: transform 240ms ease; }
.poster-carousel:not(.hero-carousel) .game-card[data-position=before] .media { transform: scale(.89); transform-origin: right center; }
.poster-carousel:not(.hero-carousel) .game-card[data-position=after] .media { transform: scale(.89); transform-origin: left center; }
.poster-carousel .carousel-track.is-repositioning .media { transition: none; }
.carousel-arrow {
  position: absolute;
  z-index: 1;
  top: 50%;
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid #ffffff60;
  background: #081328e8;
  opacity: 0;
  pointer-events: none;
}
.carousel-prev { left: 4px; }
.carousel-next { right: 4px; }
.carousel-arrow img { width: 16px; filter: brightness(0) invert(1); }
.carousel-prev img { transform: rotate(-90deg); }
.carousel-next img { transform: rotate(90deg); }
.carousel-arrow:focus-visible { opacity: 1; pointer-events: auto; }
@media (hover: hover) {
  .poster-carousel:hover .carousel-arrow:not(:disabled) { opacity: 1; pointer-events: auto; }
}
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.review-note { font-size: 10px; color: #9aa9c7; background: #14213b; border: 1px solid #26375a; padding: 8px 10px; border-radius: 8px; margin: 0 0 13px; }
.status { padding: 30px 5px; text-align: center; color: var(--muted); }
footer { font-size: 10px; text-align: center; color: #8998b7; border-top: 1px solid #ffffff0c; padding-top: 20px; margin-top: 22px; }
.retry { border: 0; background: #132743; color: #79dafa; padding: 8px 12px; border-radius: 7px; }
.landing { padding-top: 24px; }
.landing .landing-icon { width: 88px; height: 88px; border-radius: 20px; margin: 24px auto 12px; }
.landing h1 { text-align: center; font-size: 24px; }
.landing p { text-align: center; color: var(--muted); }
.landing-actions { display: flex; flex-direction: column; align-items: center; gap: 12px; margin: 24px 0; }
.landing-actions .play { min-width: 180px; padding: 12px 20px; }
.landing-note { font-size: 11px; }
.back-link { font-size: 12px; color: #97dafa; }
.inline-error { color: #ffb7b7; }
@media (max-width: 350px) {
  .brand-header { height: 58px; }
  .brand strong { font-size: 21px; }
  .hero-caption { gap: 6px; padding-inline: 8px; }
  .hero-caption .rating { font-size: 14px; }
  .portrait-caption .rating { font-size: 13px; }
  .feature-icon { width: 22px; height: 22px; }
}
.feature-icon-link { display: block; align-self: flex-start; }
.footer-note { margin: 10px 0 0; text-align: center; }
