/* =========================================================
 *  TOWER DEFENSE ASSIST · 左右分栏科幻控制台
 * ========================================================= */

* { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:       #04060b;
  --panel:    rgba(12, 18, 30, 0.78);
  --panel-2:  rgba(18, 26, 42, 0.9);
  --line:     rgba(80, 200, 255, 0.16);
  --line-2:   rgba(80, 200, 255, 0.42);
  --text:     #d6e6ff;
  --muted:    #6a86b0;
  --cyan:     #35e6ff;
  --cyan-2:   #19b6d6;
  --purple:   #a06bff;
  --magenta:  #ff4fd8;
  --ok:       #2fe08a;
  --warn:     #ffb648;
  --danger:   #ff4d6d;
  --mono:     ui-monospace, "JetBrains Mono", Consolas, monospace;
}

html, body {
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 14px;
  line-height: 1.6;
  overflow-x: hidden;
}

/* ============== 背景层 ============== */
.bg-grid {
  position: fixed; inset: 0;
  background-image:
    linear-gradient(rgba(53, 230, 255, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(53, 230, 255, 0.055) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: radial-gradient(ellipse at 50% 0%, #000 35%, transparent 85%);
          mask-image: radial-gradient(ellipse at 50% 0%, #000 35%, transparent 85%);
  z-index: -3;
}
.bg-scan {
  position: fixed; inset: 0;
  background: linear-gradient(
    to bottom,
    transparent 0%,
    rgba(53, 230, 255, 0.05) 48%,
    rgba(53, 230, 255, 0.13) 50%,
    rgba(53, 230, 255, 0.05) 52%,
    transparent 100%
  );
  background-size: 100% 220%;
  animation: scan 7s linear infinite;
  pointer-events: none;
  z-index: -2;
  opacity: .5;
}
@keyframes scan {
  0%   { background-position: 0 -100%; }
  100% { background-position: 0 200%; }
}
.bg-glow {
  position: fixed; inset: 0;
  background:
    radial-gradient(700px 340px at 12% 0%, rgba(53, 230, 255, 0.18), transparent 60%),
    radial-gradient(600px 300px at 92% 8%, rgba(160, 107, 255, 0.16), transparent 60%),
    radial-gradient(800px 400px at 50% 110%, rgba(255, 79, 216, 0.12), transparent 60%);
  pointer-events: none;
  z-index: -1;
}

/* ================= 顶部 HUD ================= */
.hud-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 16px;
  flex-wrap: nowrap;
  background: rgba(0, 8, 16, .6);
  border-bottom: 1px solid rgba(0, 229, 255, .15);
  backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 100;
}

.hud-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
  flex-shrink: 0;
}

.hud-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #00e5ff;
  box-shadow: 0 0 10px #00e5ff;
  flex-shrink: 0;
}

.hud-title {
  font-size: 15px;
  color: #e6f7ff;
  letter-spacing: 2px;
  white-space: nowrap;
  text-shadow: 0 0 10px rgba(0, 229, 255, .5);
}

.hud-ver {
  font-size: 11px;
  color: #00e5ff;
  opacity: .6;
  letter-spacing: 1px;
  padding: 1px 6px;
  border: 1px solid rgba(0, 229, 255, .3);
  border-radius: 4px;
  flex-shrink: 0;
}

.hud-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  flex-shrink: 0;
}

.hud-link {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  font-size: 12px;
  color: #7ec8ff;
  text-decoration: none;
  border: 1px solid #2c3340;
  border-radius: 4px;
  background: rgba(61, 126, 255, .06);
  transition: .15s;
  white-space: nowrap;
  flex-shrink: 0;
  letter-spacing: 1px;
}

.hud-link:hover {
  color: #fff;
  border-color: #3d7eff;
  background: rgba(61, 126, 255, .18);
  box-shadow: 0 0 12px rgba(61, 126, 255, .35);
}

