/* ══════════════════════════════════════════
   老式 CRT 磷光绿终端
   —— 扫描线 · 暗角 · 荧光泛光
   ══════════════════════════════════════════ */

:root {
  /* 磷光绿 P1 色板 */
  --bg:      #050805;
  --bg-2:    #0a120a;
  --border:  #0f3d0f;

  --fg:      #33ff33;
  --dim:     #1fa81f;
  --dimmer:  #0f5c0f;

  --accent:  #33ff33;
  --amber:   #ffb000;
  --red:     #ff3b3b;

  --glow:    0 0 3px rgba(51, 255, 51, 0.35);
  --glow-lg: 0 0 8px rgba(51, 255, 51, 0.30);
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  height: 100dvh;
  overflow: hidden;
  background: var(--bg);
  color: var(--fg);
  font-family: 'Share Tech Mono', 'Courier New', ui-monospace, monospace;
  font-size: 15px;
  line-height: 1.6;
  letter-spacing: .02em;
  -webkit-font-smoothing: antialiased;
  text-shadow: var(--glow);
}

/* ── CRT 暗角 ─────────────────────────── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9998;
  background: radial-gradient(
    ellipse at center,
    transparent 35%,
    rgba(0, 0, 0, 0.30) 72%,
    rgba(0, 0, 0, 0.82) 100%
  );
}

/* ── CRT 扫描线 ───────────────────────── */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0,
    transparent 2px,
    rgba(0, 0, 0, 0.22) 2px,
    rgba(0, 0, 0, 0.22) 3px
  );
}

/* ── 全局闪烁关键帧 ───────────────────── */
@keyframes blink {
  0%, 50%   { opacity: 1; }
  51%, 100% { opacity: 0; }
}

/* ── 色板工具类 ───────────────────────── */
.c-accent { color: var(--accent); }
.c-dim    { color: var(--dim); }
.c-dimmer { color: var(--dimmer); }
.c-green  { color: var(--fg); }
.c-amber  { color: var(--amber); }
.c-red    { color: var(--red); }
.c-blue   { color: var(--dim); }
.c-purple { color: var(--dim); }
.bold     { font-weight: 700; }





/* ══════════════════════════════════════════
   入侵报警模式 —— body.alarm
   全屏红雾 + 加速扫描线 + 屏幕抖动
   ══════════════════════════════════════════ */

/* 屏幕抖起来 */
body.alarm .win {
  animation: alarm-shake 0.09s infinite;
}

/* 覆盖原暗角，换成红色脉冲 */
body.alarm::before {
  background: radial-gradient(
    ellipse at center,
    rgba(255, 0, 0, 0.04) 0%,
    rgba(255, 0, 0, 0.16) 42%,
    rgba(90, 0, 0, 0.85) 100%
  );
  animation: alarm-pulse 0.55s ease-in-out infinite;
}

/* 扫描线变红并加速滚动 */
body.alarm::after {
  background: repeating-linear-gradient(
    to bottom,
    transparent 0,
    transparent 2px,
    rgba(255, 40, 40, 0.16) 2px,
    rgba(255, 40, 40, 0.16) 3px
  );
  animation: scan-roll 0.28s linear infinite;
}

@keyframes alarm-shake {
  0%   { transform: translate( 0px,  0px); }
  25%  { transform: translate(-1px,  1px); }
  50%  { transform: translate( 1px, -1px); }
  75%  { transform: translate(-1px, -1px); }
  100% { transform: translate( 1px,  1px); }
}

@keyframes alarm-pulse {
  0%, 100% { opacity: 0.25; }
  50%      { opacity: 0.55; }
}

@keyframes scan-roll {
  from { background-position-y: 0; }
  to   { background-position-y: 3px; }
}













