/* ═══════════════════════════════════════════
   SATURN RING — Home Screen
   Cyberpunk + iOS Frosted Glass
   ═══════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700;900&family=Rajdhani:wght@300;400;500;600;700&display=swap');

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

:root {
  --neon-blue: #00f0ff;
  --neon-purple: #bf5af2;
  --neon-pink: #ff2d78;
  --neon-green: #0aff9d;
  --glass-bg: rgba(255, 255, 255, 0.06);
  --glass-border: rgba(255, 255, 255, 0.12);
  --glass-blur: 20px;
  --text-primary: rgba(255, 255, 255, 0.92);
  --text-secondary: rgba(255, 255, 255, 0.5);
  --text-dim: rgba(255, 255, 255, 0.25);
  --bg-deep: #07080d;
  --bg-surface: #0d0f18;
  --danger: #ff453a;
  --warning: #ffd60a;
}

html, body {
  width: 100%; height: 100%;
  background: var(--bg-deep);
  color: var(--text-primary);
  font-family: 'Rajdhani', 'SF Pro', -apple-system, sans-serif;
  overflow: hidden;
  user-select: none;
}

/* ── 背景层 ── */
.bg-layer {
  position: fixed; inset: 0; z-index: 0;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(0, 255, 255, 0.03) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 50%, rgba(255, 0, 128, 0.03) 0%, transparent 50%);
}

/* 网格线 */
.grid-overlay {
  display: none;
}

/* 扫描线底纹 + 从上到下扫描光带（admin风格） */
.scanline {
  position: fixed; inset: 0; z-index: 1; pointer-events: none;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 255, 255, 0.015) 2px,
    rgba(0, 255, 255, 0.015) 4px
  );
}
.scanline::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 200px;
  background: linear-gradient(
    to bottom,
    transparent,
    rgba(0, 255, 255, 0.03),
    transparent
  );
  animation: scanline-sweep 8s linear infinite;
  pointer-events: none;
}
@keyframes scanline-sweep {
  0% { top: -200px; }
  100% { top: 100vh; }
}

/* ── 顶部状态栏 ── */
.status-bar {
  position: relative; z-index: 10;
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 20px 8px;
  font-family: 'Orbitron', monospace;
  font-size: 10px;
  letter-spacing: 1.5px;
  color: var(--text-secondary);
}

.status-left, .status-right {
  display: flex; align-items: center; gap: 16px;
}

.status-item {
  display: flex; align-items: center; gap: 5px;
  text-transform: uppercase;
}

.status-dot {
  width: 5px; height: 5px; border-radius: 50%;
  animation: pulse-dot 2s ease-in-out infinite;
}
.status-dot.green { background: var(--neon-green); box-shadow: 0 0 6px var(--neon-green); }
.status-dot.blue { background: var(--neon-blue); box-shadow: 0 0 6px var(--neon-blue); }
.status-dot.purple { background: var(--neon-purple); box-shadow: 0 0 6px var(--neon-purple); }
.status-dot.pink { background: var(--neon-pink); box-shadow: 0 0 6px var(--neon-pink); }
.status-dot.warning { background: var(--warning); box-shadow: 0 0 6px var(--warning); }