.hud-tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  font-size: 12px;
  color: #9aa4b2;
  background: rgba(0, 229, 255, .05);
  border: 1px solid rgba(0, 229, 255, .15);
  border-radius: 4px;
  white-space: nowrap;
  flex-shrink: 0;
  font-family: Consolas, monospace;
  letter-spacing: 1px;
}

.hud-tag.ok {
  color: #6ee787;
  border-color: rgba(110, 231, 135, .3);
  background: rgba(110, 231, 135, .08);
}

/* ================= 平板（<= 1024px） ================= */
@media (max-width: 1024px) {
  .hud-title { font-size: 14px; }
  .hud-link, .hud-tag { font-size: 11px; padding: 3px 8px; }
}

/* ================= 手机（<= 768px） ================= */
@media (max-width: 768px) {
  .hud-top {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    padding: 8px 12px;
  }

  .hud-brand {
    justify-content: flex-start;
    gap: 8px;
  }

  .hud-title {
    font-size: 13px;
    letter-spacing: 1px;
  }

  .hud-ver {
    font-size: 10px;
    padding: 0 4px;
  }

  .hud-meta {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 6px;
  }

  .hud-link {
    font-size: 11px;
    padding: 3px 10px;
  }

  .hud-tag {
    font-size: 11px;
    padding: 3px 8px;
  }
}

/* ================= 小屏（<= 480px） ================= */
@media (max-width: 480px) {
  .hud-top {
    padding: 6px 10px;
    gap: 6px;
  }

  .hud-title {
    font-size: 12px;
    letter-spacing: 0;
  }

  .hud-ver {
    display: none;   /* 小屏隐藏版本号 */
  }

  .hud-meta {
    gap: 4px;
  }

  .hud-link,
  .hud-tag {
    font-size: 10px;
    padding: 2px 6px;
  }
}

/* ============== 主控制台：左右分栏 ============== */
.console {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 26px;
  padding: 28px 32px;
  max-width: 1600px;
  width: 100%;
  margin: 0 auto;
}

/* 大屏进一步放宽 */
@media (min-width: 1400px) {
  .console {
    max-width: 1800px;
    padding: 32px 40px;
    gap: 32px;
  }
}

.panel {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 28px 30px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow:
    0 0 0 1px rgba(53, 230, 255, .04),
    0 14px 44px rgba(0, 0, 0, .55),
    inset 0 0 30px rgba(53, 230, 255, .04);
  overflow: hidden;
}
.panel::before {
  content: "";
  position: absolute;
  top: 0; left: -30%;
  width: 40%; height: 2px;
  background: linear-gradient(90deg, transparent, var(--cyan), transparent);
  filter: drop-shadow(0 0 8px var(--cyan));
  animation: card-light 5s linear infinite;
}
@keyframes card-light {
  0%   { left: -40%; }
  100% { left: 110%; }
}

.panel-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 22px;
}
.panel-idx {
  color: var(--magenta);
  font-size: 14px;
  text-shadow: 0 0 10px rgba(255, 79, 216, .7);
}
.panel-name {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 4px;
  color: var(--cyan);
  text-shadow: 0 0 10px rgba(53, 230, 255, .5);
}
.panel-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--line-2), transparent);
}

/* ============== 左栏区块 ============== */
.block { margin-bottom: 22px; }
.block-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}
.block-no {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--magenta);
  border: 1px solid rgba(255, 79, 216, .5);
  padding: 1px 6px;
  border-radius: 4px;
  letter-spacing: 1px;
  box-shadow: 0 0 10px rgba(255, 79, 216, .25);
}
.block-title {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 3px;
  color: var(--cyan);
}
.block-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--line), transparent);
}

