/* boot.css: the bootup sequence (js/boot.js). Colors follow the current scheme. */

#boot {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  background: #000;
  color: var(--select);
  cursor: default;
  transition: opacity 0.4s;
  -webkit-user-select: none;
  user-select: none;
}
#boot.boot-done { opacity: 0; pointer-events: none; }

/* scanlines */
#boot::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.25) 0 1px, transparent 1px 3px);
}

/* ---------- BIOS screen ---------- */
.boot-bios {
  padding: 24px 28px;
  font: 22px/1.15 'VT323', 'Courier New', monospace;
  white-space: pre;
  overflow: hidden;
  text-shadow: 0 0 6px color-mix(in srgb, var(--select) 60%, transparent);
}
.boot-bios > div:last-child::after {   /* blinking block cursor */
  content: "";
  display: inline-block;
  width: 0.55em;
  height: 0.9em;
  margin-left: 2px;
  vertical-align: -0.1em;
  background: currentColor;
  animation: boot-blink 0.8s steps(1) infinite;
}
@keyframes boot-blink { 50% { opacity: 0; } }

/* ---------- splash ---------- */
.boot-splash {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
}
.boot-splash[hidden] { display: none; }
.boot-logo {
  font: 48px 'Press Start 2P', monospace;
  color: var(--title);
  text-shadow: 0 0 10px var(--title), 0 0 26px color-mix(in srgb, var(--title) 50%, transparent);
  animation: boot-flicker 1.2s steps(1) 1;
}
.boot-logo span {
  color: var(--border);
  text-shadow: 0 0 10px var(--border), 0 0 26px color-mix(in srgb, var(--border) 50%, transparent);
}
@keyframes boot-flicker {
  0% { opacity: 0; } 10% { opacity: 1; } 15% { opacity: 0.3; } 20% { opacity: 1; } 60% { opacity: 0.7; } 65% { opacity: 1; }
}
.boot-tagline {
  font: 12px 'Silkscreen', monospace;
  color: var(--inner);
  letter-spacing: 3px;
  text-transform: uppercase;
}
.boot-bar {
  width: min(320px, 70vw);
  height: 16px;
  padding: 3px;
  border: 2px solid var(--inner);
}
.boot-bar-fill {
  width: 0;
  height: 100%;
  background: repeating-linear-gradient(90deg, var(--select) 0 12px, transparent 12px 16px);
  transition-property: width;
  transition-timing-function: steps(20);
}

.boot-skip {
  position: absolute;
  right: 18px;
  bottom: 14px;
  font: 11px 'Silkscreen', monospace;
  color: var(--disabled-text);
}

@media (max-width: 600px) {
  .boot-bios { font-size: 16px; padding: 14px; }
  .boot-logo { font-size: 30px; }
}

/* ---------- phones ---------- */
@media (max-width: 700px), (pointer: coarse) and (max-height: 500px) {
  .boot-bios {
    padding: calc(16px + env(safe-area-inset-top)) calc(16px + env(safe-area-inset-right)) 16px calc(16px + env(safe-area-inset-left));
    font-size: 18px;
    white-space: pre-wrap;
  }
  .boot-logo { font-size: 34px; }
  .boot-tagline { font-size: 10px; letter-spacing: 2px; }
}