.status-value {
  color: var(--neon-blue);
  font-weight: 700;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* ── 标题区 ── */
.header-section {
  position: relative; z-index: 10;
  text-align: center;
  padding: 24px 20px 4px;
}

.header-title {
  font-family: 'Orbitron', monospace;
  font-size: 28px;
  font-weight: 900;
  letter-spacing: 8px;
  background: linear-gradient(135deg, var(--neon-blue), var(--neon-purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: none;
  filter: drop-shadow(0 0 20px rgba(0, 240, 255, 0.3));
}

.header-sub {
  font-family: 'Orbitron', monospace;
  font-size: 9px;
  letter-spacing: 4px;
  color: var(--text-dim);
  margin-top: 4px;
}

/* ── 系统信息面板 ── */
.sys-info-panel {
  position: relative; z-index: 10;
  display: flex; justify-content: center; gap: 24px;
  padding: 16px 20px;
  flex-wrap: wrap;
}

.sys-card {
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  border-radius: 14px;
  padding: 12px 16px;
  min-width: 100px;
  text-align: center;
}

.sys-card-label {
  font-family: 'Orbitron', monospace;
  font-size: 8px;
  letter-spacing: 2px;
  color: var(--text-dim);
  text-transform: uppercase;
  margin-bottom: 6px;
}

.sys-card-value {
  font-family: 'Orbitron', monospace;
  font-size: 20px;
  font-weight: 700;
}

.sys-card-value.blue { color: var(--neon-blue); text-shadow: 0 0 12px rgba(0, 240, 255, 0.4); }
.sys-card-value.purple { color: var(--neon-purple); text-shadow: 0 0 12px rgba(191, 90, 242, 0.4); }
.sys-card-value.green { color: var(--neon-green); text-shadow: 0 0 12px rgba(10, 255, 157, 0.4); }
.sys-card-value.pink { color: var(--neon-pink); text-shadow: 0 0 12px rgba(255, 45, 120, 0.4); }

.sys-card-unit {
  font-size: 10px;
  font-weight: 400;
  opacity: 0.6;
}

/* ── App 网格 ── */
.app-grid {
  position: relative; z-index: 10;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  padding: 24px 32px;
  max-width: 480px;
  margin: 0 auto;
}

.app-icon {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.2s ease;
}
.app-icon:active { transform: scale(0.9); }

.app-icon-box {
  width: 64px; height: 64px;
  border-radius: 18px;
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  display: flex; align-items: center; justify-content: center;
  font-size: 26px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.app-icon-box::before {
  content: '';
  position: absolute; inset: 0;
  border-radius: 18px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.app-icon:hover .app-icon-box {
  border-color: rgba(255,255,255,0.25);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}

.app-icon-box.chat::before { background: linear-gradient(135deg, rgba(0,240,255,0.15), rgba(0,240,255,0.05)); }
.app-icon-box.memory::before { background: linear-gradient(135deg, rgba(191,90,242,0.15), rgba(191,90,242,0.05)); }
.app-icon-box.settings::before { background: linear-gradient(135deg, rgba(255,214,10,0.12), rgba(255,214,10,0.04)); }
.app-icon-box.admin::before { background: linear-gradient(135deg, rgba(255,45,120,0.15), rgba(255,45,120,0.05)); }
.app-icon-box.visitor::before { background: linear-gradient(135deg, rgba(10,255,157,0.15), rgba(10,255,157,0.05)); }
.app-icon-box.terminal::before { background: linear-gradient(135deg, rgba(255,255,255,0.1), rgba(255,255,255,0.03)); }

.app-icon:hover .app-icon-box::before { opacity: 1; }

.app-icon-box .icon-svg {
  width: 28px; height: 28px;
  stroke-width: 1.5;
}

.app-icon-label {
  font-family: 'Rajdhani', sans-serif;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.5px;
  color: var(--text-secondary);
}

/* 图标颜色 */
.app-icon-box.chat { color: var(--neon-blue); }
.app-icon-box.memory { color: var(--neon-purple); }
.app-icon-box.settings { color: var(--warning); }
.app-icon-box.admin { color: var(--neon-pink); }
.app-icon-box.visitor { color: var(--neon-green); }
.app-icon-box.terminal { color: var(--text-secondary); }

/* 角标 */
.app-badge {
  position: absolute; top: -4px; right: -4px;
  min-width: 18px; height: 18px;
  border-radius: 9px;
  background: var(--danger);
  color: white;
  font-family: 'Orbitron', monospace;
  font-size: 9px;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  padding: 0 4px;
  box-shadow: 0 2px 8px rgba(255, 69, 58, 0.5);
}

/* ── 底部 Dock (PC) ── */
.dock {
  position: fixed; bottom: 16px; left: 50%; transform: translateX(-50%);
  z-index: 100;
  display: none; /* 默认隐藏 PC才显示 */
  align-items: center; gap: 8px;
  padding: 8px 16px;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
}

.dock-item {
  width: 48px; height: 48px;
  border-radius: 14px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  position: relative;
}
.dock-item:hover {
  transform: translateY(-6px) scale(1.15);
  border-color: rgba(255,255,255,0.25);
  box-shadow: 0 8px 20px rgba(0,0,0,0.4);
}

.dock-item.chat { color: var(--neon-blue); }
.dock-item.memory { color: var(--neon-purple); }
.dock-item.settings { color: var(--warning); }
.dock-item.admin { color: var(--neon-pink); }

.dock-sep {
  width: 1px; height: 32px;
  background: rgba(255,255,255,0.1);
  margin: 0 4px;
}

/* ── 底部信息 ── */
.footer-info {
  position: fixed; bottom: 8px; left: 0; right: 0;
  text-align: center; z-index: 10;
  font-family: 'Orbitron', monospace;
  font-size: 8px;
  letter-spacing: 3px;
  color: var(--text-dim);
}

/* ── 响应式 ── */
@media (min-width: 768px) {
  .header-title { font-size: 36px; letter-spacing: 12px; }
  
  .app-grid {
    grid-template-columns: repeat(4, 1fr);
    max-width: 560px;
    gap: 28px;
    padding: 32px;
  }

  .app-icon-box { width: 72px; height: 72px; border-radius: 20px; font-size: 30px; }

  .dock { display: flex; }
  .footer-info { bottom: 80px; }

  .sys-info-panel { gap: 16px; }
  .sys-card { min-width: 120px; padding: 14px 20px; }
}

@media (min-width: 1200px) {
  .app-grid {
    grid-template-columns: repeat(5, 1fr);
    max-width: 680px;
  }
}

/* ── 动画 ── */
@keyframes fade-up {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.app-icon { animation: fade-up 0.5s ease backwards; }
.app-icon:nth-child(1) { animation-delay: 0.05s; }
.app-icon:nth-child(2) { animation-delay: 0.1s; }
.app-icon:nth-child(3) { animation-delay: 0.15s; }
.app-icon:nth-child(4) { animation-delay: 0.2s; }
.app-icon:nth-child(5) { animation-delay: 0.25s; }
.app-icon:nth-child(6) { animation-delay: 0.3s; }

.sys-card { animation: fade-up 0.4s ease backwards; }
.sys-card:nth-child(1) { animation-delay: 0s; }
.sys-card:nth-child(2) { animation-delay: 0.08s; }
.sys-card:nth-child(3) { animation-delay: 0.16s; }
.sys-card:nth-child(4) { animation-delay: 0.24s; }

/* breathe-glow removed — merged into new glitch */

/* ── 数字雨背景（纯CSS） ── */
/* 数字雨（已关闭） */
.matrix-rain { display: none; }
.matrix-rain::before { display: none; }

/* ── 脉动光晕 ── */
.app-icon-box:focus,
.app-icon-box:active {
  box-shadow: 0 0 20px rgba(0, 240, 255, 0.3);
  animation: pulse-glow 2s infinite;
}
@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 10px rgba(0, 240, 255, 0.2); }
  50% { box-shadow: 0 0 25px rgba(0, 240, 255, 0.4); }
}

/* ── HUD角标 ── */
.hud-corner {
  position: fixed; width: 30px; height: 30px;
  border-color: rgba(0, 240, 255, 0.15);
  border-style: solid; border-width: 0;
  z-index: 2; pointer-events: none;
}
.hud-corner.tl { top: 8px; left: 8px; border-top-width: 1px; border-left-width: 1px; }
.hud-corner.tr { top: 8px; right: 8px; border-top-width: 1px; border-right-width: 1px; }
.hud-corner.bl { bottom: 8px; left: 8px; border-bottom-width: 1px; border-left-width: 1px; }
.hud-corner.br { bottom: 8px; right: 8px; border-bottom-width: 1px; border-right-width: 1px; }

/* ── 选中文字 ── */
::selection {
  background: rgba(0, 240, 255, 0.2);
  color: var(--neon-blue);
}

/* ── 滚动条 ── */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--bg-deep); }
::-webkit-scrollbar-thumb { background: rgba(0, 240, 255, 0.2); border-radius: 2px; }
::-webkit-scrollbar-thumb:hover { background: rgba(0, 240, 255, 0.4); }

/* ── sys-card hover脉动 ── */
.sys-card:hover {
  border-color: rgba(255,255,255,0.2);
  box-shadow: 0 0 15px rgba(0, 240, 255, 0.1);
  transform: translateY(-2px);
  transition: all 0.3s ease;
}

/* ── Dock item 脉动 ── */
.dock-item:active {
  box-shadow: 0 0 20px rgba(0, 240, 255, 0.3);
}


/* ═══════════════════════════════════════════
   v2 UPGRADES — 呼吸 · 发光 · 粒子 · 故障
   ═══════════════════════════════════════════ */

/* glitch v1 removed — replaced by v2 slice glitch below */

/* ── sys-card 霓虹呼吸边框 ── */
@keyframes border-breathe-blue {
  0%, 100% {
    border-color: rgba(0, 240, 255, 0.12);
    box-shadow: 0 0 8px rgba(0, 240, 255, 0.05), inset 0 0 8px rgba(0, 240, 255, 0.02);
  }
  50% {
    border-color: rgba(0, 240, 255, 0.35);
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.15), inset 0 0 15px rgba(0, 240, 255, 0.05);
  }
}
@keyframes border-breathe-purple {
  0%, 100% {
    border-color: rgba(191, 90, 242, 0.12);
    box-shadow: 0 0 8px rgba(191, 90, 242, 0.05), inset 0 0 8px rgba(191, 90, 242, 0.02);
  }
  50% {
    border-color: rgba(191, 90, 242, 0.35);
    box-shadow: 0 0 20px rgba(191, 90, 242, 0.15), inset 0 0 15px rgba(191, 90, 242, 0.05);
  }
}
@keyframes border-breathe-green {
  0%, 100% {
    border-color: rgba(10, 255, 157, 0.12);
    box-shadow: 0 0 8px rgba(10, 255, 157, 0.05), inset 0 0 8px rgba(10, 255, 157, 0.02);
  }
  50% {
    border-color: rgba(10, 255, 157, 0.35);
    box-shadow: 0 0 20px rgba(10, 255, 157, 0.15), inset 0 0 15px rgba(10, 255, 157, 0.05);
  }
}
@keyframes border-breathe-pink {
  0%, 100% {
    border-color: rgba(255, 45, 120, 0.12);
    box-shadow: 0 0 8px rgba(255, 45, 120, 0.05), inset 0 0 8px rgba(255, 45, 120, 0.02);
  }
  50% {
    border-color: rgba(255, 45, 120, 0.35);
    box-shadow: 0 0 20px rgba(255, 45, 120, 0.15), inset 0 0 15px rgba(255, 45, 120, 0.05);
  }
}

.sys-card:nth-child(1) { animation: fade-up 0.4s ease backwards, border-breathe-blue 3s ease-in-out infinite; animation-delay: 0s, 0s; }
.sys-card:nth-child(2) { animation: fade-up 0.4s ease backwards, border-breathe-purple 3s ease-in-out infinite; animation-delay: 0.08s, 0.75s; }
.sys-card:nth-child(3) { animation: fade-up 0.4s ease backwards, border-breathe-green 3s ease-in-out infinite; animation-delay: 0.16s, 1.5s; }
.sys-card:nth-child(4) { animation: fade-up 0.4s ease backwards, border-breathe-pink 3s ease-in-out infinite; animation-delay: 0.24s, 2.25s; }

/* ── App图标 hover发光 ── */
.app-icon-box {
  transition: all 0.3s ease;
}
.app-icon-box:hover {
  transform: translateY(-4px) scale(1.05);
}
.app-icon-box.chat:hover {
  box-shadow: 0 0 25px rgba(0, 240, 255, 0.35), 0 8px 20px rgba(0, 240, 255, 0.15);
  border-color: rgba(0, 240, 255, 0.4);
}
.app-icon-box.memory:hover {
  box-shadow: 0 0 25px rgba(191, 90, 242, 0.35), 0 8px 20px rgba(191, 90, 242, 0.15);
  border-color: rgba(191, 90, 242, 0.4);
}
.app-icon-box.settings:hover {
  box-shadow: 0 0 25px rgba(255, 214, 10, 0.35), 0 8px 20px rgba(255, 214, 10, 0.15);
  border-color: rgba(255, 214, 10, 0.4);
}
.app-icon-box.admin:hover {
  box-shadow: 0 0 25px rgba(255, 45, 120, 0.35), 0 8px 20px rgba(255, 45, 120, 0.15);
  border-color: rgba(255, 45, 120, 0.4);
}
.app-icon-box.visitor:hover {
  box-shadow: 0 0 25px rgba(10, 255, 157, 0.35), 0 8px 20px rgba(10, 255, 157, 0.15);
  border-color: rgba(10, 255, 157, 0.4);
}
.app-icon-box.terminal:hover {
  box-shadow: 0 0 25px rgba(0, 255, 65, 0.35), 0 8px 20px rgba(0, 255, 65, 0.15);
  border-color: rgba(0, 255, 65, 0.4);
}

/* ── 粒子/星尘飘动 ── */
.particles {
  position: fixed; inset: 0; z-index: 1; pointer-events: none; overflow: hidden;
}
.particle {
  position: absolute;
  width: 2px; height: 2px;
  border-radius: 50%;
  opacity: 0;
  animation: float-up linear infinite;
}
.particle:nth-child(1) { left: 10%; background: var(--neon-blue); animation-duration: 12s; animation-delay: 0s; }
.particle:nth-child(2) { left: 20%; background: var(--neon-purple); animation-duration: 15s; animation-delay: 2s; width: 3px; height: 3px; }
.particle:nth-child(3) { left: 35%; background: var(--neon-pink); animation-duration: 10s; animation-delay: 4s; }
.particle:nth-child(4) { left: 45%; background: var(--neon-blue); animation-duration: 14s; animation-delay: 1s; width: 1px; height: 1px; }
.particle:nth-child(5) { left: 55%; background: var(--neon-green); animation-duration: 18s; animation-delay: 3s; }
.particle:nth-child(6) { left: 65%; background: var(--neon-purple); animation-duration: 11s; animation-delay: 5s; width: 3px; height: 3px; }
.particle:nth-child(7) { left: 75%; background: var(--neon-blue); animation-duration: 16s; animation-delay: 0.5s; }
.particle:nth-child(8) { left: 85%; background: var(--neon-pink); animation-duration: 13s; animation-delay: 2.5s; width: 1px; height: 1px; }
.particle:nth-child(9) { left: 30%; background: var(--neon-green); animation-duration: 17s; animation-delay: 6s; }
.particle:nth-child(10) { left: 50%; background: var(--neon-blue); animation-duration: 19s; animation-delay: 1.5s; width: 2px; height: 2px; }
.particle:nth-child(11) { left: 92%; background: var(--neon-purple); animation-duration: 14s; animation-delay: 3.5s; }
.particle:nth-child(12) { left: 5%; background: var(--neon-pink); animation-duration: 20s; animation-delay: 7s; width: 1px; height: 1px; }

@keyframes float-up {
  0% { bottom: -10px; opacity: 0; transform: translateX(0); }
  10% { opacity: 0.6; }
  50% { transform: translateX(20px); }
  90% { opacity: 0.3; }
  100% { bottom: 110vh; opacity: 0; transform: translateX(-10px); }
}

/* ── HUD角标呼吸 ── */
@keyframes hud-breathe {
  0%, 100% { border-color: rgba(0, 240, 255, 0.1); }
  50% { border-color: rgba(0, 240, 255, 0.3); }
}
.hud-corner { animation: hud-breathe 4s ease-in-out infinite; }


  100% { top: 100vh; }
}

