/* ===========================
   General Look
   =========================== */
body {
  margin: 0;
  background: #000;
  color: #fff;
  font-family: "Courier New", monospace;
  overflow: hidden;
}

/* ===========================
   Logo
   =========================== */
#logo {
  position: absolute;
  top: 20px;
  left: 20px;
  width: 60px;
  height: auto;
  z-index: 1000;
}

/* ===========================
   Desktop Icons
   =========================== */
.icon {
  width: 70px;
  text-align: center;
  cursor: pointer;
  position: absolute;
  user-select: none;
}
.icon img {
  width: 48px;
  height: 48px;
  display: block;
  margin: 0 auto;
}
.icon span {
  font-size: 12px;
  color: #fff;
}

/* ===========================
   Windows (Base)
   =========================== */
.window {
  position: absolute;
  background: #111;
  border: 2px solid #fff;
  width: 400px;
  height: 300px;
  z-index: 10;
  display: flex;
  flex-direction: column;
  min-width: 200px;
  min-height: 150px;
  overflow: hidden; /* contain children */
}

/* ===========================
   Title Bar
   =========================== */
.title-bar {
  background: #222;
  padding: 3px 6px;
  display: flex;
  justify-content: space-between; /* title left, buttons right */
  align-items: center;
  cursor: move;
  color: #fff;
  font-weight: bold;
  font-size: 14px;
  box-sizing: border-box;
}
.title-text {
  flex: 1;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.title-buttons {
  display: flex;
  gap: 5px;
}
.title-buttons button {
  background: #000;
  color: #fff;
  border: 1px solid #fff;
  width: 20px;
  height: 20px;
  cursor: pointer;
  padding: 0;
  font-size: 14px;
  line-height: 18px;
}

/* ===========================
   Window Content
   =========================== */
.window-content {
  flex: 1;
  background: #000;
  color: #fff;
  padding: 8px;
  overflow: hidden; /* outer window doesn’t scroll */
  display: flex;
  flex-direction: column;
}
.window iframe {
  flex: 1;
  border: none;
  width: 100%;
  height: 100%;
  overflow: auto; /* allow scrolling inside iframe */
}

/* Info window content */
.window-content p {
  margin: 0;
  font-size: 14px;
  line-height: 1.4;
}
.ok-btn {
  align-self: flex-end;
  margin-top: 12px;
  background: #000;
  color: #fff;
  border: 1px solid #fff;
  padding: 4px 12px;
  cursor: pointer;
}

/* ===========================
   Resize Handles
   =========================== */
.window .resize-handle {
  position: absolute;
  width: 10px;
  height: 10px;
  background: transparent;
}
/* Corners */
.window .resize-handle.nw { top: -2px; left: -2px; cursor: nwse-resize; }
.window .resize-handle.ne { top: -2px; right: -2px; cursor: nesw-resize; }
.window .resize-handle.sw { bottom: -2px; left: -2px; cursor: nesw-resize; }
.window .resize-handle.se { bottom: -2px; right: -2px; cursor: nwse-resize; }
/* Edges */
.window .resize-handle.n { top: -2px; left: 50%; transform: translateX(-50%); cursor: ns-resize; height: 6px; width: 100%; }
.window .resize-handle.s { bottom: -2px; left: 50%; transform: translateX(-50%); cursor: ns-resize; height: 6px; width: 100%; }
.window .resize-handle.w { top: 50%; left: -2px; transform: translateY(-50%); cursor: ew-resize; width: 6px; height: 100%; }
.window .resize-handle.e { top: 50%; right: -2px; transform: translateY(-50%); cursor: ew-resize; width: 6px; height: 100%; }

/* ===========================
   Taskbar
   =========================== */
#taskbar {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 36px;               
  background: #111;
  border-top: 1px solid #444;
  display: flex;
  align-items: center;
  padding: 4px 8px;
  box-sizing: border-box;
  z-index: 2000;
  font-family: "Courier New", monospace;
  gap: 8px;
}

/* Start button */
#start-button {
  background: #fff;
  color: #000;
  border: 2px solid #555;
  font-weight: bold;
  font-size: 16px;
  padding: 4px 12px;
  margin-right: 8px;
  cursor: pointer;
  user-select: none;
}
#start-button:hover {
  background: #eee;
}

/* ===========================
   Quick Launch
   =========================== */
#quick-launch {
  display: flex;
  align-items: center;
  gap: 4px;
}
#quick-launch a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: none;
  background: transparent;
  box-shadow: none;
  cursor: pointer;
}
#quick-launch a:active {
  box-shadow: inset 1px 1px #fff, inset -1px -1px #555;
}
#quick-launch img {
  width: 20px;
  height: 20px;
  object-fit: contain;
  background: transparent;
  image-rendering: pixelated;
}

/* Quick launch divider */
.taskbar-divider {
  width: 2px;
  height: 60%;
  background: #888;
  margin: 0 4px;
  box-shadow: inset -1px 0 #fff, inset 1px 0 #555;
}

/* ===========================
   Taskbar Items (Open Windows)
   =========================== */
#taskbar-items {
  display: flex;
  flex: 1;
  gap: 4px;
}
.taskbar-item {
  background: #222;
  border: 1px solid #666;
  padding: 6px 14px;
  cursor: pointer;
  font-size: 15px;
  white-space: nowrap;
  color: #fff;
}
.taskbar-item:hover {
  background: #333;
}
