/* Windows 95 / 98 Classic Desktop Shell */
#retroos-desktop {
  width: 100%;
  height: calc(100% - 36px);
  position: relative;
  background: var(--wallpaper, #008080);
  overflow: hidden;
}

#retroos-desktop::before {
  display: none;
}

#retroos-desktop::after {
  content: 'RetroOS 95';
  position: absolute;
  bottom: 60px;
  right: 40px;
  font-size: 36px;
  font-family: var(--font-pixel);
  color: rgba(255, 255, 255, 0.15);
  text-shadow: 2px 2px 0px rgba(0, 0, 0, 0.4);
  pointer-events: none;
  letter-spacing: 4px;
}

#retroos-desktop-icons {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.desktop-icon {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 80px;
  padding: 6px 4px;
  cursor: grab;
  border: 1px solid transparent;
  user-select: none;
}

.desktop-icon:hover {
  background: rgba(0, 0, 128, 0.2);
  border: 1px dotted #ffffff;
}

.desktop-icon.selected {
  background: #000080;
  border: 1px dotted #ffffff;
}

.desktop-icon.selected .label {
  background: #000080;
  color: #ffffff;
}

.desktop-icon .icon {
  font-size: 28px;
  margin-bottom: 4px;
  filter: drop-shadow(2px 2px 0px rgba(0, 0, 0, 0.5));
}

.desktop-icon .label {
  font-size: 8px;
  font-family: var(--font-pixel);
  text-align: center;
  color: #ffffff;
  text-shadow: 1px 1px 1px #000000;
  line-height: 1.3;
  word-break: break-word;
  padding: 2px 4px;
}

/* Windows 95 Taskbar */
#taskbar {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 36px;
  background: var(--win-face);
  border-top: 2px solid var(--win-light);
  box-shadow: inset 0 1px 0px #ffffff;
  display: flex;
  align-items: center;
  padding: 2px 4px;
  z-index: 100;
}

/* Iconic 3D Start Button */
#start-btn {
  height: 28px;
  background: var(--win-face);
  border-top: 2px solid var(--win-light);
  border-left: 2px solid var(--win-light);
  border-right: 2px solid var(--win-darker);
  border-bottom: 2px solid var(--win-darker);
  box-shadow: inset -1px -1px 0px var(--win-dark);
  color: #000000;
  font-family: var(--font-pixel);
  font-size: 9px;
  font-weight: bold;
  padding: 2px 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
}

#start-btn::before {
  content: '❖';
  color: #000080;
  font-size: 11px;
}

#start-btn:active {
  border-top: 2px solid var(--win-darker);
  border-left: 2px solid var(--win-darker);
  border-right: 2px solid var(--win-light);
  border-bottom: 2px solid var(--win-light);
  box-shadow: inset 1px 1px 0px var(--win-dark);
  padding: 3px 9px 1px 11px;
}

#taskbar-windows {
  flex: 1;
  display: flex;
  align-items: center;
  padding: 0 6px;
  gap: 4px;
  overflow-x: auto;
  height: 100%;
}

.taskbar-item {
  background: var(--win-face);
  border-top: 2px solid var(--win-light);
  border-left: 2px solid var(--win-light);
  border-right: 2px solid var(--win-darker);
  border-bottom: 2px solid var(--win-darker);
  box-shadow: inset -1px -1px 0px var(--win-dark);
  color: #000000;
  font-family: var(--font-pixel);
  font-size: 8px;
  padding: 2px 8px;
  cursor: pointer;
  white-space: nowrap;
  height: 26px;
  display: flex;
  align-items: center;
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.taskbar-item.active {
  background: #dfdfdf;
  background-image: repeating-linear-gradient(45deg, #c0c0c0 25%, transparent 25%, transparent 75%, #c0c0c0 75%, #c0c0c0), repeating-linear-gradient(45deg, #c0c0c0 25%, #ffffff 25%, #ffffff 75%, #c0c0c0 75%, #c0c0c0);
  background-position: 0 0, 1px 1px;
  background-size: 2px 2px;
  border-top: 2px solid var(--win-darker);
  border-left: 2px solid var(--win-darker);
  border-right: 2px solid var(--win-light);
  border-bottom: 2px solid var(--win-light);
  box-shadow: inset 1px 1px 0px var(--win-dark);
  font-weight: bold;
  padding: 3px 7px 1px 9px;
}

/* Sunken Tray Clock */
#taskbar-tray {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 2px 8px;
  height: 26px;
  background: var(--win-face);
  border-top: 2px solid var(--win-dark);
  border-left: 2px solid var(--win-dark);
  border-right: 2px solid var(--win-light);
  border-bottom: 2px solid var(--win-light);
  box-shadow: inset 1px 1px 0px var(--win-darker);
}

#taskbar-clock {
  font-size: 9px;
  font-family: var(--font-pixel);
  color: #000000;
  white-space: nowrap;
}

