/* 会员雷达 · 轻量样式，无外部依赖 */

:root {
  color-scheme: light dark;
  --bg: #f6f6f3;
  --bg-soft: #efefea;
  --panel: #ffffff;
  --text: #1a1b1e;
  --muted: #6d7178;
  --line: #e4e4df;
  --accent: #ff5a36;
  --accent-2: #ff9a3c;
  --ok: #14804a;
  --ok-bg: #e6f6ec;
  --warn: #9a5b00;
  --warn-bg: #fff3d6;
  --info: #1f5fbf;
  --info-bg: #e8f0ff;
  --shadow: 0 12px 32px rgba(20, 21, 24, 0.07);
  --radius: 20px;
  --max: 1120px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #101114;
    --bg-soft: #17181c;
    --panel: #17191d;
    --text: #f1f2f4;
    --muted: #9a9ea7;
    --line: #262930;
    --ok: #6ee7a0;
    --ok-bg: #123322;
    --warn: #ffd27a;
    --warn-bg: #3a2a0c;
    --info: #9cc3ff;
    --info-bg: #14233d;
    --shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
  }
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
  padding-bottom: env(safe-area-inset-bottom);
}

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

button,
input {
  font: inherit;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 8px;
  z-index: 50;
  padding: 8px 12px;
  border-radius: 8px;
  background: var(--text);
  color: var(--bg);
}

.skip:focus {
  left: 12px;
}

/* 顶栏 */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: var(--max);
  margin: 0 auto;
  padding: 14px 20px;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 11px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  font-size: 17px;
  box-shadow: 0 6px 14px rgba(255, 90, 54, 0.25);
}

.nav {
  display: flex;
  gap: 18px;
  color: var(--muted);
  font-size: 14px;
}

.nav a:hover {
  color: var(--text);
}

/* 演示提示 */
.demo-banner {
  max-width: var(--max);
  margin: 16px auto 0;
  padding: 12px 16px;
  border: 1px solid #f0d38a;
  border-radius: 14px;
  background: #fff7df;
  color: #7a4a00;
  font-size: 13px;
  line-height: 1.55;
}

.demo-banner code {
  padding: 1px 5px;
  border-radius: 5px;
  background: rgba(0, 0, 0, 0.06);
}

@media (prefers-color-scheme: dark) {
  .demo-banner {
    border-color: #5b4516;
    background: #2c210b;
    color: #ffd98a;
  }

  .demo-banner code {
    background: rgba(255, 255, 255, 0.08);
  }
}

main {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 20px 40px;
}

/* 首页 hero */
.hero {
  margin: 28px 0 18px;
  padding: 34px 28px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background:
    radial-gradient(600px 240px at 90% -10%, rgba(255, 90, 54, 0.16), transparent 70%),
    radial-gradient(500px 220px at 0% 110%, rgba(36, 104, 242, 0.1), transparent 70%),
    var(--panel);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.hero h1 {
  margin: 0;
  font-size: clamp(34px, 6vw, 56px);
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.lede {
  max-width: 680px;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 16px;
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.hero-stats span {
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: color-mix(in srgb, var(--panel) 70%, transparent);
  color: var(--muted);
  font-size: 13px;
}

.hero-stats b {
  color: var(--text);
}

/* 搜索与分类 */
.toolbar {
  display: grid;
  gap: 12px;
  margin: 22px 0 8px;
}

.search {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 50px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.search svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: var(--muted);
  stroke-width: 2;
  stroke-linecap: round;
}

.search input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-size: 15px;
}

.search input::placeholder {
  color: var(--muted);
}

.chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
}

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

.chip {
  flex: 0 0 auto;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  color: var(--muted);
  font-size: 13px;
  cursor: pointer;
}

.chip.on {
  border-color: var(--text);
  background: var(--text);
  color: var(--bg);
}

/* 区块 */
.section {
  margin-top: 30px;
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.section-head h2,
.explain h2 {
  margin: 0;
  font-size: 20px;
  letter-spacing: -0.01em;
}

.muted {
  color: var(--muted);
}

/* 卡片网格 */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
}

.card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.02);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.card:hover,
.card:focus-visible {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--accent) 35%, var(--line));
  box-shadow: var(--shadow);
  outline: none;
}

