/* ---------- 前台：NFC 防伪验证 ---------- */
:root {
  --bg: #070b14;
  --panel: #0d1526;
  --panel-2: #111c31;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.14);
  --text: #eef2fb;
  --muted: #8b98b0;
  --lime: #c9f45c;
  --lime-deep: #a8d93a;
  --ok: #2ee6a8;
  --warn: #ffb547;
  --bad: #ff5d72;
  --radius: 26px;
  --shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
  min-height: 100vh;
}

a { color: inherit; }

.site {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  background:
    radial-gradient(1200px 600px at 15% -10%, rgba(201, 244, 92, 0.10), transparent 60%),
    radial-gradient(900px 500px at 90% 0%, rgba(56, 130, 246, 0.14), transparent 55%),
    var(--bg);
}

.glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  pointer-events: none;
  opacity: 0.55;
}
.glow-a { width: 420px; height: 420px; left: -120px; top: 220px; background: rgba(46, 230, 168, 0.12); }
.glow-b { width: 360px; height: 360px; right: -100px; bottom: -60px; background: rgba(201, 244, 92, 0.10); }

.shell {
  position: relative;
  width: min(1080px, 100%);
  margin: 0 auto;
  padding: 22px 22px 34px;
}

/* ---------------- top bar ---------------- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 4px 0 10px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  background: linear-gradient(150deg, var(--lime), #9fd93d);
  color: #0a1220;
  box-shadow: 0 8px 24px rgba(201, 244, 92, 0.25);
}
.brand-mark svg { width: 23px; height: 23px; }

.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-text strong { font-size: 15px; letter-spacing: 0.4px; }
.brand-text small { font-size: 9px; letter-spacing: 1.8px; color: var(--muted); margin-top: 3px; }

.topbar-badge {
  font-size: 11px;
  letter-spacing: 0.8px;
  color: var(--lime);
  border: 1px solid rgba(201, 244, 92, 0.35);
  background: rgba(201, 244, 92, 0.07);
  padding: 7px 12px;
  border-radius: 999px;
  white-space: nowrap;
}

/* ---------------- home hero ---------------- */
.hero {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 40px;
  align-items: center;
  padding: 58px 0 42px;
}

.eyebrow {
  display: inline-block;
  font-size: 11px;
  letter-spacing: 2.4px;
  color: var(--lime);
  border: 1px solid rgba(201, 244, 92, 0.28);
  background: rgba(201, 244, 92, 0.06);
  padding: 7px 13px;
  border-radius: 999px;
  margin-bottom: 22px;
}

.hero h1 {
  margin: 0 0 20px;
  font-size: clamp(40px, 5.4vw, 62px);
  line-height: 1.06;
  letter-spacing: -1.4px;
  font-weight: 700;
}
.hero h1 span { color: var(--lime); }

.lede {
  margin: 0 0 30px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.85;
  max-width: 440px;
}

.steps { display: grid; gap: 14px; margin-bottom: 26px; }
.step { display: flex; gap: 14px; align-items: center; }
.step-no {
  width: 38px; height: 38px; flex: none;
  border-radius: 12px;
  display: grid; place-items: center;
  font-size: 12px; font-weight: 700; letter-spacing: 0.5px;
  color: var(--lime);
  background: rgba(201, 244, 92, 0.08);
  border: 1px solid rgba(201, 244, 92, 0.22);
}
.step b { display: block; font-size: 14px; }
.step small { color: var(--muted); font-size: 12px; }

.hero-note {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
  max-width: 430px;
}
.hero-note svg { width: 16px; height: 16px; flex: none; color: var(--ok); margin-top: 2px; }

.hero-visual { display: grid; justify-items: center; gap: 18px; }

.tap-card {
  position: relative;
  width: min(330px, 82vw);
  aspect-ratio: 1;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 50% 45%, rgba(201, 244, 92, 0.10), transparent 62%);
}
.tap-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid rgba(201, 244, 92, 0.18);
  animation: ripple 4s ease-out infinite;
}
.ring-2 { animation-delay: 1.3s; }
.ring-3 { animation-delay: 2.6s; }