.input-wrap { position: relative; }
.input-wrap input {
  width: 100%;
  padding: 14px 16px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  font-size: 14px;
  font-family: var(--mono);
  letter-spacing: 1px;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.input-wrap input::placeholder { color: #3b577f; letter-spacing: 1px; }
.input-wrap input:focus {
  border-color: var(--cyan);
  box-shadow:
    0 0 0 3px rgba(53, 230, 255, .12),
    0 0 22px rgba(53, 230, 255, .35);
  background: rgba(10, 20, 35, .95);
}
.input-caret {
  position: absolute;
  right: 12px; top: 50%;
  transform: translateY(-50%);
  width: 1px; height: 18px;
  background: var(--cyan);
  box-shadow: 0 0 8px var(--cyan);
  animation: blink 1s steps(2) infinite;
  pointer-events: none;
}
@keyframes blink { 50% { opacity: 0; } }

.select-wrap { position: relative; }
.select-wrap select {
  width: 100%;
  padding: 14px 40px 14px 16px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  font-size: 14px;
  font-family: var(--mono);
  letter-spacing: 1px;
  appearance: none;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--cyan) 50%),
    linear-gradient(135deg, var(--cyan) 50%, transparent 50%);
  background-position:
    calc(100% - 20px) calc(50% - 2px),
    calc(100% - 14px) calc(50% - 2px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}
.select-wrap select:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(53, 230, 255, .12), 0 0 22px rgba(53, 230, 255, .35);
}

/* ============== 多选下拉 ============== */
.multi-wrap {
  position: relative;
  user-select: none;
}

.multi-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 40px 14px 16px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  font-size: 14px;
  font-family: var(--mono);
  letter-spacing: 1px;
  cursor: pointer;
  transition: border-color .2s, box-shadow .2s;
  min-height: 48px;
}
.multi-trigger:hover {
  border-color: rgba(53, 230, 255, .5);
}
.multi-wrap.open .multi-trigger {
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(53, 230, 255, .12), 0 0 22px rgba(53, 230, 255, .35);
}
.multi-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.multi-text.placeholder { color: #3b577f; }
.multi-arrow {
  position: absolute;
  right: 16px; top: 50%;
  width: 8px; height: 8px;
  border-right: 2px solid var(--cyan);
  border-bottom: 2px solid var(--cyan);
  transform: translateY(-70%) rotate(45deg);
  transition: transform .2s;
  pointer-events: none;
}
.multi-wrap.open .multi-arrow {
  transform: translateY(-30%) rotate(-135deg);
}

.multi-panel {
  position: absolute;
  top: calc(100% + 6px);
  left: 0; right: 0;
  background: rgba(10, 16, 28, 0.98);
  border: 1px solid var(--line-2);
  border-radius: 8px;
  padding: 6px;
  z-index: 50;
  max-height: 280px;
  overflow-y: auto;
  box-shadow:
    0 10px 40px rgba(0, 0, 0, .6),
    0 0 26px rgba(53, 230, 255, .12);
  display: none;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.multi-wrap.open .multi-panel { display: block; animation: fadeIn .15s ease; }

.multi-panel::-webkit-scrollbar { width: 6px; }
.multi-panel::-webkit-scrollbar-thumb {
  background: rgba(53, 230, 255, .3);
  border-radius: 3px;
}

.multi-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 1px;
  color: var(--text);
  transition: background .15s;
}
.multi-item:hover {
  background: rgba(53, 230, 255, .08);
}
.multi-item input { display: none; }

.multi-box {
  width: 14px; height: 14px;
  border: 1px solid var(--line-2);
  border-radius: 3px;
  position: relative;
  flex-shrink: 0;
  transition: all .15s;
}
.multi-item input:checked + .multi-box {
  background: var(--cyan);
  border-color: var(--cyan);
  box-shadow: 0 0 10px rgba(53, 230, 255, .65);
}
.multi-item input:checked + .multi-box::after {
  content: "";
  position: absolute;
  left: 4px; top: 1px;
  width: 4px; height: 8px;
  border-right: 2px solid #031016;
  border-bottom: 2px solid #031016;
  transform: rotate(45deg);
}
.multi-item input:checked ~ .multi-label {
  color: var(--cyan);
  text-shadow: 0 0 8px rgba(53, 230, 255, .55);
}
.multi-label { transition: color .15s; }

.radio-group { display: flex; gap: 14px; }
.radio {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 1px;
  color: var(--muted);
  cursor: pointer;
  transition: all .2s;
  background: var(--panel-2);
}
.radio input { display: none; }
.radio-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  border: 1px solid currentColor;
  position: relative;
  transition: all .2s;
}
.radio:has(input:checked) {
  color: var(--cyan);
  border-color: var(--cyan);
  box-shadow: 0 0 16px rgba(53, 230, 255, .25), inset 0 0 10px rgba(53, 230, 255, .08);
}
.radio:has(input:checked) .radio-dot {
  background: var(--cyan);
  box-shadow: 0 0 10px var(--cyan);
}

