/* Two-phase boot — BIOS POST → Win98 cloud splash → click dismiss. spec §4.5 */

#boot-screen {
  position: fixed;
  inset: 0;
  z-index: 99999;
  cursor: pointer;
  user-select: none;
  overflow: hidden;
}

.boot-phase {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.4s ease;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
  box-sizing: border-box;
}

.boot-phase.visible {
  opacity: 1;
}

#boot-screen.fade-out {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.9s ease;
}

/* ========== Phase 1: authentic BIOS POST ========== */

#boot-bios {
  background: #000;
  color: #c8c8c8;
  /* VT323 reads as period-correct VGA text mode, not dark-mode IDE.
     Consolas fallback if the web font isn't loaded yet; ' Lucida Console'
     + 'Courier New' fallback beyond that. Port of main commit 96435f6. */
  font-family: 'VT323', 'Consolas', 'Lucida Console', 'Courier New', monospace;
  font-size: 18px;
  line-height: 1.45;
}

/* Cyan tint on the two Ansem-owned BIOS lines (ANSEM System BIOS
   + its Copyright). Widened from :first-child in the 2026-04-20 refresh
   when the Award header took over the first two lines. */
.boot-bios-line.cyan {
  color: #e0455a; /* Black Bull accent — was Printr cyan */
}

.boot-bios-inner {
  width: min(600px, 92vw);
  white-space: pre-wrap;
}

.boot-bios-line {
  opacity: 0;
}

.boot-bios-line.visible {
  opacity: 1;
}

/* Two-stage IDE-probe reveal: the "Detecting IDE ..." label fades in at
   labelDelay, then the result (PRESS/LEDGER/INK/None) fades in ~200ms
   later at resultDelay. Makes the line read as real hardware probing
   instead of static text. Spec §4.1. */
.boot-bios-probe-result {
  opacity: 0;
  transition: opacity 0.15s ease;
}

.boot-bios-probe-result.visible {
  opacity: 1;
}

/* Blinking block cursor on the last BIOS line ("Booting from Primary
   IDE..."). Only renders once the line is visible so it doesn't flash
   ahead of the type-in. Pure CSS via ::after + animation. */
.boot-bios-line.last.visible::after {
  content: '█';
  margin-left: 6px;
  animation: bios-cursor-blink 1.05s steps(2) infinite;
  color: #c8c8c8;
}

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

.boot-bios-spacer {
  height: 0.8em;
}

/* ========== Phase 2: Win98 cloud splash ========== */

#boot-splash {
  color: #fff;
  font-family: 'Pixelated MS Sans Serif', 'Microsoft Sans Serif', Tahoma, sans-serif;
  flex-direction: column;
  /* Flat Black Bull background — splash art itself is Task 8's job. */
  background: #0a0a0b;
}

.boot-splash-content {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 22px;
  max-width: 92vw;
}

/* Black Bull splash art — fluid width so it never overflows the
   390px mobile viewport; wraps under the title on narrow screens
   via .boot-splash-content's flex-wrap. */
.boot-splash-flag {
  width: min(220px, 42vw);
  height: auto;
  filter: drop-shadow(3px 3px 6px rgba(0, 0, 0, 0.4));
}

/* Anton wordmark — the AnsemOS brand display face (spec §5) */
.boot-splash-title {
  font-family: 'Anton', 'Arial Narrow', sans-serif;
  font-size: clamp(48px, 8vw, 84px);
  font-weight: 400;
  color: #e8e4e0;
  text-shadow:
    3px 3px 0 #6e0b17,
    6px 6px 14px rgba(0, 0, 0, 0.45);
  letter-spacing: 2px;
}

.boot-splash-sub {
  position: absolute;
  bottom: 104px;
  font-size: 11px;
  letter-spacing: 4px;
  color: rgba(255, 255, 255, 0.72);
  text-transform: uppercase;
}

.boot-splash-progress {
  position: absolute;
  bottom: 56px;
  width: min(320px, 72vw);
  height: 10px;
  background: rgba(0, 0, 0, 0.42);
  border: 1px solid rgba(0, 0, 0, 0.55);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.4);
  overflow: hidden;
}

.boot-splash-slider {
  position: absolute;
  top: 0;
  left: 0;
  width: 0%;
  height: 100%;
  background: #b11226;
  box-shadow: 0 0 6px rgba(255, 255, 255, 0.35);
  /* Fill 0→100% once over splash lifetime (matches BootSequence's
     SPLASH_TO_PROMPT_MS = 1500ms). Port of main commit 96435f6 —
     the older infinite slide loop implied "loading forever"; a
     single fill reads as "boot completing". */
  animation: splash-fill 1800ms ease-out forwards;
}

@keyframes splash-fill {
  from { width: 0%; }
  to   { width: 100%; }
}

.boot-click {
  position: absolute;
  bottom: 22px;
  font-size: 13px;
  letter-spacing: 1px;
  color: rgba(255, 255, 255, 0.85);
  opacity: 0;
  transition: opacity 0.4s ease;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.35);
}

.boot-click.visible {
  opacity: 1;
  animation: splash-click-blink 1.2s steps(2) infinite;
}

@keyframes splash-click-blink {
  50% { opacity: 0.3; }
}
