/* HODL Desktop - Animations */

@keyframes windowOpen {
  0% {
    transform: scale(0.85);
    opacity: 0;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes windowClose {
  0% {
    transform: scale(1);
    opacity: 1;
  }
  100% {
    transform: scale(0.85);
    opacity: 0;
  }
}

@keyframes windowMinimize {
  0% {
    transform: scale(1) translateY(0);
    opacity: 1;
  }
  100% {
    transform: scale(0.2) translateY(100vh);
    opacity: 0;
  }
}

@keyframes windowRestore {
  0% {
    transform: scale(0.2) translateY(100vh);
    opacity: 0;
  }
  100% {
    transform: scale(1) translateY(0);
    opacity: 1;
  }
}

@keyframes startMenuOpen {
  0% {
    transform: translateY(10px);
    opacity: 0;
  }
  100% {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes blinkCursor {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0; }
}

@keyframes marquee {
  0% { transform: translateX(100%); }
  100% { transform: translateX(-100%); }
}

@keyframes matrixFall {
  0% { transform: translateY(-100%); opacity: 1; }
  100% { transform: translateY(100vh); opacity: 0; }
}

.xp-window.opening {
  animation: windowOpen 0.15s ease-out forwards;
}

.xp-window.closing {
  animation: windowClose 0.12s ease-in forwards;
  pointer-events: none;
}

.xp-window.minimizing {
  animation: windowMinimize 0.2s ease-in forwards;
  pointer-events: none;
}

.xp-window.restoring {
  animation: windowRestore 0.2s ease-out forwards;
}

#start-menu:not(.hidden) {
  animation: startMenuOpen 0.12s ease-out;
}

/* Boot screen */
#boot-screen {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: #000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: var(--z-boot);
  transition: opacity 0.5s ease;
}

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

#boot-screen .boot-logo {
  font-family: var(--font-display);
  font-size: 48px;
  font-weight: 700;
  color: var(--hodl-orange);
  letter-spacing: 8px;
  margin-bottom: 30px;
  text-shadow: 0 0 20px rgba(255,149,0,0.3);
}

#boot-screen .boot-subtitle {
  color: #666;
  font-family: var(--font-system);
  font-size: 12px;
  margin-bottom: 40px;
  letter-spacing: 2px;
}

.boot-progress {
  width: 220px;
  height: 20px;
  background: #1a1a1a;
  border: 1px solid #333;
  border-radius: 3px;
  overflow: hidden;
  padding: 2px;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.5);
}

.boot-progress-track {
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
  border-radius: 2px;
}

.boot-progress-blocks {
  display: flex;
  gap: 3px;
  position: absolute;
  top: 1px;
  bottom: 1px;
  animation: xpSlide 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.boot-progress-blocks .block {
  width: 12px;
  height: 100%;
  border-radius: 1px;
  background: linear-gradient(180deg, #ffb84d 0%, #f59500 40%, #cc7a00 100%);
  box-shadow: 0 0 6px rgba(245,149,0,0.5);
}

@keyframes xpSlide {
  0%   { left: -60px; }
  100% { left: 220px; }
}
