/* ============================================================
   73-HotDash — Visual Effects
   掃描線 / 霓虹光暈 / 全息效果 / 電路紋理
   ============================================================ */

/* ── CRT 掃描線覆蓋 ── */
#scanlines {
  position: fixed;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, 0.06) 2px,
    rgba(0, 0, 0, 0.06) 4px
  );
  pointer-events: none;
  z-index: var(--z-scanlines);
  animation: scanDrift var(--scan-speed) linear infinite;
  opacity: 0.7;
}
@keyframes scanDrift {
  0%   { transform: translateY(0); }
  100% { transform: translateY(4px); }
}

/* ── 背景漸層底層 ── */
#bg-gradient {
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(ellipse at 15% 80%, rgba(0,245,212,0.06) 0%, transparent 55%),
    radial-gradient(ellipse at 85% 20%, rgba(139,92,246,0.05) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 50%, rgba(255,0,84,0.02) 0%, transparent 60%),
    var(--cy-bg);
}

/* ── 粒子層容器 ── */
#particles-bg {
  position: fixed;
  inset: 0;
  z-index: var(--z-particles);
  pointer-events: none;
}

/* ── 網格線背景 ── */
#grid-overlay {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(0,245,212,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,245,212,0.025) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 50%, black 30%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 50%, black 30%, transparent 70%);
}

/* ── 霓虹邊框動畫 ── */
@keyframes borderPulse {
  0%, 100% { border-color: rgba(0,245,212,0.15); }
  50%      { border-color: rgba(0,245,212,0.35); }
}
.border-pulse {
  animation: borderPulse 3s ease-in-out infinite;
}

/* ── 危險脈衝 ── */
@keyframes dangerPulse {
  0%, 100% { box-shadow: 0 0 4px rgba(255,0,84,0.2); }
  50%      { box-shadow: 0 0 20px rgba(255,0,84,0.5), 0 0 60px rgba(255,0,84,0.15); }
}
.danger-pulse {
  animation: dangerPulse 1.5s ease-in-out infinite;
}

/* ── 數據流入效果 ── */
@keyframes dataStream {
  0%   { background-position: 0% 0%; }
  100% { background-position: 0% 100%; }
}
.data-stream-bg {
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgba(0,245,212,0.03) 45%,
    rgba(0,245,212,0.08) 50%,
    rgba(0,245,212,0.03) 55%,
    transparent 100%
  );
  background-size: 100% 400%;
  animation: dataStream 4s linear infinite;
}

/* ── 頂部 HUD 分隔線 ── */
.hud-divider {
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(0,245,212,0.4) 20%,
    rgba(0,245,212,0.6) 50%,
    rgba(0,245,212,0.4) 80%,
    transparent 100%
  );
  box-shadow: 0 0 8px rgba(0,245,212,0.2);
}

/* ── 狀態指示燈 ── */
.status-dot {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.status-dot--ok {
  background: var(--cy-success);
  box-shadow: 0 0 6px var(--cy-success);
}
.status-dot--progress {
  background: var(--cy-accent);
  box-shadow: 0 0 6px var(--cy-accent);
  animation: pulse 2s infinite;
}
.status-dot--danger {
  background: var(--cy-danger);
  box-shadow: 0 0 6px var(--cy-danger);
  animation: dangerPulse 1.2s infinite;
}
.status-dot--offline {
  background: var(--cy-muted);
}

/* ── 連線燈 ── */
.conn-indicator {
  display: flex; align-items: center; gap: 6px;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--cy-text-dim);
}

/* ── 打字機光標 ── */
.typewriter-cursor {
  display: inline-block;
  width: 2px;
  height: 1em;
  background: var(--cy-primary);
  animation: blink 0.8s step-end infinite;
  margin-left: 2px;
  vertical-align: text-bottom;
}
@keyframes blink {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0; }
}

/* ── 進度條 ── */
.progress-bar {
  height: 4px;
  background: rgba(255,255,255,0.06);
  border-radius: 2px;
  overflow: hidden;
}
.progress-bar__fill {
  height: 100%;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--cy-primary), var(--cy-secondary));
  box-shadow: 0 0 8px rgba(0,245,212,0.3);
  transition: width 0.6s var(--ease-spring);
}

/* ── 徽章 ── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border-radius: 2px;
  border: 1px solid;
}
.badge--ok      { color: var(--cy-success); border-color: rgba(0,230,118,0.3); background: rgba(0,230,118,0.08); }
.badge--progress { color: var(--cy-accent); border-color: rgba(255,107,53,0.3); background: rgba(255,107,53,0.08); }
.badge--danger  { color: var(--cy-danger); border-color: rgba(255,0,84,0.3); background: rgba(255,0,84,0.08); }
.badge--info    { color: var(--cy-primary); border-color: rgba(0,245,212,0.3); background: rgba(0,245,212,0.08); }
