:root {
  --face: #c0c0c0;
  --face-dark: #a8a8a8;
  --light: #ffffff;
  --midtone: #dfdfdf;
  --shadow: #808080;
  --dark: #0a0a0a;
  --teal: #008080;
  --navy: #000080;
  --navy-2: #1084d0;
  --text: #000000;
  --bevel-up: inset -1px -1px var(--dark), inset 1px 1px var(--light), inset -2px -2px var(--shadow), inset 2px 2px var(--midtone);
  --bevel-down: inset 1px 1px var(--dark), inset -1px -1px var(--light), inset 2px 2px var(--shadow), inset -2px -2px var(--midtone);
  --field: inset 1px 1px var(--shadow), inset -1px -1px var(--light), inset 2px 2px var(--dark), inset -2px -2px var(--midtone);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  background: var(--teal);
  color: var(--text);
  font-family: Tahoma, "MS Sans Serif", "Segoe UI", Verdana, sans-serif;
  font-size: 12px;
  line-height: 1.4;
  -webkit-font-smoothing: none;
  font-smooth: never;
  image-rendering: pixelated;
}

a {
  color: inherit;
  text-decoration: none;
}

u {
  text-underline-offset: 2px;
}

.desktop {
  min-height: 100vh;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 24px 12px 56px;
}

.window {
  width: min(780px, 100%);
  background: var(--face);
  padding: 3px;
  box-shadow: var(--bevel-up);
}

.title-bar {
  display: flex;
  align-items: center;
  gap: 5px;
  height: 22px;
  padding: 2px 3px 2px 4px;
  background: linear-gradient(90deg, var(--navy), var(--navy-2));
  color: #fff;
  font-weight: 700;
}

.title-bar__text {
  flex: 1;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.title-bar__buttons {
  display: flex;
  gap: 2px;
}

.title-btn {
  width: 18px;
  height: 16px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  background: var(--face);
  color: #000;
  font-family: inherit;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  box-shadow: var(--bevel-up);
}

.title-btn:active {
  box-shadow: var(--bevel-down);
}

.menu-bar {
  display: flex;
  gap: 1px;
  padding: 2px 1px;
}

.menu-item {
  padding: 2px 8px;
  cursor: default;
}

.menu-item:hover {
  background: var(--navy);
  color: #fff;
}

.window-body {
  margin: 2px;
  padding: 8px;
  box-shadow: var(--field);
  background: var(--face);
}

.toolbar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--shadow);
  margin-bottom: 8px;
}

.toolbar__label {
  color: #404040;
}

.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(118px, 1fr));
  gap: 4px;
  min-height: 190px;
  padding: 8px;
  background: #fff;
  box-shadow: var(--field);
}

.game-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 12px 6px;
  color: #000;
  cursor: pointer;
}

.game-item:hover,
.game-item:focus {
  background: var(--navy);
  color: #fff;
  outline: none;
}

.game-item__icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
}

.pixel-icon {
  display: block;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

.game-item__label {
  font-weight: 700;
  text-align: center;
}

.game-item__meta {
  font-size: 11px;
  text-align: center;
}

.status-bar {
  display: flex;
  gap: 2px;
  margin-top: 8px;
}

.status-cell {
  flex: 1;
  padding: 3px 7px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  box-shadow: var(--bevel-down);
}

.status-cell--size {
  flex: 0 0 90px;
}

.taskbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 4px;
  height: 34px;
  padding: 3px;
  background: var(--face);
  box-shadow: inset 0 2px var(--midtone), inset 0 3px var(--light);
}

.taskbar__tasks {
  flex: 1;
  display: flex;
  gap: 4px;
  min-width: 0;
}

.taskbar__clock {
  padding: 4px 10px;
  box-shadow: var(--bevel-down);
}

.start-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  font-weight: 700;
}

.start-btn__logo {
  display: grid;
  grid-template-columns: 7px 7px;
  grid-template-rows: 7px 7px;
  gap: 2px;
}

.start-btn__logo i {
  display: block;
  background: #ff3b30;
}

.start-btn__logo i:nth-child(2) {
  background: #3fb950;
}

.start-btn__logo i:nth-child(3) {
  background: #4f8cff;
}

.start-btn__logo i:nth-child(4) {
  background: #e3b341;
}

.start-menu {
  position: fixed;
  left: 3px;
  bottom: 34px;
  z-index: 120;
  display: flex;
  padding: 3px;
  background: var(--face);
  box-shadow: var(--bevel-up);
}

.start-menu__banner {
  width: 26px;
  padding: 8px 4px;
  background: linear-gradient(180deg, var(--navy), var(--navy-2));
  color: #fff;
  font-weight: 700;
  letter-spacing: 1px;
  text-align: center;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
}

