* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  font-family: "MS Sans Serif", Tahoma, Verdana, sans-serif;
  background: teal;
  color: #000;
}

.scanlines .desktop::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.05) 0,
    rgba(0, 0, 0, 0.05) 1px,
    rgba(0, 0, 0, 0) 2px,
    rgba(0, 0, 0, 0) 4px
  );
}

.party-mode .desktop {
  animation: party-pulse 1.8s linear infinite;
}

body.virus-mode .desktop {
  animation: virus-jitter 120ms steps(2) infinite;
  filter: saturate(1.55) contrast(1.1) hue-rotate(-20deg);
}

@keyframes virus-jitter {
  0% { transform: translate(0, 0); }
  25% { transform: translate(2px, -1px); }
  50% { transform: translate(-2px, 1px); }
  75% { transform: translate(1px, 2px); }
  100% { transform: translate(0, 0); }
}

@keyframes party-pulse {
  0% { filter: hue-rotate(0deg) saturate(1); }
  50% { filter: hue-rotate(28deg) saturate(1.3); }
  100% { filter: hue-rotate(0deg) saturate(1); }
}

.cookie-banner {
  background: #ffffe1;
  border-bottom: 1px solid #808080;
  padding: 8px 10px;
  font-size: 14px;
}

.cookie-banner.hidden {
  display: none;
}

.cookie-banner button {
  margin-left: 8px;
  font-family: inherit;
  border: 2px solid #fff;
  border-right-color: #444;
  border-bottom-color: #444;
  background: #c0c0c0;
  padding: 1px 8px;
}

.skip-links {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 100;
  font-size: 13px;
}

.skip-links a {
  position: absolute;
  left: -9999px;
  top: 0;
  background: #ffffe1;
  border: 2px solid #fff;
  border-right-color: #444;
  border-bottom-color: #444;
  padding: 6px 8px;
  text-decoration: none;
}

.skip-links a:focus {
  left: 8px;
}

.skip-links a:nth-child(2):focus {
  top: 36px;
}

.skip-links a:nth-child(3):focus {
  top: 72px;
}

.desktop {
  position: relative;
  min-height: calc(100vh - 42px);
  padding: 26px;
  background-image: radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.08), transparent 40%);
}