/* ============== 启动按钮 ============== */
.btn-launch {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 16px 22px;
  margin: 8px 0 24px;
  border: 1px solid var(--cyan);
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(53,230,255,.12), rgba(160,107,255,.12));
  color: var(--cyan);
  font-family: var(--mono);
  font-size: 15px;
  letter-spacing: 6px;
  text-transform: uppercase;
  cursor: pointer;
  overflow: hidden;
  transition: all .25s;
  box-shadow:
    0 0 22px rgba(53, 230, 255, .25),
    inset 0 0 18px rgba(53, 230, 255, .06);
}
.btn-launch::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 30%, rgba(53,230,255,.3) 50%, transparent 70%);
  transform: translateX(-120%);
  transition: transform .7s;
}
.btn-launch:not(:disabled):hover {
  color: #fff;
  box-shadow:
    0 0 40px rgba(53, 230, 255, .6),
    inset 0 0 24px rgba(53, 230, 255, .18);
}
.btn-launch:not(:disabled):hover::after { transform: translateX(120%); }
.btn-launch:disabled {
  opacity: .35;
  cursor: not-allowed;
  filter: grayscale(.5);
}
.btn-launch-text { position: relative; z-index: 1; }
.btn-launch-scan {
  position: absolute;
  top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, transparent, var(--cyan), transparent);
  animation: btn-scan 2.4s linear infinite;
}
@keyframes btn-scan {
  0%   { transform: translateY(0);    opacity: 1; }
  50%  { transform: translateY(44px); opacity: 1; }
  100% { transform: translateY(0);    opacity: 1; }
}

