:root {
  --taskbar-color: #f6bcd3;
  --window-color: #ffe6f0;
  --text-color: #000;
  --icon-shake: 0px;
}

* {
  box-sizing: border-box;
  font-family: Tahoma, sans-serif;
}

body {
  margin: 0;
  overflow: hidden;
}

#desktop {
  position: absolute;
  inset: 0;
  background: url("background.png") center / cover no-repeat;
}

/* ICONS */

.icon {
  position: absolute;
  width: 72px;
  text-align: center;
  cursor: pointer;
  user-select: none;

  display: flex;
  flex-direction: column;
  align-items: center;

  animation: iconShake 0.3s infinite;
  animation-play-state: paused;
}

.icon img {
  width: 48px;
  height: 48px;
  image-rendering: pixelated;
  pointer-events: none;
}

.icon span {
  font-size: 12px;
  color: var(--text-color);
  text-shadow: 1px 1px white;
}

@keyframes iconShake {
  0% { transform: translate(0); }
  25% { transform: translate(var(--icon-shake), 0); }
  50% { transform: translate(0); }
  75% { transform: translate(calc(-1 * var(--icon-shake)), 0); }
}

/* WINDOWS */

.window {
  position: absolute;
  top: 120px;
  left: 160px;
  width: 340px;
  height: 260px;

  background: var(--window-color);
  border: 2px solid black;
  display: none;
  resize: both;
  overflow: hidden;
}

.titlebar {
  height: 24px;
  background: linear-gradient(to right, #ffb7d5, #ffd6e8);
  padding: 2px 6px;
  cursor: move;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.titlebar button {
  width: 22px;
}

.content {
  padding: 8px;
  height: calc(100% - 24px);
}

/* SCROLL FIX */
.scrollable {
  overflow-y: auto;
}

/* TASKBAR */

#taskbar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 32px;
  background: var(--taskbar-color);
  display: flex;
  align-items: center;
  padding: 2px;
  border-top: 2px solid white;
}

#startBtn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  font-weight: bold;
  background: linear-gradient(#fff, #ccc);
  border: 2px outset white;
}

#startBtn:active {
  border: 2px inset white;
}

#clock {
  margin-left: auto;
  padding: 0 10px;
}

/* START MENU */

#startMenu {
  position: fixed;
  bottom: 32px;
  left: 0;
  width: 160px;
  background: #fff;
  border: 2px solid black;
  display: none;
}

#startMenu button {
  width: 100%;
  border: none;
  background: none;
  padding: 6px;
  text-align: left;
}