/* ── 状态栏文字闪烁 ── */
@keyframes value-flicker {
  0%, 100% { opacity: 1; }
  92% { opacity: 1; }
  93% { opacity: 0.4; }
  94% { opacity: 1; }
  97% { opacity: 0.6; }
  98% { opacity: 1; }
}
.status-value { animation: value-flicker 8s infinite; }

/* ── sys-card-value 数值发光 ── */
.sys-card-value {
  transition: text-shadow 0.3s ease;
}
.sys-card:hover .sys-card-value.blue { text-shadow: 0 0 20px rgba(0, 240, 255, 0.7), 0 0 40px rgba(0, 240, 255, 0.3); }
.sys-card:hover .sys-card-value.purple { text-shadow: 0 0 20px rgba(191, 90, 242, 0.7), 0 0 40px rgba(191, 90, 242, 0.3); }
.sys-card:hover .sys-card-value.green { text-shadow: 0 0 20px rgba(10, 255, 157, 0.7), 0 0 40px rgba(10, 255, 157, 0.3); }
.sys-card:hover .sys-card-value.pink { text-shadow: 0 0 20px rgba(255, 45, 120, 0.7), 0 0 40px rgba(255, 45, 120, 0.3); }

/* ── footer呼吸 ── */
@keyframes footer-pulse {
  0%, 100% { opacity: 0.25; }
  50% { opacity: 0.5; }
}
.footer-info { animation: footer-pulse 5s ease-in-out infinite; }

