/* ============ 桌面 + 图标 + 任务栏 + start 菜单 ============ */

.desktop {
  position: fixed;
  inset: 0;
  /* Bliss 恶搞版壁纸；渐变作兜底（图片缺失时不至于白屏）。原版 bliss.jpeg 仍在 assets/，想换回改这行即可 */
  background-color: #3f7ec9;
  background-image:
    url("../assets/bliss-echo.jpg"),
    linear-gradient(to bottom, #7aa7e8 0%, #5a8ed6 45%, #3f7ec9 60%, var(--grass) 60.5%, #3c7d33 75%, #62a84e 100%);
  background-size: cover, cover;
  background-position: center, center;
  background-repeat: no-repeat, no-repeat;
}

/* ---- 桌面图标 ---- */
.icons {
  position: absolute;
  top: 18px;
  left: 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 86px;
}
.icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  width: 100%;
  padding: 6px 4px;
  border: 1px solid transparent;
  border-radius: 2px;
  text-align: center;
}
.icon:focus-visible,
.icon.selected { background: rgba(36, 94, 219, 0.4); border-color: rgba(255,255,255,0.4); outline: none; }
/* 统一图标盒子：等大、保持比例、块级水平居中，避免各 PNG 内边距差异导致看着没对齐 */
.icon .glyph {
  display: block;
  width: 48px;
  height: 48px;
  margin: 0 auto;
  object-fit: contain;
  filter: drop-shadow(1px 1px 1px rgba(0,0,0,.4));
}
.icon .name {
  color: #fff;
  font-size: 12px;
  line-height: 1.2;
  text-shadow: 1px 1px 2px rgba(0,0,0,.7);
}

/* ---- 任务栏 ---- */
.taskbar {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 34px;
  display: flex;
  align-items: stretch;
  background: linear-gradient(to bottom, #3168d5 0%, #245edb 8%, #1941a5 92%, #0f3491 100%);
  border-top: 1px solid #5b8ce8;
  z-index: 9000;
}
.start-btn {
  display: flex; align-items: center; gap: 6px;
  padding: 0 18px 2px 10px;
  font-family: var(--font-ui);
  font-style: italic;
  font-weight: 600;
  font-size: 16px;
  color: #fff;
  text-shadow: 1px 1px 1px rgba(0,0,0,.4);
  background: linear-gradient(to bottom, #5db14a 0%, #3a8f2c 50%, #2f7d23 100%);
  border-right: 1px solid #1b5e12;
  border-top-right-radius: 9px;
  border-bottom-right-radius: 9px;
}
.start-btn:hover { filter: brightness(1.08); }
.start-btn.open { filter: brightness(0.9); }
.start-flag {
  width: 16px; height: 16px;
  background: conic-gradient(#e64a3b 0 25%, #5db14a 0 50%, #3a86d4 0 75%, #f0c419 0 100%);
  border-radius: 3px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.5);
}
.taskbar-items { flex: 1; display: flex; align-items: center; gap: 4px; padding: 3px 6px; overflow: hidden; }
.task-item {
  display: flex; align-items: center; gap: 6px;
  min-width: 120px; max-width: 160px;
  height: 24px; padding: 0 8px;
  color: #fff; font-size: 12px;
  background: linear-gradient(to bottom, #3f7ae0, #245edb);
  border: 1px solid #1941a5;
  border-radius: 3px;
  overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
}
.task-item.active { background: linear-gradient(to bottom, #1c46b3, #1a3f9e); box-shadow: inset 1px 1px 2px rgba(0,0,0,.4); }
.task-item .dot { width: 14px; height: 14px; flex: none; }
.task-item span { overflow: hidden; text-overflow: ellipsis; }
.tray {
  display: flex; align-items: center;
  padding: 0 12px;
  background: linear-gradient(to bottom, #1a8fce, #1377b8);
  border-left: 1px solid #0f5e95;
}
.clock { color: #fff; font-size: 12px; text-shadow: 1px 1px 1px rgba(0,0,0,.3); }

/* ---- start 菜单 ---- */
.start-menu {
  position: absolute;
  left: 0; bottom: 34px;
  width: 240px;
  background: var(--win-bg);
  border: 2px solid var(--xp-blue-d);
  border-bottom: none;
  border-top-right-radius: 8px;
  box-shadow: 3px -3px 12px rgba(0,0,0,.4);
  z-index: 9500;
  overflow: hidden;
}
.start-head {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  background: linear-gradient(to bottom, #2e64d6, #1c46b3);
  color: #fff;
}
.start-avatar {
  width: 34px; height: 34px;
  display: grid; place-items: center;
  font-weight: 600; font-size: 18px;
  background: #fff; color: var(--xp-blue);
  border-radius: 4px; border: 1px solid rgba(255,255,255,.6);
}
.start-user { font-weight: 600; }
.start-list { background: #fff; padding: 6px; }
.start-list li {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 10px;
  font-size: 13px; color: var(--text);
  border-radius: 2px;
}
.start-list li:hover { background: var(--xp-blue); color: #fff; }
.start-list .glyph { width: 24px; height: 24px; }
.start-foot {
  padding: 6px 12px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: #4a4a4a;
  background: var(--face-d);
}

@media (max-width: 640px) {
  .icons { width: 80px; }
  .icon .glyph { width: 42px; height: 42px; }
  .icon .name { font-size: 11px; }
}