/* ============== 终端 ============== */
.terminal {
  border: 1px solid rgba(53, 230, 255, .22);
  border-radius: 10px;
  overflow: hidden;
  background: #03060c;
  box-shadow: inset 0 0 40px rgba(53, 230, 255, .05);
}
.terminal-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: rgba(53, 230, 255, .06);
  border-bottom: 1px solid rgba(53, 230, 255, .18);
}
.terminal-dots { display: inline-flex; gap: 5px; }
.terminal-dots i {
  width: 9px; height: 9px; border-radius: 50%;
  background: #2b3550; display: inline-block;
}
.terminal-dots i:nth-child(1) { background: #ff5f56; }
.terminal-dots i:nth-child(2) { background: #ffbd2e; }
.terminal-dots i:nth-child(3) { background: #27c93f; }
.terminal-title {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 3px;
  color: var(--muted);
}
.terminal-body {
  max-height: 260px;
  overflow-y: auto;
  padding: 14px 16px;
  font-family: var(--mono);
  font-size: 12.5px;
  color: #6ff0b0;
  white-space: pre-wrap;
  word-break: break-all;
  line-height: 1.75;
  text-shadow: 0 0 8px rgba(111, 240, 176, .35);
}
.terminal-body::-webkit-scrollbar { width: 6px; }
.terminal-body::-webkit-scrollbar-thumb {
  background: rgba(53, 230, 255, .3);
  border-radius: 3px;
}

/* ============== 右栏：状态列表 ============== */
.status-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 22px;
}
.status-item {
  display: grid;
  grid-template-columns: 70px 1fr 100px;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-family: var(--mono);
  font-size: 13px;
}
.status-label { color: var(--muted); letter-spacing: 2px; }
.status-value {
  color: var(--text);
  letter-spacing: 1px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.status-value.ok {
  color: var(--ok);
  text-shadow: 0 0 8px rgba(47, 224, 138, .6);
}
.status-bar-mini {
  height: 4px;
  background: rgba(53, 230, 255, .12);
  border-radius: 2px;
  overflow: hidden;
  position: relative;
}
.status-bar-mini i {
  position: absolute;
  inset: 0 50% 0 0;
  background: linear-gradient(90deg, var(--cyan), var(--purple));
  box-shadow: 0 0 8px var(--cyan);
  transition: inset .3s;
}
.status-bar-mini.ok i {
  background: linear-gradient(90deg, var(--ok), var(--cyan));
  inset: 0;
}

/* ============== 二维码弹窗 ============== */
.qr-modal-mask {
  position: fixed;
  inset: 0;
  background: rgba(0, 5, 15, .82);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1200;
  animation: qrFadeIn .3s ease;
}
.qr-modal-mask.show { display: flex; }

@keyframes qrFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.qr-modal-box {
  position: relative;
  width: min(420px, 92vw);
  background: linear-gradient(180deg, rgba(14,20,33,.98), rgba(8,12,22,.98));
  border: 1px solid var(--line-2);
  border-radius: 14px;
  overflow: hidden;
  box-shadow:
    0 0 60px rgba(53, 230, 255, .25),
    0 20px 60px rgba(0,0,0,.65),
    inset 0 0 30px rgba(53, 230, 255, .05);
  animation: qrSlideIn .35s cubic-bezier(.2,.8,.2,1);
}

@keyframes qrSlideIn {
  from { opacity: 0; transform: translateY(20px) scale(.95); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.qr-modal-box::before {
  content: "";
  position: absolute;
  top: 0; left: 10%; right: 10%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--cyan), transparent);
  filter: drop-shadow(0 0 8px var(--cyan));
}

.qr-modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  border-bottom: 1px solid rgba(53, 230, 255, .18);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 4px;
  color: var(--cyan);
  text-shadow: 0 0 10px rgba(53, 230, 255, .5);
}

.qr-modal-body {
  position: relative;
  aspect-ratio: 1;
  padding: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.qr-modal-foot {
  padding: 12px 18px;
  border-top: 1px solid rgba(53, 230, 255, .18);
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 1px;
  text-align: center;
}

#qrModalClose {
  position: absolute;
  top: 10px;
  right: 12px;
  padding: 4px 10px;
  font-size: 10px;
  letter-spacing: 2px;
  z-index: 10;
}

/* ============== 二维码视窗 ============== */
.qr-viewport {
  position: relative;
  border: 1px solid rgba(53, 230, 255, .25);
  border-radius: 10px;
  background: rgba(3, 6, 12, .8);
  overflow: hidden;
  margin-bottom: 18px;
  box-shadow: inset 0 0 30px rgba(53, 230, 255, .06);
  animation: qr-in .35s ease both;
}
.qr-viewport.hidden {
  display: none;
  animation: none;
}
@keyframes qr-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.qr-viewport-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  border-bottom: 1px solid rgba(53, 230, 255, .18);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 3px;
  color: var(--muted);
}
.qr-viewport-live {
  color: var(--ok);
  text-shadow: 0 0 8px rgba(47, 224, 138, .6);
}

.qr-viewport-body {
  position: relative;
  aspect-ratio: 1;
  padding: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* 二维码本体 */
.qr-holder {
  position: relative;
  z-index: 2;
  display: none;
}
.qr-holder img, .qr-holder canvas {
  display: block;
  border-radius: 6px;
  background: #fff;
  padding: 6px;
  box-shadow: 0 0 26px rgba(53, 230, 255, .45);
}

/* ---------- 旋转刻度盘 ---------- */
.qr-dial {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: 1;
}
.qr-dial-svg {
  width: 100%;
  height: 100%;
  animation: dial-rotate 24s linear infinite;
  transform-origin: 50% 50%;
}
@keyframes dial-rotate {
  to { transform: rotate(360deg); }
}
.qr-dial-ticks {
  fill: none;
  stroke: rgba(53, 230, 255, .55);
  stroke-width: 1.4;
  stroke-dasharray: 2 6;
  filter: drop-shadow(0 0 4px rgba(53, 230, 255, .65));
  animation: dial-rotate-rev 60s linear infinite;
  transform-origin: 50% 50%;
}
@keyframes dial-rotate-rev {
  to { transform: rotate(-360deg); }
}
.qr-dial-ring {
  fill: none;
  stroke: rgba(160, 107, 255, .28);
  stroke-width: 1;
  stroke-dasharray: 40 14 8 14;
  filter: drop-shadow(0 0 5px rgba(160, 107, 255, .6));
}

/* 四角标 */
.qr-dial-corner {
  position: absolute;
  width: 16px; height: 16px;
  border: 1.5px solid var(--cyan);
  filter: drop-shadow(0 0 5px rgba(53, 230, 255, .8));
}
.qr-dial-corner.tl { top: 4px;    left: 4px;   border-right: none; border-bottom: none; }
.qr-dial-corner.tr { top: 4px;    right: 4px;  border-left: none;  border-bottom: none; }
.qr-dial-corner.bl { bottom: 4px; left: 4px;   border-right: none; border-top: none; }
.qr-dial-corner.br { bottom: 4px; right: 4px;  border-left: none;  border-top: none; }

.qr-viewport-foot {
  padding: 8px 12px;
  border-top: 1px solid rgba(53, 230, 255, .18);
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 1px;
  text-align: center;
}

/* ============== 说明 ============== */
.note {
  border: 1px dashed rgba(160, 107, 255, .3);
  border-radius: 8px;
  padding: 14px 16px;
  font-size: 12.5px;
  color: #b8c9e6;
  font-family: var(--mono);
  background: rgba(160, 107, 255, .05);
  margin-bottom: 16px;
}
.note:last-child { margin-bottom: 0; }
.note-title {
  font-size: 14px;
  letter-spacing: 3px;
  color: var(--purple);
  margin-bottom: 8px;
  text-transform: uppercase;
}
.note ul { padding-left: 16px; }
.note li { margin-bottom: 4px; }
.note li::marker { color: var(--purple); }

/* ============== 底部状态栏 ============== */
.hud-bottom {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 28px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 1px;
  color: var(--cyan);
  background: rgba(4, 8, 15, .92);
  border-top: 1px solid rgba(53, 230, 255, .22);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 900;
  box-shadow: 0 -6px 26px rgba(53, 230, 255, .1);
}
.hud-prompt { color: var(--magenta); }
.hud-blink { animation: blink 1s steps(2) infinite; color: var(--cyan); }

/* ============== 弹窗 ============== */
.modal-mask {
  position: fixed; inset: 0;
  background: rgba(0, 5, 15, .78);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}
.modal-mask.show { display: flex; animation: fadeIn .25s ease; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.modal {
  position: relative;
  background: linear-gradient(180deg, rgba(14,20,33,.98), rgba(8,12,22,.98));
  border: 1px solid var(--line-2);
  border-radius: 14px;
  padding: 26px 24px;
  width: min(420px, 90vw);
  text-align: center;
  box-shadow:
    0 0 40px rgba(53, 230, 255, .18),
    0 20px 60px rgba(0,0,0,.6),
    inset 0 0 30px rgba(53, 230, 255, .05);
}
.modal::before {
  content: "";
  position: absolute;
  top: 0; left: 10%; right: 10%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--cyan), transparent);
  filter: drop-shadow(0 0 6px var(--cyan));
}
.modal h3 {
  margin-bottom: 14px;
  font-size: 16px;
  color: var(--cyan);
  font-family: var(--mono);
  letter-spacing: 3px;
  text-transform: uppercase;
  text-shadow: 0 0 10px rgba(53, 230, 255, .5);
}
.msg-body {
  color: var(--muted);
  font-size: 13.5px;
  white-space: pre-wrap;
  margin-bottom: 20px;
  font-family: var(--mono);
}
.modal-actions { display: flex; gap: 10px; justify-content: center; }
.modal-actions button { min-width: 110px; }

.btn-primary, .btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 11px 20px;
  border-radius: 8px;
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: 2px;
  text-transform: uppercase;
  cursor: pointer;
  transition: all .2s;
}
.btn-primary {
  border: 1px solid var(--cyan);
  background: linear-gradient(135deg, rgba(53,230,255,.15), rgba(160,107,255,.15));
  color: var(--cyan);
  box-shadow: 0 0 18px rgba(53, 230, 255, .25);
}
.btn-primary:hover {
  color: #fff;
  box-shadow: 0 0 32px rgba(53, 230, 255, .55);
}
.btn-ghost {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
}
.btn-ghost:hover {
  color: var(--cyan);
  border-color: var(--cyan);
  box-shadow: 0 0 14px rgba(53, 230, 255, .25);
}

