/* ============================================================
   SJD OS 11 — OS chrome (taskbar, start menu, windows, boot)
   ============================================================ */

* { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --accent: #0067c0;
  --accent-2: #1975c5;

  --text:  #1b1b1b;
  --text-2: #5d5d5d;
  --stroke: rgba(0, 0, 0, .09);
  --hover: rgba(0, 0, 0, .05);
  --pressed: rgba(0, 0, 0, .09);

  --win-bg: #f9f9f9;
  --win-chrome: #f3f3f3;
  --taskbar: rgba(243, 243, 243, .74);
  --panel: rgba(250, 250, 250, .82);
  --menu: rgba(252, 252, 252, .90);
  --card: #ffffff;
  --card-2: #fbfbfb;
  --input: #ffffff;
  --app-bg: #ffffff;

  --shadow-win: 0 32px 64px rgba(0, 0, 0, .26), 0 4px 18px rgba(0, 0, 0, .14);
  --shadow-win-off: 0 18px 40px rgba(0, 0, 0, .16), 0 2px 10px rgba(0, 0, 0, .08);
  --shadow-flyout: 0 18px 50px rgba(0, 0, 0, .26);
}

body.dark {
  --text:  #f2f2f2;
  --text-2: #a6a6a6;
  --stroke: rgba(255, 255, 255, .09);
  --hover: rgba(255, 255, 255, .06);
  --pressed: rgba(255, 255, 255, .10);

  --win-bg: #272727;
  --win-chrome: #202020;
  --taskbar: rgba(28, 28, 30, .76);
  --panel: rgba(40, 40, 44, .84);
  --menu: rgba(43, 43, 47, .92);
  --card: #2c2c30;
  --card-2: #323236;
  --input: #383838;
  --app-bg: #1f1f1f;
}

html, body { height: 100%; overflow: hidden; }

body {
  font-family: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", sans-serif;
  font-size: 14px;
  color: var(--text);
  background: #0a0e1a;
  -webkit-font-smoothing: antialiased;
  user-select: none;
  cursor: default;
}

button { font: inherit; color: inherit; background: none; border: 0; cursor: default; }
input, select, textarea { font: inherit; color: var(--text); }
img, svg { display: block; }
.ic { display: inline-block; line-height: 0; flex: none; }
.ic svg { width: 100%; height: 100%; }
::selection { background: color-mix(in srgb, var(--accent) 35%, transparent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }

::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: color-mix(in srgb, var(--text) 22%, transparent);
  border: 3px solid transparent;
  border-radius: 8px;
  background-clip: content-box;
}
::-webkit-scrollbar-thumb:hover { background-color: color-mix(in srgb, var(--text) 38%, transparent); background-clip: content-box; }
::-webkit-scrollbar-corner { background: transparent; }

.hidden { display: none !important; }

