/* Boot Sequence - Fallout-style terminal animation */

/* Hide all content while boot sequence is pending */
html.boot-sequence-pending body > *:not(#boot-sequence-overlay) {
  visibility: hidden !important;
}

/* Full-screen overlay */
#boot-sequence-overlay {
  position: fixed;
  inset: 0;
  z-index: 999999;
  background: #0a0a0a;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 40px 60px;
  font-family: 'Courier New', 'Lucida Console', monospace;
  font-size: 18px;
  line-height: 1.6;
  color: var(--text-primary, #59C99C);
  overflow: hidden;
  cursor: pointer;
}

/* Scanline overlay */
#boot-sequence-overlay::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, 0.15) 2px,
    rgba(0, 0, 0, 0.15) 4px
  );
  pointer-events: none;
  z-index: 1;
}

/* CRT vignette */
#boot-sequence-overlay::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse at center,
    transparent 50%,
    rgba(0, 0, 0, 0.5) 100%
  );
  pointer-events: none;
  z-index: 2;
}

/* Text content sits above effects */
#boot-sequence-content {
  position: relative;
  z-index: 3;
  max-width: 800px;
  width: 100%;
}

/* Individual boot lines */
.boot-line {
  white-space: pre;
  min-height: 1.6em;
  text-shadow: 0 0 8px currentColor, 0 0 2px currentColor;
}

/* Empty spacer line */
.boot-line-spacer {
  height: 1.6em;
}

/* Separator line */
.boot-line-separator {
  white-space: pre;
  min-height: 1.6em;
  text-shadow: 0 0 8px currentColor, 0 0 2px currentColor;
}

/* Blinking block cursor */
.boot-cursor {
  display: inline;
  animation: boot-cursor-blink 0.7s step-end infinite;
}

@keyframes boot-cursor-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* Skip hint */
#boot-sequence-skip {
  position: fixed;
  bottom: 20px;
  right: 24px;
  z-index: 999999;
  font-family: 'Courier New', 'Lucida Console', monospace;
  font-size: 11px;
  color: var(--text-primary, #59C99C);
  opacity: 0.4;
  text-shadow: 0 0 6px currentColor;
  pointer-events: none;
  z-index: 4;
}

/* Fade-out animation */
#boot-sequence-overlay.boot-fade-out {
  animation: boot-fade 0.6s ease-out forwards;
}

@keyframes boot-fade {
  0% { opacity: 1; }
  100% { opacity: 0; }
}

/* Mobile adjustments */
@media (max-width: 600px) {
  #boot-sequence-overlay {
    padding: 24px 20px;
    font-size: 14px;
  }

  #boot-sequence-skip {
    font-size: 10px;
    bottom: 12px;
    right: 14px;
  }
}