/* Classic Windows 95 Start Menu */
#start-menu {
  position: absolute;
  bottom: 38px;
  left: 4px;
  width: 230px;
  background: var(--win-face);
  border-top: 2px solid var(--win-light);
  border-left: 2px solid var(--win-light);
  border-right: 2px solid var(--win-darker);
  border-bottom: 2px solid var(--win-darker);
  box-shadow: inset -1px -1px 0px var(--win-dark), inset 1px 1px 0px var(--win-light), 4px 4px 0px rgba(0, 0, 0, 0.5);
  z-index: 200;
  display: flex;
  flex-direction: row;
}

/* Vertical Blue Sidebar Band */
.start-menu-header {
  width: 28px;
  background: linear-gradient(0deg, #000080 0%, #1084d0 100%);
  color: #ffffff;
  font-family: var(--font-pixel);
  font-size: 10px;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 10px 4px;
  letter-spacing: 3px;
  font-weight: bold;
  border-right: 1px solid var(--win-dark);
}

#start-menu-apps {
  flex: 1;
  padding: 4px 0;
  max-height: 380px;
  overflow-y: auto;
}

.start-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 10px;
  cursor: pointer;
  font-size: 8px;
  color: #000000;
}

.start-menu-item:hover {
  background: #000080;
  color: #ffffff;
}

.start-menu-item .menu-icon {
  font-size: 16px;
  width: 20px;
  text-align: center;
}

.start-menu-divider {
  height: 2px;
  border-top: 1px solid var(--win-dark);
  border-bottom: 1px solid var(--win-light);
  margin: 4px 2px;
}

.start-menu-footer {
  padding: 4px;
  border-top: 1px solid var(--win-dark);
  background: var(--win-face);
}

#shutdown-btn {
  width: 100%;
  background: var(--win-face);
  border-top: 2px solid var(--win-light);
  border-left: 2px solid var(--win-light);
  border-right: 2px solid var(--win-darker);
  border-bottom: 2px solid var(--win-darker);
  box-shadow: inset -1px -1px 0px var(--win-dark);
  color: #000000;
  font-family: var(--font-pixel);
  font-size: 8px;
  font-weight: bold;
  padding: 6px;
  cursor: pointer;
}

#shutdown-btn:hover {
  background: #000080;
  color: #ffffff;
}

#shutdown-btn:active {
  border-top: 2px solid var(--win-darker);
  border-left: 2px solid var(--win-darker);
  border-right: 2px solid var(--win-light);
  border-bottom: 2px solid var(--win-light);
  box-shadow: inset 1px 1px 0px var(--win-dark);
}

/* Context Menu */
#context-menu {
  position: absolute;
  background: var(--win-face);
  border-top: 2px solid var(--win-light);
  border-left: 2px solid var(--win-light);
  border-right: 2px solid var(--win-darker);
  border-bottom: 2px solid var(--win-darker);
  box-shadow: inset -1px -1px 0px var(--win-dark), 3px 3px 0px rgba(0, 0, 0, 0.4);
  z-index: 300;
  min-width: 160px;
  padding: 2px;
}

.context-item {
  padding: 6px 12px;
  font-size: 8px;
  font-family: var(--font-pixel);
  color: #000000;
  cursor: pointer;
}

.context-item:hover {
  background: #000080;
  color: #ffffff;
}

.context-divider {
  height: 2px;
  border-top: 1px solid var(--win-dark);
  border-bottom: 1px solid var(--win-light);
  margin: 2px 0;
}
