/* ==========================================================================
   Desktop Layout — viewport, icons grid, video wallpaper
   Windows XP Luna Theme
   ========================================================================== */

/* Main desktop surface — Le Taha'a island wallpaper */
.desktop {
  position: relative;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  background-color: #3a6ea5;
  background-image: url('https://diegocuevas.com/wp-content/uploads/2019/01/LeTahaa-26-of-27-510x382.jpg.webp');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  image-rendering: auto;
  filter: contrast(1.1) saturate(1.2);
  z-index: var(--z-desktop);
}

.desktop.hidden {
  display: none;
}

/* Desktop icon grid */
.desktop-icons {
  display: grid;
  grid-template-columns: repeat(auto-fill, var(--win95-icon-grid));
  grid-auto-rows: var(--win95-icon-grid);
  gap: var(--space-2);
  padding: var(--space-5);
  position: relative;
  z-index: var(--z-icons);
  height: calc(100vh - var(--win95-taskbar-height));
  align-content: start;
}

/* Individual desktop icon */
.desktop-icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: var(--space-2);
  padding: var(--space-2);
  cursor: pointer;
  user-select: none;
  border: 1px solid transparent;
  border-radius: 3px;
}

.desktop-icon:focus-visible {
  outline: 1px dotted var(--win95-selection-text);
}

.desktop-icon.selected {
  background: rgba(49, 106, 197, 0.35);
  border-color: rgba(49, 106, 197, 0.6);
  border-radius: 3px;
}

.desktop-icon-img {
  width: var(--win95-icon-size);
  height: var(--win95-icon-size);
  image-rendering: auto;
}

.desktop-icon-label {
  font-family: var(--font-content);
  font-size: var(--font-size-xs);
  color: #ffffff;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.8), 0 0 4px rgba(0,0,0,0.5);
  text-align: center;
  word-break: break-word;
  line-height: 1.4;
  max-width: 74px;
}

.desktop-icon.selected .desktop-icon-label {
  background: rgba(49, 106, 197, 0.6);
  color: var(--win95-selection-text);
  border-radius: 2px;
  padding: 1px 3px;
}

/* Video wallpaper (showreel background) */
.video-wallpaper {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  object-fit: cover;
  pointer-events: none;
}

/* Semi-transparent overlay for readability */
.video-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(10, 22, 40, 0.25);
  z-index: 1;
  pointer-events: none;
}
