body, html {
  margin: 0; padding: 0; width: 100%; height: 100%; overflow: hidden;
  background-color: #000; font-family: 'Courier New', Courier, monospace;
}

#ui-layer {
  position: absolute; top: 0; left: 0; width: 100%; height: 100%;
  z-index: 999; pointer-events: none;
}

/* 桌面端保留的电视雪花噪点 */
#glitch-overlay {
  position: absolute; inset: 0;
  background: repeating-linear-gradient(
    0deg, rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.2) 2px, transparent 2px, transparent 4px
  );
  opacity: 0; mix-blend-mode: overlay;
  transition: opacity 0.1s ease-in-out;
}
#glitch-overlay.active {
  opacity: 1; background-color: rgba(0, 0, 0, 0.8);
  animation: rgbShift 0.2s infinite alternate, noise 0.1s infinite;
}

/* 桌面端保留的恐怖血色闪屏 */
#blood-flash {
  position: absolute; inset: 0;
  background-color: #8b0000;
  opacity: 0; mix-blend-mode: multiply;
}
#blood-flash.active {
  animation: flashRed 0.5s ease-out;
}

@keyframes rgbShift {
  0% { backdrop-filter: hue-rotate(0deg) blur(2px) invert(0%); transform: scale(1); }
  50% { backdrop-filter: hue-rotate(90deg) blur(5px) invert(30%); transform: scale(1.05) translate(8px, -8px); }
  100% { backdrop-filter: hue-rotate(180deg) blur(0px) invert(0%); transform: scale(0.95) translate(-8px, 8px); }
}
@keyframes flashRed {
  0% { opacity: 0.8; }
  100% { opacity: 0; }
}

#start-screen {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  justify-content: center; align-items: center;
  background: rgba(5, 5, 5, 0.98); color: #fff; pointer-events: auto;
}
#start-screen h1 {
  font-size: 3rem; letter-spacing: 12px;
  text-shadow: 2px 2px 0 #333, -2px -2px 0 #555; margin-bottom: 1rem;
}
#start-screen p { color: #888; text-align: center; line-height: 1.8; margin-bottom: 2rem; }

button {
  background: transparent; color: #fff; border: 1px solid #666;
  padding: 15px 40px; font-size: 1.2rem; font-family: inherit;
  cursor: pointer; transition: all 0.3s;
}
button:hover { background: #fff; color: #000; box-shadow: 0 0 15px #fff; }

#hud {
  position: absolute; bottom: 20px; left: 20px;
  color: rgba(255, 255, 255, 0.7); font-size: 0.9rem;
  text-shadow: 1px 1px 2px #000;
}
.hidden { display: none !important; }