/* ════════════════════════════════
   EXPLORER TWO-PANE LAYOUT
   ════════════════════════════════ */
.explorer-body {
  display: flex;
  flex: 1;
  overflow: hidden;
  min-height: 0;
  border: 1px solid var(--c-gray-300);
  margin: 3px 0;
}

.tree-pane {
  width: 170px;
  border-right: 1px solid var(--c-gray-300);
  overflow: auto;
  flex-shrink: 0;
  background: #fff;
  padding: 1px 0;
}

.tree-item {
  display: flex;
  align-items: center;
  height: 18px;
  cursor: url('../img/cursor-default.png') 0 0, default;
  white-space: nowrap;
  font-size: 11px;
  font-family: "w95fa", 'MS Sans Serif', Tahoma, sans-serif;
  color: #000;
  padding-right: 4px;
}
.tree-item:hover  { background: #000080; color: #fff; }
.tree-item.selected { background: #000080; color: #fff; }

.tree-toggle {
  width: 9px;
  height: 9px;
  border: 1px solid var(--c-gray-300);
  background: #fff;
  color: #000;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 8px;
  font-weight: bold;
  line-height: 1;
  flex-shrink: 0;
  cursor: pointer;
  margin: 0 3px;
  user-select: none;
}
.tree-spacer {
  width: 9px;
  height: 9px;
  flex-shrink: 0;
  margin: 0 3px;
}
.tree-item img {
  width: 16px;
  height: 16px;
  image-rendering: pixelated;
  margin-right: 3px;
  flex-shrink: 0;
}
.tree-line {
  width: 1px;
  align-self: stretch;
  flex-shrink: 0;
  border-left: 1px dotted var(--c-gray-300);
  margin: 0 4px;
}

.icons-pane {
  flex: 1;
  overflow: auto;
  background: #fff;
}

/* ════════════════════════════════
   INTERNET EXPLORER
   ════════════════════════════════ */
.ie-toolbar {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 2px 4px;
  background: var(--c-material);
  border-bottom: 1px solid var(--c-border-dark);
  flex-shrink: 0;
}
.ie-btn-group {
  display: flex;
  align-items: stretch;
}
.ie-nav-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 4px 2px;
  background: transparent;
  border: 1px solid transparent;
  cursor: default;
  font-family: "w95fa", 'MS Sans Serif', Tahoma, sans-serif;
  width: 60px;
  user-select: none;
}
.ie-nav-btn svg { width: 32px; height: 32px; flex-shrink: 0; }
.ie-nav-btn img { width: 32px; height: 32px; flex-shrink: 0; image-rendering: pixelated; }
.ie-nav-btn span { font-size: 11px; line-height: 1; white-space: nowrap; }
.ie-nav-dim { opacity: 0.4; }
.ie-toolbar-divider {
  width: 1px;
  background: var(--c-border-dark);
  margin: 4px 3px;
}
.ie-nav-btn:hover {
  border-top: 1px solid #ffffff;
  border-left: 1px solid #ffffff;
  border-bottom: 1px solid #808080;
  border-right: 1px solid #808080;
}
.ie-nav-btn:active {
  border-top: 1px solid #808080;
  border-left: 1px solid #808080;
  border-bottom: 1px solid #ffffff;
  border-right: 1px solid #ffffff;
  padding: 5px 1px 3px 3px;
}
.ie-toolbar-sep {
  flex: 1;
}
.ie-logo img {
  width: 28px;
  height: 28px;
  image-rendering: pixelated;
}
.ie-addressbar {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 2px 4px;
  background: var(--c-material);
  border-bottom: 1px solid var(--c-border-dark);
  flex-shrink: 0;
}
.ie-address-label {
  font-size: 11px;
  font-family: "w95fa", 'MS Sans Serif', Tahoma, sans-serif;
  white-space: nowrap;
  padding-right: 2px;
}
.ie-address-input {
  flex: 1;
  height: 22px;
  font-size: 11px;
  font-family: 'Lucida Console', 'Courier New', monospace;
  padding: 0 4px;
  border: 2px solid;
  border-top-color: var(--c-border-dark);
  border-left-color: var(--c-border-dark);
  border-bottom-color: var(--c-border-lightest);
  border-right-color: var(--c-border-lightest);
  box-shadow: inset 1px 1px 0 var(--c-border-darkest);
  background: #fff;
  outline: none;
}
.ie-go-btn {
  height: 22px;
  padding: 0 10px;
  font-size: 11px;
  font-family: "w95fa", 'MS Sans Serif', Tahoma, sans-serif;
  background: var(--c-material);
  border: none;
  box-shadow: var(--shadow-btn);
  cursor: pointer;
}
.ie-go-btn:active {
  box-shadow: var(--shadow-btn-active);
}
.ie-linksbar {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 2px 4px;
  background: var(--c-material);
  border-bottom: 1px solid var(--c-border-dark);
  flex-shrink: 0;
}
.ie-links-label {
  font-size: 11px;
  font-family: "w95fa", 'MS Sans Serif', Tahoma, sans-serif;
  padding-right: 4px;
  border-right: 1px solid var(--c-border-dark);
  margin-right: 2px;
  white-space: nowrap;
}
.ie-link-btn {
  font-size: 11px;
  font-family: "w95fa", 'MS Sans Serif', Tahoma, sans-serif;
  background: transparent;
  border: none;
  padding: 3px 6px;
  cursor: pointer;
  white-space: nowrap;
}
.ie-link-btn:hover {
  box-shadow: var(--shadow-btn);
  background: var(--c-material);
}
.ie-content {
  flex: 1;
  position: relative;
  overflow: hidden;
  min-height: 0;
  cursor: url('../img/cursor-hand.png') 2 0, pointer;
}
#ie-frame {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
  filter: grayscale(18%) saturate(75%) contrast(108%) brightness(90%) sepia(12%);
}
.ie-content::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 3px,
    rgba(0, 0, 0, 0.04) 3px,
    rgba(0, 0, 0, 0.04) 4px
  );
  z-index: 2;
}