.tap-phone {
  width: 132px;
  height: 208px;
  border-radius: 28px;
  border: 1px solid var(--line-strong);
  background: linear-gradient(180deg, #16213a, #0b1322);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5), inset 0 0 0 1px rgba(255, 255, 255, 0.03);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transform: rotate(-8deg);
}
.tap-phone span { color: var(--lime); }
.tap-phone svg { width: 46px; height: 46px; }
.tap-phone small { font-size: 9px; letter-spacing: 2.4px; color: var(--muted); }

.tap-tag {
  position: absolute;
  right: 12%;
  bottom: 20%;
  width: 58px; height: 58px;
  border-radius: 16px;
  display: grid; place-items: center;
  font-size: 10px; letter-spacing: 1.6px; font-weight: 700;
  color: #0a1220;
  background: linear-gradient(150deg, var(--lime), #9fd93d);
  box-shadow: 0 14px 30px rgba(201, 244, 92, 0.3);
  transform: rotate(12deg);
}

.hero-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: var(--muted);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
  padding: 8px 14px;
  border-radius: 999px;
}
.dot { width: 6px; height: 6px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 10px var(--ok); }

.admin-link { text-align: center; padding-top: 8px; }
.admin-link a { color: rgba(139, 152, 176, 0.6); font-size: 11px; letter-spacing: 1px; text-decoration: none; }
.admin-link a:hover { color: var(--muted); }

/* ---------------- footer ---------------- */
.foot { text-align: center; padding: 34px 0 8px; color: var(--muted); }
.foot-line { font-size: 12px; letter-spacing: 0.4px; }
.foot-sub { font-size: 10px; margin-top: 6px; opacity: 0.75; line-height: 1.7; }
.foot-id { display: inline-block; margin-top: 10px; font-size: 10px; letter-spacing: 1.2px; color: rgba(139, 152, 176, 0.7); }

/* ---------------- verify page（重写：背景图 + 模态框 + 产品卡片） ---------------- */

.verify-site {
  /* 竖版全屏背景图 + 半透明黑叠层，保证白色文字可读 */
  background:
    linear-gradient(180deg, rgba(0,0,0,0.45) 0%, rgba(0,0,0,0.30) 30%,
                     rgba(0,0,0,0.55) 75%, rgba(0,0,0,0.75) 100%),
    url("/static/bg.jpg") center center / cover fixed no-repeat;
  min-height: 100vh;
}

.verify-site .shell {
  width: min(520px, 100%);
  padding: 100px 18px 36px;
}

/* --- 左上角公司 Logo（透明底） --- */
.brand-logo {
  position: fixed;
  top: 20px;
  left: 24px;
  display: block;
  width: auto;
  margin: 0;
  text-decoration: none;
  z-index: 5;
}
.brand-logo img {
  display: block;
  width: auto;
  max-width: 200px;
  height: 62px;
  filter: drop-shadow(0 6px 16px rgba(0, 0, 0, 0.45));
}

/* --- 主界面产品卡片 --- */
.product-stage {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 22px;
  padding: 20px 16px 18px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  animation: fadeUp 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.product-image-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 14px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  margin-bottom: 16px;
}
.product-hero-img {
  position: relative;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  z-index: 2;
}
.image-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: rgba(201, 244, 92, 0.5);
  z-index: 1;
}
.image-fallback svg { width: 48px; height: 48px; }

.product-info { text-align: center; }

