/* ==========================================================================
   框架 46 · 全息面板 HUD 全息切换系统 (Framework 46: Holographic HUD Switcher)
   mojienet.baby · 魔戒 (MoJie) 官方落地页核心交互引擎
   ========================================================================== */

:root {
  --hud-primary: #00f2fe;
  --hud-primary-rgb: 0, 242, 254;
  --hud-secondary: #4facfe;
  --hud-accent: #ffd200;
  --hud-accent-rgb: 255, 210, 0;
  --hud-border-dim: rgba(0, 242, 254, 0.28);
  --hud-bg-panel: rgba(8, 14, 28, 0.82);
  --hud-bg-card: rgba(13, 23, 44, 0.65);
  --hud-green-rgb: 0, 255, 176;
}

/* HUD 终端主容器 */
.holographic-hud-terminal {
  position: relative;
  background: var(--hud-bg-panel);
  border: 1px solid var(--hud-border-dim);
  border-radius: 16px;
  box-shadow: 
    0 20px 60px rgba(0, 0, 0, 0.7),
    inset 0 0 30px rgba(0, 242, 254, 0.08);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  padding: 30px;
  margin: 40px auto;
  max-width: 1200px;
  overflow: hidden;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.holographic-hud-terminal:hover {
  border-color: rgba(0, 242, 254, 0.45);
  box-shadow: 
    0 25px 70px rgba(0, 0, 0, 0.8),
    inset 0 0 40px rgba(0, 242, 254, 0.12);
}

/* 战术全息四角支架 HUD Brackets */
.holographic-hud-terminal::before,
.holographic-hud-terminal::after,
.hud-corner-bl,
.hud-corner-br {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  border-color: var(--hud-primary);
  border-style: solid;
  pointer-events: none;
  z-index: 10;
}
.holographic-hud-terminal::before {
  top: 8px;
  left: 8px;
  border-width: 2px 0 0 2px;
}
.holographic-hud-terminal::after {
  top: 8px;
  right: 8px;
  border-width: 2px 2px 0 0;
}
.hud-corner-bl {
  bottom: 8px;
  left: 8px;
  border-width: 0 0 2px 2px;
}
.hud-corner-br {
  bottom: 8px;
  right: 8px;
  border-width: 0 2px 2px 0;
}

/* HUD 顶部控制条 (标头 + 模式切换 + 音效开关) */
.hud-terminal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(0, 242, 254, 0.18);
  padding-bottom: 20px;
  margin-bottom: 28px;
  flex-wrap: wrap;
  gap: 16px;
}

.hud-title-group {
  display: flex;
  align-items: center;
  gap: 14px;
}
.hud-badge-code {
  font-family: 'JetBrains Mono', 'Courier New', monospace;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.5px;
  color: var(--hud-primary);
  background: rgba(0, 242, 254, 0.12);
  border: 1px solid rgba(0, 242, 254, 0.35);
  padding: 4px 10px;
  border-radius: 4px;
  text-transform: uppercase;
}
.hud-terminal-title {
  font-size: 20px;
  font-weight: 800;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 8px;
}
.hud-terminal-title span {
  color: var(--hud-accent);
}

/* 全息音效及系统状态指示器 */
.hud-status-tools {
  display: flex;
  align-items: center;
  gap: 16px;
}
.hud-live-tag {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: #00ffb0;
  background: rgba(0, 255, 176, 0.08);
  border: 1px solid rgba(0, 255, 176, 0.25);
  padding: 4px 10px;
  border-radius: 4px;
}
.hud-sound-toggle {
  background: transparent;
  border: 1px solid rgba(0, 242, 254, 0.3);
  color: var(--hud-primary);
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  padding: 5px 12px;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}
.hud-sound-toggle:hover {
  background: rgba(0, 242, 254, 0.15);
  border-color: var(--hud-primary);
}

/* 框架 46 核心切换导航 (HUD Mode Tabs) */
.hud-mode-switcher {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 28px;
}

@media (max-width: 900px) {
  .hud-mode-switcher {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 540px) {
  .hud-mode-switcher {
    grid-template-columns: 1fr;
  }
}

.hud-tab-btn {
  position: relative;
  background: rgba(13, 23, 44, 0.55);
  border: 1px solid rgba(0, 242, 254, 0.2);
  border-radius: 10px;
  padding: 14px 16px;
  color: #94a3b8;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: left;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}

.hud-tab-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 3px;
  height: 100%;
  background: var(--hud-primary);
  opacity: 0;
  transition: opacity 0.2s;
}

.hud-tab-btn:hover {
  border-color: rgba(0, 242, 254, 0.4);
  background: rgba(13, 23, 44, 0.8);
  color: #f1f5f9;
  transform: translateY(-2px);
}

.hud-tab-btn.active {
  background: rgba(0, 242, 254, 0.12);
  border-color: var(--hud-primary);
  color: #ffffff;
  box-shadow: 0 4px 20px rgba(0, 242, 254, 0.25);
}
.hud-tab-btn.active::before {
  opacity: 1;
}

.tab-code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 700;
  color: var(--hud-primary);
  letter-spacing: 0.8px;
}
.hud-tab-btn.active .tab-code {
  color: var(--hud-accent);
}
.tab-name {
  font-size: 14px;
  font-weight: 700;
  color: inherit;
}
.tab-desc {
  font-size: 11px;
  color: #64748b;
  line-height: 1.4;
}
.hud-tab-btn.active .tab-desc {
  color: #cbd5e1;
}

/* 全息展示面板切换视口 */
.hud-panels-viewport {
  position: relative;
  min-height: 380px;
}

