:root {
  --orange-500: #fd7c0a;
  --orange-header: #f77c05;
  --orange2: #ff5f00;
  --pale: #fff8f2;
  --ink: #1c1c1c;
  --muted: #8b8b8b;
  --placeholder: #b2b2b2;
  --green: #00a759;
  --red: #cf062a;
  --line: #e5e8eb;
  --disable: #a3a3a3;
  --screen-gradient: linear-gradient(-0.5deg, #ffbd7c 67.94%, #f77c05 93.46%);
  --panel-gradient: linear-gradient(111.71deg, #fff8f2 0%, #f8d9bd 137%);
  --landing-gradient: linear-gradient(180deg, #ff5f00 0%, #ff8e18 50%, #ffad4f 100%);
  font-family: "Poppins", -apple-system, BlinkMacSystemFont, "PingFang HK", "Noto Sans HK", sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  min-height: 100vh;
  display: grid;
  place-items: start center;
  background: #e5e5e5;
  color: var(--ink);
}
button, input { font: inherit; }
button { border: 0; cursor: pointer; }

.phone {
  width: 393px;
  height: 852px;
  overflow: hidden;
  background: var(--pale);
  position: relative;
}

.screen {
  width: 393px;
  height: 852px;
  position: relative;
  overflow: hidden;
  background: var(--pale);
  animation: screen-in .22s ease;
}

.scroll { height: 852px; overflow-y: auto; scrollbar-width: none; }
.scroll::-webkit-scrollbar { display: none; }

.top-orange {
  height: 204px;
  color: #fff;
  background: var(--orange-header);
  backdrop-filter: blur(10px);
}

.status {
  height: 54px;
  padding: 18px 34px 0 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 17px;
  font-weight: 600;
  line-height: 22px;
}
.status-icons {
  display: flex;
  align-items: center;
  gap: 6px;
}
.status-icons img {
  display: block;
  height: 12px;
  width: auto;
}
.status-battery {
  position: relative;
  width: 25px;
  height: 12px;
  border: 1px solid rgba(255,255,255,.35);
  border-radius: 4.3px;
}
.status-battery::after {
  content: "";
  position: absolute;
  inset: 2px 4px 2px 2px;
  border-radius: 2.5px;
  background: #fff;
}
.status-battery img { display: none; }

.nav {
  height: 50px;
  padding: 6px 12px 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.search-pill {
  height: 36px;
  border-radius: 140px;
  background: rgba(255,255,255,.2);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  gap: 8px;
  color: #fff;
  padding: 8px 12px;
  flex: 1;
  min-width: 0;
  max-width: 204px;
  font-size: 14px;
  overflow: hidden;
  white-space: nowrap;
}
.search-pill img {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
}
.search-pill span {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
}

.icon-row { display: flex; gap: 8px; }
.circle {
  width: 36px;
  height: 36px;
  border-radius: 36px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,.24);
  backdrop-filter: blur(8px);
  color: #fff;
  gap: 2px;
}
.circle.back {
  width: 36px;
  height: 36px;
  font-size: 30px;
}
.circle img {
  width: 24px;
  height: 24px;
  object-fit: contain;
}
.circle small {
  display: block;
  font-size: 10px;
  line-height: 10px;
  font-weight: 400;
}
.icon-row .circle:last-child {
  width: 58px;
  border-radius: 36px;
}
.icon-row .circle:last-child img {
  width: 18px;
  height: 18px;
}

.category-strip {
  height: 100px;
  display: block;
  overflow: hidden;
  padding: 0 8px;
}
.street-row,
.promo-row {
  display: flex;
  align-items: flex-start;
  gap: 0;
  width: 100%;
}
.street-row {
  height: 50px;
}
.promo-row {
  height: 50px;
  margin-top: 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.promo-row::-webkit-scrollbar { display: none; }
.category {
  width: 68px;
  flex: 0 0 68px;
  height: 50px;
  padding: 4px 2px;
  background: transparent;
  text-align: center;
  color: #fff;
  font-size: 10px;
  line-height: 10px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.cat-img {
  width: 40px;
  height: 40px;
  margin: 0 auto;
  border-radius: 6px;
  display: block;
  object-fit: cover;
}
.promo-icon {
  width: 68px;
  flex: 0 0 68px;
  height: 50px;
  padding: 4px 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  overflow: hidden;
}
.promo-icon img {
  width: 40px;
  height: 40px;
  object-fit: cover;
  border-radius: 6px;
}
.promo-icon.selected {
  position: relative;
}
.promo-icon.selected img {
  width: 62px;
  height: 48px;
  border-radius: 6px;
}
.promo-icon.selected span {
  position: absolute;
  inset: 10px 8px auto;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  line-height: 12px;
  text-align: center;
}
.text-promo {
  width: 52px;
  height: 40px;
  margin: 4px 8px;
  border-radius: 6px;
  font-size: 13px;
  line-height: 13px;
  font-weight: 900;
  text-align: center;
}
.text-promo.pink {
  background: #fff;
  color: #f02672;
}
.text-promo.white {
  background: #fff;
  color: #1d1d1d;
}
.text-promo.white b { color: #e61c24; }

.landing-body {
  min-height: 841px;
  margin-top: 0;
  padding-top: 16px;
  background: var(--landing-gradient);
}

.ppp-card {
  position: relative;
  margin: 0 16px;
  width: 361px;
  height: 138px;
  color: #fff;
  cursor: pointer;
}
.ppp-tab {
  position: absolute;
  top: 0;
  left: 0;
  width: 264px;
  height: 32px;
  border-radius: 18px 18px 0 0;
  background: linear-gradient(180deg, #ffac4d, #ff8b18);
}
.ppp-inner {
  position: absolute;
  left: 0;
  right: 0;
  top: 32px;
  height: 106px;
  border-radius: 0 18px 18px 18px;
  background: linear-gradient(180deg, #ffac4d, #ff8b18);
  padding: 12px 16px 10px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.42);
}
.landing .ppp-card { margin-top: 0; }
.ppp-card:active .ppp-inner { transform: scale(.995); }
.ppp-card:before { display: none; }
.ppp-title {
  display: flex;
  align-items: center;
  gap: 0;
  min-height: 34px;
  position: relative;
}
.ppp-title.centered { justify-content: center; }
.ppp-brand {
  display: inline-flex;
  align-items: center;
  margin-right: -2px;
  filter: drop-shadow(.8px .8px .8px #fd7c0a);
}
.ppp-diamond {
  width: 34px;
  height: 34px;
  display: block;
}
.ppp-dvip {
  font-size: 24px;
  font-weight: 600;
  line-height: 1.4;
  margin-left: -2px;
}
.ppp-name {
  font-size: 24px;
  font-weight: 600;
  line-height: 1.4;
  transform: skewX(-10deg) scaleY(.98);
  text-shadow: .8px .8px 1.6px #fd7c0a;
  margin-left: 8px;
}
.game-title .ppp-name,
.after-popup .ppp-name {
  margin-left: 0;
}
.ppp-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 24px;
  margin-top: 0;
  font-size: 14px;
  font-weight: 500;
  position: relative;
}
.ppp-meta-left {
  display: inline-flex;
  align-items: center;
  gap: 2px;
}
.ppp-meta b {
  font-size: 28px;
  line-height: 1.4;
  font-weight: 600;
  color: #fff;
  transform: rotate(.75deg) skewX(-10deg) scaleY(.98);
  text-shadow: .8px .8px 1.6px #fd7c0a;
  margin: 0 2px;
}
.ppp-star {
  width: 10px;
  height: 10px;
  margin-left: 2px;
  transform: rotate(90deg);
}
.ppp-meta i {
  width: 1px;
  height: 20px;
  background: rgba(255,255,255,.65);
  flex: 0 0 1px;
}
.ppp-meta.centered { justify-content: center; color: #fff; }
.after-popup .ppp-meta.centered { color: #fff; }
.view-link {
  position: absolute;
  right: 16px;
  top: 47px;
  background: transparent;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  z-index: 2;
}

.slots {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
  margin-top: 8px;
}
.ppp-card .slots { margin-top: 8px; }
.slot {
  aspect-ratio: 1;
  min-height: 48.17px;
  border-radius: 8px;
  background: #fff;
  color: var(--placeholder);
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  overflow: hidden;
  position: relative;
}
.slot-plus {
  font-size: 23.83px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--placeholder);
}
.slot img, .slot .thumb { width: 100%; height: 100%; }

.hot-wrap {
  position: relative;
  margin-top: 16px;
  padding: 109px 16px 16px;
  min-height: 637px;
  border-radius: 18px 18px 0 0;
  background: linear-gradient(180deg, #ff8a00, #ffad49);
}
.hot-label {
  position: absolute;
  left: 37px;
  top: 0;
  width: 311px;
  height: 113px;
  border-radius: 34px 34px 0 0;
  background: #fff8e8;
  color: var(--orange-500);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: 0 16px 0 rgba(255, 197, 98, .6);
}
.hot-label small { font-size: 20px; font-weight: 600; line-height: 1.2; }
.hot-label strong {
  font-size: 30px;
  font-weight: 600;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.hot-label strong img {
  width: 29px;
  height: 28px;
  transform: rotate(90deg);
}

.landing-grid {
  display: grid;
  grid-template-columns: repeat(3, 115px);
  column-gap: 9.5px;
  row-gap: 8px;
}

.landing-card {
  width: 115px;
  height: 252px;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  position: relative;
  filter: drop-shadow(0 4px 8px rgba(145, 158, 171, .16));
}
.landing-card .thumb { width: 115px; height: 115px; border-radius: 12px; }
.landing-info { padding: 8px 6px; }
.landing-name {
  height: 40px;
  margin: 0 0 4px;
  font-size: 14px;
  line-height: 1.4;
  overflow: hidden;
}
.was { color: #8b8b8b; font-size: 12px; line-height: 17px; text-decoration: line-through; display: block; }
.was.alt { margin-top: -1px; }
.was.alt.tone-vip { color: #7039c7; }
.was.alt.tone-plus { color: #00b539; }
.was.alt.tone-red { color: #cf062a; }
.deal-text { color: var(--orange-500); font-size: 12px; font-weight: 600; display: block; }
.price-row { display: flex; align-items: flex-end; justify-content: space-between; }
.price { color: var(--orange-500); font-size: 18px; line-height: 25px; font-weight: 600; }
.cart { width: 26px; height: 26px; border-radius: 4px; display: grid; place-items: center; background: var(--green); color: #fff; font-size: 15px; }
.cart img { width: 21px; height: 21px; display: block; }

.screen.game {
  background: var(--screen-gradient);
}
.game-bkg {
  position: absolute;
  inset: 0 0 auto;
  height: 296px;
  overflow: hidden;
  pointer-events: none;
}
.game-bkg::after {
  content: "";
  position: absolute;
  width: 546px;
  height: 435px;
  left: calc(50% - 13px);
  top: calc(50% - 65px);
  transform: translate(-50%, -50%);
  opacity: .3;
  mix-blend-mode: soft-light;
  background: radial-gradient(circle, rgba(255,255,255,.35), transparent 70%);
}
.game-stack {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  height: 100%;
}
.game-header {
  color: #fff;
  flex: 0 0 auto;
}
.game .nav {
  height: 48px;
  padding: 8px 12px;
  align-items: center;
}
.game .circle {
  width: 36px;
  height: 36px;
}
.game .circle img {
  width: 24px;
  height: 24px;
}
.game .circle small {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
  opacity: 0;
}
.game .icon-row .circle:last-child {
  width: 58px;
  border-radius: 36px;
}
.game .icon-row .circle:last-child img {
  width: 18px;
  height: 18px;
}
.game .icon-row .circle:last-child small {
  position: static;
  width: auto;
  height: auto;
  overflow: visible;
  opacity: 1;
  font-size: 8px;
  line-height: 8px;
}
.game-title { text-align: center; padding: 12px 16px; }
.game-title .ppp-title { justify-content: center; }
.game-title .ppp-meta { justify-content: center; margin-top: 0; }

.content-panel {
  flex: 1 1 auto;
  min-height: 0;
  border-radius: 24px 24px 0 0;
  background: var(--panel-gradient);
  padding: 16px;
  display: flex;
  flex-direction: column;
}
.game .content-panel:before { display: none; }
.game-list {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  scrollbar-width: none;
}
.game-list::-webkit-scrollbar { display: none; }
.real-search {
  height: 36px;
  border-radius: 140px;
  background: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  color: var(--placeholder);
}
.real-search img {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
}
.real-search input { border: 0; outline: 0; flex: 1; background: transparent; color: var(--ink); font-size: 14px; }
.brand-row {
  margin-top: 12px;
  height: 32px;
  display: flex;
  gap: 8px;
  overflow: hidden;
}
.brand {
  height: 32px;
  min-width: 71px;
  padding: 6px 12px;
  border-radius: 20px;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--ink);
  font-weight: 400;
  font-size: 14px;
}
.brand.logo {
  width: 71px;
  min-width: 71px;
  padding: 0;
  overflow: hidden;
}
.brand.logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.tabs {
  margin-top: 12px;
  display: flex;
  gap: 16px;
  white-space: nowrap;
  overflow: hidden;
  padding-bottom: 8px;
}
.tab {
  background: transparent;
  color: var(--muted);
  padding: 0;
  font-weight: 400;
  font-size: 16px;
  position: relative;
}
.tab.active { color: var(--orange-500); font-weight: 600; }
.tab.active:after {
  content: "";
  position: absolute;
  height: 3px;
  width: 16px;
  left: 50%;
  bottom: -5px;
  transform: translateX(-50%);
  border-radius: 4px;
  background: var(--orange-500);
}

.product-grid {
  margin-top: 10px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}
.product-card {
  min-height: 134px;
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  position: relative;
  text-align: left;
}
.product-card.selected { box-shadow: inset 0 0 0 2px var(--orange-500); }
.product-body {
  width: 100%;
  height: 100%;
  padding: 0;
  background: transparent;
  text-align: left;
  display: block;
}
.product-body:active { opacity: .85; }
.plus, .check {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 32px;
  height: 32px;
  border-radius: 0;
  display: grid;
  place-items: center;
  z-index: 2;
  font-weight: 900;
  padding: 0;
  background: transparent;
}
.plus { color: #a9a9a9; border: 0; font-size: 0; }
.plus img { width: 32px; height: 32px; display: block; }
.check { background: var(--green); color: #fff; font-size: 15px; border: 2px solid #fff; border-radius: 4px; }
.product-card .thumb { aspect-ratio: 1; height: auto; border-radius: 10px 10px 0 0; width: 100%; }
.game-price { padding: 6px 6px 10px; color: var(--red); font-size: 12px; font-weight: 400; line-height: 1.4; }
.game-price strong { display: block; font-size: 14px; font-weight: 600; }

.tray {
  position: static;
  flex: 0 0 auto;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.count { font-size: 14px; font-weight: 500; margin-bottom: 4px; color: var(--ink); }
.tray .slots { margin: 0; }
.tray .slot { min-height: 53.5px; }
.confirm-btn {
  height: 44px;
  width: 100%;
  margin-top: 12px;
  border-radius: 12px;
  background: var(--disable);
  color: #fff;
  font-size: 16px;
  font-weight: 600;
}
.confirm-btn:disabled { cursor: not-allowed; }
.confirm-btn.ready { background: var(--green); box-shadow: none; }
.home-indicator {
  position: absolute;
  left: 129px;
  bottom: 8px;
  width: 134px;
  height: 5px;
  border-radius: 99px;
  background: #111;
}

.overlay-dim {
  position: absolute;
  inset: 0;
  background: rgba(54, 28, 9, .56);
  animation: fade-in .2s ease;
}
.modal {
  position: absolute;
  background: #fff;
  border-radius: 18px;
  overflow: hidden;
}
.animate-in {
  animation: slide-up .28s cubic-bezier(.22, 1, .36, 1);
}
@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes slide-up {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}
.pdp {
  left: 36px;
  top: 66px;
  width: 321px;
  height: 720px;
}
.modal-head {
  height: 58px;
  display: grid;
  place-items: center;
  font-size: 16px;
  font-weight: 900;
  border-bottom: 1px solid #e8e8e8;
  position: relative;
}
.close {
  position: absolute;
  right: 16px;
  top: 15px;
  width: 28px;
  height: 28px;
  background: transparent;
  font-size: 30px;
  line-height: 24px;
  color: #222;
}
.pdp-hero {
  height: 274px;
  background: #f8f4f0;
  overflow: hidden;
}
.pdp-hero .thumb {
  width: 100%;
  height: 100%;
}
.pdp-hero .thumb img {
  object-fit: contain;
  background: #fff;
}
.pdp-info { padding: 16px; }
.store-chip { display: inline-flex; height: 28px; align-items: center; padding: 0 10px; border-radius: 6px; background: #b22111; color: #fff; font-weight: 900; font-size: 14px; }
.pdp-info h2 { margin: 8px 0 6px; font-size: 17px; line-height: 1.2; }
.rating { color: #8d7768; font-size: 14px; }
.rating-sep { margin: 0 4px; opacity: .5; }
.rating-sold { float: right; }
.pdp-price-row { margin-top: 4px; }
.pdp-old { margin-top: 12px; color: #8e8e8e; text-decoration: line-through; }
.pdp-price { color: var(--red); font-size: 28px; font-weight: 900; }
.discount { display: inline-block; padding: 4px 7px; border-radius: 12px; background: var(--orange-500); color: #fff; font-size: 13px; vertical-align: 4px; }
.unit { color: var(--red); font-size: 13px; font-weight: 700; }
.detail-box { margin-top: 14px; padding: 14px; border-radius: 12px; background: #fff; box-shadow: 0 0 0 1px #eee; }
.pdp-actions { position: absolute; left: 16px; right: 16px; bottom: 16px; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.outline, .green-btn { height: 42px; border-radius: 8px; font-weight: 900; transition: transform .15s ease, opacity .15s ease; }
.outline { background: #fff; color: var(--green); box-shadow: inset 0 0 0 1px var(--green); }
.green-btn { background: var(--green); color: #fff; }
.green-btn:active:not(.disabled) { transform: scale(.98); }
.green-btn.disabled { background: #b8b0a8; cursor: not-allowed; }

.confirm-modal {
  left: 16px;
  top: 188px;
  width: 361px;
  min-height: 470px;
  background: #ffe7cf;
  border-radius: 20px;
  padding: 14px 21px 16px;
  overflow: visible;
}
.confirm-modal:before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 90px;
  border-radius: 20px 20px 0 0;
  background: linear-gradient(180deg, var(--orange-500), #ff8d1d);
}
.confirm-title {
  position: relative;
  color: #fff;
  text-align: center;
  font-size: 20px;
  font-weight: 900;
}
.confirm-sub { position: relative; color: #fff; font-size: 12px; text-align: center; }
.confirm-sub b { font-size: 34px; color: #fff6cc; }
.confirm-grid {
  position: relative;
  margin-top: 10px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.confirm-card {
  height: 140px;
  background: #fff;
  border: 2px solid var(--orange-500);
  border-radius: 8px;
  overflow: hidden;
  position: relative;
}
.confirm-card .thumb { height: 96px; }
.confirm-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 14px; position: relative; }

.after-popup {
  left: 16px;
  top: 121px;
  width: 361px;
  min-height: 632px;
  background: #ffe8d1;
  padding: 14px;
  border-radius: 18px;
}
.after-popup .ppp-title { justify-content: center; color: #fff; }
.after-popup:before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 100px;
  border-radius: 18px 18px 0 0;
  background: linear-gradient(180deg, var(--orange-500), #ff8d18);
}
.after-popup > * { position: relative; }
.after-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 18px; }
.after-card { height: 204px; background: #fff; border-radius: 8px; overflow: hidden; }
.after-card .thumb { height: 118px; }
.after-card .game-price { padding: 6px 8px; }
.wide-green {
  height: 40px;
  width: 100%;
  border-radius: 8px;
  background: var(--green);
  color: #fff;
  font-weight: 900;
  margin-top: 12px;
  transition: background .2s ease, transform .15s ease;
}
.wide-green.added { background: #067a42; }
.wide-green:active { transform: scale(.98); }
.after-card .cart {
  float: right;
  width: 26px;
  height: 26px;
  padding: 0;
}
.after-card .cart img { width: 21px; height: 21px; }

.thumb {
  position: relative;
  overflow: hidden;
  background: #fff;
}
.thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@keyframes screen-in {
  from { opacity: .6; }
  to { opacity: 1; }
}

.confirm-btn:focus-visible,
.green-btn:focus-visible,
.outline:focus-visible,
.product-body:focus-visible,
.slot:focus-visible {
  outline: 2px solid var(--orange-500);
  outline-offset: 2px;
}
