/* ===== STEAM 风格 UI（独立于原生 index.html/style.css） ===== */
[hidden] { display: none !important; }

:root {
  --bg: #1b2838;
  --bg-deep: #171a21;
  --panel: #16202d;
  --panel-2: #1f2f42;
  --line: rgba(102, 192, 244, 0.18);
  --text: #c7d5e0;
  --dim: #8f98a0;
  --blue: #66c0f4;
  --blue-deep: #417a9b;
  --green-a: #a4d007;
  --green-b: #6b8a00;
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { background: var(--bg-deep); }
body {
  font-family: "Motiva Sans", -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: radial-gradient(120% 80% at 50% 0%, #213b52 0%, var(--bg) 45%, #11161f 100%);
  color: var(--text);
  min-height: 100vh;
  min-height: 100dvh;
}
a { color: var(--blue); text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: rgba(102, 192, 244, 0.24); border-radius: 8px; }
::-webkit-scrollbar-track { background: transparent; }

/* ===== 顶栏 ===== */
.s-top {
  position: sticky; top: 0; z-index: 50;
  background: linear-gradient(180deg, #171a21 0%, #171a21 92%, rgba(23, 26, 33, 0.92) 100%);
  border-bottom: 1px solid rgba(102, 192, 244, 0.12);
  box-shadow: 0 2px 14px rgba(0, 0, 0, 0.45);
}
.s-top-in {
  max-width: 1100px; margin: 0 auto;
  display: flex; align-items: center; gap: 14px;
  padding: 10px 16px;
  flex-wrap: wrap;
}
.s-logo { font-size: 19px; font-weight: 800; letter-spacing: 0.5px; color: #fff; white-space: nowrap; }
.s-nav { display: flex; gap: 4px; flex-wrap: wrap; }
.s-nav a {
  font-size: 12px; color: #b8c6d4; padding: 6px 10px; border-radius: 3px;
  text-transform: uppercase; letter-spacing: 0.6px;
}
.s-nav a:hover { color: #fff; background: rgba(255, 255, 255, 0.06); }
.s-nav a.on { color: #fff; background: linear-gradient(90deg, var(--blue-deep), #2a5b7a); }
.s-search { flex: 1 1 200px; min-width: 160px; }
.s-search input {
  width: 100%; height: 30px; padding: 0 10px;
  background: #316282; border: 1px solid #000;
  border-radius: 3px; color: #dbe7f3; font-size: 13px; outline: none;
}
.s-search input::placeholder { color: #9fb6c9; }
.s-search input:focus { background: #3b7b9e; }
.s-rec-btn {
  display: inline-flex; align-items: center; justify-content: center;
  height: 30px; padding: 0 12px; font-size: 12px; color: #dbe7f3;
  background: linear-gradient(90deg, #2a5b7a, #417a9b);
  border: none; border-radius: 3px;
  text-decoration: none; line-height: 1; white-space: nowrap;
}
.s-rec-btn:hover { filter: brightness(1.12); }
.s-rec-btn.on { background: linear-gradient(90deg, #417a9b, #2a5b7a); box-shadow: inset 0 -2px 0 var(--blue); }
.s-switch { font-size: 11px; color: var(--dim); }
.s-switch:hover { color: var(--blue); }

/* ===== 页面容器 ===== */
.s-main { max-width: 1100px; margin: 0 auto; padding: 16px 16px 48px; }
.s-page-head { margin-bottom: 6px; }
.s-page-tip { font-size: 12px; margin: 2px 0 12px; }
.s-mt { margin-top: 28px; }
.s-block { margin-bottom: 26px; }
.s-block-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 10px; }
.s-block-head h2 { font-size: 16px; font-weight: 500; color: #fff; letter-spacing: 0.4px; }
.s-dim { color: var(--dim); font-size: 12px; }

/* ===== 精选横幅 ===== */
.s-hero {
  position: relative; overflow: hidden;
  border-radius: 4px; margin-bottom: 22px;
  min-height: 190px;
  background: #0f1620;
  border: 1px solid rgba(102, 192, 244, 0.12);
}
.s-hero-bg {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  filter: blur(14px) brightness(0.55);
  transform: scale(1.12);
}
.s-hero-in {
  position: relative;
  display: flex; gap: 16px; align-items: center;
  padding: 18px;
}
.s-hero-poster {
  width: 132px; height: 132px; flex: none;
  border-radius: 3px; object-fit: cover;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.6);
  background: #0d131b;
}
.s-hero-info { min-width: 0; }
.s-hero-title { font-size: 20px; color: #fff; font-weight: 700; margin-bottom: 6px; }
.s-hero-meta { font-size: 12px; color: #b8c6d4; margin-bottom: 10px; }
.s-hero-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ===== 商店信息条（访问次数 + 站点链接） ===== */
.s-info-bar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; flex-wrap: wrap;
  margin: -8px 0 20px;
  padding: 8px 12px;
  background: rgba(102, 192, 244, 0.06);
  border: 1px solid rgba(102, 192, 244, 0.12);
  border-radius: 3px;
  font-size: 12px;
}
.s-info-stat { color: #b8c6d4; white-space: nowrap; }
.s-info-links { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.s-info-link { color: var(--blue); text-decoration: none; white-space: nowrap; }
.s-info-link:hover { color: #fff; text-decoration: underline; }

/* ===== 按钮 ===== */
.s-btn {
  display: inline-flex; align-items: center; justify-content: center;
  height: 30px; padding: 0 14px; font-size: 12px; color: #dbe7f3;
  background: linear-gradient(90deg, #2a5b7a, #417a9b);
  border: 1px solid rgba(102, 192, 244, 0.25); border-radius: 3px;
  text-decoration: none; line-height: 1; white-space: nowrap;
}
.s-btn:hover { filter: brightness(1.12); }
.s-btn:active { transform: translateY(1px); }
.s-btn-green { background: linear-gradient(90deg, var(--green-a), var(--green-b)); color: #0b1400; font-weight: 700; border-color: rgba(0, 0, 0, 0.3); }
.s-btn-ghost { background: transparent; border-color: rgba(102, 192, 244, 0.3); }
.s-btn.on { background: linear-gradient(90deg, #417a9b, #2a5b7a); border-color: var(--blue); }
.s-link-btn { background: none; border: none; color: var(--blue); font-size: 12px; padding: 0; }
.s-link-btn:hover { text-decoration: underline; }

/* ===== 横向卡片行 ===== */
/* 手机端横向滑动：图片默认可拖拽会抢走滑动手势，统一关掉；并启用惯性滚动 */
.s-row {
  display: flex; gap: 10px;
  overflow-x: auto; overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  padding-bottom: 12px;           /* 给横向滚动条留位置 */
  scrollbar-width: thin;          /* 保留可见的拖动条：这是「可以左右滑」的提示 */
  scrollbar-color: rgba(102, 192, 244, 0.45) rgba(255, 255, 255, 0.06);
}
/* 横向行用细一点的 Steam 蓝滚动条（全局是 10px，这里 6px） */
.s-row::-webkit-scrollbar { height: 6px; }
.s-row::-webkit-scrollbar-track { background: rgba(255, 255, 255, 0.06); border-radius: 3px; }
.s-row::-webkit-scrollbar-thumb {
  background: rgba(102, 192, 244, 0.45);
  border: none;
  border-radius: 3px;
}
.s-row::-webkit-scrollbar-thumb:hover { background: rgba(102, 192, 244, 0.7); }
.s-row .s-card { flex: 0 0 150px; }
img { -webkit-user-drag: none; user-select: none; -webkit-user-select: none; }

/* ===== 卡片 ===== */
.s-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.s-grid-sm { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
.s-card { min-width: 0; }
.s-cap {
  display: block; position: relative; overflow: hidden;
  border-radius: 3px; background: #0d131b;
  aspect-ratio: 1 / 1;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.4);
}
.s-cap img { width: 100%; height: 100%; object-fit: cover; display: block; }
.s-cap .s-cap-ph {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-size: 26px; color: #3d5266;
}
.s-cap::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(23, 26, 33, 0) 55%, rgba(23, 26, 33, 0.85) 100%);
  opacity: 0; transition: opacity .18s;
}
.s-card:hover .s-cap::after { opacity: 1; }
.s-card-name {
  margin-top: 5px; font-size: 12px; color: #d3dfe9; line-height: 1.35;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
/* 名称 / 作者 / 游玩次数 各占一行，避免挤在一起 */
.s-card-author {
  margin-top: 1px; font-size: 11px; color: #8f98a0; line-height: 1.35;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.s-card-sub { margin-top: 1px; font-size: 11px; color: var(--dim); line-height: 1.35; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.s-card:hover .s-card-name { color: var(--blue); }

/* ===== 筛选 ===== */
.s-filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 6px 0 12px; }
.s-chips { display: flex; gap: 6px; flex-wrap: wrap; flex: 1 1 auto; }
.s-chip {
  font-size: 12px; padding: 5px 10px; border-radius: 2px;
  background: rgba(102, 192, 244, 0.1); color: #b8c6d4;
  border: 1px solid transparent;
}
.s-chip.on { background: linear-gradient(90deg, var(--blue-deep), #2a5b7a); color: #fff; border-color: rgba(102, 192, 244, 0.4); }
.s-select {
  height: 30px; padding: 0 8px; font-size: 12px;
  background: #1b2838; color: #cfe0ee;
  border: 1px solid rgba(102, 192, 244, 0.25); border-radius: 3px; outline: none;
}
.s-check {
  display: inline-flex; align-items: center; gap: 5px;
  height: 30px; padding: 0 8px; font-size: 12px; color: #cfe0ee;
  background: rgba(102, 192, 244, 0.08);
  border: 1px solid rgba(102, 192, 244, 0.2); border-radius: 3px;
  cursor: pointer; white-space: nowrap;
}
.s-check input { width: 14px; height: 14px; accent-color: #66c0f4; cursor: pointer; }

/* ===== 加载更多 / 空状态 ===== */
.s-more { text-align: center; padding: 16px 0 4px; }
.s-empty {
  padding: 40px 16px; text-align: center; color: var(--dim); font-size: 13px;
  border: 1px dashed rgba(102, 192, 244, 0.2); border-radius: 4px;
}

/* ===== 创作者列表 ===== */
.s-creator-list { display: flex; flex-direction: column; gap: 6px; }
.s-creator-row {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; border-radius: 3px;
  background: rgba(102, 192, 244, 0.06);
  border: 1px solid rgba(102, 192, 244, 0.1);
  color: inherit; text-decoration: none;
  cursor: pointer;
}
.s-creator-row:hover { background: rgba(102, 192, 244, 0.12); }
.s-creator-row.open { border-color: rgba(102, 192, 244, 0.45); background: rgba(102, 192, 244, 0.14); }
/* 创作者主页头部 */
.s-creator-hero {
  padding: 18px 16px; margin-bottom: 18px;
  border-radius: 4px;
  background: linear-gradient(120deg, rgba(102, 192, 244, 0.16), rgba(102, 192, 244, 0.04));
  border: 1px solid rgba(102, 192, 244, 0.2);
}
.s-creator-hero-name { font-size: 22px; font-weight: 700; color: #fff; margin-bottom: 6px; }
.s-creator-hero-sub { font-size: 12px; color: #b8c6d4; }
.s-c-rank { width: 26px; text-align: right; color: var(--dim); font-size: 13px; flex: none; }
.s-c-main { flex: 1 1 auto; min-width: 0; }
.s-c-name { font-size: 14px; color: #dbe7f3; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.s-c-sub { font-size: 11px; color: var(--dim); margin-top: 2px; }
.s-c-arrow { color: var(--dim); font-size: 14px; flex: none; }

/* ===== 最近游玩 / 忽略列表 ===== */
.s-recent-list { display: flex; flex-direction: column; gap: 6px; }
.s-rec-item, .s-ign-item {
  display: flex; align-items: center; gap: 12px;
  padding: 8px 10px; border-radius: 3px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
}
.s-ri-poster {
  width: 44px; height: 44px; flex: none; border-radius: 2px;
  object-fit: cover; background: #0d131b;
}
.s-ri-main { flex: 1 1 auto; min-width: 0; }
.s-ri-title { font-size: 13px; color: #dbe7f3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.s-ri-sub { font-size: 11px; color: var(--dim); margin-top: 2px; }
.s-ri-actions { display: flex; align-items: center; gap: 6px; flex: none; }
.s-ri-actions .s-btn { height: 26px; padding: 0 10px; font-size: 11px; }

/* ===== 详情页 ===== */
.s-detail-bg {
  position: relative; border-radius: 4px; overflow: hidden;
  margin-bottom: 16px; border: 1px solid rgba(102, 192, 244, 0.12);
}
.s-detail-bg-layer {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  filter: blur(18px) brightness(0.45); transform: scale(1.15);
}
.s-detail-head {
  position: relative; display: flex; gap: 16px; padding: 18px; align-items: flex-start;
}
.s-detail-poster {
  width: 150px; height: 150px; flex: none; border-radius: 3px;
  object-fit: cover; background: #0d131b;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.55);
}
.s-detail-main { min-width: 0; flex: 1 1 auto; }
.s-detail-crumb { font-size: 11px; color: var(--dim); margin-bottom: 6px; }
.s-detail-title { font-size: 22px; color: #fff; font-weight: 700; line-height: 1.25; margin-bottom: 8px; }
.s-detail-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.s-tag {
  font-size: 11px; color: #c6d4df; background: rgba(103, 193, 245, 0.16);
  padding: 2px 8px; border-radius: 2px;
}
.s-tag.gold { background: rgba(255, 215, 110, 0.18); color: #ffd76e; }
.s-detail-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.s-detail-body { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 16px; margin-bottom: 22px; }
.s-panel { background: rgba(22, 32, 45, 0.75); border: 1px solid rgba(102, 192, 244, 0.12); border-radius: 3px; padding: 14px; }
.s-panel h4 { font-size: 13px; color: #fff; font-weight: 600; margin-bottom: 10px; letter-spacing: .4px; }
.s-kv { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 6px 10px; font-size: 12px; }
.s-kv dt { color: var(--dim); }
.s-kv dd { color: #cfe0ee; word-break: break-all; }
.s-detail-link { color: var(--blue); text-decoration: none; }
.s-detail-link:hover { color: #fff; text-decoration: underline; }
.s-back { margin-bottom: 12px; }

/* ===== 每日推荐页 ===== */
.s-modal-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.s-sub-title { font-size: 14px; color: #fff; font-weight: 600; }

/* ===== 成就 ===== */
.s-ach-tier {
  padding: 16px; border-radius: 4px; margin-bottom: 14px;
  background: linear-gradient(120deg, rgba(102, 192, 244, 0.16), rgba(102, 192, 244, 0.04));
  border: 1px solid rgba(102, 192, 244, 0.22);
}
.s-tier-main { display: flex; align-items: baseline; gap: 10px; }
.s-tier-label { font-size: 12px; color: var(--dim); }
.s-tier-name { font-size: 24px; font-weight: 800; letter-spacing: 1px; color: #cfe0ee; }
.s-tier-name.tier-0 { color: #7f8a99; }
.s-tier-name.tier-1 { color: #c98a5b; }
.s-tier-name.tier-2 { color: #cfd8ea; }
.s-tier-name.tier-3 { color: #ffd75e; }
.s-tier-name.tier-4 { color: #8fe3d0; }
.s-tier-name.tier-5 { color: #6fc3ff; }
.s-tier-name.tier-6 { color: #c79bff; }
.s-tier-name.tier-7 { color: #ff9b6b; text-shadow: 0 0 12px rgba(255, 155, 107, 0.5); }
.s-tier-count { font-size: 12px; color: #b8c6d4; margin-top: 6px; }
.s-tier-count b { color: #fff; font-size: 14px; }
.s-tier-bar {
  margin-top: 8px; height: 6px; border-radius: 3px;
  background: rgba(255, 255, 255, 0.1); overflow: hidden;
}
.s-tier-bar i { display: block; height: 100%; border-radius: 3px; background: linear-gradient(90deg, #417a9b, #66c0f4); transition: width .3s; }
.s-ach-list { display: flex; flex-direction: column; gap: 6px; }
.s-ach-row {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; border-radius: 3px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  cursor: pointer;
}
.s-ach-row:hover { background: rgba(102, 192, 244, 0.1); }
.s-ach-row.on { border-color: rgba(164, 208, 7, 0.4); background: rgba(164, 208, 7, 0.08); }
.s-ach-icon {
  font-size: 20px; flex: none;
  filter: grayscale(1) opacity(.6);
  font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
}
.s-ach-row.on .s-ach-icon { filter: none; }
.s-ach-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.s-ach-title { font-size: 13px; color: #dbe7f3; font-weight: 600; }
.s-ach-desc { font-size: 11px; color: var(--dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.s-ach-state { font-size: 11px; color: #7f8a99; flex: none; }
.s-ach-row.on .s-ach-state { color: #b6e34a; font-weight: 700; }

/* ===== 翻页 ===== */
.s-pager { display: flex; gap: 6px; justify-content: center; padding: 12px 0 4px; flex-wrap: wrap; }
.s-pg {
  min-width: 30px; height: 28px; padding: 0 8px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 12px; color: #cfe0ee;
  background: rgba(102, 192, 244, 0.1);
  border: 1px solid rgba(102, 192, 244, 0.22);
  border-radius: 3px;
}
.s-pg:hover { background: rgba(102, 192, 244, 0.2); }
.s-pg.on { background: linear-gradient(90deg, #417a9b, #2a5b7a); border-color: var(--blue); color: #fff; font-weight: 700; }
.s-pg.dis { opacity: 0.35; pointer-events: none; }

/* ===== Toast ===== */
.s-toast {
  position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%);
  background: rgba(23, 26, 33, 0.96); color: #dbe7f3;
  border: 1px solid rgba(102, 192, 244, 0.35);
  padding: 9px 16px; border-radius: 3px; font-size: 12px; z-index: 200;
}

/* ===== 小屏 ===== */
@media (max-width: 640px) {
  .s-top-in { padding: 8px 10px; gap: 8px; }
  .s-logo { font-size: 16px; }
  .s-nav a { padding: 5px 7px; font-size: 11px; }
  .s-search { order: 5; flex: 1 1 100%; }
  .s-main { padding: 12px 10px 40px; }
  /* 手机上一律 3 列，别让封面被拉大 */
  .s-grid, .s-grid-sm { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .s-card-name { font-size: 11px; }
  .s-card-author, .s-card-sub { font-size: 10px; }
  .s-hero-poster { width: 96px; height: 96px; }
  .s-hero-title { font-size: 16px; }
  .s-detail-body { grid-template-columns: 1fr; }
  .s-detail-poster { width: 104px; height: 104px; }
  .s-detail-title { font-size: 17px; }
  .s-row .s-card { flex: 0 0 120px; }
}