.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.tile {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: color-mix(in srgb, var(--c, var(--accent)) 14%, transparent);
  color: var(--c, var(--accent));
  font-size: 18px;
  font-weight: 800;
}

.card-arrow {
  color: var(--muted);
  font-size: 18px;
  transition: transform 0.18s ease, color 0.18s ease;
}

.card:hover .card-arrow {
  transform: translateX(3px);
  color: var(--accent);
}

.card h2,
.card h3 {
  margin: 4px 0 0;
  font-size: 17px;
  line-height: 1.35;
  letter-spacing: -0.01em;
}

.card .shop {
  margin: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 12.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 20px;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.5;
}

.badge.ok {
  background: var(--ok-bg);
  color: var(--ok);
}

.badge.warn {
  background: var(--warn-bg);
  color: var(--warn);
}

.badge.info {
  background: var(--info-bg);
  color: var(--info);
}

.badge.bundle {
  background: #f0e8ff;
  color: #7a3bd6;
}

@media (prefers-color-scheme: dark) {
  .badge.bundle {
    background: #2a1d42;
    color: #c9a8ff;
  }
}

.card-price {
  display: flex;
  align-items: baseline;
  gap: 4px;
  margin-top: 2px;
}

.card-price b {
  font-size: 26px;
  letter-spacing: -0.03em;
}

.card-price span {
  color: var(--muted);
  font-size: 12px;
}

.card-per {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.pill {
  display: inline-flex;
  padding: 3px 9px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
}

.low {
  color: var(--muted);
  font-size: 11.5px;
}

.card-meta {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 11.5px;
}

.bundle-card {
  background: linear-gradient(180deg, color-mix(in srgb, #7a3bd6 5%, var(--panel)), var(--panel));
}

.bundle-note {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.buy-text {
  margin-top: auto;
  padding-top: 6px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
}

/* 即将开抢 */
.upcoming-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
}

.upcoming-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 18px;
  border: 1px dashed color-mix(in srgb, var(--accent) 35%, var(--line));
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--accent) 4%, var(--panel));
}

.upcoming-card h3 {
  margin: 0;
  font-size: 16px;
}

.upcoming-card p {
  margin: 0;
  color: var(--muted);
  font-size: 12.5px;
}

/* 使用说明 */
.explain {
  margin: 38px 0 10px;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--panel);
}

.explain-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
  margin-top: 18px;
}

.explain-grid b {
  display: block;
  margin-bottom: 6px;
}

.explain-grid p {
  margin: 0;
  color: var(--muted);
  font-size: 13.5px;
}

/* 详情页 */
.detail {
  padding-top: 8px;
}

.crumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 22px 0 16px;
  color: var(--muted);
  font-size: 13px;
}

.crumbs a:hover {
  color: var(--text);
}

