﻿:root {
  color-scheme: light;
  --bg: #f6f7fb;
  --paper: #ffffff;
  --ink: #202124;
  --muted: #7b7f8a;
  --line: #eceef4;
  --red: #ff5a4f;
  --orange: #ff944d;
  --blue: #5a8dff;
  --green: #49c987;
  --purple: #a457e8;
  --shadow: 0 12px 36px rgba(31, 41, 55, .08);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  padding-bottom: 74px;
}
button, input, select, textarea { font: inherit; }
button { border: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
input, select, textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  outline: 0;
}
input, select { height: 42px; padding: 0 12px; }
textarea { padding: 12px; resize: vertical; line-height: 1.6; }
input:focus, select:focus, textarea:focus { border-color: rgba(255,90,79,.5); box-shadow: 0 0 0 4px rgba(255,90,79,.1); }
label { display: grid; gap: 7px; color: var(--muted); font-size: 13px; font-weight: 700; }

.app { max-width: 1180px; margin: 0 auto; padding: 14px clamp(12px, 3vw, 28px) 30px; }
.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 62px;
  background: rgba(246,247,251,.88);
  backdrop-filter: blur(16px);
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand-logo {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: linear-gradient(135deg, #ff765d, #ffb15f);
  color: #fff;
  font-weight: 900;
}
.brand strong, .brand small { display: block; }
.brand small { margin-top: 2px; color: var(--muted); font-size: 12px; }
.top-actions { display: flex; gap: 8px; align-items: center; }
.plain-btn, .dark-btn, .primary-btn, .ghost-btn {
  min-height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  font-weight: 800;
}
.plain-btn { background: #fff; color: var(--ink); border: 1px solid var(--line); }
.dark-btn { background: #23262f; color: #fff; }
.primary-btn { background: linear-gradient(135deg, var(--red), var(--orange)); color: #fff; box-shadow: 0 10px 20px rgba(255,90,79,.22); }
.ghost-btn { background: #fff4ef; color: #f05f35; }

.hero {
  min-height: 184px;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 16px;
  padding: clamp(22px, 4vw, 42px);
  border-radius: 22px;
  overflow: hidden;
  background:
    radial-gradient(circle at 18% 20%, rgba(255,255,255,.34), transparent 18%),
    radial-gradient(circle at 72% 26%, rgba(255,238,153,.28), transparent 18%),
    linear-gradient(135deg, #ff5b4f 0%, #ff7e50 58%, #ffb35c 100%);
  color: #fff;
  box-shadow: var(--shadow);
}
.hero-copy p { margin: 0 0 8px; font-weight: 900; color: rgba(255,255,255,.9); }
.hero-copy h1 { margin: 0 0 12px; font-size: clamp(30px, 5vw, 58px); line-height: 1.04; letter-spacing: 0; }
.hero-copy span { display: block; color: rgba(255,255,255,.88); line-height: 1.7; }
.hero-ticket {
  min-width: 120px;
  padding: 18px;
  border-radius: 18px;
  background: rgba(255,255,255,.18);
  backdrop-filter: blur(12px);
  text-align: center;
}
.hero-ticket span { display: block; color: rgba(255,255,255,.8); font-size: 13px; }
.hero-ticket strong { display: block; margin-top: 6px; font-size: 38px; }

.search-card {
  display: grid;
  grid-template-columns: 1fr 140px;
  gap: 10px;
  margin: 14px 0;
  padding: 10px;
  border-radius: 18px;
  background: var(--paper);
  box-shadow: var(--shadow);
}
.search-card input, .search-card select { border-radius: 14px; background: #f8f9fc; }
.promise-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  padding: 12px 4px 8px;
  color: #555b66;
  font-weight: 800;
}
.promise-row div { display: flex; align-items: center; justify-content: center; gap: 7px; white-space: nowrap; }
.promise-row span {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border: 1px solid #dfe2ea;
  border-radius: 50%;
  color: #687080;
  font-size: 12px;
}

.category-section, .feature-section, .products-section { margin-top: 18px; }
.category-grid {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 16px 12px;
  padding: 18px 8px 6px;
}
.category-item {
  display: grid;
  justify-items: center;
  gap: 8px;
  color: #565d69;
  font-weight: 800;
  border: 0;
  background: transparent;
}
.category-icon {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  font-size: 20px;
  font-weight: 900;
  box-shadow: 0 10px 22px rgba(31,41,55,.1);
}
.category-item.active .category-icon { outline: 4px solid rgba(255,90,79,.16); }
.category-item small { font-size: 13px; }

.feature-section { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.feature-card {
  position: relative;
  overflow: hidden;
  min-height: 150px;
  padding: 22px;
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--shadow);
}
.feature-card h2 { margin: 0 0 8px; font-size: clamp(22px, 3vw, 32px); }
.feature-card p { margin: 0 0 14px; color: var(--muted); }
.feature-card button { width: 30px; height: 30px; border-radius: 50%; background: rgba(255,255,255,.75); color: var(--orange); font-weight: 900; }
.feature-card.mint { background: linear-gradient(135deg, #eafbf3, #f7fffb); color: #26a56c; }
.feature-card.peach { background: linear-gradient(135deg, #fff1df, #fffaf2); color: #fa7b29; }
.book-stack, .coin-stack { position: absolute; right: 18px; bottom: 18px; width: 92px; height: 86px; }
.book-stack span {
  position: absolute;
  bottom: 0;
  width: 28px;
  height: 74px;
  border-radius: 5px;
  background: linear-gradient(180deg, #ff665a, #fff);
  box-shadow: 0 8px 16px rgba(0,0,0,.08);
}
.book-stack span:nth-child(2) { left: 30px; height: 82px; background: linear-gradient(180deg, #6bd0ff, #fff); }
.book-stack span:nth-child(3) { left: 60px; height: 68px; background: linear-gradient(180deg, #ffb45f, #fff); }
.coin-stack span {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ffd15a, #ff8a35);
  opacity: .95;
}
.coin-stack span:nth-child(2) { right: 28px; bottom: 18px; width: 48px; height: 48px; opacity: .75; }
.coin-stack span:nth-child(3) { right: 52px; bottom: 4px; width: 34px; height: 34px; opacity: .65; }
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 14px;
  margin-bottom: 12px;
}
.section-head p { margin: 0 0 4px; color: var(--red); font-size: 12px; font-weight: 900; letter-spacing: .12em; }
.section-head h2 { margin: 0; font-size: 26px; }
.product-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.product-card {
  position: relative;
  display: grid;
  grid-template-columns: 96px 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(31,41,55,.06);
}
.rank-badge {
  position: absolute;
  left: 10px;
  top: 10px;
  z-index: 1;
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--red);
  color: #fff;
  font-size: 12px;
  font-weight: 900;
}
.product-cover {
  height: 96px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 24px;
  font-weight: 900;
  background: linear-gradient(135deg, #ff765d, #ffb15f);
}
.product-cover.ai { background: linear-gradient(135deg, #7166ff, #7fb2ff); }
.product-cover.report { background: linear-gradient(135deg, #35a7ff, #89dcff); }
.product-cover.tool { background: linear-gradient(135deg, #2fc98b, #8df2bd); }
.product-cover.growth { background: linear-gradient(135deg, #ff765d, #ffb15f); }
.product-info h3 { margin: 0 0 6px; font-size: 18px; }
.product-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 7px; color: var(--muted); font-size: 12px; }
.detail { margin: 0; color: var(--muted); line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.price { color: #ef4338; font-size: 20px; font-weight: 950; white-space: nowrap; }
.card-actions { display: grid; gap: 8px; justify-items: end; }
.card-actions button { min-width: 88px; min-height: 36px; border-radius: 999px; font-weight: 900; }
.pay-btn { background: linear-gradient(135deg, var(--red), var(--orange)); color: #fff; }
.share-btn { background: #f3f5f9; color: #565d69; }
.empty { grid-column: 1 / -1; padding: 26px; text-align: center; color: var(--muted); background: #fff; border-radius: 16px; }

.bottom-nav {
  position: fixed;
  left: 50%;
  bottom: 0;
  z-index: 20;
  width: min(1180px, 100%);
  transform: translateX(-50%);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line);
  background: rgba(255,255,255,.95);
  backdrop-filter: blur(16px);
  box-shadow: 0 -10px 30px rgba(31,41,55,.08);
}
.bottom-nav a, .bottom-nav button {
  min-height: 58px;
  display: grid;
  place-items: center;
  background: transparent;
  color: #8a909b;
  font-size: 13px;
  font-weight: 800;
}
.bottom-nav .active { color: var(--red); }

.panel-dialog, .pay-dialog, .viewer-dialog {
  width: min(920px, calc(100vw - 26px));
  max-height: min(86vh, 760px);
  overflow: auto;
  border: 0;
  border-radius: 22px;
  padding: 22px;
  box-shadow: 0 30px 90px rgba(16,24,40,.25);
}
.pay-dialog { width: min(620px, calc(100vw - 26px)); }
.viewer-dialog { width: min(860px, calc(100vw - 26px)); }
dialog::backdrop { background: rgba(20,24,33,.38); backdrop-filter: blur(5px); }
.dialog-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; margin-bottom: 16px; }
.dialog-head p { margin: 0 0 5px; color: var(--red); font-size: 12px; font-weight: 900; letter-spacing: .12em; }
.dialog-head h3 { margin: 0; font-size: 24px; }
.icon-btn { width: 38px; height: 38px; border-radius: 50%; background: #f4f5f8; color: var(--ink); font-size: 22px; }
.customer-layout, .admin-layout { display: grid; grid-template-columns: minmax(240px, 320px) 1fr; gap: 16px; }
.login-box, .customer-stats, .admin-box {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
}
.login-box label + label, .login-box button, .admin-form label { margin-top: 12px; }
.login-box p { color: var(--muted); line-height: 1.65; }
.mini-head { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.mini-head span { padding: 5px 9px; border-radius: 999px; background: #ecfbf3; color: #23a160; font-size: 12px; font-weight: 900; }
.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 12px; }
.stats-grid div { padding: 13px; border-radius: 14px; background: #f7f8fb; }
.stats-grid span { color: var(--muted); font-size: 12px; }
.stats-grid strong { display: block; margin-top: 6px; font-size: 20px; }
.record-list, .admin-list { display: grid; gap: 8px; margin-top: 12px; }
.record, .admin-row { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: center; padding: 12px; border-radius: 14px; background: #f8f9fc; }
.record span, .admin-row span { display: block; margin-top: 4px; color: var(--muted); font-size: 12px; }
.admin-form { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.admin-form .wide { grid-column: 1 / -1; }
.file-field { padding: 12px; border: 1px dashed var(--line); border-radius: 14px; background: #fafbff; }
.file-field input { height: auto; padding: 0; border: 0; background: transparent; }
.pay-methods { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 16px 0; }
.pay-methods label { display: flex; align-items: center; gap: 8px; padding: 12px; border: 1px solid var(--line); border-radius: 14px; color: var(--ink); }
.pay-methods input { width: auto; height: auto; }
.full { width: 100%; }
.access-box { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; padding: 12px; border-radius: 14px; background: #fff6f2; }
.access-box span { color: var(--muted); font-size: 13px; font-weight: 800; }
.access-box strong { color: #ef4338; font-size: 22px; }
.document-viewer { margin-top: 16px; padding: 18px; border: 1px solid var(--line); border-radius: 16px; background: #fff; line-height: 1.75; }
.document-viewer h4 { margin: 0 0 10px; font-size: 22px; }
.document-viewer ul { margin: 0; padding-left: 20px; color: var(--muted); }
.document-viewer ul li { margin-bottom: 6px; }

/* 验证码输入行 */
.code-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: center; }
.code-row input { width: 100%; }
.code-row button { white-space: nowrap; min-height: 42px; padding: 0 14px; }
.code-row button:disabled { opacity: .6; cursor: not-allowed; }

/* 支付提示 */
#payTip { min-height: 16px; }
#payQrArea img { border-radius: 12px; }

@media (max-width: 620px) {
  .code-row { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  .category-grid { grid-template-columns: repeat(5, 1fr); }
  .feature-section, .product-list, .customer-layout, .admin-layout { grid-template-columns: 1fr; }
  .product-card { grid-template-columns: 88px 1fr; }
  .card-actions { grid-column: 1 / -1; grid-template-columns: 1fr 1fr; justify-items: stretch; }
  .card-actions button { width: 100%; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .admin-form { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 620px) {
  body { padding-bottom: 64px; }
  .app { padding-inline: 10px; }
  .topbar { min-height: 56px; }
  .brand small { display: none; }
  .top-actions .plain-btn { display: none; }
  .hero { grid-template-columns: 1fr; min-height: 162px; border-radius: 18px; }
  .hero-ticket { justify-self: start; display: flex; align-items: center; gap: 10px; padding: 10px 14px; }
  .hero-ticket strong { margin: 0; font-size: 25px; }
  .search-card { grid-template-columns: 1fr; }
  .promise-row { grid-template-columns: repeat(4, 1fr); gap: 2px; font-size: 12px; }
  .promise-row div { flex-direction: column; gap: 4px; }
  .category-grid { grid-template-columns: repeat(5, 1fr); gap: 14px 6px; padding-inline: 0; }
  .category-icon { width: 50px; height: 50px; font-size: 18px; }
  .category-item small { font-size: 12px; }
  .feature-card { min-height: 132px; padding: 18px; }
  .book-stack, .coin-stack { transform: scale(.8); transform-origin: bottom right; }
  .section-head h2 { font-size: 24px; }
  .product-card { gap: 10px; padding: 10px; }
  .product-cover { width: 82px; height: 82px; font-size: 20px; }
  .product-info h3 { font-size: 16px; }
  .detail { -webkit-line-clamp: 1; }
  .panel-dialog, .pay-dialog, .viewer-dialog { padding: 16px; border-radius: 18px; }
  .pay-methods, .access-box, .admin-form { grid-template-columns: 1fr; }
}