.hud-panel {
  display: none;
  animation: hudGlitchIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.hud-panel.active {
  display: block;
}

@keyframes hudGlitchIn {
  0% {
    opacity: 0;
    transform: translateY(12px) scale(0.99);
    filter: blur(4px);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

/* 全息激光扫掠线 Scanline Beam */
.hud-scanline {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(0, 242, 254, 0.8), #ffffff, rgba(0, 242, 254, 0.8), transparent);
  box-shadow: 0 0 12px var(--hud-primary);
  pointer-events: none;
  opacity: 0.4;
  animation: scanlineSweep 6s linear infinite;
  z-index: 5;
}

@keyframes scanlineSweep {
  0% { top: 0%; opacity: 0.1; }
  20% { opacity: 0.6; }
  80% { opacity: 0.6; }
  100% { top: 100%; opacity: 0.1; }
}

/* ==========================================================================
   面板 1：骨干遥测 HUD (Node Telemetry)
   ========================================================================== */
.telemetry-node-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 16px;
}

.node-hud-card {
  background: var(--hud-bg-card);
  border: 1px solid rgba(0, 242, 254, 0.2);
  border-radius: 12px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
  transition: all 0.25s ease;
}
.node-hud-card:hover {
  border-color: var(--hud-primary);
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0, 242, 254, 0.18);
}

.node-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.node-city {
  font-size: 16px;
  font-weight: 800;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 6px;
}
.node-flag {
  font-size: 16px;
}
.node-type-pill {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  font-weight: 700;
  color: var(--hud-accent);
  background: rgba(255, 210, 0, 0.1);
  border: 1px solid rgba(255, 210, 0, 0.3);
  padding: 2px 6px;
  border-radius: 4px;
}

.node-metric-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}
.metric-name {
  font-size: 11px;
  color: #64748b;
  font-family: 'JetBrains Mono', monospace;
}
.metric-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 15px;
  font-weight: 800;
  color: #00f2fe;
}
.metric-num.ping { color: #00ffb0; }
.metric-num.loss { color: #38bdf8; }

.node-bar-track {
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 2px;
  overflow: hidden;
}
.node-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #00f2fe, #00ffb0);
  border-radius: 2px;
  transition: width 0.6s ease;
}

.node-unlocks {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 10px;
  color: #94a3b8;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 10px;
}
.node-unlocks span {
  background: rgba(255, 255, 255, 0.05);
  padding: 2px 6px;
  border-radius: 4px;
}

/* ==========================================================================
   面板 2：资产确权核算透镜 (Traffic Asset Matrix)
   ========================================================================== */
.asset-matrix-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.asset-banner {
  background: linear-gradient(135deg, rgba(255, 210, 0, 0.12), rgba(0, 242, 254, 0.08));
  border: 1px solid rgba(255, 210, 0, 0.3);
  border-radius: 12px;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
}
.asset-banner-text h4 {
  font-size: 16px;
  font-weight: 800;
  color: #ffd200;
  margin-bottom: 4px;
}
.asset-banner-text p {
  font-size: 13px;
  color: #cbd5e1;
}
.asset-pill-high {
  font-family: 'JetBrains Mono', monospace;
  font-size: 18px;
  font-weight: 900;
  color: #050811;
  background: #ffd200;
  padding: 6px 14px;
  border-radius: 8px;
  box-shadow: 0 0 15px rgba(255, 210, 0, 0.5);
}

.asset-table-wrap {
  overflow-x: auto;
}
.asset-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  text-align: left;
}
.asset-table th {
  background: rgba(0, 242, 254, 0.08);
  color: var(--hud-primary);
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(0, 242, 254, 0.2);
  white-space: nowrap;
}
.asset-table td {
  padding: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  color: #e2e8f0;
}
.asset-table tr:hover td {
  background: rgba(0, 242, 254, 0.05);
}
.asset-table .val-accent {
  color: #ffd200;
  font-weight: 800;
  font-family: 'JetBrains Mono', monospace;
}
.asset-table .val-cyan {
  color: #00f2fe;
  font-weight: 800;
  font-family: 'JetBrains Mono', monospace;
}

/* ==========================================================================
   面板 3：协议穿透拓扑 (Protocol Penetration HUD)
   ========================================================================== */
.protocol-hud-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
}
.proto-card {
  background: var(--hud-bg-card);
  border: 1px solid rgba(0, 242, 254, 0.2);
  border-radius: 12px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.proto-card.featured {
  border-color: #ffd200;
  box-shadow: 0 0 20px rgba(255, 210, 0, 0.15);
}
.proto-name {
  font-family: 'JetBrains Mono', monospace;
  font-size: 16px;
  font-weight: 800;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.proto-feature-tag {
  font-size: 10px;
  background: rgba(0, 242, 254, 0.15);
  color: #00f2fe;
  padding: 2px 6px;
  border-radius: 4px;
}
.proto-details {
  font-size: 12px;
  color: #94a3b8;
  line-height: 1.6;
}

/* ==========================================================================
   面板 4：全端并发雷达 (Multi-Device Radar)
   ========================================================================== */
.device-radar-flex {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
}
.device-box {
  background: var(--hud-bg-card);
  border: 1px solid rgba(0, 242, 254, 0.2);
  border-radius: 12px;
  padding: 18px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  transition: all 0.2s ease;
}
.device-box:hover {
  border-color: #00ffb0;
  box-shadow: 0 8px 20px rgba(0, 255, 176, 0.15);
}
.device-icon-svg {
  width: 40px;
  height: 40px;
  color: #00f2fe;
}
.device-name {
  font-size: 14px;
  font-weight: 700;
  color: #ffffff;
}
.device-support {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: #00ffb0;
  background: rgba(0, 255, 176, 0.08);
  padding: 2px 8px;
  border-radius: 4px;
}
.device-desc {
  font-size: 11px;
  color: #64748b;
  line-height: 1.4;
}