.detail-head {
  display: flex;
  align-items: flex-start;
  gap: 22px;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.tile.big {
  flex: 0 0 auto;
  width: 76px;
  height: 76px;
  border-radius: 22px;
  font-size: 30px;
}

.detail-info {
  min-width: 0;
}

.detail-info h1 {
  margin: 4px 0 2px;
  font-size: clamp(26px, 4vw, 38px);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.detail-info .shop {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.detail-price {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
  margin-top: 12px;
}

.detail-price b {
  font-size: 40px;
  letter-spacing: -0.04em;
}

.detail-price span {
  color: var(--muted);
  font-size: 13px;
}

.detail-price s {
  color: var(--muted);
  font-size: 14px;
}

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

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.tag {
  padding: 3px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 11.5px;
}

.block {
  margin-top: 24px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--panel);
}

.block .section-head {
  margin-bottom: 16px;
}

.options {
  display: grid;
  gap: 10px;
}

.option {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 16px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
}

.option-main h3 {
  margin: 0 0 3px;
  font-size: 15px;
  line-height: 1.4;
}

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

.option-price {
  text-align: right;
}

.option-price b {
  display: block;
  font-size: 20px;
}

.option-price span {
  color: var(--muted);
  font-size: 11.5px;
  white-space: nowrap;
}

.buy {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  border-radius: 12px;
  background: var(--accent);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
  box-shadow: 0 6px 16px rgba(255, 90, 54, 0.22);
}

.buy:hover {
  background: #e94d2b;
}

/* 价格走势 */
.spark {
  padding: 6px 0 0;
}

.spark svg {
  display: block;
  width: 100%;
  height: auto;
}

.spark-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
}

.tips {
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
  font-size: 13.5px;
}

.tips li + li {
  margin-top: 6px;
}

.disclosure-box {
  margin-top: 24px;
  padding: 18px 20px;
  border: 1px dashed var(--line);
  border-radius: 18px;
  background: var(--bg-soft);
  color: var(--muted);
  font-size: 12.5px;
}

.disclosure-box b {
  color: var(--text);
}

.disclosure-box p {
  margin: 6px 0 0;
}

/* 榜单页 */
.page {
  padding-top: 28px;
}

.page h1 {
  margin: 0 0 8px;
  font-size: clamp(28px, 4vw, 40px);
  letter-spacing: -0.02em;
}

.deals-group {
  margin-top: 28px;
}

.deals-group h2 {
  margin: 0 0 10px;
  font-size: 18px;
}

.deals-group ul {
  margin: 0;
  padding-left: 18px;
}

.deals-group li {
  margin: 8px 0;
  color: var(--muted);
  font-size: 13.5px;
}

.deals-group li a {
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--accent) 45%, transparent);
  text-underline-offset: 3px;
}

.deals-group li a:hover {
  color: var(--accent);
}

/* 文字页 */
.prose {
  max-width: 760px;
  padding-top: 28px;
}

.prose h1 {
  margin: 0 0 12px;
  font-size: clamp(28px, 4vw, 40px);
  letter-spacing: -0.02em;
}

.prose h2 {
  margin-top: 28px;
  font-size: 19px;
}

.prose p,
.prose li {
  color: var(--muted);
  font-size: 14px;
}

.prose a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.prose code {
  padding: 1px 5px;
  border-radius: 5px;
  background: var(--bg-soft);
}

/* 空状态 */
.empty {
  margin: 24px 0;
  padding: 24px;
  border: 1px dashed var(--line);
  border-radius: 16px;
  color: var(--muted);
  font-size: 14px;
  text-align: center;
}

/* 页脚 */
.footer {
  max-width: var(--max);
  margin: 36px auto 0;
  padding: 24px 20px 34px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}

.footer .disclosure {
  margin: 0 0 10px;
  line-height: 1.6;
}

.foot-links {
  margin: 0 0 8px;
}

.foot-links a {
  color: var(--text);
}

/* 响应式 */
@media (max-width: 720px) {
  .hero {
    padding: 26px 20px;
    border-radius: 22px;
  }

  .topbar {
    padding: 12px 16px;
  }

  main {
    padding: 0 16px 28px;
  }

  .grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 10px;
  }

  .card {
    padding: 14px;
    border-radius: 16px;
  }

  .card-price b {
    font-size: 22px;
  }

  .card h2,
  .card h3 {
    font-size: 15px;
  }

  .detail-head {
    flex-direction: column;
    padding: 20px;
  }

  .tile.big {
    width: 64px;
    height: 64px;
    border-radius: 18px;
    font-size: 26px;
  }

  .detail-price b {
    font-size: 34px;
  }

  .block {
    padding: 18px;
    border-radius: 18px;
  }

  .option {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .option-price {
    text-align: left;
  }

  .buy {
    width: 100%;
  }

  .footer {
    padding: 20px 16px 28px;
  }

  .nav {
    gap: 12px;
    font-size: 13px;
  }

  .hero-stats span {
    font-size: 12px;
  }
}

@media (max-width: 380px) {
  .grid {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    transition: none !important;
    animation: none !important;
  }
}
