/* ==========================================================================
   MeowZilla Games — Floating App Window (Win98 style)
   ========================================================================== */

.mz-app-window {
  position: absolute;
  background: #c0c0c0;
  border: 2px solid;
  border-color: #dfdfdf #808080 #808080 #dfdfdf;
  box-shadow: 1px 1px 0 #000;
  font-family: 'MS Sans Serif', 'Tahoma', sans-serif;
  font-size: 11px;
  color: #000;
  display: flex;
  flex-direction: column;
  user-select: none;
  z-index: 100;
}

.mz-app-window.focused {
  z-index: 200;
}

.mz-app-window.minimized {
  display: none;
}

/* Title bar */
.mz-app-titlebar {
  height: 18px;
  padding: 2px 2px 2px 4px;
  display: flex;
  align-items: center;
  gap: 4px;
  background: linear-gradient(90deg, #7f7f7f, #a0a0a0);
  color: #fff;
  font-weight: bold;
  cursor: move;
  flex-shrink: 0;
}

.mz-app-window.focused .mz-app-titlebar {
  background: linear-gradient(90deg, #000080, #1084d0);
}

.mz-app-titlebar-icon {
  width: 16px;
  height: 16px;
  image-rendering: pixelated;
  flex-shrink: 0;
}

.mz-app-titlebar-text {
  flex: 1;
  font-size: 11px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mz-app-titlebar-controls {
  display: flex;
  gap: 2px;
  flex-shrink: 0;
}

.mz-app-titlebar-btn {
  width: 16px;
  height: 14px;
  background: #c0c0c0;
  border: 1px outset #fff;
  color: #000;
  font-family: 'Marlett', 'MS Sans Serif', sans-serif;
  font-size: 10px;
  font-weight: bold;
  line-height: 10px;
  padding: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mz-app-titlebar-btn:active {
  border-style: inset;
}

.mz-app-titlebar-btn:focus { outline: none; }

/* Body */
.mz-app-body {
  flex: 1;
  overflow: hidden;
  background: #c0c0c0;
  border: 1px solid;
  border-color: #808080 #dfdfdf #dfdfdf #808080;
  margin: 2px;
  display: flex;
  flex-direction: column;
}

.mz-app-body iframe,
.mz-app-body canvas {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: #000;
}

/* Resize handle */
.mz-app-resize {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 14px;
  height: 14px;
  cursor: nwse-resize;
  background: linear-gradient(
    135deg,
    transparent 0 40%,
    #808080 40% 50%,
    transparent 50% 60%,
    #808080 60% 70%,
    transparent 70% 80%,
    #808080 80% 90%,
    transparent 90% 100%
  );
}

/* Taskbar (minimized windows) */
.mz-taskbar {
  position: absolute;
  left: 0;
  bottom: 0;
  right: 0;
  height: 22px;
  background: #c0c0c0;
  border-top: 1px solid #dfdfdf;
  display: flex;
  gap: 2px;
  padding: 2px;
  z-index: 50;
}

.mz-taskbar:empty { display: none; }

.mz-taskbar-item {
  min-width: 140px;
  padding: 2px 6px;
  background: #c0c0c0;
  border: 1px outset #fff;
  font-family: 'MS Sans Serif', sans-serif;
  font-size: 11px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
}

.mz-taskbar-item:hover { background: #d0d0d0; }
.mz-taskbar-item:active { border-style: inset; }

.mz-taskbar-item img {
  width: 16px;
  height: 16px;
  image-rendering: pixelated;
}
