* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: #c8c8cd; color: #1a1a1a; min-height: 100vh;
}

/* 顶栏 */
.topbar {
  position: sticky; top: 0; z-index: 10;
  background: rgba(255,255,255,0.85);
  -webkit-backdrop-filter: blur(20px) saturate(180%); backdrop-filter: blur(20px) saturate(180%);
  color: #1a1a1a;
  border-bottom: 1px solid rgba(0,0,0,0.06);
  padding: env(safe-area-inset-top, 0px) 16px 0; text-align: center;
}
.topbar-simple { display: flex; align-items: center; justify-content: space-between; padding: 0 14px; position: relative; }
.topbar-title { font-size: 20px; font-weight: 700; flex: 1; text-align: center; line-height: 1; }

/* 图标按钮：圆形毛玻璃，10% 透明 */
.icon-btn {
  width: 38px; height: 38px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid rgba(0,0,0,0.06);
  background: rgba(0,0,0,0.05);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  color: #333; cursor: pointer; padding: 0;
  transition: transform 0.18s ease, background 0.18s ease;
}
.icon-btn:active, .icon-btn.pressed { transform: scale(0.85); background: rgba(0,0,0,0.14); }

/* 搜索栏（展开时） */
.search-bar { display: flex; gap: 8px; align-items: center; padding: 0 14px 10px; }
.search-input {
  flex: 1; padding: 9px 14px; font-size: 14px;
  border: 1px solid #e0e0e5; border-radius: 20px; outline: none;
  background: #f5f5f7; color: #1a1a1a;
}
.search-close {
  width: 40px; height: 40px; border-radius: 50%; border: none;
  background: rgba(0,0,0,0.08); color: #555; font-size: 25px; font-weight: 600;
  cursor: pointer; flex: 0 0 40px; line-height: 1;
  transition: transform 0.18s ease, background 0.18s ease;
}
.search-close:active, .search-close.pressed { transform: scale(0.85); background: rgba(0,0,0,0.15); }

