/* ── Boot screen stile macOS ── */
.boot-screen {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #000;
}

.boot-screen-bg {
  position: absolute;
  inset: -12px;
  background-image: var(--wallpaper-site, url("../assets/wallpaper-custom.webp"));
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  filter: blur(22px) saturate(115%) brightness(0.42);
  transform: scale(1.06);
  opacity: 1;
  transition: opacity 0.85s ease, filter 0.85s ease, transform 0.85s ease;
}

.boot-screen.is-exiting .boot-screen-bg {
  opacity: 0;
  filter: blur(0) saturate(100%) brightness(1);
  transform: scale(1);
}

.boot-screen-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 26px;
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.45s ease, transform 0.45s ease;
}

.boot-screen.is-exiting .boot-screen-content {
  opacity: 0;
  transform: translateY(-6px);
}

.boot-logo {
  width: 96px;
  height: auto;
  object-fit: contain;
  image-rendering: auto;
  filter: drop-shadow(0 4px 18px rgba(0, 0, 0, 0.45));
}

.boot-progress-wrap {
  width: 240px;
  height: 5px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.14);
  overflow: hidden;
  box-shadow: inset 0 0 0 0.5px rgba(255, 255, 255, 0.08);
}

.boot-progress-bar {
  height: 100%;
  width: 100%;
  background: rgba(255, 255, 255, 0.88);
  border-radius: 3px;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.14s ease-out;
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.25);
}

.boot-screen.is-exiting {
  pointer-events: none;
}

.boot-screen.is-hidden {
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.75s ease, visibility 0.75s ease;
}

body.is-booting .view-desktop,
body.is-booting .view-ios {
  opacity: 0;
  pointer-events: none;
}

/* Chrome iOS fuori da .view-ios: non deve flashare sul desktop / in boot */
body.is-booting .ios-dock-wrap,
body.is-booting #ios-sheet,
body.is-booting #ios-status,
body.is-booting #ios-weather-sheet,
body.is-booting #ios-weather-sheet-backdrop,
body.is-booting #ios-playlist-sheet,
body.is-booting #ios-playlist-sheet-backdrop {
  display: none !important;
}

@media (min-width: 1024px) {
  .ios-dock-wrap,
  #ios-sheet,
  #ios-status,
  #ios-weather-sheet,
  #ios-weather-sheet-backdrop,
  #ios-playlist-sheet,
  #ios-playlist-sheet-backdrop {
    display: none !important;
  }
}

body:not(.is-booting) .view-desktop,
body:not(.is-booting) .view-ios {
  opacity: 1;
  transition: opacity 0.5s ease 0.15s;
}
