/* NS 跨区比价 · 统一样式（深色，对标 ps-price-compare） */
* { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --bg: #0b0f17; --surface: #141b29; --surface2: #1b2336;
  --border: #232c3f; --fg: #f1f5f9; --fg2: #98a4b8; --fg3: #5b6883;
  --win: #22c55e;          /* 更便宜 = 绿（与 PS 项目同一语义） */
  --sale: #f59e0b;         /* 省钱 = 橙 */
  --star: #fbbf24;
  --blue: #4d9bff; --jpy: #ffb340; --br: #25c39a;
}
body {
  background: var(--bg); color: var(--fg); min-height: 100vh;
  font: 14px/1.6 -apple-system, "Segoe UI", "Microsoft YaHei", sans-serif;
}

/* ---- 顶栏 ---- */
.top {
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px 28px; background: linear-gradient(180deg, #17233a, #0d1016);
  border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 9;
}
.brand { font-size: 19px; font-weight: 700; letter-spacing: .5px; }
.brand a { color: inherit; text-decoration: none; }
.brand .sub { font-size: 12px; color: var(--fg3); font-weight: 400; margin-left: 10px; }
.nav { display: flex; gap: 8px; }
.nav a {
  color: var(--fg2); text-decoration: none; font-size: 13px;
  padding: 6px 14px; border-radius: 999px; border: 1px solid transparent;
}
.nav a.on { color: var(--fg); background: var(--surface2); border-color: var(--border); }
.rates { font-size: 12px; color: var(--blue); margin-left: 14px; }

main { max-width: 1100px; margin: 0 auto; padding: 20px 20px 70px; }

/* ---- 搜索 ---- */
.searchbar { display: flex; gap: 10px; }
.searchbar input {
  flex: 1; height: 44px; padding: 0 16px; border-radius: 12px;
  border: 1px solid var(--border); background: var(--surface);
  color: var(--fg); font-size: 15px; outline: none;
}
.searchbar input:focus { border-color: #2e7ff0; }
.btn {
  height: 44px; padding: 0 22px; border: none; border-radius: 12px;
  background: linear-gradient(145deg, #2e7ff0, #1d63cf); color: #fff;
  font-size: 15px; font-weight: 600; cursor: pointer;
}
.btn:active { transform: scale(.97); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.chip {
  padding: 5px 14px; border-radius: 999px; font-size: 12.5px; cursor: pointer;
  background: var(--surface); border: 1px solid var(--border); color: var(--fg2);
}
.chip:hover { color: var(--fg); }
.chip.on { background: var(--surface2); color: var(--fg); border-color: #33415c; }
.chip .n { color: var(--fg3); font-size: 11px; margin-left: 4px; }

.tabs { display: flex; gap: 8px; margin: 18px 0 14px; flex-wrap: wrap; }
.tab {
  padding: 7px 18px; border-radius: 999px; font-size: 13px; cursor: pointer;
  background: var(--surface); border: 1px solid var(--border); color: var(--fg2);
}
.tab.on {
  background: linear-gradient(145deg, #2e7ff0, #1d63cf); color: #fff;
  border-color: transparent; font-weight: 600;
}

.status { color: var(--fg2); font-size: 13px; margin: 14px 0; min-height: 18px; }
.status.err { color: #ffb4b4; }

/* ---- 游戏卡片（搜索/浏览共用） ---- */
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 860px) { .grid { grid-template-columns: 1fr; } }

.gcard {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 16px; padding: 14px 16px;
}
.gcard.cheap-jp { box-shadow: inset 0 4px 0 var(--jpy); }
.gcard.cheap-br { box-shadow: inset 0 4px 0 var(--br); }
.gcard.cheap-us { box-shadow: inset 0 4px 0 var(--blue); }
.gcard.cheap-none { box-shadow: inset 0 4px 0 #39435a; }

.ghead { display: flex; align-items: center; gap: 12px; }
.ghead img {
  width: 52px; height: 52px; border-radius: 10px; background: #0b0f17;
  object-fit: cover; flex: none;
}
/* 无封面时的占位块（首字母） */
.noimg {
  width: 52px; height: 52px; border-radius: 10px; flex: none;
  background: linear-gradient(145deg, #1d2740, #141b29);
  border: 1px solid var(--border); color: var(--fg3);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; font-weight: 700;
}
.noimg.big { width: 96px; height: 96px; border-radius: 14px; font-size: 34px; }
.gtitle { font-weight: 600; font-size: 14.5px; line-height: 1.35; }
.gmeta { font-size: 12px; color: var(--fg3); margin-top: 2px; }
.save {
  margin-left: auto; flex: none; padding: 4px 12px; border-radius: 999px;
  font-size: 12px; font-weight: 700; color: var(--sale);
  background: rgba(245,158,11,.13); border: 1px solid rgba(245,158,11,.38);
}

.sides { display: flex; margin-top: 12px; border-radius: 12px; overflow: hidden; }
.side { flex: 1; padding: 10px 14px; background: rgba(255,255,255,.015);
        border: 1px solid var(--border); }
.side + .side { border-left: none; }
.side.best { background: rgba(34,197,94,.07); }
.side .tag { font-size: 11px; color: var(--fg3); letter-spacing: 1px; }
.side.best .tag { color: var(--win); font-weight: 600; }
.side .pr { font-size: 19px; font-weight: 700; margin-top: 2px; }
.side .cny { font-size: 12px; color: var(--fg2); }
.side.best .cny { color: var(--win); }
.side .none { font-size: 13px; color: var(--fg3); margin-top: 4px; }
.side.jp .pr { color: var(--jpy); }
.side.us .pr { color: var(--blue); }
.side.br .pr { color: var(--br); }
.side .hint { font-size: 11px; color: var(--fg3); margin-top: 4px; }

.gfoot { display: flex; justify-content: flex-end; margin-top: 10px; }
.gfoot a { color: var(--blue); font-size: 12.5px; text-decoration: none; }
.gfoot a:hover { text-decoration: underline; }

.rel { font-size: 12px; color: var(--fg3); margin-top: 8px; }

/* ---- 分组标题（浏览页） ---- */
.group { margin: 22px 0 10px; font-size: 15px; font-weight: 700;
         display: flex; align-items: baseline; gap: 8px; }
.group .n { font-size: 12px; color: var(--fg3); font-weight: 400; }

/* ---- 详情页 ---- */
.detail-head {
  display: flex; gap: 16px; align-items: center;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 16px; padding: 18px 20px;
}
.detail-head img { width: 96px; height: 96px; border-radius: 14px;
                   background: #0b0f17; object-fit: cover; }
.detail-head .t { font-size: 20px; font-weight: 700; }
.detail-head .m { color: var(--fg3); font-size: 13px; margin-top: 4px; }

.panel {
  margin-top: 16px; background: var(--surface); border: 1px solid var(--border);
  border-radius: 16px; padding: 16px 20px;
}
.panel h3 { font-size: 14px; font-weight: 700; margin-bottom: 12px; }
.chart svg { display: block; }
.chart .empty { color: var(--fg3); font-size: 13px; padding: 30px 0;
                text-align: center; }

.foot { text-align: center; color: var(--fg3); font-size: 12px;
        padding: 26px 20px 40px; line-height: 1.8; }

/* NS2 品牌块（任天堂红，对标 PS 页的蓝底 logo） */
.ns-logo {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 42px; height: 27px; padding: 0 7px; margin-right: 10px;
  border-radius: 7px; background: #e60012; color: #fff;
  font-size: 12.5px; font-weight: 800; letter-spacing: .6px;
  vertical-align: 2px; box-shadow: 0 2px 10px rgba(230, 0, 18, .38);
}