.product-series-tag {
  display: inline-block;
  margin-bottom: 8px;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid rgba(201, 244, 92, 0.45);
  background: rgba(201, 244, 92, 0.12);
  color: var(--lime);
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.product-name {
  margin: 0 0 8px;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.3px;
  line-height: 1.25;
  color: #ffffff;
}

.product-desc {
  margin: 0 0 10px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.7;
  white-space: pre-wrap;
}

.product-hero-code {
  display: inline-block;
  font-family: "SF Mono", ui-monospace, Menlo, Consolas, monospace;
  font-size: 11px;
  letter-spacing: 1.2px;
  color: var(--lime);
  background: rgba(201, 244, 92, 0.08);
  border: 1px solid rgba(201, 244, 92, 0.28);
  border-radius: 8px;
  padding: 4px 10px;
}

/* --- 绿色购买大按钮 --- */
.buy-cta {
  display: block;
  margin-top: 18px;
  padding: 16px 20px;
  border-radius: 14px;
  background: linear-gradient(135deg, #2ee6a8 0%, #1fca8f 100%);
  color: #0a1a14;
  font-size: 15px;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  letter-spacing: 0.5px;
  box-shadow: 0 10px 28px rgba(46, 230, 168, 0.38),
              inset 0 1px 0 rgba(255, 255, 255, 0.25);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.buy-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 36px rgba(46, 230, 168, 0.5),
              inset 0 1px 0 rgba(255, 255, 255, 0.25);
}
.buy-cta:active { transform: translateY(0); }

/* --- 失败提示 --- */
.fail-hint {
  margin-top: 16px;
  padding: 16px 16px 14px;
  border-radius: 16px;
  background: rgba(255, 93, 114, 0.12);
  border: 1px solid rgba(255, 93, 114, 0.32);
  color: #ffd2da;
  text-align: center;
}
.fail-hint b {
  display: block;
  font-size: 14px;
  color: #ff9fb0;
  margin-bottom: 6px;
}
.fail-hint p { margin: 0; font-size: 12.5px; line-height: 1.7; }
.fail-hint .fail-tip {
  margin-top: 8px;
  font-size: 11px;
  opacity: 0.7;
}

/* --- 成功模态框 --- */
.modal-mask {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: grid;
  place-items: center;
  z-index: 9999;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease;
}
.modal-mask.show {
  opacity: 1;
  pointer-events: auto;
}
.modal-mask.hidden {
  opacity: 0;
  pointer-events: none;
}

.modal-box {
  width: min(340px, 92vw);
  background: #ffffff;
  border-radius: 22px;
  padding: 28px 22px 22px;
  text-align: center;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
  transform: scale(0.82) translateY(10px);
  opacity: 0;
  transition: transform 0.28s cubic-bezier(0.22, 1.2, 0.36, 1), opacity 0.22s ease;
}
.modal-mask.show .modal-box {
  transform: scale(1) translateY(0);
  opacity: 1;
}
.modal-mask.hidden .modal-box {
  transform: scale(0.82) translateY(10px);
  opacity: 0;
}

.modal-icon {
  width: 88px;
  height: 88px;
  margin: 0 auto 16px;
}
.modal-icon svg { width: 100%; height: 100%; }

.modal-title {
  font-size: 22px;
  font-weight: 700;
  color: #0c241a;
  letter-spacing: -0.3px;
  margin-bottom: 8px;
}

.modal-desc {
  font-size: 13px;
  color: #5a6478;
  line-height: 1.7;
  margin-bottom: 20px;
}

.modal-btn {
  display: block;
  width: 100%;
  padding: 13px 20px;
  border-radius: 12px;
  border: none;
  background: linear-gradient(135deg, #2ee6a8 0%, #1fca8f 100%);
  color: #0a1a14;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(46, 230, 168, 0.38);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.modal-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(46, 230, 168, 0.48);
}
.modal-btn:active { transform: translateY(0); }

/* --- 失败弹窗（同款小窗口，按钮直达商城） --- */
.modal-fail .modal-title { color: #7a1f2f; }
.modal-fail .modal-btn-store {
  background: linear-gradient(135deg, #ff5d72 0%, #e5475e 100%);
  color: #ffffff;
  box-shadow: 0 8px 20px rgba(229, 71, 94, 0.38);
}
.modal-fail .modal-btn-store:hover { box-shadow: 0 12px 28px rgba(229, 71, 94, 0.48); }

/* --- 成功弹窗关闭后再展示产品信息 --- */
.product-reveal.is-hidden { display: none; }
.product-reveal.revealed { animation: fadeUp 0.5s cubic-bezier(0.22, 1, 0.36, 1) both; }

/* --- 弹窗打开时：背景只显示主界面图片，无产品信息、无压暗与模糊 --- */
body.modal-open .verify-site {
  background: url("/static/bg.jpg") center center / cover fixed no-repeat;
}
body.modal-open .verify-site .shell { visibility: hidden; }
body.modal-open .modal-mask {
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

/* ---------------- media queries ---------------- */
@media (max-width: 520px) {
  .verify-site .shell { padding: 82px 14px 28px; }
  .brand-logo { top: 14px; left: 16px; }
  .brand-logo img { max-width: 150px; height: 46px; }
  .product-stage { padding: 16px 14px 14px; border-radius: 18px; }
  .product-name { font-size: 20px; }
  .buy-cta { padding: 14px 16px; font-size: 14px; }
  .modal-box { padding: 24px 18px 18px; }
  .modal-title { font-size: 20px; }
  .modal-icon { width: 76px; height: 76px; }
}

@media (max-width: 360px) {
  .verify-site .shell { padding: 74px 12px 24px; }
  .brand-logo { top: 12px; left: 12px; }
  .brand-logo img { max-width: 130px; height: 40px; }
  .product-name { font-size: 18px; }
}

/* 首页旧样式的 820px 断点（保留） */
@media (max-width: 820px) {
  .hero { grid-template-columns: 1fr; gap: 34px; padding: 34px 0 26px; }
  .hero-visual { order: -1; }
  .lede, .hero-note { max-width: none; }
  .hero h1 { font-size: clamp(38px, 11vw, 52px); }
  .shell { padding: 16px 16px 26px; }
  .stage { padding-top: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  .tap-ring, .orb-pulse, .verify-card, .product-stage,
  .modal-mask, .modal-box { animation: none !important; transition: none !important; }
}
