﻿/* The loading bar itself becomes START. */
.boot {
  position: fixed;
  inset: 0;
  z-index: 1000;
  overflow: hidden;
  color: #ffe7a4;
  background: #100c08 url('../images/loadingScreen.webp') center / cover no-repeat;
  outline: none;
}
.boot__console {
  position: absolute;
  right: max(24px, env(safe-area-inset-right));
  left: max(24px, env(safe-area-inset-left));
  bottom: max(88px, calc(env(safe-area-inset-bottom) + 68px));
  display: flex;
  flex-direction: column;
  align-items: center;
}
.boot__status {
  position: absolute;
  bottom: 100%;
  padding-bottom: 25px;
  font: 400 clamp(16px, 2.3vw, 28px)/1.2 'Aileron', sans-serif;
  letter-spacing: 0.5em;
  text-indent: 0.5em;
  text-align: center;
  text-shadow: 0 0 9px #ffb62c, 0 2px 8px #000;
  transition: opacity 0.25s ease, transform 0.45s ease;
}
.boot__control {
  position: relative;
  display: block;
  box-sizing: border-box;
  width: min(720px, 100%);
  height: 42px;
  padding: 5px;
  border: 2px solid #ffdb77;
  border-radius: 30px;
  appearance: none;
  background: rgba(15, 10, 4, 0.88);
  box-shadow: 0 0 8px #ffb52a, 0 0 28px #ff9d2438, inset 0 0 5px #fff1b580;
  opacity: 1;
  transition: width 0.85s cubic-bezier(0.65, 0, 0.2, 1), height 0.85s ease, box-shadow 0.35s ease, transform 0.2s ease;
}
.boot__lane {
  position: absolute;
  inset: 5px;
  overflow: hidden;
  border-radius: inherit;
}
.boot__fill {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(180deg, #fffbd5 0%, #ffe99b 20%, #ffcf54 56%, #ffe997 85%, #fff4bf 100%);
  box-shadow: inset 0 0 5px #fffde0, 0 0 14px #ffbc37;
  transform: scaleX(0);
  transform-origin: left center;
}
.boot__start-label {
  position: relative;
  display: block;
  opacity: 0;
  transform: translateY(6px);
  color: #4b2c07;
  font: 700 22px/1 'Aileron', sans-serif;
  letter-spacing: 0.24em;
  text-indent: 0.24em;
  text-shadow: 0 1px 0 #fff5bf;
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.boot.is-ready .boot__control {
  width: min(260px, 100%);
  height: 62px;
  cursor: pointer;
}
.boot.is-ready .boot__status { opacity: 0; transform: translateY(8px); }
.boot.is-ready .boot__start-label { opacity: 1; transform: none; transition-delay: 0.5s; }
.boot__control:enabled:hover { box-shadow: 0 0 12px #ffca55, 0 0 40px #ffad2459, inset 0 0 7px #fff1b5; }
.boot__control:focus-visible { outline: 2px solid #fff4cc; outline-offset: 6px; }
.boot__control:enabled:active, .boot__control.is-pressed { transform: translateY(2px) scale(0.98); }
.boot.is-failed .boot__fill { transform: scaleX(1) !important; }
.boot.is-failed .boot__status { opacity: 1; letter-spacing: 0.08em; }
.boot__legal {
  position: absolute;
  bottom: max(20px, calc(env(safe-area-inset-bottom) + 12px));
  right: 16px;
  left: 16px;
  color: #fff;
  font: 400 11px/1.5 'Aileron', sans-serif;
  letter-spacing: 0.08em;
  text-align: center;
  text-shadow: 0 1px 2px #000, 0 0 4px rgba(0, 0, 0, 0.8);
}
.boot.is-leaving { opacity: 0; pointer-events: none; transition: opacity 0.7s ease 0.2s; }
@media (orientation: portrait) {
  .boot { background-image: url('../images/loadingScreen2.webp'); }
}
@media (orientation: landscape) and (max-height: 600px) {
  .boot { background-position: center top; }
}
@media (max-height: 500px) {
  .boot__console { bottom: max(60px, calc(env(safe-area-inset-bottom) + 48px)); }
  .boot__status { padding-bottom: 16px; font-size: 16px; }
  .boot__control { height: 32px; width: min(560px, 100%); }
  .boot.is-ready .boot__control { height: 50px; }
  .boot__legal { bottom: max(10px, env(safe-area-inset-bottom)); }
}
@media (prefers-reduced-motion: reduce) {
  .boot *, .boot.is-leaving { transition-duration: 0.01ms !important; transition-delay: 0s !important; }
}
