:root {
  --bg-light: #9ac8ff;
  --desktop-mid: #67a7ff;
  --desktop-deep: #4f8bf3;
  --panel: #f2f2f2;
  --panel-border-dark: #3f4a62;
  --panel-border-light: #ffffff;
  --text-dark: #111827;
  --accent: #1849ba;
  --label: #7ff6ff;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text-dark);
  font-family: "IBM Plex Mono", monospace;
  background: linear-gradient(180deg, var(--bg-light), var(--desktop-mid) 45%, var(--desktop-deep));
}

.desktop {
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr;
}

.menu-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.45rem 0.8rem;
  border-top: 2px solid var(--panel-border-light);
  border-left: 2px solid var(--panel-border-light);
  border-right: 2px solid var(--panel-border-dark);
  border-bottom: 2px solid var(--panel-border-dark);
  background: var(--panel);
  font-family: "VT323", monospace;
  font-size: 1.9rem;
}

.menu-left {
  display: flex;
  align-items: center;
}

.menu-item {
  border: none;
  background: transparent;
  font-family: "VT323", monospace;
  font-size: 1.9rem;
  padding: 0 0.5rem;
  cursor: pointer;
}

.menu-item:focus,
.menu-item:hover {
  background: #1e5ddd;
  color: #fff;
  outline: none;
}

.menu-dropdown {
  position: relative;
}

.file-menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  min-width: 190px;
  border-top: 2px solid #fff;
  border-left: 2px solid #fff;
  border-right: 2px solid #2e3f66;
  border-bottom: 2px solid #2e3f66;
  background: #ecebf1;
  padding: 0.2rem;
  display: grid;
  gap: 0.15rem;
  z-index: 999;
}

.file-menu-option {
  border: 1px solid transparent;
  background: transparent;
  text-align: left;
  font-family: "VT323", monospace;
  font-size: 1.5rem;
  padding: 0.15rem 0.4rem;
  cursor: pointer;
}

.file-menu-option:hover,
.file-menu-option:focus {
  background: #1e5ddd;
  color: #fff;
  outline: none;
}

.desktop-area {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 1rem;
  padding: 1rem;
}

.desktop-icons {
  display: grid;
  gap: 0.8rem;
  align-content: start;
}

.desktop-icon {
  border: none;
  background: transparent;
  cursor: pointer;
  text-align: left;
  width: fit-content;
}

.icon-glyph {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-top: 2px solid #fff;
  border-left: 2px solid #fff;
  border-right: 2px solid #464f64;
  border-bottom: 2px solid #464f64;
  background: #e7e7ef;
  font-size: 1.7rem;
}

.icon-label {
  margin-top: 0.2rem;
  padding: 0.05rem 0.3rem;
  display: block;
  font-family: "VT323", monospace;
  font-size: 1.7rem;
  background: var(--label);
  width: fit-content;
}

.window-layer {
  position: relative;
}

.window {
  position: absolute;
  top: 1rem;
  left: 1rem;
  width: min(680px, calc(100vw - 280px));
  border-top: 2px solid var(--panel-border-light);
  border-left: 2px solid var(--panel-border-light);
  border-right: 2px solid var(--panel-border-dark);
  border-bottom: 2px solid var(--panel-border-dark);
  background: var(--panel);
  box-shadow: 6px 6px 0 rgba(48, 67, 118, 0.4);
}

.window:nth-child(2) { top: 2.5rem; left: 3.5rem; }
.window:nth-child(3) { top: 4rem; left: 6rem; }

.window-titlebar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.2rem 0.4rem;
  background: linear-gradient(90deg, #206be1, #4b8dff);
  color: white;
  font-family: "VT323", monospace;
  font-size: 1.6rem;
}

.window-titlebar h2 {
  margin: 0;
  font-weight: 400;
}

.close-button {
  border-top: 2px solid #fff;
  border-left: 2px solid #fff;
  border-right: 2px solid #2e3f66;
  border-bottom: 2px solid #2e3f66;
  background: #eae9ef;
  font-family: "VT323", monospace;
  font-size: 1.5rem;
  line-height: 1;
  width: 1.8rem;
  cursor: pointer;
}

.window-content {
  padding: 0.85rem 1rem 1.1rem;
  font-size: 0.95rem;
}

.tag {
  display: inline-block;
  margin: 0;
  font-family: "VT323", monospace;
  font-size: 1.4rem;
  background: #d2dcff;
  color: #1f3f90;
  padding: 0 0.35rem;
}

.window-content h3 {
  margin: 0.4rem 0;
}

.action-button {
  display: inline-block;
  border-top: 2px solid #fff;
  border-left: 2px solid #fff;
  border-right: 2px solid #2e3f66;
  border-bottom: 2px solid #2e3f66;
  background: #ecebf1;
  color: var(--accent);
  font-family: "VT323", monospace;
  font-size: 1.4rem;
  text-decoration: none;
  padding: 0.1rem 0.6rem;
}

@media (max-width: 900px) {
  .desktop-area {
    grid-template-columns: 1fr;
  }

  .desktop-icons {
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  }

  .window {
    position: relative;
    inset: auto;
    width: 100%;
    margin-top: 0.9rem;
  }
}
