:root {
  --bg: #070b16; --bg2: #0b1222; --card: #0e1729; --line: #1d2a44; --ink: #e8eefc; --muted: #8a9bbd; --dim: #5d6f92;
  --blue: #4f8cff; --blue-d: #3b74e6; --cyan: #5ee6c5; --amber: #ffb547; --pink: #ff6b9a;
  --mono: ui-monospace, "JetBrains Mono", "Cascadia Code", Consolas, monospace;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", system-ui, sans-serif; color: var(--ink); background: var(--bg); line-height: 1.7; }
a { color: var(--cyan); text-decoration: none; }
img, video, canvas { display: block; max-width: 100%; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.mono { font-family: var(--mono); }
.dim { color: var(--dim); font-size: 13px; }

/* 顶栏 */
.top { position: sticky; top: 0; z-index: 30; background: rgba(7, 11, 22, .72); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid rgba(29, 42, 68, .7); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; height: 58px; }
.brand { font-weight: 900; font-size: 19px; letter-spacing: 1px; display: inline-flex; align-items: center; gap: 8px; }
.brand img { width: 30px; height: 30px; border-radius: 7px; }
.brand .b1 { color: #ff4fa3; text-shadow: 0 0 10px rgba(255, 79, 163, .55); }
.brand .b2 { color: var(--cyan); text-shadow: 0 0 10px rgba(94, 230, 197, .5); margin-left: -8px; }
.nav a { color: var(--muted); margin-left: 22px; font-size: 15px; }
.nav a:hover { color: var(--ink); }

/* 按钮 */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-size: 16px; font-weight: 700; border-radius: 12px; padding: 12px 22px; border: 1px solid transparent; cursor: pointer; transition: transform .15s, box-shadow .2s, background .2s; }
.btn:active { transform: translateY(1px); }
.btn-main { background: linear-gradient(135deg, #4f8cff, #36c2ff); color: #fff; box-shadow: 0 8px 26px rgba(79, 140, 255, .35); }
.btn-main:hover { box-shadow: 0 10px 34px rgba(79, 140, 255, .55); }
.btn-line { color: var(--ink); border-color: #2c3d61; background: rgba(14, 23, 41, .6); }
.btn-line:hover { border-color: var(--cyan); }
.btn-ghost { background: #13203a; color: var(--ink); }
.btn[aria-disabled="true"] { background: #1c2740; color: #7b8bab; box-shadow: none; cursor: not-allowed; }

/* 首页主视觉 */
.hero { position: relative; min-height: min(88vh, 820px); display: flex; align-items: flex-start; overflow: hidden; touch-action: pan-y;
  background: radial-gradient(ellipse at 70% 65%, #10203d 0%, #0a1222 45%, var(--bg) 80%); border-bottom: 1px solid var(--line); }
.hero canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(90deg, rgba(7, 11, 22, .92) 0%, rgba(7, 11, 22, .55) 42%, rgba(7, 11, 22, 0) 70%); }
.hero-inner { position: relative; z-index: 2; padding-top: clamp(48px, 10vh, 110px); pointer-events: none; width: 100%; }
.hero-inner a, .hero-inner .readout { pointer-events: auto; }
.kicker { color: var(--cyan); font-size: 14px; letter-spacing: .3px; min-height: 1.6em; }
.caret { display: inline-block; width: .55em; height: 1.05em; background: var(--cyan); margin-left: 3px; vertical-align: -2px; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.hero h1 { font-size: clamp(32px, 5.6vw, 60px); line-height: 1.18; font-weight: 900; margin-top: 12px; letter-spacing: .5px; }
.hero h1 em { font-style: normal; background: linear-gradient(90deg, #ffb547, #ff7a45 40%, #5ee6c5); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { color: #b6c3de; font-size: clamp(15px, 1.9vw, 18px); margin-top: 16px; max-width: 560px; }
.cta { margin-top: 26px; display: flex; gap: 12px; flex-wrap: wrap; }
.readout { display: inline-block; margin-top: 22px; font-size: 13px; color: #cfe9ff; background: rgba(14, 23, 41, .75); border: 1px solid #22324f; border-radius: 10px; padding: 6px 12px; }

/* 区块 */
.section { padding: 56px 0 8px; }
.sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.section h2 { font-size: 26px; font-weight: 900; }
.js .reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s ease, transform .7s ease; }
.js .reveal.in { opacity: 1; transform: none; }

/* 货架 */
.shelf { display: grid; gap: 18px; }
.item { display: grid; grid-template-columns: 1.35fr 1fr; background: var(--card); border: 1px solid var(--line); border-radius: 20px; overflow: hidden; color: inherit; transition: border-color .2s, transform .2s, box-shadow .2s; }
.item:hover { border-color: #33507f; transform: translateY(-3px); box-shadow: 0 18px 40px rgba(0, 0, 0, .35); }
.item-fx { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 1px; background: var(--line); min-height: 270px; }
.item-fx canvas { width: 100%; height: 100%; background: #0a1120; min-height: 200px; }
.item-body { padding: 22px; display: flex; flex-direction: column; justify-content: space-between; gap: 14px; }
.item h3 { font-size: 21px; margin-top: 6px; }
.item p { color: var(--muted); font-size: 15px; margin-top: 6px; }
.tag { display: inline-block; font-size: 12px; font-family: var(--mono); color: var(--amber); background: rgba(255, 181, 71, .1); border: 1px solid rgba(255, 181, 71, .3); border-radius: 6px; padding: 1px 8px; }
.price { color: #ffcf7a; font-weight: 900; font-size: 26px; font-family: var(--mono); }
.price small { font-size: 13px; color: var(--muted); font-weight: 400; margin-left: 8px; font-family: "PingFang SC", "Microsoft YaHei", sans-serif; }
.soon-item { display: block; border-style: dashed; background: transparent; }
.soon-item:hover { transform: none; box-shadow: none; }
.soon-body { padding: 18px 22px; }
.soon-body h3 { color: #c8d4ec; font-size: 18px; }

/* 步骤 */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; counter-reset: s; position: relative; }
.steps li { list-style: none; background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 16px 16px 16px 60px; position: relative; color: var(--muted); overflow: hidden; }
.steps li b { color: var(--ink); display: block; }
.steps li::before { counter-increment: s; content: counter(s); position: absolute; left: 16px; top: 16px; width: 30px; height: 30px; border-radius: 9px; background: #13203a; border: 1px solid #2c4470; color: var(--cyan); font: 800 15px var(--mono); display: grid; place-items: center; }
.steps li::after { content: ""; position: absolute; left: 0; bottom: 0; height: 2px; width: 40%; background: linear-gradient(90deg, transparent, var(--cyan), transparent); animation: scan 3.2s linear infinite; }
.steps li:nth-child(2)::after { animation-delay: 1.07s; }
.steps li:nth-child(3)::after { animation-delay: 2.13s; }
@keyframes scan { from { transform: translateX(-100%); } to { transform: translateX(260%); } }

/* 商品页 */
.crumb { color: var(--muted); font-size: 14px; padding-top: 18px; }
.prod { display: grid; grid-template-columns: 1.05fr 1fr; gap: 28px; padding: 18px 0 8px; align-items: start; }
.prod-media video { width: 100%; border-radius: 18px; background: #000; aspect-ratio: 3 / 4; object-fit: cover; border: 1px solid var(--line); }
.prod-info h1 { font-size: clamp(24px, 3.4vw, 32px); line-height: 1.3; font-weight: 900; }
.prod-info .sub { color: var(--muted); margin-top: 6px; }
.buybox { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 18px; margin-top: 18px; }
.buybox .price { font-size: 32px; }
.buybox .btn { width: 100%; margin-top: 12px; padding: 14px; font-size: 18px; }
.buybox .note { color: var(--muted); font-size: 14px; margin-top: 10px; }
.include { margin-top: 14px; }
.include li { list-style: none; padding-left: 26px; position: relative; margin: 5px 0; color: #c8d4ec; }
.include li::before { content: "✓"; position: absolute; left: 4px; color: var(--cyan); font-weight: 900; }
.exp { display: grid; grid-template-columns: 1.2fr 1fr; gap: 24px; align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 18px; margin-bottom: 18px; }
.exp video { width: 100%; border-radius: 12px; background: #0a1120; aspect-ratio: 4 / 3; }
.exp h3 { font-size: 21px; margin-top: 6px; }
.exp ul, .plain { margin-top: 8px; }
.exp li, .plain li { list-style: none; padding-left: 22px; position: relative; margin: 6px 0; color: #c8d4ec; }
.exp li::before, .plain li::before { content: ""; position: absolute; left: 6px; top: 11px; width: 7px; height: 7px; border-radius: 2px; background: var(--cyan); }
.box { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 18px 20px; }
.faq dt { font-weight: 700; margin-top: 12px; }
.faq dt:first-child { margin-top: 0; }
.faq dd { color: #b6c3de; margin-top: 2px; }
.sticky-buy { display: none; }

/* 经营者信息、下载页 */
.doc { max-width: 780px; margin: 0 auto; padding: 32px 20px 20px; }
.doc h1 { font-size: 28px; font-weight: 900; margin-bottom: 12px; }
.doc h2 { font-size: 20px; margin: 24px 0 8px; }
.doc p, .doc li { color: #c8d4ec; }
.doc table { border-collapse: collapse; width: 100%; background: var(--card); border-radius: 12px; overflow: hidden; }
.doc td { border: 1px solid var(--line); padding: 9px 12px; vertical-align: top; }
.doc td:first-child { color: var(--muted); width: 120px; white-space: nowrap; }
.fill { color: #ff8a8a; }
.dl { text-align: center; padding: 28px; background: var(--card); border: 1px solid var(--line); border-radius: 20px; margin: 14px 0; }
.dl .btn { font-size: 18px; padding: 14px 28px; }
.dl p { margin-top: 10px; color: var(--muted); font-size: 14px; }

/* 管理员模式：顶上的提示栏（红点和 logo 的 REC 点一样）、管理页 */
.adminbar { background: linear-gradient(90deg, rgba(255, 181, 71, .16), rgba(255, 107, 154, .1)); border-bottom: 1px solid rgba(255, 181, 71, .3); font-size: 13px; }
.adminbar .wrap { display: flex; align-items: center; gap: 18px; height: 34px; }
.adminbar span { color: var(--amber); font-weight: 700; letter-spacing: 1px; }
.adminbar span::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #ff3b3b; box-shadow: 0 0 8px #ff3b3b; margin-right: 8px; vertical-align: 1px; }
.adminbar a { color: var(--ink); }
.adminbar a:hover { color: var(--amber); }
.admin { padding-top: 32px; }
.admin h1 { font-size: 28px; font-weight: 900; }
.admin .sub { color: var(--muted); margin-top: 4px; }
.adm-sec { margin-top: 36px; }
.adm-sec h2 { font-size: 20px; margin-bottom: 2px; }
.adm-sec p { color: #c8d4ec; margin-top: 6px; }
.viewer { margin-top: 12px; background: var(--card); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.tabs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 10px; border-bottom: 1px solid var(--line); }
.tabs button { font: inherit; font-size: 14px; color: var(--muted); background: transparent; border: 1px solid var(--line); border-radius: 9px; padding: 5px 12px; cursor: pointer; }
.tabs button:hover, .tabs button.on { color: var(--ink); border-color: var(--cyan); }
.tabs .newwin { margin-left: auto; font-size: 14px; padding: 0 6px; }
.viewer iframe { display: block; width: 100%; height: min(78vh, 760px); border: 0; background: #fff; }
.adm-links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.adm-links .btn { font-size: 14px; padding: 9px 16px; }
.admin table { border-collapse: collapse; width: 100%; background: var(--card); margin-top: 10px; }
.admin td { border: 1px solid var(--line); padding: 9px 12px; vertical-align: top; color: #c8d4ec; word-break: break-all; }
.admin td:first-child { color: var(--muted); width: 120px; white-space: nowrap; word-break: normal; }

/* 页脚 */
.foot { border-top: 1px solid var(--line); margin-top: 56px; padding: 24px 0 90px; color: var(--dim); font-size: 13px; }
.foot p { margin: 2px 0; }

@media (max-width: 860px) {
  .item { grid-template-columns: 1fr; }
  .item-fx { min-height: 0; grid-template-columns: 1fr 1fr; }
  .item-fx canvas { aspect-ratio: 4 / 3; min-height: 0; }
  .item-fx canvas:first-child { grid-column: 1 / 3; aspect-ratio: 16 / 9; }
  .steps { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .hero { min-height: 92vh; }
  .hero::after { background: linear-gradient(180deg, rgba(7, 11, 22, .94) 0%, rgba(7, 11, 22, .7) 40%, rgba(7, 11, 22, 0) 62%); }
  .prod, .exp { grid-template-columns: 1fr; }
  .prod-media video { max-height: 70vh; }
  .sticky-buy { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; background: rgba(11, 18, 34, .95); border-top: 1px solid var(--line); padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); align-items: center; gap: 12px; }
  .sticky-buy .price { font-size: 22px; white-space: nowrap; }
  .sticky-buy .btn { flex: 1; }
  .nav a { margin-left: 14px; }
}
@media (prefers-reduced-motion: reduce) { .caret, .steps li::after { animation: none; } .reveal { transition: none; } }