/* ============== 加载遮罩 ============== */
.loading-mask {
  position: fixed; inset: 0;
  background: rgba(0, 5, 15, .85);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  z-index: 1100;
  color: var(--cyan);
  font-family: var(--mono);
  letter-spacing: 2px;
}
.loading-mask.show { display: flex; }
.spinner {
  position: relative;
  width: 64px; height: 64px;
  border-radius: 50%;
  border: 2px solid rgba(53, 230, 255, .18);
  box-shadow: 0 0 24px rgba(53, 230, 255, .35), inset 0 0 16px rgba(53, 230, 255, .15);
}
.spinner::before {
  content: "";
  position: absolute; inset: -2px;
  border-radius: 50%;
  border: 2px solid transparent;
  border-top-color: var(--cyan);
  border-right-color: var(--magenta);
  animation: spin 1s linear infinite;
}
.spinner::after {
  content: "";
  position: absolute; inset: 10px;
  border-radius: 50%;
  border: 2px solid transparent;
  border-bottom-color: var(--purple);
  animation: spin 1.4s linear infinite reverse;
}
@keyframes spin { to { transform: rotate(360deg); } }
#loadingText {
  font-size: 13px;
  color: var(--cyan);
  text-shadow: 0 0 12px rgba(53, 230, 255, .7);
}
#loadingText::after {
  content: "_";
  animation: blink 1s steps(2) infinite;
  color: var(--magenta);
}

