/* ============================================================
   ATA — 休闲游戏落地页
   这个文件把「位置/定位」相关写法都注释出来了，方便学习。
   对照 index.html 一起看。
   ============================================================ */

/* —— 变量：换色只改这里 —— */
:root {
  --brand: #4f46e5;
  /* 品牌主色 */
  --brand-dark: #4338ca;
  --install: #16a34a;
  /* 下载按钮绿色 */
  --bg: #f7f8fb;
  --card: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --star: #fbbf24;
  --radius: 18px;
  --shadow: 0 8px 24px rgba(0, 0, 0, .08);
}

/* 通配重置 */
* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.6;
  /* 底部留白：给 fixed 悬浮条腾位置，避免内容被挡住 */
  padding-bottom: 84px;
}

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

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

/* 页面容器：居中，最大 440px（模拟手机应用详情页） */
.wrap {
  max-width: 440px;
  margin: 0 auto;
  padding: 0 0 32px;
}


/* ============================================================
   顶部品牌条 —— position: sticky
   平时跟着文档流正常显示，滚动到顶部后「吸」在视口上方不动。
   ============================================================ */
.topbar {
  position: sticky;
  /* 吸顶 */
  top: 0;
  /* 距视口顶部 0 */
  z-index: 50;
  /* 层级：比普通内容高，比 modal(200) 低 */
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.topbar-in {
  max-width: 440px;
  margin: 0 auto;
  display: flex;
  /* flex：左右两个元素 */
  align-items: center;
  /* 垂直居中 */
  justify-content: space-between;
  /* 两端对齐：logo 左，头像右 */
  gap: 12px;
  padding: 12px 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 17px;
}

.brand-badge {
  position: relative;
  overflow: hidden;
  /* 定位基准 + 圆角裁切 */
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 800;
}

.brand-badge::before {
  content: attr(data-label);
}

/* 兜底文字 "A" */
.brand-badge img {
  position: absolute;
  inset: 0;
  /* 铺满 30×30 */
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.topbar-note {
  font-size: 12px;
  color: var(--muted);
}

/* —— 应用商店风格顶部栏（自己的品牌，不冒充 Google Play）—— */
.store-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.store-logo img {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  flex-shrink: 0;
}

.store-name {
  font-weight: 800;
  font-size: 15px;
  white-space: nowrap;
}

.store-badge {
  flex-shrink: 0;
  height: 30px;              /* 固定高度；改这里可整体缩放徽章 */
  display: flex;
  align-items: center;
}

.store-badge img {
  display: block;
  height: 100%;              /* 高度撑满 30px */
  width: auto;               /* 宽度按原图比例（456:144）自适应 */
  max-width: none;           /* 覆盖全局 img{max-width:100%}，避免宽度被压 */
}


/* ============================================================
   应用卡片
   ============================================================ */
.card {
  padding: 16px;
}

/* 图标 + 名称：用 grid 两列（72px 图标列 + 自适应文字列） */
.approw {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 14px;
  align-items: center;
}

/* —— Logo 图标：position: relative 作为父容器，
     里面 <img> 用 position: absolute 铺满；没有图片时显示 data-label 文字 —— */
.app-icon {
  position: relative;
  /* 定位基准 */
  width: 72px;
  height: 72px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  font-weight: 800;
  box-shadow: var(--shadow);
  overflow: hidden;
  /* 圆角裁切图片 */
}

.app-icon::before {
  content: attr(data-label);
}

/* 兜底文字（如 "A"） */
.app-icon img {
  position: absolute;
  inset: 0;
  /* = top/right/bottom/left 全为 0，铺满父容器 */
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* 图片按比例填满并裁切，不变形 */
}

.app-name {
  font-size: 20px;
  font-weight: 800;
  line-height: 1.2;
}

.app-dev {
  font-size: 13px;
  color: var(--muted);
  margin-top: 3px;
}

/* 三个指标：grid 三等分 */
.metrics {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
  margin: 16px 4px 6px;
}

.metric {
  text-align: center;
}

.metric b {
  display: block;
  font-weight: 800;
  font-size: 15px;
}

.metric small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-top: 2px;
}

.metric .stars {
  color: var(--star);
}

/* 安装按钮 */
.install-wrap {
  padding: 8px 0 0;
}

.install {
  display: block;
  width: 100%;
  text-align: center;
  background: var(--install);
  color: #fff;
  text-decoration: none;
  padding: 13px 18px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 15px;
  transition: filter .15s;
}

.install:hover {
  filter: brightness(1.05);
}


/* ============================================================
   截图横滑轮播
   - .s-row 用 flex + overflow-x:auto 实现横向滑动
   - .shot 用 position:relative 父容器，img 用 absolute 铺满
   ============================================================ */
.screens {
  padding: 12px 0 0;
}

.s-row {
  display: flex;
  /* 子项横向排列 */
  gap: 10px;
  /* 间距 */
  overflow-x: auto;
  /* 超出时横向滚动 */
  scroll-snap-type: x mandatory;
  /* 滑动吸附 */
  padding: 0 12px 12px;
  -webkit-overflow-scrolling: touch;
}

.s-row::-webkit-scrollbar {
  height: 4px;
}

.s-row::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, .2);
  border-radius: 2px;
}

