/* ============================================================
   photon.css — 风格A：粒子光影 + 子弹时间
   暗室 / 光能 / 仪器感
   ============================================================ */
html[data-hl-style="photon"] {
  --bg: #050d0a;
  --fg: #e9f7f0;
  --fg-dim: #9dbfaf;
  --brand-accent: #3dffb8;
  --accent-warm: #ffd27a;
  --accent-cool: #6ee7ff;
  --line: rgba(122, 255, 190, .10);
  --line-strong: rgba(122, 255, 190, .26);
  --link: #3dffb8;
  --link-hover: #9dffe0;
  --header-bg: rgba(5, 13, 10, .68);
  --card-bg: rgba(13, 30, 23, .5);
  --card-shadow: 0 18px 50px rgba(0, 0, 0, .5), 0 0 0 1px rgba(122,255,190,.05);
  --btn-bg: linear-gradient(135deg, #46ffc0, #17b981);
  --btn-fg: #03130c;
  --ghost-bg: rgba(61, 255, 184, .05);
  --radius: 14px;
  --radius-sm: 9px;
  --font-mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
  --sel-bg: rgba(61, 255, 184, .3);
  --footer-bg: rgba(3, 8, 6, .75);
  --switch-bg: rgba(6, 16, 12, .85);
  --input-bg: rgba(4, 12, 9, .7);
  --art-bg: radial-gradient(circle at 50% 40%, rgba(61,255,184,.14), rgba(61,255,184,.03));
  --hover-bg: rgba(122, 255, 190, .07);
  --active-bg: rgba(61, 255, 184, .1);
  --band-bg: linear-gradient(180deg, rgba(16, 42, 31, .42), rgba(6, 14, 10, 0));
  --cta-bg: radial-gradient(130% 170% at 50% 0%, rgba(20, 68, 48, .55), rgba(5, 13, 9, .25));
  color-scheme: dark;
}

/* ---- 整体氛围：暗室 + 顶光 ---- */
html[data-hl-style="photon"] body {
  background:
    radial-gradient(1200px 700px at 75% -10%, rgba(46, 190, 138, .12), transparent 60%),
    radial-gradient(900px 600px at 10% 8%, rgba(110, 231, 255, .05), transparent 55%),
    var(--bg);
}
html[data-hl-style="photon"] body::before {
  /* 噪点颗粒（canvas 生成 dataURL 注入到 --noise-url，见 photon.js） */
  content: ""; position: fixed; inset: 0; z-index: 70; pointer-events: none;
  background-image: var(--noise-url); opacity: .05; mix-blend-mode: overlay;
}
html[data-hl-style="photon"] body::after {
  content: ""; position: fixed; inset: 0; z-index: 71; pointer-events: none;
  background: radial-gradient(130% 100% at 50% 40%, transparent 62%, rgba(0, 0, 0, .38) 100%);
}

/* ---- 标题发光 ---- */
html[data-hl-style="photon"] h1 { text-shadow: 0 0 34px rgba(61, 255, 184, .12); }
html[data-hl-style="photon"] .hl-em {
  position: relative; color: var(--brand-accent);
  text-shadow: 0 0 18px rgba(61, 255, 184, .55), 0 0 60px rgba(61, 255, 184, .25);
}
html[data-hl-style="photon"] .hl-em::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: .02em; height: .1em;
  background: linear-gradient(90deg, transparent, rgba(61,255,184,.5), transparent);
  filter: blur(2px);
}

/* ---- 卡片 / 区块的仪器边框 ---- */
html[data-hl-style="photon"] .hl-card,
html[data-hl-style="photon"] .hl-product,
html[data-hl-style="photon"] .hl-hw-card,
html[data-hl-style="photon"] .hl-flow-step,
html[data-hl-style="photon"] .hl-band-step,
html[data-hl-style="photon"] .hl-note,
html[data-hl-style="photon"] .hl-prompt,
html[data-hl-style="photon"] .hl-download-card,
html[data-hl-style="photon"] .hl-feature-list li,
html[data-hl-style="photon"] .hl-scenario {
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
html[data-hl-style="photon"] .hl-card:hover,
html[data-hl-style="photon"] .hl-product:hover,
html[data-hl-style="photon"] .hl-hw-card:hover,
html[data-hl-style="photon"] .hl-scenario:hover {
  box-shadow: 0 18px 50px rgba(0,0,0,.5), 0 0 24px rgba(61, 255, 184, .07) inset;
}

/* ---- hero 底部渐隐入黑 ---- */
html[data-hl-style="photon"] .hl-hero::after {
  content: ""; position: absolute; inset: auto 0 0 0; height: 180px; z-index: 1;
  background: linear-gradient(180deg, transparent, var(--bg)); pointer-events: none;
}

/* ---- 按钮能量感 ---- */
html[data-hl-style="photon"] .hl-btn-primary {
  background: linear-gradient(135deg, #4dffc4, #14b57c);
  box-shadow: 0 6px 26px rgba(61, 255, 184, .28), 0 0 0 1px rgba(255,255,255,.08) inset;
}
html[data-hl-style="photon"] .hl-btn-primary:hover {
  box-shadow: 0 10px 40px rgba(61, 255, 184, .45), 0 0 0 1px rgba(255,255,255,.14) inset;
}
html[data-hl-style="photon"] .hl-btn-ghost { backdrop-filter: blur(4px); }

/* ---- 链接下划线光 ---- */
html[data-hl-style="photon"] .hl-footer-group a:hover,
html[data-hl-style="photon"] .hl-link-more:hover { text-shadow: 0 0 12px rgba(61,255,184,.4); }

/* ---- 子弹时间 HUD ---- */
.bt-hud {
  position: absolute; right: 16px; top: 16px; z-index: 5;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .14em;
  color: var(--brand-accent); border: 1px solid var(--line-strong);
  background: rgba(5, 14, 10, .78); border-radius: 8px; padding: 10px 14px;
  display: flex; align-items: center; gap: 10px; pointer-events: none;
  opacity: 0; transform: translateY(-8px); transition: opacity .35s, transform .35s;
  text-transform: uppercase;
}
.bt-hud.is-on { opacity: 1; transform: none; }
.bt-hud .bt-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent-warm); box-shadow: 0 0 10px var(--accent-warm); animation: btBlink 1.1s steps(2, jump-none) infinite; }
@keyframes btBlink { 50% { opacity: .25; } }

