/* ============ desktop.css ============ */

/* --- Boot screen --- */
#boot-screen {
  position: fixed; inset: 0; z-index: 9999;
  background: radial-gradient(circle at 50% 40%, #1a1c33, #07080f 70%);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 26px; transition: opacity 0.6s ease;
}
#boot-screen.fade-out { opacity: 0; pointer-events: none; }
.boot-logo { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.boot-logo svg { animation: spin-slow 3.5s linear infinite, pulse 2s ease-in-out infinite; }
.boot-logo h1 {
  font-size: 30px; font-weight: 600; letter-spacing: 1px;
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.boot-bar { width: 220px; height: 4px; background: rgba(255,255,255,0.1); border-radius: 4px; overflow: hidden; }
.boot-bar-fill { height: 100%; width: 0%; background: linear-gradient(90deg, var(--accent), var(--accent-2)); border-radius: 4px; transition: width 0.3s ease; }
.boot-status { color: #8a8fb0; font-size: 13px; letter-spacing: 0.4px; }

/* --- Desktop --- */
#desktop { position: fixed; inset: 0; overflow: hidden; }
#wallpaper {
  position: absolute; inset: 0; z-index: 0;
  background-size: cover; background-position: center;
  transition: background-image 0.6s ease, filter 0.4s ease;
}
#window-layer { position: absolute; inset: 0; z-index: 10; pointer-events: none; }
#window-layer > * { pointer-events: auto; }

/* --- Desktop icons --- */
#desktop-icons {
  position: absolute; inset: 0; z-index: 5;
  padding: 16px; display: flex; flex-direction: column; flex-wrap: wrap;
  align-content: flex-start; gap: 6px;
}
.desk-icon {
  width: 92px; height: 96px; border-radius: 10px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 7px; padding: 8px 4px; cursor: default;
  transition: background 0.12s ease, transform 0.12s ease;
}
.desk-icon:hover { background: rgba(255,255,255,0.1); }
.desk-icon.selected { background: var(--selected); outline: 1px solid rgba(var(--accent-rgb),0.5); }
.desk-icon .icon-glyph { width: 46px; height: 46px; line-height: 1; filter: drop-shadow(0 3px 6px rgba(0,0,0,0.4)); pointer-events: none; }
.desk-icon .icon-glyph svg, .desk-icon .icon-glyph img { width: 100%; height: 100%; }
.desk-icon .icon-label {
  font-size: 12px; color: #fff; text-align: center; max-width: 100%;
  text-shadow: 0 1px 4px rgba(0,0,0,0.8); word-break: break-word;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  pointer-events: none;
}

/* --- Context menu --- */
.context-menu {
  position: absolute; z-index: 5000; min-width: 210px;
  background: var(--surface); backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-strong); border-radius: 12px;
  box-shadow: var(--shadow); padding: 6px; color: var(--text);
  animation: menu-pop 0.13s cubic-bezier(.2,.9,.3,1);
}
.context-menu .ctx-item {
  display: flex; align-items: center; gap: 11px; padding: 9px 12px;
  border-radius: 8px; font-size: 13.5px; cursor: default;
}
.context-menu .ctx-item:hover { background: var(--accent); color: #fff; }
.context-menu .ctx-item .ctx-ico { width: 18px; height: 18px; display: inline-flex; align-items: center; justify-content: center; opacity: 0.9; }
.context-menu .ctx-item .ctx-ico svg, .context-menu .ctx-item .ctx-ico img { width: 100%; height: 100%; }
.context-menu .ctx-item:hover .ctx-ico { opacity: 1; }
.context-menu .ctx-sep { height: 1px; background: var(--border); margin: 5px 8px; }
.context-menu .ctx-item.disabled { opacity: 0.4; pointer-events: none; }

/* --- Start menu --- */
.start-menu {
  position: absolute; bottom: 64px; left: 50%; transform: translateX(-50%);
  width: 560px; max-width: 92vw; z-index: 4000;
  background: var(--surface); backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-strong); border-radius: 18px;
  box-shadow: var(--shadow); padding: 22px; color: var(--text);
  animation: start-rise 0.2s cubic-bezier(.2,.9,.3,1);
}
.start-search {
  width: 100%; background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 10px; padding: 11px 14px; color: var(--text); font-size: 14px;
  margin-bottom: 18px; outline: none;
}
.start-search:focus { border-color: var(--accent); }
.start-section-title { font-size: 12px; color: var(--text-dim); margin: 0 0 10px 4px; text-transform: uppercase; letter-spacing: 0.6px; }
.start-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.start-app {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 14px 6px; border-radius: 12px; cursor: default; transition: background 0.12s, transform 0.12s;
}
.start-app:hover { background: var(--hover); transform: translateY(-2px); }
.start-app .sa-ico { width: 34px; height: 34px; }
.start-app .sa-ico svg, .start-app .sa-ico img { width: 100%; height: 100%; }
.start-app .sa-label { font-size: 11.5px; text-align: center; color: var(--text); }
.start-footer { display: flex; align-items: center; justify-content: space-between; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--border); }
.start-user { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.start-user .avatar { width: 34px; height: 34px; border-radius: 50%; background: linear-gradient(135deg, var(--accent), var(--accent-2)); display: flex; align-items: center; justify-content: center; font-weight: 600; color: #fff; }
.start-power { padding: 8px; border-radius: 8px; display: inline-flex; }
.start-power svg { width: 18px; height: 18px; }
.start-power:hover { background: var(--hover); }
