/* ===== GLOBAL ===== */

body {
  margin: 0;
  font-family: Tahoma, sans-serif;
  background: #008080;
  overflow: hidden;
}

.desktop {
  width: 100vw;
  height: 100vh;
  position: relative;
}

/* ===== DESKTOP ICONS ===== */

.icon {
  width: 80px;
  text-align: center;
  color: white;
  margin: 20px;
  cursor: pointer;
  font-size: 12px;
}

.icon img {
  width: 32px;
  display: block;
  margin: 0 auto 5px;
}

/* ===== WINDOWS ===== */

.window {
  position: absolute;
  background: #c0c0c0;
  border: 2px solid #fff;
  border-right-color: #404040;
  border-bottom-color: #404040;
  display: none;
  flex-direction: column;

  min-width: 250px;
  min-height: 150px;
  overflow: hidden;
  box-sizing: border-box;
}

/* ===== TITLE BAR ===== */

.titlebar {
  background: #000080;
  color: white;
  padding: 4px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: move;
  user-select: none;
}

.win-buttons button {
  width: 20px;
  height: 20px;
  margin-left: 2px;
  font-weight: bold;
  cursor: pointer;
}

/* ===== WINDOW CONTENT ===== */

.window-content {
  flex: 1;
  background: gray;
  position: relative;   /* Important for resize layering */
  overflow: hidden;     /* Keeps map contained */
}

.small-content {
  padding: 10px;
  font-size: 12px;
}

/* ===== MAP ===== */

#map {
  width: 100%;
  height: 100%;
  z-index: 1;
}

/* ===== LAYER BUTTONS ===== */

.layer-controls {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 500;  /* Above map tiles */
}

.layer-controls button {
  display: block;
  margin-bottom: 5px;
  cursor: pointer;
}

/* ===== RESIZE HANDLE ===== */

.resize-handle {
  width: 16px;
  height: 16px;
  position: absolute;
  right: 0;
  bottom: 0;
  cursor: se-resize;
  background: repeating-linear-gradient(
    135deg,
    #666,
    #666 2px,
    #aaa 2px,
    #aaa 4px
  );
  z-index: 9999;        /* Force above other elements */
  pointer-events: auto; /* Ensure mouse events */
}

/* ===== TASKBAR ===== */

.taskbar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 30px;
  background: #c0c0c0;
  display: flex;
  align-items: center;
}

.start {
  background: #808080;
  padding: 5px 10px;
  cursor: pointer;
  margin-right: 5px;
  user-select: none;
}

.task-buttons {
  display: flex;
}

.task-btn {
  background: #e0e0e0;
  margin-right: 5px;
  padding: 3px 8px;
  cursor: pointer;
  user-select: none;
}

/* ===== START MENU ===== */

.start-menu {
  position: fixed;
  bottom: 30px;
  left: 0;
  background: #c0c0c0;
  display: none;
  padding: 5px;
  border: 2px solid #fff;
  border-right-color: #404040;
  border-bottom-color: #404040;
}

/* ===== MAP GRAYSCALE ===== */

.map-grayscale {
  filter: grayscale(100%);
}