/* ---- 稀有度光色（产品） ---- */
html[data-hl-style="photon"] [data-rarity="green"] .hl-icon { color: #46e8a0; }
html[data-hl-style="photon"] [data-rarity="red"] .hl-icon { color: #ff7d6e; }
html[data-hl-style="photon"] [data-rarity="gold"] .hl-icon { color: #ffd27a; }
html[data-hl-style="photon"] [data-rarity="cyan"] .hl-icon { color: #6ee7ff; }
html[data-hl-style="photon"] [data-rarity="diamond"] .hl-icon { color: #9ecbff; }

/* ---- 键盘焦点可见 ---- */
html[data-hl-style="photon"] a:focus-visible, html[data-hl-style="photon"] button:focus-visible {
  outline: 2px solid var(--brand-accent); outline-offset: 2px; border-radius: 4px;
}

/* ================= v2：子弹时间区块 ================= */
html[data-hl-style="photon"] .hl-bt-section { padding: 80px 0; }
html[data-hl-style="blockcraft"] .hl-bt-section { display: none; }
.hl-bt-head { width: min(1120px, 100% - 40px); margin: 0 auto 26px; max-width: 1120px; }
.hl-bt-head p { color: var(--fg-dim); max-width: 40em; }
.hl-bt-stage {
  position: relative; width: min(1120px, 100% - 40px); margin: 0 auto;
  height: min(66vh, 560px); min-height: 380px;
  border: 1px solid var(--line-strong); border-radius: var(--radius);
  background:
    radial-gradient(60% 60% at 50% 50%, rgba(255, 210, 122, .05), transparent 70%),
    radial-gradient(80% 80% at 50% 50%, rgba(61, 255, 184, .04), transparent 75%),
    #040b08;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0,0,0,.5), 0 0 0 1px rgba(122,255,190,.06), inset 0 0 120px rgba(61,255,184,.03);
}
.hl-bt-stage #hl-bt-canvas { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; cursor: grab; }
.hl-bt-stage #hl-bt-canvas:active { cursor: grabbing; }
.hl-bt-hint {
  position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%);
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .12em;
  color: var(--fg-dim); opacity: .85; pointer-events: none;
  border: 1px solid var(--line); border-radius: 99px; padding: 7px 16px;
  background: rgba(5, 14, 10, .6);
}

/* ---- 平台带滚动光束 ---- */
html[data-hl-style="photon"] .hl-band { position: relative; overflow: hidden; }
html[data-hl-style="photon"] .hl-band::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: linear-gradient(180deg, transparent, var(--brand-accent), transparent);
  transform: scaleY(var(--band-progress, 0));
  transform-origin: top;
  box-shadow: 0 0 18px var(--brand-accent);
  opacity: .9;
}
html[data-hl-style="photon"] .hl-band-step {
  position: relative;
}
html[data-hl-style="photon"] .hl-band-step::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(120deg, transparent 30%, rgba(61,255,184,.06) 50%, transparent 70%);
  background-size: 250% 100%;
  background-position: calc((1 - var(--band-progress, 0)) * 250%) 0;
}

/* ---- 内页环境粒子画布 ---- */
canvas.photon-ambient {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
}
html[data-hl-style="photon"] main { position: relative; z-index: 1; }
html[data-hl-style="photon"] .hl-header { z-index: 70; }
html[data-hl-style="photon"] .hl-footer { position: relative; z-index: 2; }

/* ---- 方块版隐藏子弹时间提示（防御） ---- */
html[data-hl-style="blockcraft"] .hl-bt-stage { display: none; }

/* ================= v3：页间光爆 / 粒子溢出画布 ================= */
canvas.photon-flash { position: fixed; inset: 0; z-index: 96; pointer-events: none; }
canvas.photon-burst { position: fixed; inset: 0; z-index: 65; pointer-events: none; }

/* ================= v3：标题逐字辉光入场 ================= */
.photon-char {
  display: inline-block;
  opacity: 0;
  transform: translateY(.35em);
  animation: photonCharIn .6s cubic-bezier(.2,.8,.3,1) forwards;
}
@keyframes photonCharIn {
  0% { opacity: 0; transform: translateY(.35em); text-shadow: 0 0 0 rgba(61,255,184,0); }
  60% { opacity: 1; text-shadow: 0 0 26px rgba(61,255,184,.8); }
  100% { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) { .photon-char { opacity: 1; transform: none; animation: none; } }

/* ================= v3：平台带逐步点亮 ================= */
html[data-hl-style="photon"] .hl-band-step { transition: border-color .5s, box-shadow .5s, transform .5s; }
html[data-hl-style="photon"] .hl-band-step.is-lit {
  border-color: rgba(61,255,184,.45);
  box-shadow: 0 0 24px rgba(61,255,184,.12), inset 0 0 18px rgba(61,255,184,.05);
  transform: translateX(4px);
}
html[data-hl-style="photon"] .hl-band-step.is-lit > span { text-shadow: 0 0 14px rgba(61,255,184,.8); }

/* ============================================================
   v4：极客 CLI 终端 / X 光全息图 / 品牌辉光
   ============================================================ */
html[data-hl-style="photon"] .hl-brand-img { filter: drop-shadow(0 0 8px rgba(61,255,184,.5)); }
html[data-hl-style="photon"] .hl-brand-figure img { filter: drop-shadow(0 0 26px rgba(61,255,184,.3)); }
html[data-hl-style="photon"] .hl-bt-figure img,
html[data-hl-style="photon"] .hl-product-figure img {
  filter: saturate(.85) contrast(1.05) brightness(.92);
  box-shadow: 0 0 0 1px rgba(110,231,255,.25), 0 0 34px rgba(61,255,184,.12);
}
html[data-hl-style="photon"] .hl-ext-btn:hover { box-shadow: 0 8px 28px rgba(255,210,122,.22), 0 0 0 1px rgba(255,210,122,.3); }

/* CLI 终端 */
.hl-cli-overlay { position: fixed; inset: 0; z-index: 130; display: none; align-items: center; justify-content: center; padding: 20px; background: rgba(3,8,6,.74); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.hl-cli-overlay.is-open { display: flex; }
.hl-cli-window { width: min(680px, 100%); max-height: 82vh; display: flex; flex-direction: column; border: 1px solid var(--line-strong); border-radius: var(--radius); background: rgba(6,15,11,.97); box-shadow: 0 30px 90px rgba(0,0,0,.6), 0 0 44px rgba(61,255,184,.08); overflow: hidden; font-family: var(--font-mono); }
.hl-cli-titlebar { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--line); background: rgba(10,22,16,.92); }
.hl-cli-dots { display: flex; gap: 6px; }
.hl-cli-dots i { width: 11px; height: 11px; border-radius: 50%; display: block; }
.hl-cli-dots i:nth-child(1) { background: #ff5f56; }
.hl-cli-dots i:nth-child(2) { background: #ffbd2e; }
.hl-cli-dots i:nth-child(3) { background: #27c93f; }
.hl-cli-title { font-size: 12px; color: var(--fg-dim); flex: 1; }
.hl-cli-close { background: none; border: 1px solid var(--line); color: var(--fg-dim); border-radius: 6px; padding: 3px 9px; font-size: 11px; font-family: var(--font-mono); }
.hl-cli-close:hover { color: var(--brand-accent); border-color: var(--brand-accent); }
.hl-cli-output { flex: 1; overflow-y: auto; padding: 14px 16px; font-size: 12.5px; line-height: 1.75; color: var(--fg); min-height: 220px; }
.hl-cli-line { white-space: pre-wrap; word-break: break-word; }
.hl-cli-line b { color: var(--brand-accent); font-weight: 600; }
.hl-cli-line code { color: var(--accent-cool); }
.hl-cli-line a { color: var(--accent-warm); text-decoration: underline; }
.hl-cli-accent { color: var(--brand-accent); }
.hl-cli-dim { color: var(--fg-dim); }
.hl-cli-err { color: #ff8d8d; }
.hl-cli-prompt { color: var(--brand-accent); font-weight: 700; }
.hl-cli-inputrow { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-top: 1px solid var(--line); background: rgba(10,22,16,.92); }
.hl-cli-input { flex: 1; background: none; border: none; outline: none; color: var(--fg); font-family: var(--font-mono); font-size: 13px; }
.hl-cli-run { background: var(--brand-accent); color: #04120c; border: none; border-radius: 6px; padding: 5px 12px; font-size: 12px; font-weight: 700; font-family: var(--font-mono); }
@media (max-width: 720px) {
  .hl-cli-overlay { padding: 12px; align-items: flex-end; }
  .hl-cli-window { max-height: 76vh; }
  .hl-cli-output { font-size: 12px; min-height: 180px; }
}