.shot {
  position: relative;
  /* 定位基准（供占位文字绝对定位） */
  flex: 0 0 auto;
  /* flex 三件套：不放大/不缩小/按内容宽度 */
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  scroll-snap-align: start;
  background: #eef1f6;
}

/* 兜底占位文字：图片没加载出来时显示 */
.shot::before {
  content: attr(data-label);
  position: absolute;
  inset: 0;
  /* 铺满整个 .shot */
  display: flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  font-size: 13px;
  font-weight: 700;
  z-index: 0;
}

.shot img {
  display: block;
  height: 240px;
  /* 统一高度；改这里可整体缩放截图 */
  width: auto;
  /* 宽度按原图比例自适应，不裁切、不变形 */
  max-width: none;
  /* 覆盖全局 img{max-width:100%}，避免宽度被压 */
  position: relative;
  z-index: 1;
  /* 盖在占位文字之上 */
}


/* ============================================================
   分节（关于 / 评论）
   ============================================================ */
.section {
  border-top: 8px solid #eef1f6;
  margin-top: 8px;
  background: var(--card);
}

.h2 {
  padding: 14px 16px;
  font-weight: 800;
  font-size: 16px;
}

.body {
  padding: 0 16px 16px;
  color: #1f2937;
}

.about-body {
  padding: 0 16px 20px;
  color: #1f2937;
}

.about-body p {
  margin: 0 0 12px;
}

/* 评分总览：flex 左右布局 */
.rev-summary {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 16px;
}

.rev-score {
  min-width: 108px;
  text-align: center;
}

.rev-score .big {
  font-size: 32px;
  font-weight: 800;
}

.rev-score .stars {
  color: var(--star);
  margin: 4px 0;
}

.rev-score small {
  color: var(--muted);
}

.rev-bars {
  flex: 1;
}

.rev-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 6px 0;
}

.rev-bar label {
  width: 20px;
  color: var(--muted);
  font-size: 13px;
}

.rev-bar .track {
  flex: 1;
  height: 8px;
  background: #e2e8f0;
  border-radius: 999px;
  overflow: hidden;
}

.rev-bar .fill {
  height: 100%;
  background: #7dd58f;
}

