html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: #008080;
  font-family: "Pixelated MS Sans Serif", "MS Sans Serif", Arial, sans-serif;
  overflow: hidden;
}

body.wp-teal       { background: #008080; }
body.wp-purple     { background: #3b1c5a; }
body.wp-red        { background: #800000; }
body.wp-black      { background: #000; }
body.wp-clouds     { background: linear-gradient(180deg, #6aa8ff 0%, #bfe0ff 60%, #fff 100%); }
body.wp-bliss      { background: linear-gradient(180deg, #70a8e0 0%, #b7e2ff 45%, #7ac142 55%, #4a8a2a 100%); }
body.wp-hotdog     { background: repeating-linear-gradient(45deg, #ffd400 0 24px, #b30000 24px 48px); }
body.wp-pipes      {
  background:
    radial-gradient(circle at 20% 30%, #ff0080 0 10px, transparent 11px),
    radial-gradient(circle at 70% 60%, #00ffff 0 10px, transparent 11px),
    radial-gradient(circle at 40% 80%, #ffff00 0 10px, transparent 11px),
    #000;
}

.desktop {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 54px;
  padding: 6px 4px;
  overflow-x: auto;
  overflow-y: hidden;
  display: flex;
  flex-direction: column;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 2px 2px;
}

.icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  text-decoration: none;
  color: white;
  padding: 3px 2px;
  width: 76px;
  height: 74px;
  flex: 0 0 74px;
  cursor: pointer;
  user-select: none;
  box-sizing: border-box;
}
.icon-img {
  width: 32px;
  height: 32px;
  image-rendering: pixelated;
  image-rendering: -moz-crisp-edges;
  display: block;
  pointer-events: none;
}
.icon-label {
  margin-top: 3px;
  padding: 0 2px;
  font-size: 11px;
  line-height: 1.15;
  text-align: center;
  color: white;
  text-shadow:
    1px 1px 0 #000, -1px 1px 0 #000, 1px -1px 0 #000, -1px -1px 0 #000,
    0 1px 0 #000, 0 -1px 0 #000, 1px 0 0 #000, -1px 0 0 #000;
  word-wrap: break-word;
  max-width: 72px;
  overflow-wrap: break-word;
  max-height: 30px;
  overflow: hidden;
}
.icon:hover .icon-label,
.icon:focus .icon-label,
.icon.selected .icon-label {
  background: #000080;
  text-shadow: none;
  outline: 1px dotted #fff;
  outline-offset: -1px;
}
.empty {
  color: white;
  font-size: 12px;
  padding: 12px;
  text-shadow: 1px 1px 0 #000;
}

/* Taskbar */
.taskbar {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: 30px;
  background: #c0c0c0;
  border-top: 1px solid #dfdfdf;
  box-shadow: inset 0 1px 0 #fff;
  display: flex;
  align-items: center;
  padding: 2px 4px;
  gap: 4px;
  z-index: 10;
}
.start-btn {
  font-weight: bold;
  min-width: 64px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0 6px;
}
.start-flag {
  width: 18px;
  height: 16px;
  display: inline-block;
  vertical-align: middle;
  margin-right: 2px;
}
.tray {
  margin-left: auto;
  display: inline-flex;
  gap: 4px;
  align-items: center;
  height: 22px;
  padding: 0 6px;
  border: 1px solid #808080;
  box-shadow: inset 1px 1px 0 #000, inset -1px -1px 0 #fff;
  background: #c0c0c0;
}
.tray .tray-btn {
  background: transparent;
  border: 0;
  padding: 0 2px;
  cursor: pointer;
  font-size: 13px;
  line-height: 1;
}
.tray .tray-btn:hover { background: rgba(0,0,64,0.15); }
.clock {
  font-size: 11px;
  padding: 0 4px;
  min-width: 50px;
  text-align: center;
}

/* Start menu */
.start-menu {
  position: fixed;
  bottom: 30px;
  left: 2px;
  width: 200px;
  background: #c0c0c0;
  border: 1px solid #000;
  box-shadow: inset 1px 1px 0 #fff, inset -1px -1px 0 #808080;
  padding: 2px;
  display: none;
  z-index: 50;
}
.start-menu.open { display: block; }
.start-menu .banner {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 22px;
  background: linear-gradient(to top, #000080, #1084d0);
  color: #c0c0c0;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  text-align: center;
  font-weight: bold;
  font-size: 14px;
  padding: 6px 2px;
  letter-spacing: 2px;
}
.start-menu ul {
  list-style: none;
  margin: 0;
  padding: 4px 4px 4px 26px;
}
.start-menu li {
  padding: 5px 8px;
  font-size: 12px;
  cursor: default;
  user-select: none;
}
.start-menu li:hover {
  background: #000080;
  color: white;
}
.start-menu li .kb {
  float: right;
  color: #555;
  margin-left: 12px;
}
.start-menu li:hover .kb { color: #ccc; }

/* Marquee strip above taskbar */
.marquee-strip {
  position: fixed;
  bottom: 30px;
  left: 0; right: 0;
  height: 24px;
  background: #000;
  color: #fff200;
  font-family: "Courier New", monospace;
  font-size: 12px;
  border-top: 1px solid #fff200;
  display: flex;
  align-items: center;
  padding: 0 8px;
  gap: 12px;
  z-index: 9;
}
.marquee-strip marquee { flex: 1; }
.visits {
  display: inline-flex;
  background: #000;
  color: #0f0;
  border: 1px inset #444;
  font-family: "Courier New", monospace;
  padding: 1px 6px;
  letter-spacing: 2px;
}
.countdown {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #000;
  color: #ff5050;
  border: 1px inset #444;
  font-family: "Courier New", monospace;
  padding: 1px 8px;
  letter-spacing: 1px;
  white-space: nowrap;
  font-size: 11px;
  text-shadow: 0 0 4px rgba(255, 60, 60, 0.45);
}
.countdown .cd-label {
  color: #ffaa00;
  font-weight: bold;
  letter-spacing: 2px;
}
.countdown .cd-time { color: #ff5050; font-weight: bold; }
.countdown.live .cd-time,
.countdown.live .cd-label { color: #00ff66; animation: cd-blink 0.9s steps(2, start) infinite; }
@keyframes cd-blink { to { opacity: 0.55; } }
.construction {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #ffaa00;
  font-weight: bold;
  font-size: 11px;
  text-transform: uppercase;
  white-space: nowrap;
}

/* Clippy */
.clippy {
  position: fixed;
  right: 20px;
  bottom: 64px;
  width: 200px;
  z-index: 40;
  user-select: none;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}
.clippy.hidden { display: none; }
.clippy .bubble {
  position: relative;
  background: #ffffcc;
  border: 1px solid #000;
  padding: 8px 10px;
  font-size: 11px;
  box-shadow: 2px 2px 0 rgba(0,0,0,0.3);
  margin-bottom: 4px;
  width: 184px;
  line-height: 1.3;
  box-sizing: border-box;
}
.clippy .bubble .close {
  position: absolute;
  top: 3px;
  right: 4px;
  background: transparent;
  border: 0;
  font-size: 11px;
  width: 14px;
  height: 14px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  font-family: Arial, sans-serif;
  font-weight: bold;
  color: #999;
}
.clippy .bubble .close:hover { color: #000; }
.clippy .bubble::after {
  content: "";
  position: absolute;
  right: 40px;
  bottom: -8px;
  border: 8px solid transparent;
  border-top-color: #000;
  border-bottom: 0;
}
.clippy .bubble::before {
  content: "";
  position: absolute;
  right: 41px;
  bottom: -6px;
  border: 7px solid transparent;
  border-top-color: #ffffcc;
  border-bottom: 0;
  z-index: 1;
}
.clippy .avatar {
  width: 92px;
  height: 112px;
  cursor: pointer;
  image-rendering: pixelated;
}

/* Windows (My Computer, Network Neighborhood, etc.) */
.win {
  position: absolute;
  background: #c0c0c0;
  border: 1px solid #000;
  box-shadow:
    inset 1px 1px 0 #dfdfdf,
    inset -1px -1px 0 #808080,
    2px 2px 0 rgba(0,0,0,0.25);
  min-width: 280px;
  z-index: 20;
  display: none;
}
.win.open { display: block; }
.win .title-bar {
  background: linear-gradient(90deg, #000080, #1084d0);
  color: #fff;
  padding: 2px 4px;
  font-weight: bold;
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 4px;
  cursor: move;
  user-select: none;
}
.win .title-bar .title-bar-text { flex: 1; }
.win .title-bar button {
  width: 18px;
  height: 16px;
  font-family: "Marlett", "Segoe UI Symbol", monospace;
  font-size: 10px;
  line-height: 1;
  border: 1px outset #fff;
  background: #c0c0c0;
  color: #000;
  cursor: pointer;
  padding: 0;
  font-weight: bold;
}
.win .menubar {
  border-bottom: 1px solid #808080;
  padding: 2px 4px;
  font-size: 11px;
  background: #c0c0c0;
  display: flex;
  gap: 8px;
}
.win .menubar span { cursor: default; padding: 1px 4px; }
.win .menubar span:hover { background: #000080; color: white; }
.win .body {
  padding: 10px;
  background: #fff;
  margin: 2px;
  border: 1px inset #808080;
  min-height: 140px;
  font-size: 12px;
}
.win .statusbar {
  padding: 2px 6px;
  font-size: 11px;
  border-top: 1px solid #808080;
  background: #c0c0c0;
  display: flex;
  justify-content: space-between;
}

.dir-listing {
  display: grid;
  grid-template-columns: repeat(auto-fill, 80px);
  gap: 10px;
}
.dir-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 11px;
  text-align: center;
  cursor: default;
  user-select: none;
  padding: 2px;
}
.dir-item .glyph {
  font-size: 32px;
  line-height: 1;
  margin-bottom: 2px;
}
.dir-item:hover { background: #000080; color: white; }

/* InstallShield dialog */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.25);
  display: none;
  z-index: 100;
  align-items: center;
  justify-content: center;
}
.modal-backdrop.open { display: flex; }
.install-dialog {
  background: #c0c0c0;
  border: 1px solid #000;
  box-shadow: inset 1px 1px 0 #dfdfdf, inset -1px -1px 0 #808080;
  width: 420px;
}
.install-dialog .title-bar {
  background: linear-gradient(90deg, #000080, #1084d0);
  color: white;
  padding: 2px 4px;
  font-weight: bold;
  font-size: 12px;
}
.install-dialog .body {
  padding: 18px 18px 14px;
  font-size: 12px;
}
.install-dialog .label {
  margin-bottom: 10px;
}
.progress-outer {
  border: 1px inset #808080;
  background: #fff;
  height: 20px;
  padding: 1px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: repeating-linear-gradient(
    90deg, #000080 0 12px, #c0c0c0 12px 14px
  );
  width: 0%;
  transition: width 0.15s linear;
}

/* BSOD */
.bsod {
  position: fixed;
  inset: 0;
  background: #0000aa;
  color: #c0c0c0;
  font-family: "Courier New", "Perfect DOS VGA 437", monospace;
  font-size: 15px;
  padding: 24px 40px;
  z-index: 9999;
  display: none;
  white-space: pre-wrap;
  overflow: auto;
}
.bsod.open { display: block; }
.bsod .hdr {
  background: #c0c0c0;
  color: #0000aa;
  padding: 0 8px;
  display: inline-block;
  margin-bottom: 16px;
  font-weight: bold;
}

/* Context menu */
.ctx-menu {
  position: fixed;
  background: #c0c0c0;
  border: 1px solid #000;
  box-shadow: inset 1px 1px 0 #fff, inset -1px -1px 0 #808080;
  padding: 2px;
  display: none;
  z-index: 200;
  min-width: 150px;
}
.ctx-menu.open { display: block; }
.ctx-menu .ctx-item {
  padding: 4px 16px;
  font-size: 12px;
  user-select: none;
  cursor: default;
}
.ctx-menu .ctx-item:hover { background: #000080; color: white; }
.ctx-menu hr { border: 0; border-top: 1px solid #808080; margin: 2px 0; }

/* Display Properties dialog body */
.dp-preview {
  width: 100%;
  height: 110px;
  border: 1px inset #808080;
  margin-bottom: 10px;
}
.dp-form { font-size: 12px; }
.dp-form label { display: block; margin-bottom: 4px; }
.dp-form select { font-size: 12px; padding: 2px 4px; width: 200px; }
.dp-buttons { margin-top: 14px; display: flex; gap: 6px; justify-content: flex-end; }
.dp-buttons button {
  min-width: 72px;
  padding: 4px 10px;
  font-size: 12px;
  background: #c0c0c0;
  border: 1px outset #fff;
  cursor: pointer;
}

/* pr0n folder prank */
.icon.pr0n-icon {
  position: absolute;
  left: 50%;
  top: 42%;
  transform: translate(-50%, -50%);
  z-index: 4;
}
.popz {
  position: fixed;
  background: #c0c0c0;
  border: 1px solid #000;
  box-shadow:
    inset 1px 1px 0 #dfdfdf,
    inset -1px -1px 0 #808080,
    3px 3px 0 rgba(0,0,0,0.4);
  z-index: 500;
  font-family: "MS Sans Serif", "Pixelated MS Sans Serif", Arial, sans-serif;
  font-size: 11px;
  user-select: none;
  animation: popz-pop 0.18s ease-out;
  box-sizing: border-box;
}
@keyframes popz-pop {
  from { transform: scale(0.7) rotate(var(--r, 0deg)); opacity: 0.2; }
  to   { opacity: 1; }
}
.popz .bar {
  color: #fff;
  padding: 2px 4px;
  display: flex;
  align-items: center;
  gap: 4px;
  font-weight: bold;
  font-size: 11px;
  text-shadow: 1px 1px 0 rgba(0,0,0,0.4);
}
.popz .bar-text {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.popz .bar button {
  background: #c0c0c0;
  border: 1px outset #fff;
  width: 16px;
  height: 14px;
  padding: 0;
  cursor: pointer;
  font-size: 10px;
  color: #000;
  font-weight: bold;
  font-family: Arial, sans-serif;
  min-width: 0;
  min-height: 0;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.popz .bar .popz-min { position: relative; }
.popz .bar .popz-min::before {
  content: "";
  position: absolute;
  left: 3px; right: 3px; bottom: 3px;
  height: 2px;
  background: #000;
}
.popz .body {
  background: #fff;
  margin: 2px;
  border: 1px inset #808080;
  overflow: hidden;
}
.popz .popz-btn {
  padding: 3px 12px;
  background: #c0c0c0;
  border: 1px outset #fff;
  cursor: pointer;
  font-family: inherit;
  font-size: 11px;
}
.popz .popz-btn:active { border-style: inset; }

.blink-text { animation: blink 0.55s steps(2, start) infinite; }
@keyframes blink { to { opacity: 0.25; } }
.wobble { display: inline-block; animation: wobble 0.6s ease-in-out infinite; }
@keyframes wobble {
  0%, 100% { transform: rotate(-8deg); }
  50%      { transform: rotate(8deg); }
}

/* Minesweeper — authentic Win98 bevels */
.ms {
  background: #c0c0c0;
  padding: 6px;
  display: inline-block;
  user-select: none;
  box-shadow:
    inset 1px 1px 0 #fff,
    inset -1px -1px 0 #808080,
    inset 2px 2px 0 #dfdfdf,
    inset -2px -2px 0 #404040;
  border: 1px solid #000;
}
.ms-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 6px;
  margin-bottom: 6px;
  background: #c0c0c0;
  box-shadow:
    inset 1px 1px 0 #808080,
    inset -1px -1px 0 #fff,
    inset 2px 2px 0 #404040,
    inset -2px -2px 0 #dfdfdf;
}
.ms-score {
  background: #000;
  color: #ff0000;
  font-family: "Courier New", "Consolas", monospace;
  font-size: 22px;
  line-height: 22px;
  padding: 1px 3px;
  letter-spacing: 2px;
  min-width: 44px;
  text-align: right;
  font-weight: bold;
  box-shadow:
    inset 1px 1px 0 #404040,
    inset -1px -1px 0 #fff;
  text-shadow: 0 0 2px rgba(255,0,0,0.35);
}
.ms-face {
  width: 26px; height: 26px;
  background: #c0c0c0;
  cursor: pointer;
  font-size: 18px;
  line-height: 20px;
  padding: 0;
  text-align: center;
  border: 0;
  box-shadow:
    inset 1px 1px 0 #fff,
    inset -1px -1px 0 #808080,
    inset 2px 2px 0 #dfdfdf,
    inset -2px -2px 0 #404040;
}
.ms-face:active {
  box-shadow:
    inset 1px 1px 0 #808080,
    inset -1px -1px 0 #fff,
    inset 2px 2px 0 #404040,
    inset -2px -2px 0 #dfdfdf;
  font-size: 17px;
}
.ms-grid {
  display: grid;
  grid-template-columns: repeat(9, 16px);
  grid-auto-rows: 16px;
  background: #c0c0c0;
  box-shadow:
    inset 1px 1px 0 #808080,
    inset -1px -1px 0 #fff,
    inset 2px 2px 0 #404040,
    inset -2px -2px 0 #dfdfdf;
  padding: 3px;
  width: fit-content;
}
.ms-cell {
  width: 16px; height: 16px;
  background: #c0c0c0;
  font-family: "Courier New", monospace;
  font-size: 12px;
  line-height: 12px;
  text-align: center;
  font-weight: bold;
  cursor: pointer;
  box-sizing: border-box;
  padding: 0;
  border: 0;
  box-shadow:
    inset 1px 1px 0 #fff,
    inset -1px -1px 0 #808080,
    inset 2px 2px 0 #dfdfdf,
    inset -2px -2px 0 #404040;
}
.ms-cell.open {
  background: #c0c0c0;
  cursor: default;
  box-shadow: inset 0 0 0 1px #808080;
}
.ms-cell.bomb { background: #ff0000; }
.ms-cell.flag::after { content: "⚑"; color: #c00; font-size: 11px; }
.ms-cell.wrong::after { content: "✕"; color: #000; }
.ms-cell[data-n="1"] { color: #0000ff; }
.ms-cell[data-n="2"] { color: #008000; }
.ms-cell[data-n="3"] { color: #ff0000; }
.ms-cell[data-n="4"] { color: #000080; }
.ms-cell[data-n="5"] { color: #800000; }
.ms-cell[data-n="6"] { color: #008080; }
.ms-cell[data-n="7"] { color: #000000; }
.ms-cell[data-n="8"] { color: #808080; }
