/* =========================
   GLOBAL
========================= */
body {
  margin: 0;
  overflow: hidden;
  background: linear-gradient(120deg, #dfe9f3, #ffffff);
  font-family: "Segoe UI", sans-serif;
}
/* =========================
   DESKTOP
========================= */
#desktop {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 44px;
  overflow: hidden;
}
/* =========================
   WINDOWS
========================= */
.window {
  position: absolute;
  width: 920px;
  height: 650px;
  background: #fff;
  border-radius: 6px;
  border: 1px solid #b5b5b5;
  box-shadow: 0 4px 12px rgba(0,0,0,0.25);
  overflow: hidden;
}
.window-header {
  background: #0d6efd;
  color: #fff;
  padding: 6px 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: move;
  user-select: none;
}
.window-buttons button {
  border: none;
  background: transparent;
  color: white;
  font-weight: bold;
  margin-left: 8px;
  cursor: pointer;
}
.window-buttons button:hover {
  color: #ccc;
}
.window-body {
  height: calc(100% - 40px);
  padding: 10px;
}
.ylc-window {
  resize: both;
  overflow: auto;
  min-width: 300px;
  min-height: 200px;
  max-width: 95vw;
  max-height: 95vh;
}

/* =========================
   IFRAME
========================= */
.ylc-iframe {
  width: 100%;
  height: 100%;
  border: none;
  background: white;
}
/* =========================
   TASKBAR
========================= */
#taskbar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 44px;
  background: #0d6efd;
  display: flex;
  align-items: center;
  padding: 0 10px;
  z-index: 10000;
}
@media (max-width: 768px) {
  .taskbar-app {
    max-width: 90px;
    font-size: 12px;
  }
}
.taskbar-app {
	  background: rgba(255,255,255,0.15);
  max-width: 140px;            /* desktop default */
  min-width: 60px;
  padding: 4px 10px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: center;
  cursor: pointer;
  user-select: none;
}
.taskbar-app.active {
  background: rgba(255,255,255,0.35);
}
#taskbarApps {
  display: flex;
  gap: 6px;
  overflow: hidden;
}
.taskbar-app {
  flex: 1 1 auto;
  max-width: 160px;
}
/* =========================
   START MENU
========================= */
#appMenu {
  position: fixed;
  bottom: 44px;
  left: 10px;
  width: 260px;
  background: white;
  border-radius: 6px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.25);
  display: none;
  z-index: 10001;
}
#appMenu ul {
  list-style: none;
  margin: 0;
  padding: 6px;
}
#appMenu li {
  padding: 8px 10px;
  cursor: pointer;
}
#appMenu li:hover {
  background: #f1f1f1;
}
.start-menu {
  position: fixed;
  bottom: 44px; /* height of taskbar */
  left: 10px;
  width: 260px;
  max-height: 400px; /* optional: max height */
  display: none;
  overflow-y: auto;
  z-index: 10001;
  animation: fadeIn 0.15s ease-out;
}
.start-menu ul {
  margin: 0;
  padding: 0;
  list-style: none;
}
.start-menu li {
  cursor: pointer;
}
.start-open .window {
  pointer-events: none; /* windows behind menu are not clickable */
}
.start-open #appMenu {
  pointer-events: auto;
}
/* Animation */
@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.95); }
  to   { opacity: 1; transform: scale(1); }
}
/* =========================
   START OPEN STATE
========================= */
.start-open .window {
  pointer-events: none;
}
.start-open #appMenu {
  pointer-events: auto;
}
#appMenu {
  min-height: 200px; /* or whatever you like */
}
.window[data-active="true"] {
  box-shadow: 0 0 0 2px #0d6efd;
}
@media (max-width: 768px) {
  .window {
    width: 100vw !important;
    height: calc(100vh - 44px) !important;
    top: 0 !important;
    left: 0 !important;
    border-radius: 0;
  }
  .window-header {
    cursor: default;
  }
}
.window-header {
  touch-action: none;
}