#preloader {
  position: fixed;
  top: 0; left: 0;
  width: 100vw;
  height: 100vh;
  background: #000;
  color: #ff3131;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  font-family: 'Courier New', monospace;
  overflow: hidden;
}

.reveal-terminal {
  animation: reveal-terminal-fade 1.2s cubic-bezier(.77,0,.18,1);
}
@keyframes reveal-terminal-fade {
  from { opacity: 0; transform: scale(0.98) translateY(40px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.terminal .content pre {
  opacity: 0;
  transform: translateY(30px);
}

#start-overlay {
  animation: overlay-fadein 1s;
}
@keyframes overlay-fadein {
  from { opacity: 0; }
  to { opacity: 1; }
}

.cursor-msg {
  animation: blink 0.8s infinite steps(1);
}
@keyframes blink {
  0%,100%{opacity:1;}
  50%{opacity:0;}
}

.hacker-glitch {
  font-size: 2.5rem;
  letter-spacing: 3px;
  position: relative;
  color: #ff3131;
  text-shadow: 0 0 6px #ff3131;
  animation: flicker-red 3s infinite steps(2,end);
}

@keyframes flicker-red {
  0%, 18%, 22%, 25%, 53%, 57%, 100% { opacity: 1; }
  20%, 23%, 55% { opacity: 0.6; }
}

.hacker-swing {
  width: 120px;
  height: 220px;
  position: relative;
  margin-top: 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.swing-rope {
  width: 2px;
  height: 70px;
  background: #ff3131;
  margin: 0 auto;
  z-index: 2;
}

.swing-girl {
  width: 60px;
  height: 120px;
  background: transparent;
  position: absolute;
  top: 70px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  animation: swing 2.5s infinite ease-in-out alternate;
}

@keyframes swing {
  0% { transform: translateX(-50%) rotate(-8deg); }
  100% { transform: translateX(-50%) rotate(8deg); }
}

.swing-girl-body {
  width: 26px;
  height: 60px;
  background: #222;
  border-radius: 13px 13px 15px 15px;
  margin: 0 auto;
  box-shadow: 0 0 12px #ff3131;
  position: relative;
}

.swing-girl-head {
  width: 32px;
  height: 32px;
  background: #222;
  border-radius: 50%;
  position: absolute;
  left: 50%;
  top: -28px;
  transform: translateX(-50%);
  box-shadow: 0 0 10px #ff3131;
}

.swing-girl-legs {
  width: 26px;
  height: 38px;
  position: absolute;
  bottom: -38px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  justify-content: space-between;
}

.swing-girl-leg {
  width: 6px;
  height: 38px;
  background: #222;
  border-radius: 4px;
  box-shadow: 0 0 8px #ff3131;
}

.swing-seat {
  width: 40px;
  height: 10px;
  background: #222;
  border-radius: 5px;
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  box-shadow: 0 0 6px #ff3131;
}

.keyboard {
  margin-top: 3rem;
  width: 340px;
  height: 80px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-start;
  filter: drop-shadow(0 0 12px #ff3131);
}
.key {
  width: 32px;
  height: 32px;
  margin: 3px;
  background: #111;
  border: 1.5px solid #ff3131;
  border-radius: 6px;
  color: #ff3131;
  font-family: 'Courier New', monospace;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.08s, color 0.08s;
}
.key.active {
  background: #ff3131;
  color: #fff;
}
