* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Tahoma", "MS Sans Serif", sans-serif;
  font-size: 11px;
  overflow: hidden;
  user-select: none;
  height: 100vh;
  width: 100vw;
}

.desktop {
  width: 100%;
  height: calc(100vh - 28px);
  background: #008080;
  display: flex;
  flex-direction: column;
  flex-wrap: wrap;
  align-content: flex-start;
  padding: 10px;
  gap: 10px;
}

.desktop-icon {
  width: 70px;
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  padding: 4px;
  border: 1px dotted transparent;
}

.desktop-icon:hover {
  background: rgba(0, 0, 128, 0.3);
  border-color: dotted #000;
}

.desktop-icon.selected {
  background: rgba(0, 0, 128, 0.5);
  border: 1px dotted #fff;
}

.desktop-icon img {
  width: 32px;
  height: 32px;
  image-rendering: pixelated;
}

.desktop-icon svg {
  width: 32px;
  height: 32px;
}

.desktop-icon span {
  color: #fff;
  text-align: center;
  margin-top: 4px;
  text-shadow: 1px 1px #000;
  word-wrap: break-word;
  max-width: 70px;
}

.window {
  position: absolute;
  background: #c0c0c0;
  border: 2px solid;
  border-color: #fff #808080 #808080 #fff;
  box-shadow: 1px 1px 0 #000;
  min-width: 200px;
  min-height: 150px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.window.maximized {
  top: 0 !important;
  left: 0 !important;
  width: calc(100vw - 4px) !important;
  height: calc(100vh - 32px) !important;
}

.window-titlebar {
  background: linear-gradient(90deg, #000080, #1084d0);
  padding: 2px 4px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: default;
}

.window-titlebar-text {
  color: #fff;
  font-weight: bold;
  font-size: 11px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.window-titlebar-text img {
  width: 16px;
  height: 16px;
  image-rendering: pixelated;
}

.window-controls {
  display: flex;
  gap: 2px;
}

.window-btn {
  width: 16px;
  height: 14px;
  background: #c0c0c0;
  border: 1px solid;
  border-color: #fff #808080 #808080 #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  font-weight: bold;
  cursor: pointer;
  line-height: 1;
}

.window-btn:active {
  border-color: #808080 #fff #fff #808080;
}

.window-btn-minimize::before { content: "_"; }
.window-btn-maximize::before { content: "☐"; font-size: 10px; }
.window-btn-close::before { content: "×"; }

.window-content {
  flex: 1;
  padding: 8px;
  background: #fff;
  overflow: hidden;
}

.window-content.has-overflow {
  overflow: auto;
}

.window-iframe {
  width: 100%;
  height: 100%;
  border: none;
}

.window-resize-handle {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 16px;
  height: 16px;
  cursor: se-resize;
  z-index: 10;
  background: linear-gradient(135deg, transparent 50%, #808080 50%);
}

.window.maximized .window-resize-handle {
  display: none;
}

.taskbar {
  height: 28px;
  background: #c0c0c0;
  border-top: 2px solid #fff;
  display: flex;
  align-items: center;
  padding: 2px;
  position: relative;
  z-index: 10000;
  overflow: hidden;
}

.start-btn {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 2px 6px;
  background: #c0c0c0;
  border: 2px solid;
  border-color: #fff #808080 #808080 #fff;
  font-weight: bold;
  font-size: 11px;
  cursor: pointer;
}

.start-btn:active {
  border-color: #808080 #fff #fff #808080;
}

.start-btn img {
  width: 16px;
  height: 16px;
  image-rendering: pixelated;
}

.taskbar-items {
  display: flex;
  gap: 2px;
  margin-left: 4px;
  flex: 1;
  overflow: hidden;
}

.taskbar-item {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 2px 4px;
  background: #c0c0c0;
  border: 2px solid;
  border-color: #fff #808080 #808080 #fff;
  min-width: 60px;
  max-width: 120px;
  cursor: pointer;
  font-size: 11px;
  flex-shrink: 1;
  overflow: hidden;
}

.taskbar-item .icon-img-small {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.taskbar-item span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
}

.taskbar-item.active {
  background: #e0e0e0;
  border-color: #808080 #fff #fff #808080;
}

.taskbar-item img {
  width: 16px;
  height: 16px;
  image-rendering: pixelated;
}

.taskbar-item span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tray {
  display: flex;
  align-items: center;
  padding: 2px 8px;
  background: #c0c0c0;
  border: 2px solid;
  border-color: #808080 #fff #fff #808080;
  font-size: 11px;
}

.start-menu {
  position: absolute;
  bottom: 30px;
  left: 2px;
  background: #c0c0c0;
  border: 2px solid;
  border-color: #fff #808080 #808080 #fff;
  width: 160px;
  display: none;
}

.start-menu.open {
  display: block;
}

.start-menu-banner {
  display: flex;
  align-items: flex-end;
  padding: 6px 10px;
  background: linear-gradient(90deg, #000080, #1084d0);
  color: #fff;
}

.start-menu-banner h1 {
  font-size: 16px;
  font-weight: bold;
  font-family: "Tahoma", sans-serif;
}

.start-menu-items {
  padding: 2px;
}

.start-menu-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 8px;
  cursor: pointer;
  font-size: 11px;
}

.start-menu-item:hover {
  background: #000080;
  color: #fff;
}

.start-menu-item img {
  width: 20px;
  height: 20px;
  image-rendering: pixelated;
}

.start-menu-item svg {
  width: 20px;
  height: 20px;
}

.start-menu-item .label {
  display: flex;
  flex-direction: column;
}

.start-menu-item .label span:first-child {
  font-weight: bold;
}

.start-menu-separator {
  height: 1px;
  background: #808080;
  border-bottom: 1px solid #fff;
  margin: 2px 4px;
}

.start-menu-shutdown {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 8px;
  cursor: pointer;
  font-size: 11px;
}

.start-menu-shutdown:hover {
  background: #000080;
  color: #fff;
}

.start-menu-shutdown img {
  width: 20px;
  height: 20px;
  image-rendering: pixelated;
}
