/* IntelGen V2 — boot sequence (same pattern as System Build / App) */

#boot-screen {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(5, 0, 1, 0.92);
  transition: opacity 0.5s ease;
}

#boot-screen.is-dismissed {
  display: none !important;
  pointer-events: none !important;
  visibility: hidden;
}

.boot-terminal {
  width: min(680px, 94vw);
  padding: 1.75rem 2rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(165deg, rgba(18, 0, 4, 0.95) 0%, rgba(6, 0, 1, 0.98) 100%);
  box-shadow:
    0 0 50px var(--red-glow),
    inset 0 0 80px var(--red-dim);
}

.boot-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}

.boot-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 8px var(--red);
}

.boot-dot:nth-child(2) { opacity: 0.6; }
.boot-dot:nth-child(3) { opacity: 0.3; }

.boot-title {
  margin-left: 0.5rem;
  font-family: var(--font-display);
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  color: var(--red-bright);
  text-shadow: 0 0 12px var(--red-glow);
}

.boot-log {
  margin: 0 0 1.25rem;
  min-height: 220px;
  max-height: min(42vh, 320px);
  overflow-y: auto;
  font-size: 13px;
  line-height: 1.85;
  color: var(--text-dim);
}

.boot-line-row { display: block; margin-bottom: 0.15rem; }
.boot-line { color: rgba(245, 230, 232, 0.88); }
.boot-line-head {
  color: var(--red-bright);
  font-weight: bold;
  letter-spacing: 0.06em;
}
.boot-line-dim { color: rgba(245, 230, 232, 0.45); font-size: 12px; }
.boot-ok {
  color: var(--ok);
  text-shadow: 0 0 8px rgba(110, 255, 154, 0.45);
  font-weight: bold;
}

.boot-progress-wrap {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--red-dim);
  flex-wrap: wrap;
}

.boot-progress-label {
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--red);
}

.boot-progress-bar {
  color: var(--red-bright);
  text-shadow: 0 0 8px var(--red-glow);
}

.boot-progress-pct { color: var(--text-dim); font-size: 12px; }

.boot-hint {
  margin: 1rem 0 0;
  font-size: 11px;
  color: var(--text-dim);
  text-align: center;
}

.loading-ui-screen {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(5, 0, 1, 0.94);
}

.loading-ui-screen.hidden {
  display: none !important;
  pointer-events: none !important;
  visibility: hidden;
}

.loading-ui-screen .boot-ui-phase {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  opacity: 0;
  transform: scale(0.96);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.loading-ui-screen .boot-ui-phase.active {
  opacity: 1;
  transform: scale(1);
}

.boot-ui-eyebrow {
  margin: 0;
  font-size: 10px;
  letter-spacing: 0.35em;
  color: var(--red);
}

.boot-ui-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2rem, 8vw, 3.25rem);
  font-weight: 900;
  letter-spacing: 0.25em;
  color: #fff;
  text-shadow: 0 0 20px var(--red), 0 0 50px var(--red-glow);
}

.boot-ui-sub {
  margin: 0;
  font-size: 12px;
  letter-spacing: 0.12em;
  color: var(--text-dim);
}

.boot-ui-dots {
  display: flex;
  gap: 0.5rem;
}

.boot-ui-dots span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--red);
  animation: boot-dot-pulse 1.2s ease-in-out infinite;
}

.boot-ui-dots span:nth-child(2) { animation-delay: 0.2s; }
.boot-ui-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes boot-dot-pulse {
  0%, 100% { opacity: 0.3; transform: scale(0.85); }
  50% { opacity: 1; transform: scale(1); }
}

body.boot-active #rainCanvas,
body.loading-ui-active #rainCanvas {
  opacity: 0.35 !important;
}

@media (prefers-reduced-motion: reduce) {
  .boot-ui-dots span { animation: none; opacity: 0.8; }
}
