/* ============================================================
   macOS Web — FX layer  (flashy / cinematic enhancements)
   ============================================================ */

/* ---------- animated aurora backdrop ---------- */
#aurora {
  position: absolute; inset: -12%;
  z-index: 1; overflow: hidden; pointer-events: none;
}
.aurora-blob {
  position: absolute; border-radius: 50%;
  filter: blur(75px); opacity: 0.55;
  mix-blend-mode: screen; will-change: transform;
}
@keyframes drift1 { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(13vw,9vh) scale(1.28); } }
@keyframes drift2 { 0%,100% { transform: translate(0,0) scale(1.1); } 50% { transform: translate(-15vw,11vh) scale(0.9); } }
@keyframes drift3 { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(11vw,-13vh) scale(1.22); } }
@keyframes drift4 { 0%,100% { transform: translate(0,0) scale(0.95); } 50% { transform: translate(-11vw,-9vh) scale(1.18); } }
@keyframes drift5 { 0%,100% { transform: translate(0,0) scale(1.05); } 50% { transform: translate(9vw,15vh) scale(0.92); } }

/* ---------- power-on / screen-on ---------- */
@keyframes screenOn {
  0% { filter: brightness(2.4) saturate(1.5); transform: scale(1.045); opacity: 0.15; }
  55% { opacity: 1; }
  100% { filter: none; transform: none; opacity: 1; }
}
#desktop.screen-on { animation: screenOn 0.65s ease-out; }
.power-flash {
  position: fixed; inset: 0; background: #fff; z-index: 9999;
  pointer-events: none; animation: powerFlash 0.6s ease-out forwards;
}
@keyframes powerFlash { 0% { opacity: 0; } 14% { opacity: 0.9; } 100% { opacity: 0; } }

/* ---------- flashier boot ---------- */
.boot-logo { animation: bootPulse 1.8s ease-in-out infinite; }
@keyframes bootPulse {
  0%,100% { filter: drop-shadow(0 0 6px rgba(255,255,255,0.25)); }
  50% { filter: drop-shadow(0 0 24px rgba(255,255,255,0.9)); }
}
.boot-progress-fill { position: relative; overflow: hidden; }
.boot-progress-fill::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.95), transparent);
  transform: translateX(-100%); animation: bsheen 1.1s linear infinite;
}
@keyframes bsheen { to { transform: translateX(240%); } }

/* ---------- breathing focus glow on the active window ---------- */
@keyframes winGlowAqua {
  0%,100% { box-shadow: 0 24px 60px rgba(0,0,0,0.45), 0 0 0 1px rgba(0,0,0,0.5), 0 0 26px 0 rgba(var(--accent-rgb),0.16); }
  50% { box-shadow: 0 24px 60px rgba(0,0,0,0.45), 0 0 0 1px rgba(0,0,0,0.5), 0 0 52px 5px rgba(var(--accent-rgb),0.48); }
}
@keyframes winGlowModern {
  0%,100% { box-shadow: 0 28px 70px rgba(0,0,0,0.42), 0 0 0 0.5px rgba(0,0,0,0.18), 0 0 26px 0 rgba(var(--accent-rgb),0.14); }
  50% { box-shadow: 0 28px 70px rgba(0,0,0,0.42), 0 0 0 0.5px rgba(0,0,0,0.18), 0 0 50px 5px rgba(var(--accent-rgb),0.42); }
}
body.aqua .window:not(.inactive):not(.mc-thumb):not(.closing) { animation: winGlowAqua 3.6s ease-in-out infinite; }
/* modern: clean native focus shadow, no pulsing */
body:not(.aqua) .window:not(.inactive):not(.mc-thumb) {
  box-shadow: 0 32px 80px rgba(0,0,0,0.46), 0 0 0 0.5px rgba(0,0,0,0.16);
}

/* ---------- springy window open ---------- */
.window.opening { animation: winPop 0.34s cubic-bezier(0.2,1.25,0.4,1) !important; }
@keyframes winPop {
  0% { opacity: 0; transform: scale(0.8) translateY(18px); }
  60% { opacity: 1; }
  100% { opacity: 1; transform: none; }
}

/* ---------- spotlight reveal + glow ---------- */
#spotlight .spotlight-box { animation: spotPop 0.26s cubic-bezier(0.2,1.1,0.3,1); }
@keyframes spotPop { from { opacity: 0; transform: scale(0.92) translateY(-8px); } to { opacity: 1; transform: none; } }
body.aqua .spotlight-box { box-shadow: 0 26px 70px rgba(0,0,0,0.5), inset 0 1px 0 #fff, 0 0 46px rgba(var(--accent-rgb),0.32); }

/* ---------- glass shine sweep across the dock ---------- */
#dock { position: relative; }
body.aqua #dock::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  pointer-events: none; z-index: 0;
  background: linear-gradient(115deg, transparent 38%, rgba(255,255,255,0.4) 50%, transparent 62%);
  background-size: 260% 100%; background-position: 210% 0;
  mix-blend-mode: screen; animation: dockShine 7.5s ease-in-out infinite;
}
@keyframes dockShine {
  0% { background-position: 210% 0; }
  55%,100% { background-position: -80% 0; }
}

/* ---------- Mission Control ---------- */
.mc-overlay {
  position: absolute; inset: 0; z-index: 9;
  background: rgba(8,10,20,0.45);
  backdrop-filter: blur(12px) saturate(1.3);
  -webkit-backdrop-filter: blur(12px) saturate(1.3);
  animation: fadeIn 0.3s ease;
}
.mc-hint {
  position: absolute; top: 40px; left: 50%; transform: translateX(-50%);
  color: #fff; font-size: 14px; font-weight: 500; letter-spacing: 0.3px;
  text-shadow: 0 2px 8px rgba(0,0,0,0.5); z-index: 11; opacity: 0.9;
}
.window.mc-thumb {
  cursor: pointer;
  transition: transform 0.4s cubic-bezier(0.2,0.8,0.2,1), box-shadow 0.3s !important;
  animation: none !important;
  box-shadow: 0 30px 70px rgba(0,0,0,0.55) !important;
}
.window.mc-thumb .window-body,
.window.mc-thumb .resize-handle { pointer-events: none; }
.window.mc-thumb:hover { box-shadow: 0 30px 80px rgba(0,0,0,0.6), 0 0 0 3px var(--accent) !important; }

/* desktop wallpaper gets a hair of zoom for parallax headroom */
#wallpaper { will-change: transform; }
