/* BOOT SEQUENCE OVERLAY STYLE */
.boot-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: #03050a;
  z-index: 999999; /* Highest priority */
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 20px;
  overflow: hidden;
  transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.8s;
}

.boot-screen.fade-out {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.boot-container {
  width: 100%;
  max-width: 700px;
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.boot-terminal {
  width: 100%;
  min-height: 280px;
  background-color: rgba(5, 8, 16, 0.95);
  border: 1px solid rgba(0, 240, 255, 0.2);
  border-radius: var(--radius-md);
  padding: 30px;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--text-secondary);
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.8), 0 0 8px rgba(var(--accent-cyan-rgb), 0.15);
  position: relative;
  overflow: hidden;
}

/* CRT Screen reflection / scanlines */
.boot-terminal::before {
  content: " ";
  display: block;
  position: absolute;
  top: 0; left: 0; bottom: 0; right: 0;
  background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.3) 50%);
  background-size: 100% 4px;
  z-index: 2;
  pointer-events: none;
}

.boot-line {
  margin-bottom: 8px;
  display: flex;
  gap: 10px;
  opacity: 0;
  transform: translateY(5px);
  animation: boot-line-fade-in 0.2s forwards;
}

.boot-line.ok {
  color: var(--accent-emerald);
}

.boot-line.info {
  color: var(--accent-cyan);
}

.boot-line.warn {
  color: var(--accent-amber);
}

.boot-line.ready {
  color: var(--accent-cyan);
  font-weight: bold;
  font-size: 1.1rem;
  margin-top: 15px;
  border-top: 1px dashed rgba(0, 240, 255, 0.2);
  padding-top: 15px;
  text-shadow: var(--shadow-neon-cyan);
}

.boot-line .caret-blink::after {
  content: '_';
  animation: blink 0.8s infinite;
}

.boot-skip {
  align-self: center;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  letter-spacing: 2px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.02);
  transition: var(--transition-normal);
}

.boot-skip:hover {
  color: var(--accent-cyan);
  border-color: var(--accent-cyan);
  background: rgba(0, 240, 255, 0.05);
  box-shadow: var(--shadow-neon-cyan);
  cursor: pointer;
}

@keyframes boot-line-fade-in {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes blink {
  50% { opacity: 0; }
}

/* Glitch Effect on Title */
.glitch-text {
  position: relative;
}

.glitch-text::before,
.glitch-text::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--bg-deep);
}

.glitch-text::before {
  left: 2px;
  text-shadow: -1px 0 #ff00c1;
  clip: rect(44px, 450px, 56px, 0);
  animation: glitch-anim 5s infinite linear alternate-reverse;
}

.glitch-text::after {
  left: -2px;
  text-shadow: -1px 0 #00fff9, 0 1px #00fff9;
  clip: rect(85px, 450px, 140px, 0);
  animation: glitch-anim2 5s infinite linear alternate-reverse;
}

@keyframes glitch-anim {
  0% { clip: rect(31px, 9999px, 94px, 0); }
  5% { clip: rect(112px, 9999px, 76px, 0); }
  10% { clip: rect(85px, 9999px, 5px, 0); }
  15% { clip: rect(27px, 9999px, 115px, 0); }
  20% { clip: rect(73px, 9999px, 29px, 0); }
  25% { clip: rect(136px, 9999px, 60px, 0); }
  30% { clip: rect(15px, 9999px, 131px, 0); }
  35% { clip: rect(95px, 9999px, 53px, 0); }
  40% { clip: rect(48px, 9999px, 84px, 0); }
  45% { clip: rect(122px, 9999px, 111px, 0); }
  50% { clip: rect(4px, 9999px, 67px, 0); }
  55% { clip: rect(79px, 9999px, 126px, 0); }
  60% { clip: rect(138px, 9999px, 18px, 0); }
  65% { clip: rect(11px, 9999px, 98px, 0); }
  70% { clip: rect(57px, 9999px, 41px, 0); }
  75% { clip: rect(118px, 9999px, 83px, 0); }
  80% { clip: rect(6px, 9999px, 147px, 0); }
  85% { clip: rect(99px, 9999px, 24px, 0); }
  90% { clip: rect(33px, 9999px, 102px, 0); }
  95% { clip: rect(125px, 9999px, 70px, 0); }
  100% { clip: rect(52px, 9999px, 119px, 0); }
}

@keyframes glitch-anim2 {
  0% { clip: rect(76px, 9999px, 116px, 0); }
  11% { clip: rect(43px, 9999px, 82px, 0); }
  22% { clip: rect(128px, 9999px, 15px, 0); }
  33% { clip: rect(9px, 9999px, 134px, 0); }
  44% { clip: rect(92px, 9999px, 51px, 0); }
  55% { clip: rect(115px, 9999px, 74px, 0); }
  66% { clip: rect(31px, 9999px, 108px, 0); }
  77% { clip: rect(144px, 9999px, 22px, 0); }
  88% { clip: rect(67px, 9999px, 119px, 0); }
  100% { clip: rect(5px, 9999px, 96px, 0); }
}

/* Lock page scroll while the boot overlay is up */
body.booting {
  overflow: hidden;
}
