/* ===== Boot / Lock / Desktop shell ===== */
.boot {
  position: fixed; inset: 0; z-index: 9999;
  background: #000; color: #fff;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 60px;
  transition: opacity .7s ease;
}
.boot.fade { opacity: 0; pointer-events: none; }
.boot-logo { opacity: .96; animation: bootpop .9s var(--ease-out) both; }
@keyframes bootpop { from { opacity: 0; transform: scale(.9); } to { opacity: .96; transform: scale(1); } }
.boot-progress { width: 210px; height: 6px; border-radius: 3px; background: rgba(255,255,255,.16); overflow: hidden; }
.boot-progress-fill { height: 100%; width: 0; background: #fff; border-radius: 3px; transition: width .2s linear; }

/* Lock screen */
.lock {
  position: fixed; inset: 0; z-index: 9000; color: #fff;
  background-size: cover; background-position: center;
  display: flex; align-items: center; justify-content: center;
  transition: opacity .6s ease, transform .6s var(--ease-out);
}
.lock::before { content:""; position:absolute; inset:0; backdrop-filter: blur(0px); transition: backdrop-filter .6s; }
.lock.blur::before { backdrop-filter: blur(20px) brightness(.8); }
.lock.up { opacity: 0; transform: translateY(-40px); pointer-events: none; }
.lock-inner { display: flex; flex-direction: column; align-items: center; justify-content: space-between; height: 76vh; z-index: 1; }
.lock-clock { text-align: center; text-shadow: 0 2px 30px rgba(0,0,0,.4); }
.lock-time { font-size: 88px; font-weight: 650; letter-spacing: -2px; line-height: 1; }
.lock-date { font-size: 20px; font-weight: 550; margin-top: 6px; opacity: .95; }
.lock-user { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.lock-avatar { width: 92px; height: 92px; border-radius: 50%; background: rgba(255,255,255,.2); display: grid; place-items: center; backdrop-filter: blur(14px); box-shadow: inset 0 1px 0 rgba(255,255,255,.4), 0 8px 24px rgba(0,0,0,.3); }
.lock-name { font-size: 18px; font-weight: 600; text-shadow: 0 1px 12px rgba(0,0,0,.4); }
.lock-btn { padding: 9px 22px; border-radius: 999px; background: rgba(255,255,255,.16); backdrop-filter: blur(20px); border: .5px solid rgba(255,255,255,.3); color: #fff; font-size: 14px; font-weight: 500; box-shadow: inset 0 1px 0 rgba(255,255,255,.3); transition: transform .15s, background .15s; }
.lock-btn:hover { background: rgba(255,255,255,.26); transform: scale(1.03); }
.lock-hint { font-size: 12px; opacity: .7; }

/* Screen + wallpaper */
.screen { position: fixed; inset: 0; overflow: hidden; }
.screen.hidden { display: none; }
.wallpaper {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  transition: filter .5s ease, opacity .5s;
  will-change: transform;
}
.desktop { position: absolute; inset: var(--menubar-h) 0 0 0; overflow: hidden; }

/* Desktop icons */
.desk-icon {
  position: absolute; width: 92px; display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 6px; border-radius: 10px; cursor: default;
}
.desk-icon.sel { background: rgba(var(--accent-rgb), .3); box-shadow: inset 0 0 0 1px rgba(var(--accent-rgb),.5); }
.desk-icon .di-img { width: 58px; height: 58px; display: grid; place-items: center; filter: drop-shadow(0 3px 6px rgba(0,0,0,.35)); }
.desk-icon .di-label { font-size: 12.5px; color: #fff; text-align: center; text-shadow: 0 1px 3px rgba(0,0,0,.9); padding: 1px 5px; border-radius: 5px; max-width: 88px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.desk-icon.sel .di-label { background: var(--accent); }

.windows-layer, .menus-layer { position: absolute; inset: 0; pointer-events: none; }
.windows-layer > *, .menus-layer > * { pointer-events: auto; }
.overlays-layer { position: absolute; inset: 0; pointer-events: none; z-index: 4000; }
.overlays-layer > * { pointer-events: auto; }

/* Selection marquee */
.marquee { position: absolute; border: 1px solid rgba(var(--accent-rgb), .8); background: rgba(var(--accent-rgb), .18); z-index: 5; pointer-events: none; }

/* Context menu */
.context-menu {
  position: absolute; min-width: 200px; padding: 5px; border-radius: 12px; z-index: 6000;
  font-size: 13.5px; animation: ctxpop .12s var(--ease-out);
}
@keyframes ctxpop { from { opacity: 0; transform: scale(.97); } to { opacity: 1; transform: scale(1); } }
.context-menu .ci { display: flex; align-items: center; gap: 10px; padding: 5px 10px; border-radius: 7px; }
.context-menu .ci:hover:not(.disabled) { background: var(--accent); color: #fff; }
.context-menu .ci.disabled { opacity: .35; }
.context-menu .sep { height: 1px; background: var(--hairline); margin: 5px 8px; }
.context-menu .ci .ci-key { margin-left: auto; opacity: .55; font-size: 12px; }
