:root {
  --scan-line-color: rgba(0, 0, 0, 0.5);
  --scan-freq: 4px;
  --flicker-opacity: 0.97;
}

/* Alap CRT háttér */
body.crt-terminal {
  background-color: #0a0a0a;
  color: #00ff41;
  font-family: 'VT323', monospace;
  position: relative;
  overflow-x: hidden;
}

/* Scanlines */
body.scanlines::before {
  content: " ";
  display: block;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
  background: linear-gradient(
    to bottom,
    rgba(18, 16, 16, 0) 50%,
    rgba(0, 0, 0, 0.25) 50%
  );
  background-size: 100% var(--scan-freq);
  z-index: 9999;
  pointer-events: none;
  animation: flicker 0.15s infinite;
}

/* Flicker animáció */
@keyframes flicker {
  0% { opacity: var(--flicker-opacity); }
  50% { opacity: 1; }
  100% { opacity: calc(var(--flicker-opacity) + 0.01); }
}

/* CRT glow effekt a szövegeken */
.crt-terminal h1, 
.crt-terminal h2, 
.crt-terminal h3 {
  text-shadow: 0 0 5px currentColor;
}

/* Képernyő torzítás szimuláció */
.crt-terminal::after {
  content: " ";
  display: block;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
  background: radial-gradient(
    ellipse at center,
    rgba(0,0,0,0) 0%,
    rgba(0,0,0,0.4) 100%
  );
  pointer-events: none;
  z-index: 9998;
}

/* Alapból animáció nélkül */
.boot-sequence {
    display: none;
}

/* Csak ha a body-n van home class vagy a preloader létezik */
.boot-sequence {
    display: flex;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #0a0a0a;
    z-index: 10000;
    flex-direction: column;
    justify-content: center;
    padding: 2rem;
    font-family: 'VT323', monospace;
    font-size: 1.2rem;
    animation: fadeOut 0.5s ease-out 3s forwards;
}

.boot-text {
  margin: 0.2rem 0;
  opacity: 0;
  animation: typeIn 0.1s ease-out forwards;
}

.boot-text:nth-child(1) { animation-delay: 0.5s; }
.boot-text:nth-child(2) { animation-delay: 1s; }
.boot-text:nth-child(3) { animation-delay: 1.5s; }
.boot-text:nth-child(4) { animation-delay: 2s; }

@keyframes typeIn {
  to { opacity: 1; }
}

@keyframes fadeOut {
  to { opacity: 0; visibility: hidden; }
}