/* xbet-pwa：精简 Google Play 风格壳 + 一图流 */

:root {
  --bg: #fff;
  --text: #202124;
  --muted: #5f6368;
  --accent: #01875f;
  --accent-hover: #137333;
  --bar: #f8f9fa;
  --radius: 12px;
  --max: 720px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Google Sans", "Product Sans", Roboto, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

button {
  font: inherit;
}

a {
  color: var(--accent);
  text-decoration: none;
}

.logo-loading {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  background: #0a1628;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.logo-loading.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.logo-loading img {
  width: 96px;
  height: 96px;
  object-fit: contain;
  border-radius: 20px;
}

.page {
  max-width: var(--max);
  margin: 0 auto;
  padding: 16px 16px 96px;
}

.hero {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 14px 16px;
  align-items: start;
}

.hero__icon {
  width: 72px;
  height: 72px;
  border-radius: 16px;
  object-fit: cover;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

.hero__meta h1 {
  margin: 0 0 4px;
  font-size: 22px;
  line-height: 1.25;
  font-weight: 500;
}

.hero__dev {
  display: inline-block;
  margin-bottom: 4px;
  font-size: 14px;
  font-weight: 500;
}

.hero__tags {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.hero__cta {
  grid-column: 1 / -1;
  margin-top: 4px;
}

.btn-install {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 140px;
  height: 40px;
  padding: 0 24px;
  border: 0;
  border-radius: 20px;
  background: var(--accent);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}

.btn-install:hover {
  background: var(--accent-hover);
}

.btn-install:active {
  transform: scale(0.98);
}

.stats {
  display: flex;
  gap: 0;
  margin: 20px 0 8px;
  padding: 8px 0;
  border-top: 1px solid #e8eaed;
  border-bottom: 1px solid #e8eaed;
}

.stats__item {
  flex: 1;
  text-align: center;
  padding: 4px 8px;
}

.stats__item + .stats__item {
  border-left: 1px solid #e8eaed;
}

.stats__value {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  font-size: 15px;
  font-weight: 600;
}

.stats__star {
  font-size: 14px;
  line-height: 1;
}

.stats__label {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.shots {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 12px 0 4px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.shots::-webkit-scrollbar {
  display: none;
}

.shots img {
  flex: 0 0 auto;
  width: 140px;
  height: 250px;
  object-fit: cover;
  border-radius: 12px;
  background: #f1f3f4;
}

.banner-wrap {
  margin-top: 12px;
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  background: #f1f3f4;
  padding: 0;
  border: 0;
  line-height: 0;
}

.banner-wrap img,
.banner-wrap .bg1 {
  display: block;
  width: 100%;
  height: auto;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}

/* 一图流：750 稿 15rem=屏宽，电脑端锁 480 宽，长图按比例不压缩 */
html.is-banner-only {
  font-size: calc(100vw / 15);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

@media (min-width: 480px) {
  html.is-banner-only {
    font-size: 32px;
  }
}

html.is-banner-only,
body.is-banner-only {
  min-height: 100%;
  background: #06140a;
}

body.is-banner-only {
  width: 15rem;
  max-width: 100%;
  margin: 0 auto;
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
}

body.is-banner-only .logo-loading {
  background: #06140a;
}

body.is-banner-only .page {
  width: 15rem;
  max-width: 100%;
  margin: 0 auto;
  padding: 0;
}

.lp-topbar {
  display: none;
}

body.is-banner-only .hero,
body.is-banner-only .stats,
body.is-banner-only .shots,
body.is-banner-only .sticky-bar {
  display: none;
}

body.is-banner-only .lp-topbar {
  display: flex;
  align-items: center;
  box-sizing: border-box;
  width: 15rem;
  max-width: 100%;
  height: 1.92rem;
  padding: 0 0.36rem;
  gap: 0.32rem;
  position: sticky;
  top: 0;
  top: env(safe-area-inset-top, 0px);
  z-index: 20;
  background: #06140a;
  border-bottom: 0;
}

.lp-topbar__icon {
  flex: 0 0 auto;
  width: 1.44rem;
  height: 1.44rem;
  margin: 0;
  object-fit: cover;
  border-radius: 0.32rem;
  display: block;
}

.lp-topbar__meta {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 0.48rem;
  color: #fff;
  line-height: 1.2;
}

.lp-topbar__meta strong {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lp-topbar__cta {
  flex: 0 0 auto;
  height: 1.04rem;
  min-width: 2.6rem;
  padding: 0 0.5rem;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(180deg, #ffe7a3 0%, #f0c14b 46%, #d4a017 100%);
  color: #1a0808;
  font: italic 800 0.42rem/1 Arial, Helvetica, sans-serif;
  letter-spacing: 0.02em;
  box-shadow: 0 1px 0 rgba(255, 236, 180, 0.7) inset, 0 2px 6px rgba(0, 0, 0, 0.35);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

body.is-banner-only .banner-wrap {
  position: relative;
  top: 0;
  display: block;
  width: 15rem;
  max-width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  border-radius: 0;
  overflow: visible;
  background: transparent;
}

body.is-banner-only .banner-wrap img,
body.is-banner-only .banner-wrap .bg1 {
  display: block;
  margin-top: 0;
  width: 15rem;
  max-width: 100%;
  height: auto;
}

.sticky-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0px));
  background: rgba(255, 255, 255, 0.96);
  border-top: 1px solid #e8eaed;
  backdrop-filter: blur(8px);
}

.sticky-bar__left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.sticky-bar__left img {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  object-fit: cover;
}

.sticky-bar__name {
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (min-width: 760px) {
  .page {
    padding-top: 28px;
  }

  .hero {
    grid-template-columns: 96px 1fr auto;
  }

  .hero__icon {
    width: 96px;
    height: 96px;
    border-radius: 20px;
  }

  .hero__cta {
    grid-column: auto;
    margin-top: 0;
    align-self: center;
  }

  .shots img {
    width: 180px;
    height: 320px;
  }
}

.pwa-help {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.55);
}

.pwa-help[hidden] {
  display: none;
}

.pwa-help__card {
  width: min(360px, 92vw);
  padding: 20px 18px 16px;
  border-radius: 16px;
  background: #fff;
  color: #111;
  font: 400 15px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.pwa-help__title {
  margin: 0 0 10px;
  font-size: 18px;
  font-weight: 700;
}

.pwa-help__body {
  margin: 0 0 16px;
  white-space: pre-line;
  color: #333;
}

.pwa-help__ok {
  display: block;
  width: 100%;
  height: 42px;
  border: 0;
  border-radius: 999px;
  background: #01875f;
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
}