/* ============== 响应式 ============== */
@media (max-width: 900px) {
  .console {
    grid-template-columns: 1fr;
    padding: 16px;
    gap: 16px;
  }
  .panel { padding: 20px; }
  .hud-title { letter-spacing: 2px; font-size: 12px; }
  .hud-ver { display: none; }
  .status-item { grid-template-columns: 56px 1fr 70px; font-size: 12px; padding: 12px 14px; }
  .qr-modal-box { width: min(340px, 92vw); }
}
.quick-links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 16px;
}
.quick-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 14px 8px;
  background: #171a21;
  border: 1px solid #262b36;
  border-radius: 8px;
  color: #e6e6e6;
  text-decoration: none;
  font-size: 13px;
  transition: .15s;
}
.quick-btn:hover {
  border-color: #3d7eff;
  background: rgba(61,126,255,.08);
  color: #7ec8ff;
  transform: translateY(-2px);
}
.quick-icon { font-size: 20px; margin-bottom: 4px; }
.quick-text { font-size: 12px; letter-spacing: 1px; }

/* HUD 跳转按钮 */
.hud-link {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  font-size: 12px;
  color: #7ec8ff;
  text-decoration: none;
  border: 1px solid #2c3340;
  border-radius: 4px;
  background: rgba(61,126,255,.06);
  transition: .15s;
  margin-right: 8px;
  letter-spacing: 1px;
}
.hud-link:hover {
  color: #fff;
  border-color: #3d7eff;
  background: rgba(61,126,255,.18);
  box-shadow: 0 0 12px rgba(61,126,255,.35);
}

