:root {
  --page-width: 625px;
  --green: #34a853;
  --text: #0f1419;
  --muted: #4f5b67;
  --line: #e5e7eb;
  --nav-blue: #1a73e8;
  --nav-bg: #f8fbff;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: #fff;
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
  min-height: 100vh;
  padding-bottom: 70px;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.store-page {
  width: 100%;
}

.top-bar {
  position: sticky;
  top: 0;
  z-index: 5;
  width: min(100%, var(--page-width));
  height: 58px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #fff;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 20px;
}

.icon-button,
.chevron-button {
  width: 42px;
  height: 42px;
  padding: 8px;
  border: 0;
  background: transparent;
  color: #30363b;
  cursor: pointer;
}

.icon-button svg,
.chevron-button svg,
.bottom-nav svg {
  width: 100%;
  height: 100%;
  display: block;
  fill: currentColor;
}

.content {
  width: min(100%, var(--page-width));
  margin: 0 auto;
}

.app-header {
  display: grid;
  grid-template-columns: 120px 1fr;
  align-items: center;
  gap: 18px;
  padding: 26px 0 16px;
}

.app-icon {
  width: 116px;
  height: 116px;
  border-radius: 22px;
  object-fit: cover;
  box-shadow: 0 2px 10px rgb(0 0 0 / 18%);
}

.app-copy h1 {
  margin: 0 0 4px;
  font-size: 29px;
  line-height: 1.05;
  font-weight: 700;
  letter-spacing: 0;
}

.developer {
  margin: 0 0 2px;
  color: #00875f;
  font-size: 17px;
  font-weight: 700;
}

.meta-line {
  margin: 0;
  color: #334155;
  font-size: 14px;
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  padding: 0 0 36px;
}

.stat-item {
  min-height: 45px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-right: 1px solid var(--line);
  text-align: center;
}

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

.stat-item strong {
  font-size: 19px;
  line-height: 1;
}

.stat-item span {
  color: #475569;
  font-size: 13px;
}

.rating-box {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 18px;
  border: 1.5px solid #111;
  border-radius: 2px;
  font-size: 12px !important;
}

.install-section {
  padding-bottom: 39px;
}

.install-button {
  width: 100%;
  height: 51px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 999px;
  background: var(--green);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.media-strip {
  display: grid;
  grid-template-columns: 1.06fr 0.94fr;
  gap: 16px;
  padding-bottom: 26px;
  overflow: hidden;
}

.media-strip img {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 2px;
  object-fit: cover;
  display: block;
  background: #eef2f7;
}

/* Responsive video embed matching screenshot aspect and behavior */
.video-embed {
  margin: 0;
}
.video-embed .embed-responsive {
  position: relative;
  padding-top: 56.25%; /* 16:9 */
  width: 100%;
  border-radius: 2px;
  overflow: hidden;
  background: #000;
}
.video-embed iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.detail-section {
  padding: 0 0 18px;
  border-bottom: 1px solid var(--line);
}

.detail-section.compact {
  padding: 23px 0 15px;
}

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

.section-title-row h2 {
  margin: 0;
  font-size: 20px;
  line-height: 1.2;
}

.detail-section p {
  margin: 22px 0 16px;
  color: #465568;
  font-size: 15.5px;
  line-height: 1.45;
}

.detail-section.compact p {
  margin: 24px 0 3px;
  color: #5f6872;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tags span {
  min-height: 29px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 5px 16px;
  border: 1px solid #d2d8df;
  border-radius: 999px;
  color: #344054;
  font-size: 14px;
  white-space: nowrap;
}

.games-section {
  padding: 33px 0 7px;
}

.hot-games-section {
  padding-top: 33px;
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
}

.section-heading h2 {
  margin: 0;
  font-size: 25px;
  line-height: 1.1;
  color: #2a2d31;
}

.section-heading a {
  color: #00875f;
  font-size: 20px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.trending-row,
.hot-games-row {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  scrollbar-width: none;
  scroll-snap-type: x mandatory;
}

.trending-row::-webkit-scrollbar,
.hot-games-row::-webkit-scrollbar,
.media-strip::-webkit-scrollbar {
  display: none;
}

.trending-game {
  flex: 0 0 125px;
  scroll-snap-align: start;
  color: inherit;
  text-decoration: none;
}

.trending-game img {
  width: 125px;
  height: 125px;
  display: block;
  border-radius: 22px;
  object-fit: cover;
  box-shadow: inset 0 0 0 1px rgb(0 0 0 / 8%);
}

.trending-game h3 {
  margin: 14px 0 0;
  font-size: 16px;
  line-height: 1.25;
  font-weight: 700;
  color: #2f3237;
  text-align: center;
}

.hot-games-row {
  display: grid;
  grid-auto-flow: column;
  grid-template-rows: repeat(3, 104px);
  grid-auto-columns: minmax(290px, 313px);
  gap: 18px 10px;
}

.hot-game-card {
  min-width: 0;
  height: 104px;
  display: grid;
  grid-template-columns: 84px 1fr;
  align-items: center;
  gap: 16px;
  padding: 10px;
  border: 1px solid #edf0f3;
  border-radius: 13px;
  background: #fff;
  color: inherit;
  text-decoration: none;
  scroll-snap-align: start;
}

.hot-game-card img {
  width: 80px;
  height: 80px;
  border-radius: 15px;
  object-fit: cover;
  display: block;
}

.hot-game-card h3 {
  margin: 0 0 4px;
  font-size: 20px;
  line-height: 1.15;
  color: #2b2e34;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hot-game-card p {
  margin: 0;
  color: #5f6872;
  font-size: 15px;
  line-height: 1.25;
  white-space: nowrap;
}

.reviews-section {
  padding: 30px 0 24px;
}

.rate-block h2,
.reviews-heading-row h2 {
  margin: 0;
  color: #262a2f;
  font-size: 24px;
  line-height: 1.2;
}

.rate-block p,
.reviews-note {
  margin: 5px 0 0;
  color: #5f6872;
  font-size: 16px;
  line-height: 1.4;
}

.star-picker {
  display: flex;
  align-items: center;
  gap: 26px;
  margin: 16px 0 22px;
}

.star-picker button {
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #697079;
  font-size: 45px;
  line-height: 34px;
  cursor: pointer;
}

.review-link {
  display: inline-flex;
  color: #00875f;
  font-size: 17px;
  font-weight: 700;
  text-decoration: none;
}

.reviews-heading-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 31px;
}

.arrow-button,
.mini-menu {
  width: 42px;
  height: 42px;
  padding: 8px;
  border: 0;
  background: transparent;
  color: #5e666f;
  cursor: pointer;
}

.arrow-button svg,
.mini-menu svg,
.search-chip svg {
  width: 100%;
  height: 100%;
  display: block;
  fill: currentColor;
}

.reviews-note {
  max-width: 520px;
  margin-top: 11px;
}

.rating-summary {
  display: grid;
  grid-template-columns: 152px 1fr;
  align-items: end;
  gap: 40px;
  margin-top: 26px;
}

.rating-score {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.rating-score strong {
  font-size: 72px;
  line-height: 0.94;
  font-weight: 400;
  letter-spacing: 0;
}

.small-stars {
  margin-top: 11px;
  color: #00875f;
  font-size: 16px;
  line-height: 1;
  letter-spacing: 1px;
}

.rating-score > span:last-child {
  margin-top: 9px;
  color: #68717b;
  font-size: 16px;
}

.rating-bars {
  display: flex;
  flex-direction: column;
  gap: 11px;
  padding-bottom: 8px;
}

.rating-bar-row {
  display: grid;
  grid-template-columns: 16px 1fr;
  align-items: center;
  gap: 12px;
  color: #5f6872;
  font-size: 16px;
}

.bar-track {
  height: 13px;
  border-radius: 999px;
  overflow: hidden;
  background: #e4e7eb;
}

.bar-track span {
  display: block;
  height: 100%;
  min-width: 9px;
  border-radius: inherit;
  background: #00875f;
}

.review-filters {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 30px -1px 27px;
  padding-bottom: 1px;
  overflow-x: auto;
  scrollbar-width: none;
}

.review-filters::-webkit-scrollbar {
  display: none;
}

.search-chip,
.filter-chip {
  flex: 0 0 auto;
  height: 38px;
  border: 1px solid #d6dbe1;
  border-radius: 9px;
  background: #fff;
  color: #3d444d;
}

.search-chip {
  width: 48px;
  padding: 10px;
}

.filter-chip {
  padding: 0 16px;
  font-size: 17px;
  white-space: nowrap;
}

.filter-chip.active {
  border-color: #00875f;
  background: #e8f5ee;
  color: #096f3e;
}

.filter-chip span {
  color: #6a717a;
  font-size: 14px;
}

.review-card {
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.review-card + .review-card {
  margin-top: 26px;
}

.review-topline,
.review-author {
  display: flex;
  align-items: center;
}

.review-topline {
  justify-content: space-between;
  gap: 16px;
}

.review-author {
  gap: 15px;
}

.avatar {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #1e88e5;
  color: #fff;
  font-size: 16px;
  font-weight: 700;
}

.avatar.red {
  background: #e53935;
}

.review-author strong {
  font-size: 18px;
  font-weight: 500;
  color: #2c2f34;
}

.mini-menu {
  width: 32px;
  height: 32px;
  padding: 6px;
}

.review-meta {
  display: flex;
  align-items: center;
  gap: 13px;
  margin-top: 15px;
}

.review-meta span {
  color: #00875f;
  font-size: 14px;
  letter-spacing: 1px;
}

.review-meta .three-star span {
  color: #dfe3e8;
}

.review-meta time {
  color: #68717b;
  font-size: 14px;
}

.review-card p {
  margin: 10px 0 0;
  color: #5d646d;
  font-size: 18px;
  line-height: 1.45;
}

.review-card .helpful-count {
  margin-top: 16px;
  color: #5d646d;
  font-size: 16px;
}

.helpful-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 20px;
  color: #5d646d;
  font-size: 18px;
}

.helpful-actions {
  display: flex;
  gap: 10px;
}

.helpful-actions button {
  min-width: 64px;
  height: 33px;
  padding: 0 18px;
  border: 1px solid #d6dbe1;
  border-radius: 999px;
  background: #fff;
  color: #3e454d;
  font-size: 15px;
  cursor: pointer;
}

.bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 6;
  height: 83px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  align-items: start;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  background: #fff;
}

.bottom-nav a {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  color: #5f6872;
  text-decoration: none;
  font-size: 12px;
}

.bottom-nav a > svg {
  width: 25px;
  height: 25px;
}

.bottom-nav .active {
  color: #0b57d0;
  font-weight: 700;
}

.nav-pill {
  width: 76px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #e8f0fe;
}

.nav-pill svg {
  width: 27px;
  height: 27px;
  color: var(--nav-blue);
}

@media (max-width: 720px) {
  :root {
    --page-width: 100%;
  }

  .top-bar,
  .content {
    padding-left: 18px;
    padding-right: 18px;
  }

  .top-bar {
    height: 56px;
  }

  .app-header {
    grid-template-columns: 82px 1fr;
    gap: 14px;
    padding-top: 16px;
  }

  .app-icon {
    width: 82px;
    height: 82px;
    border-radius: 18px;
  }

  .app-copy h1 {
    font-size: 25px;
  }

  .developer {
    font-size: 16px;
  }

  .stats {
    padding-top: 14px;
    padding-bottom: 30px;
  }

  .install-section {
    padding-bottom: 30px;
  }

  .media-strip {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 24px;
    scroll-snap-type: x mandatory;
  }

  .media-strip img {
    flex: 0 0 82%;
    max-width: 360px;
    scroll-snap-align: start;
  }

  .media-strip .video-embed {
    flex: 0 0 82%;
    max-width: 360px;
    scroll-snap-align: start;
  }

  .games-section {
    padding-top: 32px;
  }

  .trending-row {
    gap: 20px;
    margin-right: -18px;
    padding-right: 18px;
  }

  .hot-games-row {
    grid-auto-columns: minmax(290px, 64vw);
    margin-right: -18px;
    padding-right: 18px;
  }

  .rating-summary {
    grid-template-columns: 145px minmax(0, 1fr);
    gap: 30px;
  }

  .review-filters {
    margin-right: -18px;
    padding-right: 18px;
  }
}

@media (max-width: 430px) {
  .content,
  .top-bar {
    padding-left: 16px;
    padding-right: 16px;
  }

  .app-header {
    grid-template-columns: 74px 1fr;
  }

  .app-icon {
    width: 74px;
    height: 74px;
    border-radius: 16px;
  }

  .app-copy h1 {
    font-size: 23px;
  }

  .meta-line,
  .stat-item span,
  .tags span {
    font-size: 12.5px;
  }

  .stat-item strong {
    font-size: 17px;
  }

  .section-title-row h2 {
    font-size: 19px;
  }

  .section-heading h2 {
    font-size: 24px;
  }

  .section-heading a {
    font-size: 18px;
  }

  .trending-game {
    flex-basis: 123px;
  }

  .trending-game img {
    width: 123px;
    height: 123px;
  }

  .hot-games-row {
    grid-auto-columns: minmax(272px, 72vw);
  }

  .media-strip .video-embed {
    flex: 0 0 88%;
    max-width: 320px;
    scroll-snap-align: start;
  }

  .hot-game-card {
    grid-template-columns: 74px 1fr;
    gap: 13px;
  }

  .hot-game-card img {
    width: 70px;
    height: 70px;
  }

  .hot-game-card h3 {
    font-size: 18px;
  }

  .reviews-section {
    padding-top: 29px;
  }

  .star-picker {
    justify-content: space-between;
    gap: 0;
  }

  .rating-summary {
    grid-template-columns: 130px minmax(0, 1fr);
    gap: 22px;
  }

  .rating-score strong {
    font-size: 70px;
  }

  .review-card p {
    font-size: 18px;
  }

  .helpful-row {
    align-items: flex-start;
    font-size: 18px;
  }

  .helpful-actions button {
    min-width: 62px;
  }
}

/* Ensure the video embed matches screenshot sizing and is full-width on mobile */
.media-strip .video-embed,
.media-strip .video-embed .embed-responsive {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 2px;
  overflow: hidden;
  background: #000;
}
.media-strip .video-embed .embed-responsive {
  position: relative;
  padding-top: 56.25%;
}
.media-strip .video-embed iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

@media (max-width: 720px) {
  .media-strip img,
  .media-strip .video-embed {
    flex: 0 0 100%;
    max-width: 100%;
    scroll-snap-align: start;
  }
}