.start-menu__items {
  display: flex;
  flex-direction: column;
  min-width: 190px;
}

.start-menu__item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 28px 7px 10px;
  border: 0;
  background: none;
  font: inherit;
  color: #000;
  text-align: left;
  cursor: pointer;
}

.start-menu__item:hover {
  background: var(--navy);
  color: #fff;
}

.start-menu__sep {
  height: 2px;
  margin: 3px 4px;
  box-shadow: inset 0 1px var(--shadow), inset 0 -1px var(--light);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 23px;
  padding: 3px 12px;
  border: 0;
  background: var(--face);
  color: #000;
  font-family: inherit;
  font-size: 12px;
  cursor: pointer;
  box-shadow: var(--bevel-up);
}

.btn:active:not(:disabled) {
  box-shadow: var(--bevel-down);
  padding: 4px 11px 2px 13px;
}

.btn:focus-visible {
  outline: 1px dotted #000;
  outline-offset: -4px;
}

.btn:disabled {
  color: var(--shadow);
  text-shadow: 1px 1px var(--light);
}

.btn--primary {
  font-weight: 700;
}

.btn--ghost {
  background: var(--face);
}

.btn--block {
  width: 100%;
  margin-top: 8px;
}

.input {
  width: 100%;
  padding: 3px 5px;
  border: 0;
  background: #fff;
  color: #000;
  font-family: inherit;
  font-size: 12px;
  box-shadow: var(--field);
}

.input:focus {
  outline: 1px dotted #000;
  outline-offset: -3px;
}

.badge {
  display: inline-block;
  padding: 1px 6px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  box-shadow: var(--field);
  background: #fff;
}

.badge--online,
.badge--record,
.badge--solo,
.badge--tag {
  color: #000;
}

.games-empty {
  grid-column: 1 / -1;
  color: #404040;
}

.site-header {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 26px;
  padding: 2px 4px;
  background: linear-gradient(90deg, var(--navy), var(--navy-2));
  color: #fff;
}

.brand {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  color: #fff;
}

.brand__logo {
  display: flex;
  align-items: center;
  font-size: 15px;
}

.brand em {
  font-style: normal;
  font-weight: 400;
  color: #cfe3ff;
}

.site-nav {
  margin-left: auto;
  display: flex;
  gap: 3px;
}

.page {
  width: min(900px, 100%);
  margin: 0 auto;
  padding: 16px 16px 56px;
}

.game-shell {
  width: min(760px, 100%);
  margin: 16px auto 56px;
  padding: 10px;
  background: var(--face);
  box-shadow: var(--bevel-up);
}

.game-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.game-topbar h1 {
  font-size: 16px;
}

.game-topbar__side {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.hud {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.hud__item {
  display: flex;
  flex-direction: column;
  min-width: 74px;
  padding: 4px 9px;
  background: #fff;
  box-shadow: var(--field);
}

.hud__label {
  font-size: 10px;
  text-transform: uppercase;
}

.hud__value {
  font-size: 16px;
  font-weight: 700;
}

.game-stage {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 300px;
  padding: 12px;
  background: var(--face);
  box-shadow: var(--field);
}

.game-canvas {
  display: block;
  width: 100%;
  max-width: 560px;
  height: auto;
  background: #000;
  box-shadow: var(--field);
  touch-action: none;
}

.game-overlay {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(0, 0, 0, 0.32);
}

.overlay-card {
  width: min(380px, 100%);
  background: var(--face);
  padding: 3px;
  box-shadow: var(--bevel-up);
}

.overlay-card__title {
  margin: 0;
  padding: 3px 6px;
  background: linear-gradient(90deg, var(--navy), var(--navy-2));
  color: #fff;
  font-size: 12px;
}

.overlay-card__text {
  margin: 0;
  padding: 14px 12px;
}

.overlay-card__actions {
  display: flex;
  gap: 8px;
  justify-content: center;
  padding: 0 12px 14px;
}

.game-toolbar {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 12px;
}

.filters {
  display: flex;
  gap: 4px;
}

.filter-btn {
  min-height: 23px;
  padding: 3px 12px;
  border: 0;
  background: var(--face);
  color: #000;
  font-family: inherit;
  font-size: 12px;
  cursor: pointer;
  box-shadow: var(--bevel-up);
}

.filter-btn.is-active {
  box-shadow: var(--bevel-down);
  font-weight: 700;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.3);
}

.hidden {
  display: none !important;
}

body.win-minimized .desktop .window {
  display: none;
}