/* ════════════════════════════════
   MS PAINT
   ════════════════════════════════ */
.paint-body {
  display: flex;
  flex: 1;
  overflow: hidden;
  min-height: 0;
}
.paint-toolbox {
  width: 54px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  padding: 2px;
  gap: 5px;
  background: var(--c-material);
  border-right: 2px solid var(--c-border-dark);
}
.paint-tools {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
}
.paint-tool {
  width: 24px;
  height: 24px;
  background: var(--c-material);
  border: none;
  box-shadow: var(--shadow-btn);
  padding: 2px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}
.paint-tool svg { width: 14px; height: 14px; }
.paint-tool.active,
.paint-tool:active {
  box-shadow: var(--shadow-btn-active);
}
.paint-tool-options {
  box-shadow: var(--shadow-btn-active);
  padding: 4px 5px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.paint-line-opt {
  width: 100%;
  background: transparent;
  border: 1px solid transparent;
  padding: 2px 2px;
  cursor: pointer;
  display: flex;
  align-items: center;
}
.paint-line-opt.active {
  border-color: var(--c-border-dark);
  background: #000080;
}
.paint-line-opt.active .paint-line-preview { background: #fff; }
.paint-line-preview {
  width: 100%;
  background: #000;
  display: block;
}
.paint-canvas-wrap {
  flex: 1;
  overflow: auto;
  background: #808080;
  padding: 10px;
  min-width: 0;
}
.paint-canvas-inner {
  position: relative;
  display: inline-block;
}
.paint-canvas {
  display: block;
  border: 1px solid #808080;
  cursor: crosshair;
  box-shadow: 2px 2px 0 #404040;
}
.paint-canvas-handle {
  position: absolute;
  width: 6px;
  height: 6px;
  background: #000;
  border: 1px solid #fff;
}
.paint-handle-r  { right: -4px; top: 50%; transform: translateY(-50%); cursor: e-resize; }
.paint-handle-b  { bottom: -4px; left: 50%; transform: translateX(-50%); cursor: s-resize; }
.paint-handle-br { bottom: -4px; right: -4px; cursor: se-resize; }
.paint-palette {
  display: flex;
  align-items: center;
  padding: 3px 4px;
  gap: 6px;
  border-top: 2px solid var(--c-border-dark);
  background: var(--c-material);
  flex-shrink: 0;
  height: 38px;
}
.paint-fg-bg {
  position: relative;
  width: 36px;
  height: 30px;
  flex-shrink: 0;
  margin-right: 4px;
}
.paint-color-box {
  position: absolute;
  width: 22px;
  height: 22px;
  border: 2px solid;
}
.paint-fg-color {
  top: 0; left: 0;
  background: #000;
  border-top-color: var(--c-border-lightest);
  border-left-color: var(--c-border-lightest);
  border-bottom-color: var(--c-border-dark);
  border-right-color: var(--c-border-dark);
  z-index: 2;
}
.paint-bg-color {
  bottom: 0; right: 0;
  background: #fff;
  border-top-color: var(--c-border-dark);
  border-left-color: var(--c-border-dark);
  border-bottom-color: var(--c-border-lightest);
  border-right-color: var(--c-border-lightest);
  z-index: 1;
}
.paint-color-grid {
  display: grid;
  grid-template-rows: 14px 14px;
  grid-auto-columns: 14px;
  grid-auto-flow: column;
  gap: 1px;
}
.paint-color-swatch {
  width: 14px;
  height: 14px;
  border: 1px solid var(--c-border-dark);
  cursor: pointer;
  box-sizing: border-box;
}
.paint-color-swatch:hover {
  outline: 1px solid #fff;
  z-index: 1;
  position: relative;
}

/* ════════════════════════════════
   RESPONSIVE
   ════════════════════════════════ */
@media (max-width: 480px) {
  .taskbar-btn { min-width: 44px; padding: 0 4px; }
  .window { min-width: 160px; }
}

/* ════════════════════════════════
   MINESWEEPER
   ════════════════════════════════ */
.mine-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 6px;
  box-shadow: inset -1px -1px 0px #ffffff, inset 1px 1px 0px #808080, inset -2px -2px 0px #c1c1c1, inset 2px 2px 0px #000000;
}
.mine-lcd {
  background: #000;
  color: #ff0000;
  font-family: 'Courier New', monospace;
  font-size: 18px;
  font-weight: bold;
  letter-spacing: 2px;
  padding: 1px 4px;
  min-width: 44px;
  text-align: right;
  border: 2px solid;
  border-top-color: #808080;
  border-left-color: #808080;
  border-bottom-color: #ffffff;
  border-right-color: #ffffff;
}
.mine-face-btn {
  width: 34px;
  height: 34px;
  font-size: 18px;
  background: var(--c-material);
  border: none;
  box-shadow: var(--shadow-btn);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  line-height: 1;
}
.mine-face-btn:active {
  box-shadow: var(--shadow-btn-active);
}
.mine-field-border {
  box-shadow: inset -1px -1px 0px #ffffff, inset 1px 1px 0px #808080, inset -2px -2px 0px #c1c1c1, inset 2px 2px 0px #000000;
  display: inline-block;
}
.mine-grid {
  display: grid;
  padding: 3px;
}
.mine-cell {
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "w95fa", 'MS Sans Serif', Tahoma, sans-serif;
  font-size: 13px;
  font-weight: bold;
  cursor: default;
  box-shadow: var(--shadow-btn);
  background: var(--c-material);
  user-select: none;
}
.mine-cell-revealed {
  box-shadow: inset -1px -1px 0px #ffffff, inset 1px 1px 0px #808080;
  background: var(--c-material);
  font-size: 13px;
}
.mine-cell-exploded {
  background: #ff0000;
}
.mine-cell-mine {
  background: var(--c-material);
}
.mine-cell-wrongflag {
  background: var(--c-material);
}
.mine-menu-item {
  padding: 3px 20px;
  cursor: default;
  font-family: "w95fa", 'MS Sans Serif', Tahoma, sans-serif;
  font-size: 13px;
}
.mine-menu-item:hover {
  background: #000080;
  color: #fff;
}

/* ════════════════════════════════
   DISK DEFRAGMENTER
   ════════════════════════════════ */
.defrag-body {
  display: flex;
  flex-direction: column;
  height: 100%;
}
.defrag-scroll-row {
  display: flex;
  flex: 1;
  overflow: hidden;
  border-top: 1px solid #808080;
  border-left: 1px solid #808080;
  border-bottom: 1px solid #ffffff;
  border-right: 1px solid #ffffff;
  background: #000;
  min-height: 0;
}
.defrag-viewport {
  flex: 1;
  overflow: hidden;
  position: relative;
  background: #fff;
}
.defrag-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 4px 4px;
  flex-shrink: 0;
}
.defrag-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.defrag-status-txt {
  font-family: "w95fa", 'MS Sans Serif', Tahoma, sans-serif;
  font-size: 13px;
  color: #000;
}
.defrag-bar-track {
  padding: 2px;
  height: 16px;
  background: #c0c0c0;
  box-shadow: inset -1px -1px 0px #ffffff, inset 1px 1px 0px #808080;
  overflow: hidden;
}
.defrag-bar-fill {
  width: 0;
  height: 12px;
  background: repeating-linear-gradient(
    to right,
    #000080 0px, #000080 8px,
    #c0c0c0 8px, #c0c0c0 10px
  );
  transition: none;
}
.defrag-pct {
  font-family: "w95fa", 'MS Sans Serif', Tahoma, sans-serif;
  font-size: 13px;
  color: #000;
}
.defrag-btns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  flex-shrink: 0;
}