/* ---------- shared buttons ---------- */
.btn {
  height: 32px;
  padding: 0 16px;
  border-radius: 5px;
  border: 1px solid var(--stroke);
  background: var(--card);
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.btn:hover { background: color-mix(in srgb, var(--text) 6%, var(--card)); }
.btn:active { background: var(--pressed); }
.btn.primary { background: var(--accent); border-color: transparent; color: #fff; }
.btn.primary:hover { background: color-mix(in srgb, var(--accent) 88%, #000); }
.btn:disabled { opacity: .45; }

/* ============================================================
   Wallpapers
   ============================================================ */
.wallpaper-layer { position: absolute; inset: 0; overflow: hidden; }
.wallpaper-layer::after { content: ""; position: absolute; inset: 0; }

body[data-wallpaper="bloom"] .wallpaper-layer {
  background:
    radial-gradient(1100px 780px at 66% 30%, rgba(64, 156, 255, .38), transparent 62%),
    radial-gradient(950px 720px at 44% 62%, rgba(122, 82, 255, .32), transparent 62%),
    radial-gradient(1000px 600px at 28% 78%, rgba(0, 222, 255, .18), transparent 56%),
    linear-gradient(165deg, #0e2a63 0%, #091538 55%, #050b21 100%);
}
body[data-wallpaper="bloom"] .wallpaper-layer::after {
  background: conic-gradient(from 205deg at 56% 44%,
    transparent 0deg, rgba(0, 229, 255, .16) 28deg, transparent 58deg,
    rgba(126, 87, 255, .15) 118deg, transparent 158deg,
    rgba(0, 168, 255, .12) 218deg, transparent 258deg,
    rgba(64, 224, 255, .10) 318deg, transparent 360deg);
  filter: blur(42px);
}

body[data-wallpaper="sunrise"] .wallpaper-layer {
  background:
    radial-gradient(1050px 720px at 74% 24%, rgba(255, 176, 92, .5), transparent 62%),
    radial-gradient(950px 780px at 30% 62%, rgba(255, 96, 128, .34), transparent 62%),
    linear-gradient(170deg, #48234b 0%, #7a3553 48%, #2b1638 100%);
}
body[data-wallpaper="sunrise"] .wallpaper-layer::after {
  background: radial-gradient(600px 340px at 70% 30%, rgba(255, 224, 175, .35), transparent 70%);
  filter: blur(30px);
}

body[data-wallpaper="emerald"] .wallpaper-layer {
  background:
    radial-gradient(1050px 720px at 64% 30%, rgba(64, 224, 164, .34), transparent 62%),
    radial-gradient(950px 720px at 34% 66%, rgba(22, 148, 124, .42), transparent 62%),
    linear-gradient(165deg, #0b3d33 0%, #06251f 58%, #031512 100%);
}
body[data-wallpaper="emerald"] .wallpaper-layer::after {
  background: conic-gradient(from 160deg at 40% 60%,
    transparent 0deg, rgba(140, 255, 210, .12) 60deg, transparent 120deg,
    rgba(60, 255, 190, .10) 200deg, transparent 280deg);
  filter: blur(46px);
}

body[data-wallpaper="midnight"] .wallpaper-layer {
  background:
    radial-gradient(1300px 700px at 50% -10%, rgba(90, 110, 170, .28), transparent 60%),
    linear-gradient(180deg, #10101c 0%, #07070e 70%, #04040a 100%);
}
body[data-wallpaper="midnight"] .wallpaper-layer::after { background: none; }

body[data-wallpaper="aurora"] .wallpaper-layer {
  background:
    radial-gradient(1150px 620px at 24% 20%, rgba(92, 255, 192, .22), transparent 56%),
    radial-gradient(1250px 820px at 76% 36%, rgba(122, 102, 255, .28), transparent 60%),
    radial-gradient(950px 720px at 54% 84%, rgba(0, 160, 255, .20), transparent 60%),
    linear-gradient(160deg, #07102b 0%, #0a0f2e 50%, #04070f 100%);
}
body[data-wallpaper="aurora"] .wallpaper-layer::after {
  background: conic-gradient(from 30deg at 50% 30%,
    transparent 0deg, rgba(120, 255, 214, .10) 40deg, transparent 90deg,
    rgba(150, 130, 255, .12) 160deg, transparent 220deg,
    rgba(96, 190, 255, .10) 300deg, transparent 360deg);
  filter: blur(52px);
}

body[data-wallpaper="flow"] .wallpaper-layer {
  background:
    radial-gradient(950px 640px at 70% 22%, rgba(255, 255, 255, .85), transparent 62%),
    radial-gradient(1150px 820px at 28% 72%, rgba(186, 212, 244, .9), transparent 62%),
    linear-gradient(160deg, #cfe0f5 0%, #e8f0fb 100%);
}
body[data-wallpaper="flow"] .wallpaper-layer::after { background: none; }

/* ============================================================
   Desktop & icons
   ============================================================ */
#desktop { position: fixed; inset: 0 0 48px 0; overflow: hidden; }

#d-icons {
  position: absolute; inset: 10px 10px 10px 10px;
  display: flex; flex-flow: column wrap; align-content: flex-start;
  gap: 2px; max-height: 100%;
}
.d-icon {
  width: 86px; padding: 8px 4px 6px;
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  border-radius: 5px; border: 1px solid transparent;
}
.d-icon:hover { background: rgba(255, 255, 255, .10); }
.d-icon.sel {
  background: color-mix(in srgb, var(--accent) 34%, transparent);
  border-color: color-mix(in srgb, var(--accent) 55%, transparent);
}
.d-icon .ic { width: 44px; height: 44px; filter: drop-shadow(0 2px 4px rgba(0, 0, 0, .35)); }
.d-icon span {
  font-size: 12px; color: #fff; text-align: center; line-height: 1.25;
  text-shadow: 0 1px 3px rgba(0, 0, 0, .8), 0 0 8px rgba(0, 0, 0, .4);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

/* ============================================================
   Windows
   ============================================================ */
#windows { position: absolute; inset: 0; pointer-events: none; }
#windows .window { pointer-events: auto; }

.window {
  position: absolute;
  display: flex; flex-direction: column;
  background: var(--win-bg);
  border: 1px solid var(--stroke);
  border-radius: 8px;
  box-shadow: var(--shadow-win);
  overflow: hidden;
  min-width: 360px; min-height: 240px;
  animation: win-open .16s cubic-bezier(.2, .9, .3, 1);
  transition: opacity .15s ease, transform .15s ease;
}
body[data-wallpaper="custom"] .wallpaper-layer::after { content: none; }
.window.inactive { box-shadow: var(--shadow-win-off); }
.window.anim { transition: left .17s ease, top .17s ease, width .17s ease, height .17s ease; }
.window.maximized { border-radius: 0; border: none; }
.window.minimized { opacity: 0; transform: scale(.88) translateY(80px); pointer-events: none; }
.window.closing { opacity: 0; transform: scale(.92); transition: .13s; }

@keyframes win-open { from { opacity: 0; transform: scale(.94); } }

.titlebar {
  height: 38px; flex: none;
  display: flex; align-items: center; gap: 10px;
  padding-left: 14px;
  background: var(--win-chrome);
  user-select: none; touch-action: none;
}
.window.inactive .titlebar { color: var(--text-2); }
.t-icon { width: 16px; height: 16px; }
.t-title { font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.t-controls { margin-left: auto; display: flex; height: 100%; align-self: stretch; }
.t-btn {
  width: 46px; height: 100%;
  display: grid; place-items: center;
  color: inherit;
}
.t-btn:hover { background: var(--hover); }
.t-btn:active { background: var(--pressed); }
.t-btn.close:hover { background: #c42b1c; color: #fff; }
.t-btn svg { width: 10px; height: 10px; }

.win-body { flex: 1; min-height: 0; position: relative; display: flex; flex-direction: column; background: var(--app-bg); }

/* resize handles */
.rz { position: absolute; z-index: 6; touch-action: none; }
.rz-n { top: -3px; left: 10px; right: 10px; height: 7px; cursor: ns-resize; }
.rz-s { bottom: -3px; left: 10px; right: 10px; height: 7px; cursor: ns-resize; }
.rz-w { left: -3px; top: 10px; bottom: 10px; width: 7px; cursor: ew-resize; }
.rz-e { right: -3px; top: 10px; bottom: 10px; width: 7px; cursor: ew-resize; }
.rz-nw { top: -4px; left: -4px; width: 14px; height: 14px; cursor: nwse-resize; }
.rz-ne { top: -4px; right: -4px; width: 14px; height: 14px; cursor: nesw-resize; }
.rz-sw { bottom: -4px; left: -4px; width: 14px; height: 14px; cursor: nesw-resize; }
.rz-se { bottom: -4px; right: -4px; width: 14px; height: 14px; cursor: nwse-resize; }
.window.maximized .rz { display: none; }

#snap-preview {
  position: absolute; z-index: 500; border-radius: 8px;
  background: color-mix(in srgb, var(--accent) 18%, rgba(255, 255, 255, .25));
  border: 1px solid color-mix(in srgb, var(--accent) 60%, transparent);
  backdrop-filter: blur(10px);
  transition: all .12s ease; opacity: 0; pointer-events: none;
}
#snap-preview.show { opacity: 1; }

body.dragging iframe { pointer-events: none !important; }
body.dragging { cursor: inherit !important; }

/* ============================================================
   Taskbar
   ============================================================ */
#taskbar {
  position: fixed; left: 0; right: 0; bottom: 0; height: 48px;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 10px;
  background: var(--taskbar);
  backdrop-filter: blur(28px) saturate(1.7);
  -webkit-backdrop-filter: blur(28px) saturate(1.7);
  z-index: 1000;
}
.tb-left { display: flex; }
.tb-center {
  position: absolute; left: 50%; transform: translateX(-50%);
  display: flex; gap: 4px;
}
.tb-right { display: flex; align-items: center; gap: 2px; }

.tb-btn {
  width: 40px; height: 40px; border-radius: 5px;
  display: grid; place-items: center;
  position: relative; color: var(--text);
}
.tb-btn:hover { background: var(--hover); }
.tb-btn:active { transform: scale(.93); }
.tb-btn .ic { width: 24px; height: 24px; }
#tb-start .ic { width: 22px; height: 22px; }
#tb-search .ic { width: 20px; height: 20px; }

.tb-btn.running::after {
  content: ""; position: absolute; bottom: 2px; left: 50%; transform: translateX(-50%);
  width: 6px; height: 3px; border-radius: 2px;
  background: color-mix(in srgb, var(--text) 55%, transparent);
  transition: width .15s;
}
.tb-btn.active-app::after { width: 16px; background: var(--accent); }

.tb-tray {
  display: flex; align-items: center; gap: 7px;
  padding: 6px 9px; border-radius: 5px; color: var(--text);
}
.tb-tray:hover { background: var(--hover); }
.tray-ic { width: 16px; height: 16px; }

.tb-clock {
  display: flex; flex-direction: column; align-items: flex-end;
  gap: 0; padding: 5px 9px; border-radius: 5px;
  font-size: 11.5px; line-height: 1.35; color: var(--text); text-align: right;
}
.tb-clock:hover { background: var(--hover); }

/* ============================================================
   Flyouts (start menu, quick settings, calendar, widgets)
   ============================================================ */
.flyout {
  position: fixed; z-index: 1100;
  background: var(--panel);
  backdrop-filter: blur(34px) saturate(1.8);
  -webkit-backdrop-filter: blur(34px) saturate(1.8);
  border: 1px solid var(--stroke);
  border-radius: 9px;
  box-shadow: var(--shadow-flyout);
  animation: fly-in .17s cubic-bezier(.1, .9, .2, 1);
}
@keyframes fly-in {
  from { opacity: 0; transform: translateY(16px) scale(.985); }
}

/* ---- Start menu ---- */
#start-menu {
  left: 50%; bottom: 57px; margin-left: -280px; width: 560px;
  padding-top: 24px;
  transform-origin: bottom center;
}
#start-menu.fly-in-center { animation-name: fly-in-center; }
@keyframes fly-in-center { from { opacity: 0; transform: translateX(-50%) translateY(16px) scale(.985); } }

.sm-search { padding: 0 44px; }
.sm-search input {
  width: 100%; height: 34px;
  border-radius: 17px; border: 1px solid var(--stroke);
  background: var(--input); color: var(--text);
  padding: 0 14px 0 34px; font-size: 13px; outline: none;
  background-image: var(--search-bg-img);
  background-repeat: no-repeat; background-size: 14px; background-position: 12px center;
}
.sm-search input:focus { border-color: var(--accent); }

.sm-section-label {
  display: flex; justify-content: space-between; align-items: center;
  padding: 20px 44px 8px; font-size: 13px; font-weight: 600;
}
.sm-grid {
  display: grid; grid-template-columns: repeat(6, 1fr);
  gap: 2px; padding: 2px 30px;
  max-height: 316px; overflow: auto;
}
.sm-app {
  display: flex; flex-direction: column; align-items: center; gap: 7px;
  padding: 12px 2px 10px; border-radius: 6px;
  font-size: 11.5px; text-align: center; color: var(--text);
  line-height: 1.2;
}
.sm-app:hover { background: var(--hover); }
.sm-app:active { background: var(--pressed); }
.sm-app .ic { width: 32px; height: 32px; }
.sm-app span {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

.sm-recommended {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 2px; padding: 2px 34px;
  min-height: 40px; max-height: 160px; overflow: auto;
}
.sm-rec-item {
  display: flex; align-items: center; gap: 12px;
  padding: 8px 10px; border-radius: 6px; color: var(--text);
}
.sm-rec-item:hover { background: var(--hover); }
.sm-rec-item .ic { width: 26px; height: 26px; }
.sm-rec-item .r-name { font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sm-rec-item .r-sub { font-size: 11px; color: var(--text-2); }
.sm-rec-empty { grid-column: 1 / -1; text-align: center; padding: 18px; font-size: 12px; color: var(--text-2); }

.sm-footer {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 16px; height: 58px;
  border-top: 1px solid var(--stroke);
  padding: 0 44px 0 40px;
  background: color-mix(in srgb, var(--text) 2.5%, transparent);
  border-radius: 0 0 9px 9px;
}
.sm-user { display: flex; align-items: center; gap: 12px; font-size: 13px; }
.sm-avatar {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--accent); color: #fff;
  display: grid; place-items: center; font-weight: 600; font-size: 14px;
}
#sm-power-menu { position: absolute; right: 30px; bottom: 64px; }

/* ---- Quick settings ---- */
#qs-panel { right: 10px; bottom: 57px; width: 360px; padding: 22px 20px 16px; }
.qs-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.qs-toggle {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px;
  height: 66px; border-radius: 6px;
  border: 1px solid var(--stroke); background: var(--card);
  font-size: 11.5px; color: var(--text);
}
.qs-toggle .ic { width: 19px; height: 19px; }
.qs-toggle:hover { background: var(--card-2); }
.qs-toggle.on { background: var(--accent); border-color: transparent; color: #fff; }
.qs-slider { display: flex; align-items: center; gap: 12px; padding: 16px 6px 4px; }
.qs-slider .ic { width: 17px; height: 17px; flex: none; color: var(--text); }
.qs-slider input { flex: 1; accent-color: var(--accent); }
.qs-footer {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--stroke);
  font-size: 12.5px; color: var(--text-2);
}

/* ---- Calendar panel ---- */
#cal-panel { right: 10px; bottom: 57px; width: 360px; padding: 6px 20px 18px; }
.cal-notif { padding: 14px 4px 16px; font-size: 13px; color: var(--text-2); border-bottom: 1px solid var(--stroke); }
.cal-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 2px 6px; }
.cal-title { font-size: 14px; font-weight: 600; }
.cal-nav { display: flex; gap: 4px; }
.cal-nav .tb-btn { width: 30px; height: 30px; }
.cal-nav .tb-btn .ic { width: 12px; height: 12px; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.cal-dow { text-align: center; font-size: 11px; color: var(--text-2); padding: 6px 0; }
.cal-day {
  height: 38px; display: grid; place-items: center;
  font-size: 12.5px; border-radius: 50%; color: var(--text);
}
.cal-day.dim { color: var(--text-2); opacity: .55; }
.cal-day.today { background: var(--accent); color: #fff; font-weight: 600; }

/* ---- Widgets ---- */
#widgets-panel { left: 10px; bottom: 57px; width: 380px; padding: 18px; display: flex; flex-direction: column; gap: 12px; }
.wg-card {
  background: var(--card); border: 1px solid var(--stroke); border-radius: 8px;
  padding: 16px;
}
.wg-weather { display: flex; align-items: center; gap: 18px; }
.wg-temp { font-size: 34px; font-weight: 600; }
.wg-city { font-size: 13px; color: var(--text-2); margin-top: 2px; }
.wg-ic { width: 52px; height: 52px; }
.wg-title { font-size: 12px; font-weight: 600; color: var(--text-2); margin-bottom: 8px; }
.wg-big-date { font-size: 22px; font-weight: 600; }
.wg-tip { font-size: 13px; line-height: 1.55; color: var(--text); }

/* ============================================================
   Context menu
   ============================================================ */
.ctx-menu {
  position: fixed; z-index: 1250;
  min-width: 214px; padding: 5px;
  background: var(--menu);
  backdrop-filter: blur(32px) saturate(1.8);
  -webkit-backdrop-filter: blur(32px) saturate(1.8);
  border: 1px solid var(--stroke); border-radius: 8px;
  box-shadow: var(--shadow-flyout);
  animation: ctx-in .1s ease-out;
}
@keyframes ctx-in { from { opacity: 0; transform: scale(.98); } }
.ctx-item {
  display: flex; align-items: center; gap: 12px;
  height: 34px; padding: 0 12px; border-radius: 5px;
  font-size: 13px; color: var(--text);
}
.ctx-item:hover { background: var(--hover); }
.ctx-item .ci { width: 16px; height: 16px; opacity: .85; }
.ctx-item .grow { flex: 1; }
.ctx-item kbd { font: 11px inherit; color: var(--text-2); }
.ctx-item.danger:hover { background: rgba(196, 43, 28, .12); color: #c42b1c; }
.ctx-sep { height: 1px; margin: 5px 10px; background: var(--stroke); }

/* ============================================================
   Toasts
   ============================================================ */
#toasts {
  position: fixed; right: 14px; bottom: 60px; z-index: 1350;
  display: flex; flex-direction: column; gap: 8px; align-items: flex-end;
}
.toast {
  display: flex; align-items: center; gap: 12px;
  min-width: 240px; max-width: 380px;
  background: var(--menu);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  border: 1px solid var(--stroke); border-radius: 8px;
  padding: 12px 16px;
  box-shadow: var(--shadow-flyout);
  animation: toast-in .22s cubic-bezier(.2, .9, .3, 1);
  font-size: 13px; color: var(--text);
}
.toast .ic { width: 22px; height: 22px; }
.toast.out { animation: toast-out .2s forwards; }
@keyframes toast-in { from { opacity: 0; transform: translateX(40px); } }
@keyframes toast-out { to { opacity: 0; transform: translateX(40px); } }

/* ============================================================
   Modal dialog (OS-level)
   ============================================================ */
#modal-layer {
  position: fixed; inset: 0; z-index: 1400;
  background: rgba(0, 0, 0, .34);
  display: grid; place-items: center;
  animation: fade-in .12s;
}
@keyframes fade-in { from { opacity: 0; } }
.modal {
  width: min(460px, 92vw);
  background: var(--menu);
  backdrop-filter: blur(34px);
  -webkit-backdrop-filter: blur(34px);
  border: 1px solid var(--stroke); border-radius: 8px;
  box-shadow: var(--shadow-flyout);
  overflow: hidden; animation: win-open .15s;
  user-select: none;
}
.modal-title {
  height: 40px; display: flex; align-items: center; padding: 0 16px;
  font-size: 13px; font-weight: 600;
}
.modal-body { padding: 4px 20px 20px; font-size: 13.5px; overflow: auto; max-height: 60vh; }
.modal-body input[type=text], .modal-body input[type=number], .modal-body select {
  width: 100%; height: 32px; border-radius: 5px;
  border: 1px solid var(--stroke); background: var(--input);
  padding: 0 10px; outline: none; margin-top: 6px;
}
.modal-body input:focus { border-color: var(--accent); }
.modal-body label { display: block; font-size: 12.5px; color: var(--text-2); margin-top: 12px; }
.modal-buttons { display: flex; justify-content: flex-end; gap: 8px; padding: 0 20px 20px; }

/* ============================================================
   Boot / Lock / Shutdown
   ============================================================ */
#boot {
  position: fixed; inset: 0; z-index: 2100;
  background: #000; color: #e6e6e6;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 56px;
}
.boot-logo {
  width: 92px; height: 92px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Crect x='2' y='2' width='13' height='13' rx='1.6' fill='%234cc2ff'/%3E%3Crect x='17' y='2' width='13' height='13' rx='1.6' fill='%234cc2ff'/%3E%3Crect x='2' y='17' width='13' height='13' rx='1.6' fill='%234cc2ff'/%3E%3Crect x='17' y='17' width='13' height='13' rx='1.6' fill='%234cc2ff'/%3E%3C/svg%3E") center / contain no-repeat;
}
.boot-spinner { position: relative; width: 34px; height: 34px; }
.boot-spinner i {
  position: absolute; top: 50%; left: 50%;
  width: 5px; height: 5px; margin: -2.5px; border-radius: 50%;
  background: #fff;
  animation: orbit 1.7s cubic-bezier(.5, .1, .5, .9) infinite;
}
.boot-spinner i:nth-child(1) { animation-delay: 0s; }
.boot-spinner i:nth-child(2) { animation-delay: .12s; }
.boot-spinner i:nth-child(3) { animation-delay: .24s; }
.boot-spinner i:nth-child(4) { animation-delay: .36s; }
.boot-spinner i:nth-child(5) { animation-delay: .48s; }
@keyframes orbit {
  from { transform: rotate(0deg) translateX(15px); }
  to   { transform: rotate(360deg) translateX(15px); }
}
.boot-caption { font-size: 14px; color: #9a9a9a; letter-spacing: .2px; }
#boot.fade-out { animation: boot-fade .5s forwards; }
@keyframes boot-fade { to { opacity: 0; visibility: hidden; } }

#lock { position: fixed; inset: 0; z-index: 1900; }
#lock .wallpaper-layer { position: absolute; }
.lock-content {
  position: absolute; top: 16%; left: 0; right: 0;
  text-align: center; color: #fff;
  text-shadow: 0 2px 22px rgba(0, 0, 0, .5);
}
.lock-time { font-size: 92px; font-weight: 600; line-height: 1.05; }
.lock-date { font-size: 26px; font-weight: 400; margin-top: 6px; }
.lock-hint {
  position: absolute; bottom: 64px; left: 0; right: 0;
  text-align: center; color: rgba(255, 255, 255, .85);
  font-size: 13px; animation: hint-pulse 2.4s ease-in-out infinite;
}
@keyframes hint-pulse { 50% { opacity: .45; } }
#lock.leaving { animation: lock-up .55s cubic-bezier(.5, 0, .2, 1) forwards; }
@keyframes lock-up { to { transform: translateY(-102%); } }

#shutdown {
  position: fixed; inset: 0; z-index: 2000;
  background: #000;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 30px;
}
#power-on-btn {
  width: 64px; height: 64px; border-radius: 50%;
  border: 2px solid #3c3c3c; background: #101010; color: #ddd;
  display: grid; place-items: center;
  transition: border-color .2s, transform .15s;
}
#power-on-btn:hover { border-color: var(--accent); transform: scale(1.05); }
#power-on-btn .ic { width: 26px; height: 26px; }
.shutdown-text { text-align: center; color: #8a8a8a; font-size: 13.5px; line-height: 1.7; }

/* QS overlays */
#brightness-overlay {
  position: fixed; inset: 0; background: #000; opacity: 0;
  pointer-events: none; z-index: 1500; transition: opacity .25s;
}
#nightlight-overlay {
  position: fixed; inset: 0;
  background: rgba(255, 148, 54, .16);
  pointer-events: none; z-index: 1501; opacity: 0; transition: opacity .3s;
  mix-blend-mode: multiply;
}
body.nightlight #nightlight-overlay { opacity: 1; }

/* sleep = black screen */
#sleep { position: fixed; inset: 0; background: #000; z-index: 2050; }
