:root {
  --ink: #101010;
  --xp-blue: #245edc;
  --xp-blue-dark: #0b3ca8;
  --xp-green: #3caf2a;
  --xp-window: #ece9d8;
  --xp-border: #0831a2;
  --red: #e81123;
  --shadow: rgba(0, 0, 0, 0.35);
  --target-size: 92px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100dvh;
  font-family: Tahoma, Verdana, Arial, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 18% 18%, rgba(255, 255, 255, 0.35), transparent 26%),
    linear-gradient(135deg, #1c8fdd 0%, #2dba44 52%, #0d7a36 100%);
  overflow: hidden;
}

button {
  font: inherit;
}

.stage {
  height: 100dvh;
  display: grid;
  place-items: center;
  padding: 10px;
  overflow: hidden;
}

.xp-desktop {
  width: min(980px, calc(100vw - 20px));
  height: calc(100dvh - 20px);
  min-height: 0;
  display: grid;
  place-items: center;
  padding: 22px 18px 56px;
  position: relative;
  background:
    linear-gradient(135deg, rgba(255,255,255,0.25), transparent 35%),
    linear-gradient(160deg, #1688d2 0%, #54bd45 58%, #1f7f32 100%);
  border: 1px solid rgba(255,255,255,0.55);
  box-shadow: 0 22px 60px var(--shadow);
}

.taskbar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 42px;
  display: grid;
  grid-template-columns: 112px 1fr 92px;
  align-items: center;
  gap: 8px;
  padding: 4px 10px 4px 0;
  color: white;
  background: linear-gradient(#2e78f0, #0b4bc4 45%, #113da4);
  box-shadow: inset 0 2px 0 rgba(255,255,255,0.38);
  z-index: 30;
}

.start-button {
  height: 34px;
  border: 0;
  color: white;
  display: grid;
  place-items: center;
  border-radius: 0 18px 18px 0;
  background: linear-gradient(#79d86a, #258b19);
  box-shadow: inset 0 2px 0 rgba(255,255,255,0.55), 2px 0 5px rgba(0,0,0,0.35);
  font-size: 19px;
  font-style: italic;
  font-weight: 900;
  text-shadow: 1px 1px 1px #073b07;
  cursor: pointer;
}

.task-button,
.clock {
  height: 28px;
  display: flex;
  align-items: center;
  padding: 0 10px;
  border: 1px solid rgba(255,255,255,0.35);
  background: rgba(255,255,255,0.12);
  box-shadow: inset 1px 1px 0 rgba(255,255,255,0.25);
  font-size: 12px;
}

.clock {
  justify-content: center;
}

.desktop-icon {
  position: absolute;
  left: 34px;
  top: 34px;
  width: 118px;
  min-height: 92px;
  border: 1px solid transparent;
  color: white;
  background: transparent;
  display: grid;
  justify-items: center;
  gap: 6px;
  padding: 7px 5px;
  cursor: pointer;
  text-shadow: 1px 1px 2px #000;
}

.desktop-icon:hover,
.desktop-icon:focus-visible {
  border-color: rgba(255,255,255,0.55);
  background: rgba(29, 93, 211, 0.35);
  outline: 0;
}

.icon-box {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  color: #ffd500;
  background: linear-gradient(#3ca0ff, #124fbf);
  border: 2px solid #fff;
  border-radius: 8px;
  box-shadow: 2px 3px 8px rgba(0,0,0,0.35);
  font-family: Georgia, serif;
  font-size: 32px;
  font-weight: 900;
}

.icon-box.tiny {
  width: 24px;
  height: 24px;
  border-radius: 4px;
  font-size: 16px;
  margin-right: 8px;
}

.desktop-icon b {
  max-width: 110px;
  font-size: 12px;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.settings-icon {
  top: 138px;
}

.codes-icon {
  top: 242px;
}

.trophy-icon {
  top: 346px;
  pointer-events: none;
}

.trash-icon {
  inset: auto 18px 58px auto;
}

.trash-icon.is-locked .trash-box::after {
  content: "";
  position: absolute;
  right: -7px;
  bottom: -5px;
  width: 15px;
  height: 13px;
  border: 2px solid #2d2300;
  border-radius: 2px;
  background: #ffd43b;
  box-shadow: inset 0 0 0 1px #fff2a2;
}

.trash-icon.is-locked .trash-box::before {
  content: "";
  position: absolute;
  z-index: 1;
  right: -3px;
  bottom: 9px;
  width: 9px;
  height: 9px;
  border: 2px solid #2d2300;
  border-bottom: 0;
  border-radius: 7px 7px 0 0;
}

.code-icon {
  color: #39ff88;
  background: linear-gradient(#1f2937, #05070b);
  font-family: "Courier New", monospace;
  font-size: 18px;
}

.trophy-box {
  color: #3a2400;
  background:
    linear-gradient(135deg, transparent 0 30%, #1f1f1f 30% 48%, transparent 48%),
    linear-gradient(#ffe78a, #d89b16);
  border-color: #fff5bd;
  font-size: 0;
}

.trophy-box::before {
  content: "";
  width: 31px;
  height: 18px;
  background: #111;
  clip-path: polygon(50% 0, 100% 28%, 50% 56%, 0 28%);
  box-shadow: 0 13px 0 -5px #f2c84c;
}

.trash-box {
  position: relative;
  background: linear-gradient(135deg, #edf7ff, #8cb7d7);
  border-color: #fff;
}

.trash-box::before {
  content: "";
  width: 24px;
  height: 27px;
  border: 2px solid #154d76;
  border-top-width: 4px;
  border-radius: 2px 2px 6px 6px;
  background: repeating-linear-gradient(90deg, #d7efff 0 4px, #7daccc 4px 7px);
  box-shadow: 0 -6px 0 -2px #154d76;
}

.settings-window {
  width: min(340px, 86vw);
}

.settings-body {
  padding: 14px;
  background: #f7f5e9;
}

.codes-window,
.stage-select-window,
.trash-unlock-window,
.trash-window {
  position: absolute;
  z-index: 18;
}

.codes-window {
  width: min(390px, 88vw);
  left: clamp(150px, 24vw, 250px);
  top: 92px;
}

.codes-body,
.stage-select-body {
  padding: 12px;
  background: #f7f5e9;
}

.codes-body label {
  display: block;
  margin-bottom: 6px;
  font-size: 12px;
  font-weight: 700;
}

.code-entry {
  display: grid;
  grid-template-columns: 1fr 72px;
  gap: 8px;
}

.code-entry input,
.captcha-card input {
  min-height: 32px;
  padding: 6px 8px;
  border: 1px solid #777;
  background: white;
  font: 14px "Courier New", monospace;
}

.code-entry button,
.captcha-card button,
.stage-choice {
  border: 1px solid #777;
  border-radius: 3px;
  background: linear-gradient(#fff, #d8d2bd);
  box-shadow: inset 1px 1px 0 #fff, inset -1px -1px 0 #777;
  cursor: pointer;
}

#code-status {
  min-height: 34px;
  margin: 10px 0 0;
  padding: 8px;
  background: white;
  border: 1px solid #b9b088;
  font-size: 12px;
  font-weight: 700;
}

.stage-select-window {
  width: min(430px, 88vw);
  right: clamp(18px, 8vw, 80px);
  top: 126px;
}

.trash-unlock-window,
.trash-window {
  width: min(400px, 88vw);
  right: clamp(18px, 11vw, 120px);
  bottom: 92px;
}

.trash-unlock-body,
.trash-body,
.reset-body {
  padding: 14px;
  background: #f7f5e9;
}

.trash-unlock-body > p:first-child {
  margin: 0 0 12px;
  font-size: 13px;
}

.trash-unlock-body label {
  display: block;
  margin-bottom: 5px;
  font-size: 12px;
  font-weight: 700;
}

.trash-unlock-body input {
  width: 100%;
  min-height: 32px;
  padding: 6px 8px;
  border: 1px solid #777;
  background: white;
  font: 14px "Courier New", monospace;
}

.window-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 12px;
}

.window-actions button {
  min-width: 76px;
  min-height: 28px;
  border: 1px solid #777;
  border-radius: 3px;
  background: linear-gradient(#fff, #d8d2bd);
  box-shadow: inset 1px 1px 0 #fff, inset -1px -1px 0 #777;
  cursor: pointer;
}

.window-actions button:focus-visible {
  outline: 2px solid #1f55bd;
  outline-offset: 1px;
}

.unlock-status {
  min-height: 16px;
  margin: 8px 0 0;
  color: #b00000;
  font-size: 12px;
  font-weight: 700;
}

.trash-location {
  margin: -14px -14px 12px;
  padding: 7px 10px;
  border-bottom: 1px solid #aaa;
  background: white;
  font-size: 12px;
}

.text-file {
  width: 90px;
  display: grid;
  justify-items: center;
  gap: 5px;
  padding: 8px;
  color: #111;
  text-align: center;
  text-decoration: none;
  font-size: 12px;
}

.text-file:hover,
.text-file:focus-visible {
  color: white;
  background: #245edc;
  outline: 1px dotted white;
}

.text-file-icon {
  width: 42px;
  height: 50px;
  display: grid;
  place-items: end center;
  padding-bottom: 6px;
  border: 1px solid #6d6d6d;
  background: linear-gradient(135deg, white 0 75%, #bbb 75% 82%, white 82%);
  color: #154d76;
  font: 700 10px "Courier New", monospace;
}

.reset-overlay {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(0, 0, 0, 0.48);
}

.reset-overlay.hidden {
  display: none;
}

.reset-window {
  width: min(470px, 94vw);
}

.danger-title {
  background: linear-gradient(90deg, #8f0000, #e33d28);
}

.reset-body {
  display: grid;
  grid-template-columns: 48px 1fr;
  align-items: center;
  gap: 12px;
}

.reset-body p {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.45;
}

.warning-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  clip-path: polygon(50% 0, 100% 92%, 0 92%);
  background: #ffd52b;
  color: #111;
  font: 900 28px Georgia, serif;
}

.reset-actions {
  margin: 0;
  padding: 0 14px 14px;
  background: #f7f5e9;
}

.stage-select-body {
  display: grid;
  gap: 8px;
}

.stage-choice {
  min-height: 58px;
  display: grid;
  grid-template-columns: 86px 1fr;
  align-items: center;
  padding: 8px 10px;
  text-align: left;
}

.stage-choice:hover,
.stage-choice:focus-visible {
  outline: 2px solid #f9d34a;
}

.stage-choice b {
  color: #0b3ca8;
}

.stage-choice span {
  font-weight: 900;
}

.settings-toggle {
  min-height: 40px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px;
  border: 1px solid #9f9f9f;
  background: white;
  font-size: 13px;
  cursor: pointer;
}

.start-menu {
  position: absolute;
  left: 0;
  bottom: 42px;
  width: 270px;
  padding: 8px;
  background: var(--xp-window);
  border: 2px solid var(--xp-border);
  border-radius: 7px 7px 0 0;
  box-shadow: 5px -4px 18px rgba(0,0,0,0.35);
  z-index: 35;
}

.start-menu::before {
  content: "Windows XP";
  display: block;
  margin: -8px -8px 8px;
  padding: 10px 12px;
  color: white;
  background: linear-gradient(#5d94ff, #0b3ca8);
  font-weight: 900;
}

.start-menu-item {
  width: 100%;
  min-height: 38px;
  border: 0;
  background: transparent;
  display: flex;
  align-items: center;
  padding: 6px;
  text-align: left;
  cursor: pointer;
}

.start-menu-item:hover {
  color: white;
  background: #245edc;
}

.xp-window {
  background: var(--xp-window);
  border: 2px solid var(--xp-border);
  border-radius: 7px 7px 3px 3px;
  box-shadow: 7px 9px 20px var(--shadow);
  overflow: hidden;
}

.legal-window {
  width: min(560px, 88vw);
  max-height: calc(100dvh - 92px);
}

.title-bar {
  min-height: 30px;
  padding: 4px 5px 4px 10px;
  color: #fff;
  background: linear-gradient(#5d94ff, var(--xp-blue) 42%, var(--xp-blue-dark));
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 700;
  text-shadow: 1px 1px 0 #08318f;
}

.tiny-x {
  width: 24px;
  height: 22px;
  border: 1px solid #fff;
  border-radius: 3px;
  color: #fff;
  background: linear-gradient(#ff9a8e, #dc2f20 48%, #a40e05);
  box-shadow: inset -1px -1px 0 rgba(0,0,0,0.35), inset 1px 1px 0 rgba(255,255,255,0.35);
  cursor: pointer;
  font-weight: 900;
  line-height: 1;
}

.big-x:disabled,
.tiny-x:disabled {
  filter: grayscale(0.8);
  opacity: 0.55;
  cursor: not-allowed;
}

.legal-body {
  display: grid;
  grid-template-columns: 160px minmax(220px, 1fr);
  gap: 14px;
  padding: 14px;
}

.terms-list {
  min-height: 220px;
  background: white;
  border: 1px solid #8b8b8b;
  font-size: 11px;
}

.mini-title {
  padding: 5px 7px;
  color: white;
  background: linear-gradient(#5d94ff, #245edc);
  font-size: 10px;
}

.terms-list p,
.terms-list label {
  display: block;
  margin: 9px;
}

.close-panel {
  min-height: 220px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 10px;
  text-align: center;
  background: #f7f5e8;
  border: 1px solid #fff;
  box-shadow: inset 1px 1px 0 #fff, inset -1px -1px 0 #aaa;
}

.close-panel h1 {
  margin: 0;
  font-size: clamp(18px, 3vw, 26px);
}

.close-panel p {
  margin: 4px 0 0;
  font-size: 12px;
}

.big-x {
  width: var(--target-size);
  height: var(--target-size);
  border: 3px solid #fff;
  border-radius: 7px;
  background: linear-gradient(#ff958e, var(--red) 48%, #950510);
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: inset 2px 2px 0 rgba(255,255,255,0.5), inset -3px -3px 0 rgba(0,0,0,0.3), 0 5px 12px rgba(0,0,0,0.34);
  transition: transform 120ms ease, filter 120ms ease;
}

.big-x:hover {
  transform: translateY(-2px) scale(1.03);
  filter: saturate(1.15) brightness(1.03);
}

.big-x:active {
  transform: translateY(2px) scale(0.97);
}

.big-x span,
.big-x span::before {
  width: calc(var(--target-size) * 0.52);
  height: calc(var(--target-size) * 0.08);
  background: white;
  display: block;
  border-radius: 8px;
  box-shadow: 1px 1px 0 #5a0505;
}

.big-x span {
  transform: rotate(45deg);
}

.big-x span::before {
  content: "";
  transform: rotate(90deg);
}

.hidden {
  display: none;
}

.game {
  width: min(1080px, calc(100vw - 20px));
  padding: 12px 12px 54px;
}

.game-shell {
  width: min(1080px, 100%);
  max-height: calc(100dvh - 86px);
  align-self: center;
  justify-self: center;
}

.game-window-body {
  padding: 14px;
  max-height: calc(100dvh - 120px);
  overflow: hidden;
}

.hud {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 10px;
}

.hud div,
.ticker {
  border: 2px solid var(--xp-border);
  border-radius: 5px;
  background: var(--xp-window);
  box-shadow: 4px 5px 14px rgba(0,0,0,0.28);
}

.hud div {
  padding: 9px 12px;
}

.hud p {
  margin: 0 0 3px;
  font-size: 11px;
  text-transform: uppercase;
}

.hud strong {
  font-size: clamp(24px, 5vw, 42px);
  line-height: 1;
  color: #0b3ca8;
}

.play-area {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(230px, 300px);
  gap: 12px;
  align-items: stretch;
  min-height: 0;
}

.fake-window {
  min-height: 0;
}

.target-wrap {
  height: clamp(230px, calc(100dvh - 310px), 398px);
  min-height: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 24px;
  padding: 22px;
  background: #f6f4e8;
}

.game-target.moving {
  animation: wobble 680ms ease-in-out infinite alternate;
}

.game.overdrive .game-target {
  animation: pulse 360ms ease-in-out infinite alternate;
}

@keyframes wobble {
  from { translate: -10px 0; }
  to { translate: 12px 6px; }
}

@keyframes pulse {
  from { filter: brightness(1); }
  to { filter: brightness(1.35) saturate(1.7); }
}

#status {
  margin: 0;
  min-height: 44px;
  max-width: 430px;
  text-align: center;
  font-weight: 700;
}

.shop {
  border: 0;
  box-shadow: none;
  padding: 10px;
  max-height: calc(100dvh - 265px);
  overflow-y: auto;
}

.shop-window {
  background: var(--xp-window);
}

.shop h2 {
  margin: 0 0 10px;
  font-size: 18px;
  color: #0b3ca8;
}

.shop h2:nth-of-type(2) {
  margin-top: 16px;
}

.upgrade {
  width: 100%;
  min-height: 64px;
  margin-bottom: 10px;
  padding: 9px;
  border: 1px solid #777;
  border-radius: 3px;
  background: linear-gradient(#fff, #d8d2bd);
  text-align: left;
  cursor: pointer;
  box-shadow: inset 1px 1px 0 #fff, inset -1px -1px 0 #777;
}

.upgrade:hover:not(:disabled) {
  outline: 2px solid #f9d34a;
}

.upgrade:disabled {
  filter: grayscale(0.85);
  opacity: 0.55;
  cursor: not-allowed;
}

.glitch-upgrade {
  background: linear-gradient(135deg, #111, #2d0f56 40%, #08ffe6);
  color: white;
  text-shadow: 1px 1px 0 #000;
}

.download-upgrade {
  background: linear-gradient(135deg, #001a12, #0a8f3d 46%, #fff200);
  color: #fff;
}

.upgrade span {
  display: block;
  font-weight: 900;
  margin-bottom: 5px;
}

.upgrade small {
  font-size: 11px;
}

.ticker {
  margin-top: 10px;
  padding: 9px 12px;
  min-height: 38px;
  font-weight: 700;
}

.toast-area {
  position: fixed;
  inset: auto 18px 56px auto;
  display: grid;
  gap: 10px;
  pointer-events: none;
}

.email-popup {
  position: fixed;
  width: min(280px, calc(100vw - 24px));
  z-index: 24;
  background: var(--xp-window);
  border: 2px solid var(--xp-border);
  border-radius: 7px 7px 3px 3px;
  box-shadow: 6px 8px 18px rgba(0,0,0,0.38);
  overflow: hidden;
}

.email-popup-body {
  padding: 12px;
  font-size: 12px;
}

.email-popup-body b {
  display: block;
  margin-bottom: 6px;
}

.email-popup-body p {
  margin: 0 0 10px;
}

.email-popup-body button {
  min-height: 26px;
  padding: 2px 12px;
  border: 1px solid #777;
  border-radius: 3px;
  background: linear-gradient(#fff, #d8d2bd);
  box-shadow: inset 1px 1px 0 #fff, inset -1px -1px 0 #777;
  cursor: pointer;
}

.toast {
  width: min(330px, calc(100vw - 36px));
  padding: 10px 12px;
  border: 2px solid var(--xp-border);
  border-radius: 5px;
  background: #fffad6;
  box-shadow: 4px 5px 12px rgba(0,0,0,0.35);
  font-size: 13px;
  animation: pop 1200ms ease forwards;
}

@keyframes pop {
  0% { opacity: 0; transform: translateY(10px) scale(0.96); }
  10%, 82% { opacity: 1; transform: translateY(0) scale(1); }
  100% { opacity: 0; transform: translateY(-8px) scale(0.96); }
}

.float-score {
  position: fixed;
  color: #fff;
  font-size: 24px;
  font-weight: 900;
  text-shadow: 2px 2px 0 #000;
  pointer-events: none;
  animation: float-score 650ms ease-out forwards;
}

@keyframes float-score {
  to {
    opacity: 0;
    transform: translateY(-46px) rotate(-8deg);
  }
}

.glitch {
  position: fixed;
  width: 112px;
  height: 78px;
  z-index: 20;
  border: 2px solid #fff;
  color: white;
  background:
    linear-gradient(90deg, transparent 0 12%, rgba(255,255,255,0.22) 12% 16%, transparent 16% 100%),
    linear-gradient(135deg, #ff005d, #2411ff 48%, #00ffd5);
  box-shadow: 0 0 0 2px #000, 0 0 18px #00ffd5;
  cursor: pointer;
  font-family: "Courier New", monospace;
  text-transform: uppercase;
  animation: glitch-jump 240ms steps(2, end) infinite;
}

.glitch span,
.glitch b {
  display: block;
}

.glitch span {
  font-size: 18px;
  font-weight: 900;
}

.glitch b {
  font-size: 12px;
}

@keyframes glitch-jump {
  0% { transform: translate(0, 0) skew(0deg); filter: hue-rotate(0deg); }
  50% { transform: translate(3px, -2px) skew(8deg); filter: hue-rotate(70deg); }
  100% { transform: translate(-2px, 2px) skew(-6deg); filter: hue-rotate(140deg); }
}

.stage-two {
  width: min(1120px, calc(100vw - 20px));
  padding: 12px 12px 54px;
}

.download-shell {
  width: min(1120px, 100%);
  max-height: calc(100dvh - 86px);
  align-self: center;
  justify-self: center;
}

.download-body {
  padding: 10px;
  max-height: calc(100dvh - 120px);
  overflow: hidden;
}

.download-hud {
  display: grid;
  grid-template-columns: 1fr 1fr 190px;
  gap: 10px;
  margin-bottom: 8px;
}

.download-hud > div,
.platform-help {
  padding: 10px;
  background: var(--xp-window);
  border: 2px solid var(--xp-border);
  border-radius: 5px;
}

.download-hud p {
  margin: 0 0 6px;
  font-size: 11px;
  text-transform: uppercase;
}

.download-hud strong {
  color: #0b3ca8;
  font-size: 16px;
}

.download-health-card {
  min-width: 170px;
}

.bar {
  height: 22px;
  padding: 2px;
  background: #fff;
  border: 1px solid #777;
  box-shadow: inset 1px 1px 2px rgba(0,0,0,0.25);
}

.bar span {
  display: block;
  width: 100%;
  height: 100%;
  transform-origin: left center;
  transition: transform 160ms ease-out;
  background: linear-gradient(#7dff7d, #13a51f);
}

.download-health span {
  width: 100%;
  background: linear-gradient(#7dff7d, #13a51f);
}

.bar.danger span {
  background: linear-gradient(#ff9b9b, #d20000);
}

.platform-window {
  background: var(--xp-window);
}

.arena {
  position: relative;
  height: clamp(260px, calc(100dvh - 255px), 440px);
  min-height: 0;
  overflow: hidden;
  background:
    linear-gradient(rgba(255,255,255,0.22) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.22) 1px, transparent 1px),
    linear-gradient(#7fc8ff, #d8f0ff 52%, #31473d 52%, #20352e);
  background-size: 34px 34px, 34px 34px, auto;
}

.download-file {
  position: absolute;
  right: 34px;
  top: 34px;
  width: 100px;
  height: 92px;
  display: grid;
  place-items: center;
  gap: 4px;
  color: #102a55;
  font-size: 12px;
  font-weight: 700;
}

.download-file span {
  width: 46px;
  height: 58px;
  background: linear-gradient(135deg, #fff 0 72%, #bcdcff 72%);
  border: 2px solid #0b3ca8;
  box-shadow: 3px 3px 0 rgba(0,0,0,0.22);
}

.platform {
  position: absolute;
  height: 22px;
  background: linear-gradient(#ebe5c7, #8d8055);
  border: 2px solid #4f4528;
  box-shadow: inset 0 2px 0 rgba(255,255,255,0.55);
}

.platform.ground {
  left: 0;
  right: 0;
  bottom: 0;
  height: 42px;
}

.platform.p1 {
  width: 240px;
  left: 120px;
  bottom: 118px;
}

.platform.p2 {
  width: 220px;
  right: 160px;
  bottom: 205px;
}

.antivirus {
  position: absolute;
  width: 48px;
  height: 58px;
  left: 60px;
  bottom: 42px;
  z-index: 4;
}

.shield {
  width: 42px;
  height: 48px;
  display: grid;
  place-items: center;
  color: white;
  background: linear-gradient(135deg, #2f8dff, #071d9c);
  border: 3px solid white;
  border-radius: 18px 18px 22px 22px;
  box-shadow: 0 0 0 2px #0b3ca8, 4px 5px 8px rgba(0,0,0,0.28);
  font-weight: 900;
}

.gun-thumb {
  position: absolute;
  right: -14px;
  top: 18px;
  min-width: 32px;
  height: 18px;
  display: grid;
  place-items: center;
  border: 2px solid #111;
  background: #d8d8d8;
  font-size: 12px;
  transform-origin: left center;
}

.antivirus.left .gun-thumb {
  right: auto;
  left: -14px;
  transform: scaleX(-1);
}

.virus-spider {
  position: absolute;
  width: 76px;
  height: 56px;
  left: 760px;
  bottom: 42px;
  z-index: 4;
  filter: drop-shadow(4px 5px 5px rgba(0,0,0,0.35));
}

.virus-spider b {
  position: absolute;
  inset: 8px 10px 0;
  display: grid;
  place-items: center;
  color: white;
  background: radial-gradient(circle at 35% 30%, #ff817a, #c60000 66%);
  border: 3px solid #580000;
  border-radius: 50%;
  font-weight: 900;
}

.virus-spider span,
.virus-spider span::before {
  position: absolute;
  width: 42px;
  height: 6px;
  background: #700000;
  border-radius: 10px;
  content: "";
}

.stage-six .download-body {
  background: #c8c0a8;
}

.stage-six-arena {
  background:
    radial-gradient(circle at 18% 18%, rgba(255,255,255,0.18), transparent 20%),
    repeating-linear-gradient(92deg, rgba(74,42,21,0.2) 0 2px, transparent 2px 46px),
    linear-gradient(#8a5b35, #5d3922);
  box-shadow: inset 0 18px 28px rgba(255,255,255,0.12), inset 0 -22px 35px rgba(35,17,8,0.28);
}

.stage-six-arena .download-file {
  left: 26px;
  right: auto;
  top: 18px;
  color: #f5ead7;
  text-shadow: 1px 1px #2c160b;
}

.stage-six-arena .platform {
  background:
    repeating-linear-gradient(90deg, rgba(255,255,255,0.18) 0 3px, transparent 3px 35px),
    linear-gradient(#d3cab2, #877b61);
  border-color: #413827;
  box-shadow: inset 0 3px 0 rgba(255,255,255,0.48), 0 7px 12px rgba(24,12,6,0.38);
}

.stage-six-arena .platform.p1 {
  left: 40px;
  right: auto;
  bottom: 70px;
  width: 220px;
}

.stage-six-arena .platform.p2 {
  left: calc(50% - 120px);
  right: auto;
  bottom: 168px;
  width: 240px;
}

.stage-six-arena .platform.ground {
  left: auto;
  right: 40px;
  bottom: 82px;
  width: 220px;
  height: 22px;
}

.stage-six-floor {
  display: none;
}

.stage-six-arena .stage-six-floor {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 42px;
  display: block;
  z-index: 1;
  background:
    repeating-linear-gradient(90deg, rgba(255,255,255,0.14) 0 2px, transparent 2px 44px),
    linear-gradient(#b28a62, #6d472b);
  border-top: 3px solid #3c281a;
  box-shadow: inset 0 4px 0 rgba(255,255,255,0.2), 0 -8px 16px rgba(38,20,10,0.22);
}

.stage-six .gun-thumb {
  right: -22px;
  left: auto;
  width: 44px;
  transform-origin: left center;
  transition: transform 45ms linear;
}

.drone-boss {
  width: 132px;
  height: 72px;
  filter: drop-shadow(0 9px 8px rgba(20, 9, 4, 0.45));
}

.drone-boss span {
  display: block;
  width: 42px;
  height: 12px;
  top: 7px;
  background: #272b31;
  border: 2px solid #8d939b;
  border-radius: 50%;
}

.drone-boss span::before {
  width: 30px;
  height: 3px;
  left: 4px;
  top: -7px;
  background: #d8dde3;
  transform: none;
}

.drone-boss span:nth-child(1) { left: -8px; top: 5px; transform: none; }
.drone-boss span:nth-child(2) { left: -8px; top: 49px; transform: none; }
.drone-boss span:nth-child(3) { right: -8px; left: auto; top: 5px; transform: none; }
.drone-boss span:nth-child(4) { right: -8px; left: auto; top: 49px; transform: none; }

.drone-boss b {
  inset: 13px 22px;
  border-radius: 12px 24px 12px 24px;
  border-color: #20242b;
  background: linear-gradient(135deg, #d7dce2, #555d68 48%, #242a31);
  color: #ffdf68;
  letter-spacing: 2px;
  text-shadow: 1px 1px #17191d;
}

.virus-spider span:nth-child(1) { left: -16px; top: 15px; transform: rotate(25deg); }
.virus-spider span:nth-child(2) { left: -18px; top: 34px; transform: rotate(-25deg); }
.virus-spider span:nth-child(3) { right: -16px; top: 15px; transform: rotate(-25deg); }
.virus-spider span:nth-child(4) { right: -18px; top: 34px; transform: rotate(25deg); }

.virus-spider span::before {
  left: 24px;
  top: 10px;
  transform: rotate(45deg);
}

.bullet {
  position: absolute;
  width: 16px;
  height: 8px;
  border-radius: 10px;
  background: #fff200;
  box-shadow: 0 0 8px #fff200;
  z-index: 5;
}

.virus-bolt {
  position: absolute;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #ff1919;
  box-shadow: 0 0 10px #ff1919;
  z-index: 5;
}

.drone-laser {
  border-radius: 2px;
  background: linear-gradient(#fff8c5, #ff3b23 42%, #82140c);
  box-shadow: 0 0 4px #fff4ae, 0 0 12px #e52516;
}

.gun-pickup {
  position: absolute;
  width: 78px;
  height: 66px;
  padding: 4px;
  z-index: 3;
  background: white;
  border: 1px solid #b8b8b8;
  box-shadow: 2px 3px 7px rgba(0,0,0,0.25);
  font-size: 9px;
  cursor: pointer;
}

.gun-pickup::before {
  content: "Google Images";
  display: block;
  margin-bottom: 3px;
  color: #1a0dab;
  font-size: 8px;
}

.gun-art {
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid #ddd;
  background: linear-gradient(135deg, #eef4ff, #fff);
  color: #111;
  font-size: 20px;
}

.gun-pickup b {
  display: block;
  margin-top: 2px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.stage-three {
  width: min(1400px, calc(100vw - 20px));
  padding: 12px 12px 54px;
}

.captcha-stage {
  width: min(980px, calc(100vw - 20px));
  padding: 12px 12px 54px;
}

.captcha-shell {
  width: min(760px, 100%);
  align-self: center;
  justify-self: center;
}

.captcha-body {
  padding: 12px;
  background:
    linear-gradient(90deg, rgba(8,49,162,0.08) 1px, transparent 1px),
    linear-gradient(#f7f5e9, #e8e2c9);
  background-size: 18px 18px, auto;
}

.captcha-header {
  display: grid;
  grid-template-columns: 1fr 150px;
  gap: 10px;
  margin-bottom: 10px;
}

.captcha-header > div {
  padding: 10px;
  background: var(--xp-window);
  border: 2px solid var(--xp-border);
  border-radius: 5px;
}

.captcha-header p {
  margin: 0 0 4px;
  font-size: 11px;
  text-transform: uppercase;
}

.captcha-header strong {
  color: #0b3ca8;
  font-size: 24px;
}

.captcha-card {
  display: grid;
  gap: 10px;
  padding: 14px;
  background: white;
  border: 1px solid #8f8f8f;
  box-shadow: inset 1px 1px 0 #fff, inset -1px -1px 0 #b6b6b6;
}

.captcha-card label {
  min-height: 48px;
  display: grid;
  align-items: center;
  padding: 10px;
  background: #fffad6;
  border: 1px solid #c6b65a;
  font-weight: 900;
}

.captcha-card button {
  min-height: 36px;
  justify-self: start;
  padding: 4px 22px;
  font-weight: 900;
}

.captcha-card button:disabled {
  opacity: 0.55;
  cursor: default;
}

#captcha-feedback {
  min-height: 34px;
  margin: 0;
  padding: 8px;
  color: #0b3ca8;
  background: #eef4ff;
  border: 1px solid #9ab0dd;
  font-size: 12px;
  font-weight: 700;
}

.maze-shell {
  width: min(1400px, 100%);
  max-height: calc(100dvh - 86px);
  align-self: center;
  justify-self: center;
}

.maze-body {
  padding: 10px;
  max-height: calc(100dvh - 120px);
  overflow: hidden;
}

.maze-hud {
  display: grid;
  grid-template-columns: repeat(7, minmax(92px, 1fr));
  gap: 8px;
  margin-bottom: 8px;
}

.maze-hud > div {
  padding: 9px 10px;
  background: var(--xp-window);
  border: 2px solid var(--xp-border);
  border-radius: 5px;
  box-shadow: 3px 4px 10px rgba(0,0,0,0.25);
}

.maze-hud p {
  margin: 0 0 4px;
  font-size: 10px;
  text-transform: uppercase;
}

.maze-hud strong {
  color: #0b3ca8;
  font-size: 17px;
}

.maze-health-card {
  min-width: 170px;
}

.maze-health span {
  width: 100%;
  background: linear-gradient(#7dff7d, #13a51f);
}

.maze-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 230px;
  gap: 10px;
  align-items: stretch;
}

.maze-viewport {
  min-width: 0;
  background: #1d1d1d;
  position: relative;
}

#raycast-canvas {
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: calc(100dvh - 220px);
  display: block;
  background: #111827;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  cursor: crosshair;
}

.maze-map {
  position: absolute;
  inset: 26px 0 0;
  width: 100%;
  height: calc(100% - 26px);
  z-index: 6;
  background: #07111d;
  image-rendering: pixelated;
}

.maze-map::after {
  content: "";
}

.maze-game-ammo {
  position: absolute;
  right: 12px;
  bottom: 12px;
  padding: 5px 8px;
  color: #f7f7f7;
  background: rgba(0, 0, 0, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.75);
  font: 700 12px "Courier New", monospace;
  text-shadow: 1px 1px 0 #000;
  pointer-events: none;
}

.maze-game-ammo strong {
  color: #f9e66b;
}

.maze-panel {
  background: var(--xp-window);
}

.maze-panel-body {
  padding: 10px;
  display: grid;
  gap: 10px;
  font-size: 12px;
}

.maze-panel pre {
  margin: 0;
  max-height: 190px;
  overflow: auto;
  padding: 8px;
  color: #e6ffe6;
  background: #08220c;
  border: 1px solid #636363;
  font: 11px/1.35 "Courier New", monospace;
}

.maze-panel dl {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
}

.maze-panel dl div {
  display: grid;
  grid-template-columns: 24px 1fr;
  align-items: center;
  gap: 5px;
  min-height: 28px;
  padding: 4px;
  background: #fff;
  border: 1px solid #9c9c9c;
}

.maze-panel dt {
  display: grid;
  place-items: center;
  height: 20px;
  color: #fff;
  background: #0b3ca8;
  font-weight: 900;
}

.maze-panel dd {
  margin: 0;
}

.maze-panel p {
  margin: 0;
  min-height: 48px;
  padding: 8px;
  background: #fffad6;
  border: 1px solid #c6b65a;
  font-weight: 700;
}

.stage-five-red-button {
  width: 100%;
  min-height: 220px;
  border: 4px outset #ff8a8a;
  color: #fff;
  background: linear-gradient(#ff4545, #b50000 55%, #6d0000);
  font: 900 92px/1 Arial, sans-serif;
  text-shadow: 3px 3px 0 #320000;
  cursor: pointer;
}

.stage-five-red-button:active {
  border-style: inset;
  background: linear-gradient(#820000, #d20d0d);
}

@media (max-width: 820px) {
  body {
    overflow: auto;
  }

  .stage {
    min-height: auto;
  }

  .legal-body,
  .play-area {
    grid-template-columns: 1fr;
  }

  .hud {
    grid-template-columns: repeat(2, 1fr);
  }

  .taskbar {
    grid-template-columns: 96px 1fr 74px;
  }

  .download-hud,
  .maze-hud,
  .maze-workspace {
    grid-template-columns: 1fr;
  }

  #raycast-canvas {
    max-height: none;
  }
}