/* ── 背景光晕缓慢移动 ── */
@keyframes bg-drift {
  0% { background-position: 0% 0%; }
  25% { background-position: 100% 50%; }
  50% { background-position: 50% 100%; }
  75% { background-position: 0% 50%; }
  100% { background-position: 0% 0%; }
}
.bg-layer {
  animation: bg-drift 30s ease-in-out infinite;
  background-size: 200% 200%;
}


/* ═══════════════════════════════════════════
   GLITCH v2 — clip-path inset slice system
   ═══════════════════════════════════════════ */

/* 标题容器 */
.header-title {
  position: relative;
  display: inline-block;
  animation: breathe-glow 4s ease-in-out infinite;
}

@keyframes breathe-glow {
  0%, 100% { filter: drop-shadow(0 0 20px rgba(0, 240, 255, 0.3)); }
  50% { filter: drop-shadow(0 0 35px rgba(0, 240, 255, 0.6)); }
}

/* 双伪元素：各自独立切片动画 */
.header-title::before,
.header-title::after {
  content: attr(data-text);
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: var(--bg-deep);
  overflow: hidden;
  font-family: inherit;
  font-size: inherit;
  font-weight: inherit;
  letter-spacing: inherit;
  text-align: center;
}

/* 粉色层 — 左偏移 */
.header-title::before {
  background: linear-gradient(135deg, var(--neon-pink), var(--neon-purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  opacity: 0;
  animation: glitch-slice-pink 6s infinite;
}

/* 青色层 — 右偏移 */
.header-title::after {
  background: linear-gradient(135deg, var(--neon-blue), #00ff88);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  opacity: 0;
  animation: glitch-slice-cyan 6s infinite;
  animation-delay: 0.15s;
}

/* 粉色切片动画 — 大部分时间隐藏 突然闪现 */
@keyframes glitch-slice-pink {
  0%, 100% { opacity: 0; clip-path: inset(0 0 100% 0); transform: translate(0); }
  
  /* 第一次故障 — 2s处 持续0.3s */
  32% { opacity: 0; clip-path: inset(0 0 100% 0); transform: translate(0); }
  33% { opacity: 0.8; clip-path: inset(15% 0 65% 0); transform: translate(-3px, 0); }
  33.5% { opacity: 0.8; clip-path: inset(60% 0 10% 0); transform: translate(2px, 0); }
  34% { opacity: 0.8; clip-path: inset(30% 0 45% 0); transform: translate(-4px, 0); }
  34.5% { opacity: 0.8; clip-path: inset(5% 0 80% 0); transform: translate(1px, 0); }
  35% { opacity: 0; clip-path: inset(0 0 100% 0); transform: translate(0); }
  
  /* 第二次故障 — 4s处 持续0.2s */
  65% { opacity: 0; clip-path: inset(0 0 100% 0); transform: translate(0); }
  66% { opacity: 0.7; clip-path: inset(70% 0 5% 0); transform: translate(-2px, 0); }
  66.5% { opacity: 0.9; clip-path: inset(10% 0 75% 0); transform: translate(3px, 0); }
  67% { opacity: 0.6; clip-path: inset(45% 0 30% 0); transform: translate(-1px, 0); }
  67.5% { opacity: 0; clip-path: inset(0 0 100% 0); transform: translate(0); }
  
  /* 第三次微故障 — 5s处 */
  83% { opacity: 0; }
  83.5% { opacity: 0.5; clip-path: inset(50% 0 35% 0); transform: translate(-2px, 0); }
  84% { opacity: 0; clip-path: inset(0 0 100% 0); transform: translate(0); }
}

/* 青色切片动画 — 跟粉色错开 */
@keyframes glitch-slice-cyan {
  0%, 100% { opacity: 0; clip-path: inset(0 0 100% 0); transform: translate(0); }
  
  33% { opacity: 0; }
  33.3% { opacity: 0.7; clip-path: inset(40% 0 35% 0); transform: translate(3px, 0); }
  33.8% { opacity: 0.8; clip-path: inset(5% 0 85% 0); transform: translate(-2px, 0); }
  34.3% { opacity: 0.9; clip-path: inset(75% 0 5% 0); transform: translate(4px, 0); }
  34.8% { opacity: 0.6; clip-path: inset(20% 0 60% 0); transform: translate(-1px, 0); }
  35.3% { opacity: 0; clip-path: inset(0 0 100% 0); transform: translate(0); }
  
  65.5% { opacity: 0; }
  66% { opacity: 0.8; clip-path: inset(25% 0 55% 0); transform: translate(2px, 0); }
  66.3% { opacity: 0.7; clip-path: inset(80% 0 5% 0); transform: translate(-3px, 0); }
  66.8% { opacity: 0.9; clip-path: inset(10% 0 70% 0); transform: translate(1px, 0); }
  67.3% { opacity: 0; clip-path: inset(0 0 100% 0); transform: translate(0); }
  
  83.3% { opacity: 0; }
  83.6% { opacity: 0.6; clip-path: inset(60% 0 20% 0); transform: translate(2px, 0); }
  84.1% { opacity: 0; clip-path: inset(0 0 100% 0); transform: translate(0); }
}

/* 标题本体也偶尔抖一下 */
@keyframes title-jitter {
  0%, 100% { transform: translate(0); }
  33% { transform: translate(0); }
  33.2% { transform: translate(-1px, 1px); }
  33.4% { transform: translate(1px, -1px); }
  33.6% { transform: translate(0); }
  66% { transform: translate(0); }
  66.15% { transform: translate(1px, 0); }
  66.3% { transform: translate(-1px, 1px); }
  66.45% { transform: translate(0); }
}

.header-section {
  animation: title-jitter 6s infinite;
}

/* ═══════════════════════════════════════════
   背景动效 — 替代扫描线/数字雨
   ═══════════════════════════════════════════ */

/* 背景光晕缓慢脉动 + 漂移 */
.bg-layer {
  animation: bg-morph 20s ease-in-out infinite alternate;
}
@keyframes bg-morph {
  0% {
    background:
      radial-gradient(ellipse at 20% 40%, rgba(0, 255, 255, 0.04) 0%, transparent 50%),
      radial-gradient(ellipse at 80% 60%, rgba(255, 0, 128, 0.03) 0%, transparent 50%);
  }
  33% {
    background:
      radial-gradient(ellipse at 30% 60%, rgba(0, 255, 255, 0.05) 0%, transparent 50%),
      radial-gradient(ellipse at 70% 40%, rgba(191, 90, 242, 0.04) 0%, transparent 50%);
  }
  66% {
    background:
      radial-gradient(ellipse at 60% 30%, rgba(191, 90, 242, 0.03) 0%, transparent 50%),
      radial-gradient(ellipse at 40% 70%, rgba(0, 255, 255, 0.04) 0%, transparent 50%);
  }
  100% {
    background:
      radial-gradient(ellipse at 50% 50%, rgba(255, 0, 128, 0.04) 0%, transparent 50%),
      radial-gradient(ellipse at 25% 45%, rgba(0, 255, 255, 0.03) 0%, transparent 50%);
  }
}

/* 偶发全屏故障闪烁 */
.bg-layer::after {
  content: '';
  position: fixed; inset: 0;
  background: transparent;
  pointer-events: none;
  animation: bg-glitch-flash 8s infinite;
}
@keyframes bg-glitch-flash {
  0%, 100% { background: transparent; }
  /* 故障瞬间 */
  37.5% { background: transparent; }
  37.6% { background: rgba(0, 255, 255, 0.02); clip-path: inset(30% 0 40% 0); }
  37.8% { background: rgba(255, 0, 128, 0.015); clip-path: inset(60% 0 20% 0); }
  38% { background: transparent; clip-path: none; }
  
  75% { background: transparent; }
  75.2% { background: rgba(191, 90, 242, 0.02); clip-path: inset(10% 0 70% 0); }
  75.4% { background: rgba(0, 255, 255, 0.015); clip-path: inset(80% 0 5% 0); }
  75.5% { background: transparent; clip-path: none; }
}
