:root {
  --accent: #0071e3;
  --accent-dark: #0058b8;
  --accent-soft: #e8f3ff;
  --ink: #1d1d1f;
  --muted: #6e6e73;
  --line: rgba(0, 0, 0, .08);
  --surface: #ffffff;
  --bg: #fbfbfd;
  --radius: 22px;
  --shadow: 0 12px 40px rgba(0, 0, 0, .06);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: hidden; }
body {
  margin: 0;
  max-width: 100%;
  overflow-x: hidden;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button { cursor: pointer; }
.container { width: min(1120px, calc(100% - 48px)); margin: 0 auto; }
[hidden] { display: none !important; }

/* ---------- 导航 ---------- */
.site-header {
  position: sticky; top: 0; z-index: 30;
  background: rgba(251, 251, 253, .82);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--line);
}
.nav-shell { height: 52px; display: flex; align-items: center; gap: 24px; }
.brand { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 650; letter-spacing: -.2px; flex-shrink: 0; }
.brand-mark {
  width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--accent), #7ac7ff); color: #fff;
  font-size: 13px; font-weight: 800; box-shadow: 0 3px 10px rgba(0, 113, 227, .24);
}
.brand-mark img { width: 100%; height: 100%; object-fit: cover; border-radius: 8px; }
.brand-tag { font-size: 10px; font-weight: 600; color: var(--accent); background: var(--accent-soft); padding: 3px 8px; border-radius: 980px; }
.main-nav { display: flex; align-items: center; gap: 28px; margin: 0 auto; }
.main-nav a { font-size: 12px; color: #424245; transition: color .2s; }
.main-nav a:hover { color: var(--accent); }
.nav-btn {
  border: 0; background: var(--accent); color: #fff; border-radius: 980px;
  padding: 7px 15px; font-size: 12px; font-weight: 600; flex-shrink: 0;
  transition: background .2s, transform .2s;
}
.nav-btn:hover { background: var(--accent-dark); transform: translateY(-1px); }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid transparent; border-radius: 980px; padding: 10px 19px;
  font-size: 13px; font-weight: 600; letter-spacing: -.1px; transition: .2s;
}
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 6px 18px rgba(0, 113, 227, .22); }
.btn-primary:hover { background: var(--accent-dark); transform: translateY(-1px); }
.btn-outline { background: #fff; border-color: rgba(0, 0, 0, .12); color: var(--ink); }
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }
.btn-ghost { background: rgba(255, 255, 255, .16); border-color: rgba(255, 255, 255, .34); color: #fff; }
.btn-ghost:hover { background: rgba(255, 255, 255, .26); }
.btn-lg { padding: 12px 23px; font-size: 14px; }
.btn-block { width: 100%; }
.btn-pill { min-width: 132px; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.text-link { color: var(--accent); font-size: 13px; font-weight: 600; display: inline-block; }
.text-link:hover { text-decoration: underline; }

/* ---------- 今日推荐 ---------- */
.today-section { padding: 54px 0 20px; background: linear-gradient(180deg, #fff 0%, var(--bg) 100%); }
.today-heading { margin-bottom: 24px; }
.section-kicker { font-size: 10px; font-weight: 800; letter-spacing: 1.8px; color: var(--accent); }
.today-heading h1 { font-size: clamp(34px, 5vw, 56px); line-height: 1.1; letter-spacing: -1.8px; margin: 10px 0 4px; font-weight: 750; }
.today-sub { font-size: clamp(20px, 3vw, 30px); color: var(--accent); font-weight: 650; margin: 0; letter-spacing: -.8px; }
.today-card {
  position: relative; border-radius: 28px; overflow: hidden;
  background: #0b1024; border: 1px solid var(--line); box-shadow: var(--shadow);
}
.feature-stage { position: relative; overflow: hidden; }
.feature-canvas {
  display: block; width: 100%; height: clamp(280px, 34vw, 420px);
  object-fit: cover; object-position: center;
}
.feature-mini-icon {
  position: absolute; top: 20px; left: 22px; width: 62px; height: 62px; z-index: 3;
  border-radius: 16px; object-fit: cover;
  box-shadow: 0 8px 22px rgba(0, 0, 0, .35), 0 0 0 1px rgba(255, 255, 255, .25);
}
.feature-shade {
  position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(0deg, rgba(6, 9, 22, .86) 0%, rgba(6, 9, 22, .28) 34%, rgba(6, 9, 22, 0) 62%);
}
.feature-content {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 2;
  padding: 24px 30px 26px; color: #fff;
  display: flex; align-items: flex-end; justify-content: space-between; gap: 20px;
}
.feature-copy h2 { margin: 0 0 6px; font-size: clamp(24px, 3.2vw, 38px); font-weight: 780; letter-spacing: -1px; text-shadow: 0 2px 18px rgba(0, 0, 0, .4); }
.feature-copy p { margin: 0; font-size: 14px; color: rgba(255, 255, 255, .88); max-width: 620px; }
.feature-buy { min-width: 0; padding: 8px 17px; font-size: 12px; box-shadow: 0 4px 12px rgba(0, 113, 227, .2); flex-shrink: 0; }

/* ---------- 通用区块 ---------- */
.section { padding: 64px 0; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 26px; }
.section-head.center { flex-direction: column; align-items: center; text-align: center; }
.section-head h2 { font-size: 30px; margin: 8px 0 6px; letter-spacing: -.8px; font-weight: 700; }
.section-head p { margin: 0; color: var(--muted); font-size: 13px; }
.search-box {
  display: flex; align-items: center; gap: 8px; background: #fff; border: 1px solid var(--line);
  border-radius: 980px; padding: 0 16px; height: 38px; min-width: 260px; transition: .2s;
}
.search-box:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.search-icon { color: #a1a1a6; font-size: 19px; }
.search-box input { border: 0; outline: 0; background: none; width: 100%; font-size: 13px; color: var(--ink); }
/* ---------- 商品卡片 ---------- */
.product-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.product-card {
  display: flex; align-items: flex-start; gap: 15px; background: #fff;
  border: 1px solid var(--line); border-radius: var(--radius); padding: 18px;
  transition: transform .2s, box-shadow .2s;
}
.product-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.product-cover {
  width: 76px; height: 76px; border-radius: 18px; flex-shrink: 0; position: relative;
  display: grid; place-items: center; overflow: hidden;
  background-color: #f2f2f7;
}
.cover-img {
  position: absolute; inset: 0; z-index: 1;
  width: 100%; height: 100%; object-fit: cover;
}
.cover-glyph { font-size: 28px; font-weight: 800; color: rgba(0, 113, 227, .28); }
.product-body { flex: 1; min-width: 0; }
.system-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; }
.system-tag { display: inline-block; font-size: 10px; font-weight: 700; line-height: 1.4; color: var(--accent); background: var(--accent-soft); border-radius: 6px; padding: 2px 7px; }
.product-name { font-size: 15px; margin: 4px 0 5px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.product-sub {
  font-size: 12px; color: var(--muted); line-height: 1.5; margin: 0 0 12px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.product-bottom { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.price-now { color: var(--ink); font-size: 15px; font-weight: 750; letter-spacing: -.3px; }
.price-now small { font-size: 11px; font-weight: 700; }
.price-old { font-size: 11px; color: #a1a1a6; text-decoration: line-through; margin-left: 5px; }
.product-buy {
  border: 0; background: var(--accent); color: #fff; border-radius: 980px;
  padding: 6px 13px; font-size: 11px; font-weight: 700; flex-shrink: 0;
}
.product-buy:hover { background: var(--accent-dark); }
.product-meta { font-size: 10px; color: #a1a1a6; margin-top: 10px; display: flex; gap: 10px; }
.loading-block { grid-column: 1/-1; text-align: center; padding: 60px 0; color: var(--muted); font-size: 13px; }
.empty-state { text-align: center; padding: 60px 0; color: var(--muted); }
.empty-icon { font-size: 40px; color: #d2d2d7; }
.empty-state h3 { color: var(--ink); margin: 12px 0 5px; font-size: 17px; }
.empty-state p { font-size: 13px; margin: 0; }

/* ---------- 排行榜 ---------- */
.rank-section { background: #fff; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.rank-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 44px; }
.rank-item { display: flex; align-items: center; gap: 14px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.rank-num { width: 26px; text-align: center; font-size: 20px; font-weight: 800; color: #c7c7cc; flex-shrink: 0; }
.rank-item:nth-child(-n+3) .rank-num { color: var(--accent); }
.rank-icon {
  width: 56px; height: 56px; border-radius: 14px; flex-shrink: 0; display: grid; place-items: center;
  position: relative; overflow: hidden;
  background: #f2f2f7;
  font-size: 22px; font-weight: 800; color: rgba(0, 113, 227, .3);
}
.rank-info { flex: 1; min-width: 0; }
.rank-info h3 { font-size: 14px; margin: 0 0 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rank-info p { font-size: 11px; color: var(--muted); margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rank-btn {
  border: 0; background: var(--accent-soft); color: var(--accent); border-radius: 980px;
  padding: 6px 12px; font-size: 11px; font-weight: 700; flex-shrink: 0;
}
.rank-btn:hover { background: var(--accent); color: #fff; }

/* ---------- 服务保障 ---------- */
.service-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.service-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px 20px; }
.service-icon { width: 42px; height: 42px; border-radius: 13px; background: var(--accent-soft); display: grid; place-items: center; font-size: 18px; margin-bottom: 14px; }
.service-card h3 { font-size: 14px; margin: 0 0 7px; }
.service-card p { font-size: 12px; color: var(--muted); line-height: 1.7; margin: 0; }

/* ---------- 页脚 ---------- */
.site-footer { padding: 32px 0 44px; color: var(--muted); font-size: 12px; background: var(--bg); }
.footer-inner { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.site-footer strong { color: var(--ink); }

/* ---------- 弹层 ---------- */
.modal[hidden] { display: none !important; }
.modal { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 20px; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, .38); backdrop-filter: blur(6px); }
.modal-panel {
  position: relative; width: min(440px, 100%); max-height: calc(100vh - 40px); overflow-y: auto;
  background: #fff; border-radius: 26px; padding: 30px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .24); animation: pop .22s ease-out;
}
.modal-panel-wide { width: min(820px, 100%); padding: 0; overflow: hidden; }
@keyframes pop { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: none; } }
.modal-close {
  position: absolute; top: 14px; right: 16px; border: 0; background: #f2f2f7;
  width: 28px; height: 28px; border-radius: 50%; font-size: 18px; color: #6e6e73;
  line-height: 1; z-index: 2;
}
.modal-close:hover { background: #e5e5ea; color: var(--ink); }
.modal-head { margin-bottom: 22px; }
.step-tag { font-size: 10px; font-weight: 800; letter-spacing: 1.5px; color: var(--accent); }
.modal-head h2 { font-size: 23px; margin: 8px 0 5px; letter-spacing: -.5px; }
.modal-head p { margin: 0; color: var(--muted); font-size: 13px; }
.field-group { margin-bottom: 18px; }
.field-group > label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 9px; }
.field-group input {
  width: 100%; height: 40px; padding: 0 13px; border: 1px solid var(--line); border-radius: 11px;
  outline: 0; background: #fff; color: var(--ink); font-size: 14px;
}
.field-group input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.optional { color: #a1a1a6; font-weight: 400; font-size: 12px; }
.pay-options { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.pay-option {
  display: flex; align-items: center; gap: 9px; border: 1px solid var(--line); border-radius: 12px;
  padding: 10px 12px; cursor: pointer; font-size: 12px; font-weight: 600; transition: .2s;
}
.pay-option:hover, .pay-option.active { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.pay-icon { width: 25px; height: 25px; border-radius: 7px; display: grid; place-items: center; color: #fff; font-size: 11px; font-weight: 800; }
.radio { margin-left: auto; width: 15px; height: 15px; border-radius: 50%; border: 1.5px solid #d2d2d7; }
.pay-option.active .radio { border: 4px solid var(--accent); background: #fff; }
.checkout-product { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 14px; background: var(--bg); margin-bottom: 22px; }
.checkout-thumb { width: 50px; height: 50px; border-radius: 12px; display: grid; place-items: center; position: relative; overflow: hidden; background: var(--accent-soft); color: var(--accent); font-size: 18px; font-weight: 800; flex-shrink: 0; }
.checkout-product > div:nth-child(2) { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.checkout-product strong { font-size: 14px; }
.checkout-product span { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.checkout-price { margin-left: auto; font-weight: 800; color: var(--ink); white-space: nowrap; }
.order-total { display: flex; justify-content: space-between; align-items: center; padding: 15px 0; border-top: 1px dashed var(--line); margin: 4px 0 16px; font-size: 13px; color: var(--muted); }
.order-total strong { font-size: 24px; color: var(--ink); }
.modal-tip { text-align: center; font-size: 11px; color: #a1a1a6; margin: 14px 0 0; }
.inline-status { padding: 11px 13px; border-radius: 11px; font-size: 13px; line-height: 1.6; margin: 12px 0; }
.inline-status.error { background: #fff1f0; color: #d70015; border: 1px solid #ffd0cd; }
.inline-status.success { background: #f0fbf4; color: #248a3d; border: 1px solid #c7ebd2; }
.inline-status.info { background: var(--accent-soft); color: var(--accent); border: 1px solid #cfe6ff; }

.detail-layout { display: grid; grid-template-columns: 300px 1fr; }
.detail-cover {
  min-height: 360px; display: grid; place-items: center; position: relative; overflow: hidden; background: linear-gradient(135deg, #e8f3ff, #f5f3ff);
  font-size: 64px; font-weight: 800; color: rgba(0, 113, 227, .25);
}
.detail-body { padding: 32px; }
.detail-body h2 { font-size: 25px; margin: 14px 0 6px; letter-spacing: -.6px; }
.detail-subtitle { color: var(--muted); font-size: 13px; margin: 0 0 18px; }
.detail-price { display: flex; align-items: baseline; gap: 10px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.detail-meta { display: flex; gap: 18px; font-size: 12px; color: var(--muted); padding: 14px 0; }
.detail-desc { font-size: 13px; color: #424245; line-height: 1.8; white-space: pre-wrap; }
.feature-list { list-style: none; padding: 0; margin: 16px 0 0; display: grid; gap: 8px; }
.feature-list li { font-size: 12px; color: #424245; padding-left: 20px; position: relative; }
.feature-list li::before { content: '✓'; position: absolute; left: 0; color: #34c759; font-weight: 800; }
.detail-actions { margin-top: 24px; }

.order-result { margin-top: 16px; border: 1px solid var(--line); border-radius: 14px; padding: 18px; background: var(--bg); }
.order-result h4 { margin: 0 0 14px; font-size: 15px; }
.result-row { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; padding: 7px 0; border-bottom: 1px dashed var(--line); }
.result-row:last-child { border-bottom: 0; }
.result-row span:first-child { color: var(--muted); }
.result-row span:last-child { text-align: right; word-break: break-all; }
.result-code { margin-top: 14px; padding: 14px; border-radius: 12px; background: #fff; border: 1px dashed var(--accent); }
.result-code label { display: block; font-size: 11px; color: var(--accent); font-weight: 700; margin-bottom: 7px; }
.result-code code { font-size: 14px; font-weight: 700; word-break: break-all; user-select: all; }

/* ---------- 响应式 ---------- */
@media (max-width: 980px) {
  .main-nav { display: none; }
  .nav-btn { margin-left: auto; }
  .feature-canvas { height: clamp(260px, 44vw, 360px); }
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rank-list { grid-template-columns: minmax(0, 1fr); }
  .service-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .container { width: calc(100% - 28px); }
  .today-section { padding: 30px 0 8px; }
  .today-card { border-radius: 20px; }
  .feature-canvas { height: 260px; object-position: center; }
  .feature-mini-icon { display: none; }
  .feature-content { padding: 20px 18px 22px; gap: 12px; flex-direction: column; align-items: flex-start; }
  .feature-copy h2 { font-size: 21px; }
  .feature-copy p { font-size: 12px; line-height: 1.5; }
  .section { padding: 48px 0; }
  .section-head { flex-direction: column; align-items: flex-start; }
  .section-head.center { align-items: center; }
  .search-box { width: 100%; }
  .product-grid { grid-template-columns: minmax(0, 1fr); }
  .service-grid { grid-template-columns: minmax(0, 1fr); }
  .modal { padding: 10px; }
  .modal-panel { padding: 24px 20px; border-radius: 22px; }
  .modal-panel-wide { padding: 0; }
  .detail-layout { grid-template-columns: 1fr; }
  .detail-cover { min-height: 180px; }
  .detail-body { padding: 22px; }
  .pay-options { grid-template-columns: 1fr; }
}