/* 排序菜单（弹出）——无底背景，三个独立框 */
.sort-menu {
  position: absolute; right: 14px; top: 42px; z-index: 20;
  padding: 0; width: auto; min-width: 0;
}
.sort-item { padding: 5px 14px; font-size: 14px; color: #666; cursor: pointer; border-radius: 18px; text-align: left; white-space: nowrap; display: flex; justify-content: space-between; align-items: center; gap: 10px; background: rgba(255,255,255,0.75); -webkit-backdrop-filter: blur(20px) saturate(180%); backdrop-filter: blur(20px) saturate(180%); border: 1px solid rgba(255,255,255,0.5); margin: 4px 0; box-shadow: 0 2px 8px rgba(0,0,0,0.06); }
.sort-item:hover { background: rgba(255,255,255,0.6); }
.sort-item.active { color: #000; font-weight: 700; border-color: rgba(0,0,0,0.2); }
.sort-item .check { display: none; }
.topbar-sub { font-size: 12px; color: #999; margin-top: 2px; }
.topbar-simple .back { color: #1a1a1a; font-size: 16px; text-decoration: none; padding: 4px 8px; }
.back-placeholder { width: 44px; }

.container { max-width: 640px; margin: 0 auto; padding: 12px; }

/* 壁纸列表 */
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.card { background: rgba(255,255,255,0.72); border-radius: 14px; overflow: hidden;
  -webkit-backdrop-filter: blur(14px) saturate(150%); backdrop-filter: blur(14px) saturate(150%);
  border: 1px solid rgba(255,255,255,0.65); box-shadow: 0 2px 14px rgba(0,0,0,.06);
  display: flex; flex-direction: column; }
.card-link { text-decoration: none; color: inherit; }
.card-img-wrap { position: relative; overflow: hidden; background: #eee; }
.card-img { width: 100%; height: auto; object-fit: contain; display: block; }
.card-name { font-size: 14px; font-weight: 600; padding: 8px 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: center; display: flex; align-items: center; justify-content: center; min-height: 36px; }
.card-name-box { padding: 8px 10px 10px; }

/* 获取壁纸按钮：毛玻璃，10% 透明（接近全透），浮在壁纸图内底部 */
.get-btn {
  position: absolute; left: 10px; right: 10px; bottom: 10px;
  padding: 11px 0; border: 1px solid rgba(255,255,255,0.30); border-radius: 21px;
  background: rgba(255,255,255,0.05);
  -webkit-backdrop-filter: blur(16px) saturate(150%); backdrop-filter: blur(16px) saturate(150%);
  color: #fff; font-size: 15px; font-weight: 700; text-shadow: 0 1px 2px rgba(0,0,0,0.45);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.25), 0 6px 18px rgba(0,0,0,0.18);
  cursor: pointer;
}
.get-btn:active { transform: scale(.97); }

/* 弹窗内版本列表 */
.modal-version-title { font-size: 13px; font-weight: 700; color: #666; margin: 4px 0 8px; }
.modal-version-row {
  font-size: 13px; color: #333; background: rgba(0,0,0,0.04);
  border-radius: 8px; padding: 7px 10px; margin-bottom: 6px; text-align: center;
}

/* 购买弹窗 */
.modal-mask {
  position: fixed; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,0.45); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  padding: 24px;
}
.modal {
  width: 100%; max-width: 340px; border-radius: 20px; padding: 22px 20px;
  background: rgba(255,255,255,0.86);
  -webkit-backdrop-filter: blur(24px) saturate(160%); backdrop-filter: blur(24px) saturate(160%);
  border: 1px solid rgba(255,255,255,0.75);
  box-shadow: 0 24px 60px rgba(0,0,0,0.22);
  text-align: center;
}
.modal-name { font-size: 18px; font-weight: 800; color: #1a1a1a; }
.modal-desc { font-size: 13px; color: #888; margin-top: 4px; }
.modal-price { font-size: 34px; font-weight: 800; color: #e64340; margin: 16px 0 20px; }
.modal-price small { font-size: 14px; font-weight: 600; color: #999; }
.modal-btn-row { display: flex; gap: 10px; }
.modal-cancel {
  flex: 1; padding: 13px 0; border-radius: 14px; border: 1px solid rgba(0,0,0,0.10);
  background: rgba(0,0,0,0.05); color: #555; font-size: 15px; font-weight: 600; cursor: pointer;
}
.loading { grid-column: 1 / -1; text-align: center; color: #999; padding: 40px 0; }

/* 详情 */
.detail-img-wrap { aspect-ratio: 9 / 16; border-radius: 12px; overflow: hidden; background: #fff; }
.detail-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.detail-name { font-size: 20px; font-weight: 700; margin: 14px 2px 6px; }
.detail-desc { font-size: 14px; color: #666; margin: 0 2px 16px; line-height: 1.6; }
.buy-btn {
  width: 100%; padding: 15px; border: none; border-radius: 16px;
  background: linear-gradient(180deg, #ff5b4a, #e64340);
  color: #fff; font-size: 17px; font-weight: 700;
  border: 1px solid rgba(255,255,255,0.25);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.30), 0 10px 26px rgba(230,67,64,0.30);
  cursor: pointer; margin: 4px 0 10px;
}
.buy-btn:disabled { background: #c9c9cc; box-shadow: none; }
.buy-msg { text-align: center; color: #e64340; font-size: 13px; min-height: 18px; margin-bottom: 4px; }

.notice {
  background: #fff; border-radius: 12px; padding: 12px 14px; margin-top: 14px;
  font-size: 13px; color: #555; line-height: 1.9;
}
.notice b { color: #333; }

/* 支付页 */
.pay-box { text-align: center; padding-top: 24px; }
.pay-amount { font-size: 34px; font-weight: 800; color: #111; }
.pay-tip { font-size: 13px; color: #888; margin: 8px 0 18px; line-height: 1.7; }
.qr-wrap { background: #fff; border-radius: 16px; padding: 18px; display: inline-block; box-shadow: 0 2px 10px rgba(0,0,0,.08); }
.qr-img { width: 220px; height: 220px; display: block; }
.pay-status { font-size: 15px; font-weight: 600; color: #e64340; margin: 18px 0 6px; }
.pay-timeout { font-size: 12px; color: #999; }

/* 成功页 */
.success-box { text-align: center; padding-top: 30px; }
.success-icon {
  width: 64px; height: 64px; line-height: 64px; border-radius: 50%;
  background: #07c160; color: #fff; font-size: 34px; margin: 0 auto 14px;
}
.success-title { font-size: 22px; font-weight: 800; }
.success-sub { font-size: 14px; color: #666; margin: 6px 0 20px; }
.code-box {
  font-size: 20px; font-weight: 800; letter-spacing: 1px; font-family: "Courier New", monospace;
  background: #111; color: #fff; border-radius: 12px; padding: 18px 12px; margin-bottom: 12px;
  user-select: all; -webkit-user-select: all;
}
.steps { text-align: left; }

.foot { text-align: center; color: #aaa; font-size: 12px; padding: 24px 0 30px; }
