body {
  background-image: url("background.jpg");
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
  cursor: url("cursors/arrow.cur"), default;
}

.icon:hover {
  cursor: url("cursors/select.cur"), pointer;
}

/* Desktop background and layout */
.desktop {
  width: 100vw;
  height: 100vh;
  background: url("wallpaper.jpg") center/cover no-repeat;

  display: grid;

  /* Windows-style vertical fill */
  grid-auto-flow: column;     /* fill down first */
  grid-auto-columns: 72px;    /* icon column width */
  grid-template-rows: repeat(auto-fill, 80px);

  align-content: start;
  justify-content: start;

  gap: 8px;
  padding: 16px;
  box-sizing: border-box;

  font-family: "Segoe UI", sans-serif;
  user-select: none;
}

/* Desktop icon */
.icon {
  width: 72px;
  text-align: center;
  color: white;
  cursor: default;
}

/* Windows selection highlight */
.icon.selected {
  background: rgba(0,120,215,0.35);   /* Win10-like blue */
  border: 1px solid rgba(0,120,215,0.9);
  border-radius: 2px;
}

/* Window */
.window {
  position: absolute;
  width: 320px;
  height: 200px;
  background: #c0c0c0;
  border: 2px solid #000;
  box-shadow: 2px 2px 0 #404040;
  display: flex;
  flex-direction: column;
  z-index: 1000;
}

/* Title bar */
.window-titlebar {
  background: linear-gradient(#000080, #0000a8);
  color: white;
  font-size: 13px;
  padding: 2px 6px;
  cursor: url("cursors/move.cur"), move;
  user-select: none;
}

/* Resize handles */
.resize-handle {
  position: absolute;
  background: transparent;
}

/* edges */
.resize-n { top: -2px; left: 0; right: 0; height: 4px; cursor: n-resize; }
.resize-s { bottom: -2px; left: 0; right: 0; height: 4px; cursor: s-resize; }
.resize-e { right: -2px; top: 0; bottom: 0; width: 4px; cursor: e-resize; }
.resize-w { left: -2px; top: 0; bottom: 0; width: 4px; cursor: w-resize; }

/* corners */
.resize-nw { top: -2px; left: -2px; width: 6px; height: 6px; cursor: nw-resize; }
.resize-ne { top: -2px; right: -2px; width: 6px; height: 6px; cursor: ne-resize; }
.resize-sw { bottom: -2px; left: -2px; width: 6px; height: 6px; cursor: sw-resize; }
.resize-se { bottom: -2px; right: -2px; width: 6px; height: 6px; cursor: se-resize; }

/* Content */
.window-content {
  flex: 1;
  background: #ffffff;
  padding: 6px;
  font-size: 13px;
}

.icon img {
  width: 48px;
  height: 48px;
  display: block;
  margin: 0 auto 4px;
}

.icon span {
  font-size: 12px;
  line-height: 1.2;
  text-shadow: 0 0 3px rgba(0,0,0,0.7);
}