/* 评论列表：纵向 flex */
.revs {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.rev {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  background: #fff;
}

.rev-h {
  display: flex;
  align-items: center;
  gap: 10px;
}

.rev-ava {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: #eef2ff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  color: var(--brand);
}

.rev-name {
  font-weight: 700;
}

.rev-meta {
  font-size: 12px;
  color: var(--muted);
}

.rev-txt {
  margin-top: 8px;
  font-size: 14px;
  color: #1f2937;
}

.rev-stars {
  color: var(--star);
  margin-left: auto;
  font-size: 13px;
}

/* margin-left:auto 把星星推到最右 */


/* ============================================================
   底部悬浮条 —— position: fixed
   固定在视口底部，不随页面滚动；left:0;right:0 拉满全宽。
   ============================================================ */
.sticky {
  position: fixed;
  /* 固定在视口 */
  left: 0;
  right: 0;
  bottom: 0;
  /* 左右拉满、贴底 */
  z-index: 60;
  /* 在普通内容之上 */
  background: #fff;
  border-top: 1px solid var(--line);
  box-shadow: 0 -6px 20px rgba(0, 0, 0, .08);
}

.sticky-in {
  max-width: 560px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 14px;
}

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

.sticky-app .mini-icon {
  position: relative;
  overflow: hidden;
  /* 定位基准 + 圆角裁切，和 .app-icon 一样 */
  width: 40px;
  height: 40px;
  border-radius: 10px;
  flex-shrink: 0;
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 18px;
}

.sticky-app .mini-icon::before {
  content: attr(data-label);
}

/* 兜底文字 "A" */
.sticky-app .mini-icon img {
  position: absolute;
  inset: 0;
  /* 铺满 40×40 */
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* 按比例填满并裁切，不变形 */
}

.sticky-app .t {
  font-weight: 800;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sticky-app .s {
  font-size: 12px;
  color: var(--muted);
}

.sticky-btn {
  flex-shrink: 0;
  border: 0;
  border-radius: 999px;
  padding: 11px 20px;
  background: var(--install);
  color: #fff;
  font-weight: 800;
  font-size: 14px;
  cursor: pointer;
}


/* ============================================================
   下载弹窗 —— position: fixed + 全屏遮罩 + flex 居中
   inset:0 让它铺满整个屏幕；display:none 默认隐藏，加 .open 显示。
   ============================================================ */
.modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  /* 铺满 + 最高层 */
  background: rgba(0, 0, 0, .5);
  backdrop-filter: blur(3px);
  display: none;
  /* 默认隐藏 */
  align-items: center;
  justify-content: center;
  /* 内容居中（配合 .open 的 flex） */
  padding: 16px;
}

.modal.open {
  display: flex;
}

/* 打开时变 flex，居中生效 */
.modal-box {
  width: 100%;
  max-width: 400px;
  background: #fff;
  border-radius: 18px;
  padding: 22px 20px;
  text-align: center;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .3);
}

.modal-logo {
  position: relative;
  overflow: hidden;
  /* 定位基准 + 圆角裁切 */
  width: 70px;
  height: 70px;
  margin: 0 auto 12px;
  border-radius: 17px;
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  font-weight: 800;
}

.modal-logo::before {
  content: attr(data-label);
}

/* 兜底文字 "A" */
.modal-logo img {
  position: absolute;
  inset: 0;
  /* 铺满 70×70 */
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.modal-h {
  font-size: 20px;
  font-weight: 800;
  margin: 0 0 6px;
}

.modal-p {
  font-size: 14px;
  color: var(--muted);
  margin: 0 0 18px;
}

.modal-dl {
  display: block;
  background: var(--install);
  color: #fff;
  text-decoration: none;
  padding: 14px 16px;
  border-radius: 12px;
  font-weight: 800;
  font-size: 15px;
}

.modal-note {
  margin: 14px 0 0;
  font-size: 12px;
  color: #94a3b8;
}

.modal-close {
  margin-top: 14px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  cursor: pointer;
}

.footer {
  text-align: center;
  padding: 20px 16px 12px;
  color: var(--muted);
  font-size: 12px;
}

.gpm-card-box-items {
  height: 100%;
}