/* Full-screen states: boot, lock, sleep, shutting down, and the brightness and night-light overlays */
.screen {
  position: fixed;
  inset: 0;
  overflow: hidden;
}

.overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
}

.dim {
  z-index: 4000;
  background: #000;
  opacity: 0;
}

.night {
  z-index: 4001;
  background: rgba(255, 168, 70, 0.22);
  mix-blend-mode: multiply;
}

/* Boot */
.boot {
  z-index: 6000;
  background: #000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  animation: boot-in 0.3s var(--ease-out);
}

.boot.fade-out {
  animation: boot-out 0.42s var(--ease-out) forwards;
}

@keyframes boot-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes boot-out {
  to {
    opacity: 0;
  }
}

.boot-logo {
  width: 58px;
  height: 58px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  transform: translateY(-14px);
}

.boot-logo span {
  border-radius: 2px;
  opacity: 0;
  animation: boot-tile 1.2s var(--ease) forwards;
}

.boot-logo span:nth-child(1) {
  background: #f25022;
}

.boot-logo span:nth-child(2) {
  background: #7fba00;
  animation-delay: 0.14s;
}

.boot-logo span:nth-child(3) {
  background: #00a4ef;
  animation-delay: 0.28s;
}

.boot-logo span:nth-child(4) {
  background: #ffb900;
  animation-delay: 0.42s;
}

@keyframes boot-tile {
  0% {
    opacity: 0;
    transform: scale(0.6);
  }
  60% {
    opacity: 1;
    transform: scale(1.04);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

.boot-dots {
  position: absolute;
  bottom: 78px;
  display: flex;
  gap: 8px;
}

.boot-dots i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.85);
  opacity: 0.2;
  animation: boot-dot 1.2s ease-in-out infinite;
}

.boot-dots i:nth-child(2) {
  animation-delay: 0.12s;
}

.boot-dots i:nth-child(3) {
  animation-delay: 0.24s;
}

.boot-dots i:nth-child(4) {
  animation-delay: 0.36s;
}

.boot-dots i:nth-child(5) {
  animation-delay: 0.48s;
}

@keyframes boot-dot {
  0%,
  100% {
    opacity: 0.2;
  }
  40% {
    opacity: 1;
  }
}

/* Lock screen: the wallpaper, blurred and dimmed, with the clock and sign-in */
.lock {
  z-index: 3900;
  color: #fff;
  background: rgba(10, 14, 22, 0.25);
  backdrop-filter: blur(18px) brightness(0.9);
  -webkit-backdrop-filter: blur(18px) brightness(0.9);
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.35);
  animation: lock-in 0.35s var(--ease-out);
}

.lock.leaving {
  animation: lock-out 0.46s var(--ease) forwards;
}

@keyframes lock-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes lock-out {
  to {
    opacity: 0;
    transform: translateY(-40px);
  }
}

.lock-top {
  position: absolute;
  top: 9vh;
  left: 0;
  right: 0;
  text-align: center;
}

.lock-time {
  font: 300 104px/1 var(--font-display);
  letter-spacing: -2px;
}

.lock-date {
  margin-top: 6px;
  font-size: 22px;
  font-weight: 400;
}

.lock-bottom {
  position: absolute;
  bottom: 10vh;
  left: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.lock-avatar {
  width: 80px;
  height: 80px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: linear-gradient(145deg, #5aa2ff, #2a64d6);
  color: #fff;
  font-size: 34px;
  font-weight: 600;
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.3);
  cursor: default;
}

.lock-name {
  font-size: 22px;
  font-weight: 600;
}

.lock-pin {
  display: flex;
  margin-top: 6px;
}

.lock-pin input {
  width: 240px;
  height: 38px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-bottom: 2px solid #fff;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  outline: none;
  text-align: center;
  letter-spacing: 4px;
  user-select: text;
}

.lock-pin input::placeholder {
  color: rgba(255, 255, 255, 0.75);
  letter-spacing: 0;
}

.lock-pin.shake {
  animation: shake 0.4s var(--ease);
}

@keyframes shake {
  0%,
  100% {
    transform: translateX(0);
  }
  20% {
    transform: translateX(-10px);
  }
  40% {
    transform: translateX(10px);
  }
  60% {
    transform: translateX(-6px);
  }
  80% {
    transform: translateX(4px);
  }
}

.lock-error {
  color: #ffd1cc;
  font-size: 13px;
}

.lock-hint {
  margin-top: 4px;
  padding: 6px 12px;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: #fff;
  font-size: 14px;
  cursor: default;
}

.lock-hint:hover {
  background: rgba(255, 255, 255, 0.12);
}

/* Power states */
.power {
  z-index: 6100;
  background: #000;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: boot-in 0.3s var(--ease-out);
}

.power-msg {
  font: 300 26px/1 var(--font-display);
  letter-spacing: 0.3px;
}

.power-msg:not(:empty)::after {
  content: "";
  display: inline-block;
  width: 26px;
  margin-left: 2px;
  animation: dots 1.4s steps(4, end) infinite;
}

@keyframes dots {
  0% {
    content: "";
  }
  100% {
    content: "";
  }
}

.power.sleep,
.power.off {
  cursor: default;
}