.desktop-icons {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

.desktop-icon {
  position: absolute;
  width: 90px;
  color: #fff;
  text-decoration: none;
  text-align: center;
  padding: 4px;
  user-select: none;
  pointer-events: auto;
}

.desktop-icon:hover {
  background: rgba(0, 0, 128, 0.5);
  color: #fff;
}

.pixel-desktop-icon {
  display: block;
  width: 32px;
  height: 32px;
  margin: 0 auto;
  image-rendering: pixelated;
  background-repeat: no-repeat;
  background-position: center;
}

.pixel-my-computer {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' shape-rendering='crispEdges'%3E%3Crect x='5' y='6' width='22' height='14' fill='%23000'/%3E%3Crect x='7' y='8' width='18' height='10' fill='%23c0c0c0'/%3E%3Crect x='10' y='21' width='12' height='2' fill='%23000'/%3E%3Crect x='8' y='23' width='16' height='3' fill='%23000'/%3E%3Crect x='11' y='24' width='10' height='1' fill='%23c0c0c0'/%3E%3C/svg%3E");
}

.pixel-recycle-bin {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' shape-rendering='crispEdges'%3E%3Crect x='10' y='6' width='12' height='2' fill='%23000'/%3E%3Crect x='9' y='8' width='14' height='2' fill='%23000'/%3E%3Crect x='10' y='10' width='12' height='14' fill='%23000'/%3E%3Crect x='11' y='11' width='10' height='12' fill='%23c0c0c0'/%3E%3Crect x='13' y='13' width='1' height='8' fill='%23000'/%3E%3Crect x='16' y='13' width='1' height='8' fill='%23000'/%3E%3Crect x='19' y='13' width='1' height='8' fill='%23000'/%3E%3C/svg%3E");
}

.pixel-shortcut {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' shape-rendering='crispEdges'%3E%3Crect x='8' y='5' width='16' height='22' fill='%23000'/%3E%3Crect x='10' y='7' width='12' height='18' fill='%23fff'/%3E%3Crect x='12' y='10' width='8' height='1' fill='%23000'/%3E%3Crect x='12' y='13' width='8' height='1' fill='%23000'/%3E%3Crect x='12' y='16' width='8' height='1' fill='%23000'/%3E%3Crect x='5' y='20' width='9' height='7' fill='%23000'/%3E%3Crect x='6' y='21' width='7' height='5' fill='%230080ff'/%3E%3Crect x='7' y='22' width='2' height='1' fill='%23fff'/%3E%3Crect x='9' y='23' width='2' height='1' fill='%23fff'/%3E%3C/svg%3E");
}

.desktop-icon-label {
  display: block;
  font-size: 12px;
  margin-top: 3px;
}

.window {
  position: relative;
  max-width: 760px;
  margin: 0 auto;
  background: #c0c0c0;
  border: 2px solid #fff;
  border-right-color: #444;
  border-bottom-color: #444;
  box-shadow: 2px 2px 0 #000;
  z-index: 3;
}

.window.floating {
  position: fixed;
  margin: 0;
  width: min(760px, calc(100vw - 12px));
}

.window.maximized {
  max-width: none;
  width: 100%;
  min-height: 100%;
  margin: 0;
}

.window.minimized nav,
.window.minimized .window-content {
  display: none;
}

.window.closed {
  display: none;
}

.titlebar {
  background: linear-gradient(to right, #000080, #1084d0);
  color: #fff;
  padding: 6px 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: bold;
}

.window-buttons {
  display: flex;
  gap: 3px;
}

.btn {
  width: 20px;
  height: 18px;
  line-height: 14px;
  text-align: center;
  font-size: 11px;
  background: #c0c0c0;
  border: 1px solid #fff;
  border-right-color: #444;
  border-bottom-color: #444;
  color: #000;
  cursor: pointer;
  font-family: inherit;
  padding: 0;
}

.window-content {
  padding: 18px;
}

.statusbar {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 4px 8px;
  background: #c0c0c0;
  border-top: 2px solid #7f7f7f;
  border-left: 2px solid #fff;
  font-size: 12px;
}

.top-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 12px;
  border-bottom: 2px solid #7f7f7f;
  background: #b8b8b8;
}

.top-nav a {
  padding: 3px 8px;
  border: 1px solid #fff;
  border-right-color: #555;
  border-bottom-color: #555;
  color: #000;
  text-decoration: none;
}

.top-nav a:hover {
  background: #d6d6d6;
}

h1,
h2 {
  margin-top: 0;
}

.panel {
  margin: 14px 0;
  padding: 12px;
  background: #c0c0c0;
  border: 2px solid #fff;
  border-right-color: #6b6b6b;
  border-bottom-color: #6b6b6b;
}

.hero-profile {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.profile-photo {
  width: 170px;
  max-width: 42vw;
  height: auto;
  border: 2px solid #fff;
  border-right-color: #555;
  border-bottom-color: #555;
  background: #a9a9a9;
  object-fit: cover;
}

.field {
  margin: 8px 0;
}

.field-label {
  display: inline-block;
  min-width: 120px;
  font-weight: bold;
}

.retro-form input,
.retro-form textarea {
  width: 100%;
  max-width: 100%;
  font-family: inherit;
  font-size: 14px;
  padding: 6px;
  border: 2px solid #7f7f7f;
  border-right-color: #fff;
  border-bottom-color: #fff;
  background: #fff;
}

.retro-form textarea {
  resize: vertical;
}

.retro-btn {
  font-family: inherit;
  font-weight: bold;
  border: 2px solid #fff;
  border-right-color: #444;
  border-bottom-color: #444;
  background: #c0c0c0;
  padding: 5px 16px;
  cursor: pointer;
}

a {
  color: #000080;
}

a:hover {
  color: #f00;
}

.taskbar {
  height: 42px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 8px;
  background: #c0c0c0;
  border-top: 2px solid #fff;
}

.start-btn {
  font-family: inherit;
  font-weight: bold;
  background: #c0c0c0;
  border: 2px solid #fff;
  border-right-color: #444;
  border-bottom-color: #444;
  padding: 4px 12px;
  cursor: pointer;
}

.start-btn.pressed {
  border: 2px solid #444;
  border-right-color: #fff;
  border-bottom-color: #fff;
  background: #b3b3b3;
}

.start-menu {
  position: fixed;
  left: 8px;
  bottom: 44px;
  width: 220px;
  background: #c0c0c0;
  border: 2px solid #fff;
  border-right-color: #444;
  border-bottom-color: #444;
  box-shadow: 2px 2px 0 #000;
  display: none;
  z-index: 20;
}

.start-menu.open {
  display: block;
}

.start-menu-head {
  background: linear-gradient(to bottom, #000080, #1084d0);
  color: #fff;
  font-weight: bold;
  padding: 8px;
}

.start-menu a {
  display: block;
  text-decoration: none;
  color: #000;
  padding: 7px 10px;
  border-top: 1px solid #fff;
  border-bottom: 1px solid #8b8b8b;
}

.start-menu a:hover {
  background: #000080;
  color: #fff;
}

.start-menu-action {
  display: block;
  width: 100%;
  text-align: left;
  font-family: inherit;
  font-size: 14px;
  color: #000;
  background: #c0c0c0;
  border: none;
  border-top: 1px solid #8b8b8b;
  padding: 7px 10px;
  cursor: pointer;
}

.start-menu-action:hover {
  background: #000080;
  color: #fff;
}

.desktop-menu {
  position: fixed;
  background: #c0c0c0;
  border: 2px solid #fff;
  border-right-color: #444;
  border-bottom-color: #444;
  box-shadow: 2px 2px 0 #000;
  min-width: 175px;
  display: none;
  z-index: 35;
}

.desktop-menu.open {
  display: block;
}

.desktop-menu button {
  display: block;
  width: 100%;
  text-align: left;
  font-family: inherit;
  background: #c0c0c0;
  border: none;
  padding: 7px 10px;
  cursor: pointer;
}

.desktop-menu button:hover {
  background: #000080;
  color: #fff;
}

.boot-screen {
  position: fixed;
  inset: 0;
  background: #000;
  color: #fff;
  display: none;
  z-index: 45;
}

.boot-screen.show {
  display: grid;
  place-items: center;
}

.boot-inner {
  width: min(420px, 90vw);
  text-align: center;
  font-family: "Courier New", monospace;
}

.boot-bar {
  height: 18px;
  border: 2px solid #fff;
  margin-top: 10px;
  padding: 1px;
}

.boot-bar span {
  display: block;
  width: 0;
  height: 100%;
  background: #c0c0c0;
}

.secret-toast {
  position: fixed;
  right: 14px;
  bottom: 56px;
  background: #ffffe1;
  border: 2px solid #fff;
  border-right-color: #555;
  border-bottom-color: #555;
  box-shadow: 2px 2px 0 #000;
  padding: 8px 12px;
  font-size: 13px;
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity 120ms ease, transform 120ms ease;
  z-index: 40;
}

.secret-toast.show {
  opacity: 1;
  transform: translateY(0);
}

.bsod {
  position: fixed;
  inset: 0;
  background: #0000aa;
  color: #fff;
  display: none;
  z-index: 50;
  cursor: pointer;
}

.bsod.show {
  display: block;
}

.bsod-inner {
  max-width: 780px;
  margin: 14vh auto 0;
  padding: 16px;
  font-family: "Courier New", monospace;
  font-size: 20px;
  line-height: 1.45;
}

.virus-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 44;
  display: none;
}

.virus-layer.show {
  display: block;
}

.virus-popup {
  position: absolute;
  width: 240px;
  background: #c0c0c0;
  border: 2px solid #fff;
  border-right-color: #444;
  border-bottom-color: #444;
  box-shadow: 2px 2px 0 #000;
  pointer-events: auto;
}

.virus-popup-title {
  background: linear-gradient(to right, #000080, #1084d0);
  color: #fff;
  font-weight: bold;
  padding: 4px 6px;
  font-size: 13px;
}

.virus-popup-body {
  padding: 8px;
  font-size: 13px;
  line-height: 1.35;
}

.virus-popup-btn {
  margin: 0 8px 8px;
  font-family: inherit;
  border: 2px solid #fff;
  border-right-color: #444;
  border-bottom-color: #444;
  background: #c0c0c0;
  padding: 3px 9px;
}

.system-dialog {
  position: fixed;
  top: 95px;
  left: 120px;
  width: min(380px, calc(100vw - 24px));
  background: #c0c0c0;
  border: 2px solid #fff;
  border-right-color: #444;
  border-bottom-color: #444;
  box-shadow: 2px 2px 0 #000;
  display: none;
  z-index: 42;
}

.system-dialog.show {
  display: block;
}

.system-dialog-title {
  background: linear-gradient(to right, #000080, #1084d0);
  color: #fff;
  padding: 5px 8px;
  font-weight: bold;
}

.system-dialog-body {
  padding: 10px;
  font-size: 14px;
}

.system-dialog-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.system-dialog-links a {
  text-decoration: none;
  color: #000;
  border: 1px solid #fff;
  border-right-color: #666;
  border-bottom-color: #666;
  padding: 3px 7px;
  background: #c0c0c0;
}

.system-dialog-links a:hover {
  background: #d6d6d6;
}

.system-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 0 10px 10px;
}

.taskbar-title {
  flex: 1;
  border: 2px solid #7f7f7f;
  border-right-color: #fff;
  border-bottom-color: #fff;
  background: #b3b3b3;
  padding: 4px 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: left;
  font-family: inherit;
  font-size: 14px;
}

.taskbar-title-inactive {
  color: #4b4b4b;
}

.tray {
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 2px 4px;
  border: 2px solid #7f7f7f;
  border-right-color: #fff;
  border-bottom-color: #fff;
  background: #b3b3b3;
}

.tray-icon {
  width: 22px;
  height: 20px;
  padding: 0;
  border: 1px solid #fff;
  border-right-color: #666;
  border-bottom-color: #666;
  background: #c0c0c0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.tray-icon:active {
  border: 1px solid #666;
  border-right-color: #fff;
  border-bottom-color: #fff;
}

.pixel-icon {
  width: 16px;
  height: 16px;
  display: block;
  image-rendering: pixelated;
  background-repeat: no-repeat;
  background-position: center;
}

.pixel-volume {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' shape-rendering='crispEdges'%3E%3Crect x='1' y='6' width='2' height='4' fill='%23000'/%3E%3Crect x='3' y='5' width='2' height='6' fill='%23000'/%3E%3Crect x='5' y='4' width='2' height='8' fill='%23000'/%3E%3Crect x='9' y='5' width='1' height='1' fill='%23000'/%3E%3Crect x='10' y='6' width='1' height='1' fill='%23000'/%3E%3Crect x='11' y='7' width='1' height='2' fill='%23000'/%3E%3Crect x='10' y='9' width='1' height='1' fill='%23000'/%3E%3Crect x='9' y='10' width='1' height='1' fill='%23000'/%3E%3Crect x='12' y='4' width='1' height='1' fill='%23000'/%3E%3Crect x='13' y='5' width='1' height='1' fill='%23000'/%3E%3Crect x='14' y='6' width='1' height='4' fill='%23000'/%3E%3Crect x='13' y='10' width='1' height='1' fill='%23000'/%3E%3Crect x='12' y='11' width='1' height='1' fill='%23000'/%3E%3C/svg%3E");
}

.tray-volume.is-muted .pixel-volume {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' shape-rendering='crispEdges'%3E%3Crect x='1' y='6' width='2' height='4' fill='%23000'/%3E%3Crect x='3' y='5' width='2' height='6' fill='%23000'/%3E%3Crect x='5' y='4' width='2' height='8' fill='%23000'/%3E%3Crect x='9' y='9' width='1' height='1' fill='%23000'/%3E%3Crect x='10' y='8' width='1' height='1' fill='%23000'/%3E%3Crect x='11' y='7' width='1' height='1' fill='%23000'/%3E%3Crect x='12' y='6' width='1' height='1' fill='%23000'/%3E%3Crect x='12' y='10' width='1' height='1' fill='%23000'/%3E%3Crect x='11' y='9' width='1' height='1' fill='%23000'/%3E%3Crect x='10' y='8' width='1' height='1' fill='%23000'/%3E%3Crect x='9' y='7' width='1' height='1' fill='%23000'/%3E%3C/svg%3E");
}

.pixel-network {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' shape-rendering='crispEdges'%3E%3Crect x='2' y='10' width='3' height='3' fill='%23000'/%3E%3Crect x='6' y='10' width='3' height='3' fill='%23000'/%3E%3Crect x='3' y='9' width='1' height='1' fill='%23000'/%3E%3Crect x='7' y='9' width='1' height='1' fill='%23000'/%3E%3Crect x='4' y='8' width='4' height='1' fill='%23000'/%3E%3Crect x='9' y='4' width='5' height='1' fill='%23000'/%3E%3Crect x='9' y='6' width='1' height='4' fill='%23000'/%3E%3Crect x='11' y='5' width='1' height='5' fill='%23000'/%3E%3Crect x='13' y='7' width='1' height='3' fill='%23000'/%3E%3C/svg%3E");
}

.tray-network.is-offline .pixel-network {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' shape-rendering='crispEdges'%3E%3Crect x='2' y='10' width='3' height='3' fill='%23000'/%3E%3Crect x='6' y='10' width='3' height='3' fill='%23000'/%3E%3Crect x='3' y='9' width='1' height='1' fill='%23000'/%3E%3Crect x='7' y='9' width='1' height='1' fill='%23000'/%3E%3Crect x='4' y='8' width='4' height='1' fill='%23000'/%3E%3Crect x='10' y='4' width='1' height='1' fill='%23000'/%3E%3Crect x='11' y='5' width='1' height='1' fill='%23000'/%3E%3Crect x='12' y='6' width='1' height='1' fill='%23000'/%3E%3Crect x='13' y='7' width='1' height='1' fill='%23000'/%3E%3Crect x='13' y='4' width='1' height='1' fill='%23000'/%3E%3Crect x='12' y='5' width='1' height='1' fill='%23000'/%3E%3Crect x='11' y='6' width='1' height='1' fill='%23000'/%3E%3Crect x='10' y='7' width='1' height='1' fill='%23000'/%3E%3C/svg%3E");
}

.pixel-hardware {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' shape-rendering='crispEdges'%3E%3Crect x='2' y='3' width='12' height='10' fill='%23000'/%3E%3Crect x='3' y='4' width='10' height='4' fill='%23c0c0c0'/%3E%3Crect x='4' y='10' width='8' height='2' fill='%23c0c0c0'/%3E%3Crect x='11' y='10' width='1' height='1' fill='%2300aa00'/%3E%3C/svg%3E");
}

.clock {
  min-width: 64px;
  text-align: center;
  border: 2px solid #7f7f7f;
  border-right-color: #fff;
  border-bottom-color: #fff;
  background: #b3b3b3;
  padding: 4px 6px;
}

.site-footer {
  max-width: 760px;
  margin: 10px auto 14px;
  padding: 8px 12px;
  background: #c0c0c0;
  border: 2px solid #fff;
  border-right-color: #666;
  border-bottom-color: #666;
  font-size: 14px;
}

@media (max-width: 700px) {
  .hero-profile {
    flex-direction: column;
  }
}
