:root {
  --bg: #0b0d12;
  --bg-soft: #12151d;
  --card: #161a24;
  --line: #242938;
  --text: #e8eaf0;
  --muted: #9aa3b5;
  --accent: #4f8cff;
  --accent-soft: #1d2a45;
  --ok: #35c07f;
  --warn: #f0b429;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.7 -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Microsoft YaHei", "Hiragino Sans GB", sans-serif;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent);
}

.wrap {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 20px 80px;
}

header.top {
  padding: 22px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 650;
  letter-spacing: 0.2px;
}

.brand .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 14px var(--accent);
}

.brand small {
  color: var(--muted);
  font-weight: 400;
}

.hero {
  padding: 40px 0 8px;
}

h1 {
  font-size: 34px;
  line-height: 1.25;
  margin: 0 0 14px;
  letter-spacing: -0.5px;
}

.lead {
  color: var(--muted);
  font-size: 16px;
  margin: 0 0 26px;
  max-width: 620px;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 22px;
}

.price-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  background: linear-gradient(160deg, #182034 0%, #141822 60%);
}

.price {
  font-size: 40px;
  font-weight: 700;
  letter-spacing: -1px;
}

.price small {
  display: block;
  font-size: 13px;
  font-weight: 400;
  color: var(--muted);
  letter-spacing: 0;
  margin-top: 4px;
}

button.primary {
  appearance: none;
  border: 0;
  cursor: pointer;
  background: var(--accent);
  color: #fff;
  font: inherit;
  font-weight: 600;
  padding: 13px 26px;
  border-radius: 10px;
  transition: filter 0.15s ease, transform 0.05s ease;
}

button.primary:hover {
  filter: brightness(1.1);
}

button.primary:active {
  transform: translateY(1px);
}

button.primary:disabled {
  opacity: 0.55;
  cursor: default;
}

button.ghost {
  appearance: none;
  cursor: pointer;
  background: transparent;
  color: var(--text);
  border: 1px solid var(--line);
  font: inherit;
  padding: 12px 22px;
  border-radius: 10px;
}

button.ghost:hover {
  border-color: #3a4257;
}

.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
  margin: 26px 0;
}

.step {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px 18px;
}

.step b {
  display: block;
  color: var(--accent);
  font-size: 13px;
  letter-spacing: 1px;
  margin-bottom: 6px;
}

.step span {
  color: var(--muted);
  font-size: 14px;
}

h2 {
  font-size: 19px;
  margin: 40px 0 12px;
}

.faq dt {
  font-weight: 600;
  margin-top: 16px;
}

.faq dd {
  margin: 4px 0 0;
  color: var(--muted);
}

.codebox {
  position: relative;
  background: #0a0c11;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px 14px 14px;
  margin: 10px 0 14px;
}

.codebox code {
  font: 13px/1.6 ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  color: #c8d3ff;
  word-break: break-all;
  white-space: pre-wrap;
}

.copy-row {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

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

.small {
  font-size: 13px;
}

.badge {
  display: inline-block;
  font-size: 12px;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: #a9c6ff;
  border: 1px solid #2c3d63;
}

.badge.ok {
  background: #14301f;
  color: #7fe0ac;
  border-color: #1f5236;
}

.notice {
  border-left: 3px solid var(--warn);
  background: #241d0d;
  color: #f2d79a;
  padding: 12px 16px;
  border-radius: 0 10px 10px 0;
  margin: 18px 0;
  font-size: 14px;
}

/* 教学视频。preload=metadata 时浏览器只取头部，点播放才开始下正文，
   不会让一进首页就吃掉十几 MB 流量。 */
.tutorial {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  background: #000;
  margin-top: 12px;
}

/* 网站公告。放在首页最上面，比 hero 还靠前，确保一进来就看到 */
.announce {
  background: linear-gradient(160deg, #17233a 0%, #141822 100%);
  border: 1px solid #2c3d63;
  border-radius: 14px;
  padding: 16px 20px;
  margin: 6px 0 22px;
}

.announce-title {
  font-weight: 650;
  color: #a9c6ff;
  font-size: 15px;
  margin-bottom: 8px;
}

.announce ul {
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
  font-size: 14px;
}

.announce li {
  margin: 5px 0;
}

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

.kv {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 6px 18px;
  margin: 0;
}

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

.kv dd {
  margin: 0;
}

footer {
  border-top: 1px solid var(--line);
  margin-top: 48px;
  padding-top: 20px;
  color: var(--muted);
  font-size: 13px;
}

.err {
  color: #ff8b8b;
}

/* ---------------- 收款码收银台 ---------------- */
.qr-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 16px;
  margin: 20px 0;
}

.qr-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px;
  text-align: center;
}

.qr-card h3 {
  margin: 0 0 14px;
  font-size: 15px;
}

.qr-img {
  display: block;
  width: 100%;
  /* 收款码海报都是竖版，用 3:4 的框；
     两张原图比例不完全一样（828x1124 / 1280x1919），固定框 + contain
     才能让下面两个按钮在同一水平线上。框是白底，留白看不出来。 */
  aspect-ratio: 3 / 4;
  object-fit: contain;
  max-width: 240px;
  background: #fff;
  border-radius: 10px;
  border: 1px solid var(--line);
  margin: 0 auto 14px;
}

.qr-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 210px;
  aspect-ratio: 1 / 1;
  margin: 0 auto 14px;
  padding: 14px;
  border: 1px dashed var(--line);
  border-radius: 10px;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.6;
}

.amount-big {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.5px;
}

/* ---------------- 卖家后台 ---------------- */
.admin-bar {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

input[type="password"],
input[type="text"] {
  background: #0a0c11;
  border: 1px solid var(--line);
  color: var(--text);
  font: inherit;
  padding: 10px 12px;
  border-radius: 9px;
  min-width: 220px;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}

.admin-table th,
.admin-table td {
  border-bottom: 1px solid var(--line);
  padding: 9px 10px;
  text-align: left;
  vertical-align: middle;
}

.admin-table th {
  color: var(--muted);
  font-weight: 600;
  white-space: nowrap;
}

.row-claimed {
  background: #1c2436;
}

.row-paid {
  opacity: 0.55;
}

.row-canceled {
  opacity: 0.4;
  text-decoration: line-through;
}

.btn-mini {
  appearance: none;
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  padding: 6px 12px;
  border-radius: 7px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  margin-right: 6px;
}

.btn-mini.go {
  background: #1f6b45;
  border-color: #2c8a5b;
  color: #eafff4;
}

.btn-mini.no {
  background: #4a1f22;
  border-color: #6b2c31;
  color: #ffdede;
}

/* 放行的二次确认。刻意做成页面内可见的一块，而不是浏览器原生 confirm() */
.inline-confirm {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  background: #3a2f14;
  border: 1px solid #6b5a24;
  color: #f2d79a;
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 13px;
}

@keyframes flash {
  50% {
    background: #2c4022;
  }
}

.flash {
  animation: flash 0.9s ease 4;
}

.nowrap {
  white-space: nowrap;
}
