:root {
  color-scheme: dark;
  --black: #000;
  --panel: #080808;
  --panel-soft: #0d0d0d;
  --white: #ededed;
  --muted: #757575;
  --line: #242424;
  --line-soft: #161616;
  --accent: #c7ff42;
  font-family: "IBM Plex Mono", monospace;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-width: 320px;
  min-height: 100%;
  margin: 0;
  overflow: hidden;
  background: var(--black);
}

button,
input {
  font: inherit;
}

button {
  color: inherit;
}

.login-screen {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  min-height: 100vh;
  padding: 24px;
  place-items: center;
  color: var(--white);
  background: #000;
  transition: opacity 420ms ease, visibility 420ms ease;
}

.login-screen.is-leaving {
  visibility: hidden;
  opacity: 0;
}

.login-box {
  width: min(100%, 310px);
}

.login-logo {
  margin: 0 0 43px;
  color: #5c5c5c;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: -0.04em;
}

.login-box h1 {
  margin: 0 0 27px;
  color: #e7e7e7;
  font-size: 25px;
  font-weight: 400;
  letter-spacing: -0.065em;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.login-box input {
  width: 100%;
  height: 47px;
  padding: 0;
  border: 0;
  border-bottom: 1px solid #242424;
  border-radius: 0;
  outline: none;
  color: #dedede;
  background: transparent;
  caret-color: var(--accent);
  font-size: 12px;
  transition: border-color 160ms ease;
}

.login-box input::placeholder {
  color: #454545;
}

.login-box input:focus {
  border-color: #858585;
}

.login-box button[type="submit"] {
  display: flex;
  width: 100%;
  height: 42px;
  margin-top: 29px;
  padding: 0 12px;
  align-items: center;
  justify-content: space-between;
  border: 1px solid #353535;
  border-radius: 0;
  color: #aaa;
  background: transparent;
  cursor: pointer;
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.12em;
  transition: color 160ms ease, border-color 160ms ease, background 160ms ease;
}

.login-box button[type="submit"]:hover,
.login-box button[type="submit"]:focus-visible {
  border-color: #e7e7e7;
  color: #050505;
  background: #fff;
  outline: none;
}

.login-status {
  min-height: 10px;
  margin: 14px 0 0;
  color: transparent;
  font-size: 8px;
  letter-spacing: 0.13em;
  text-align: center;
}

.login-status.is-active {
  color: var(--accent);
}

.desktop {
  position: fixed;
  inset: 0;
  z-index: 1;
  min-height: 100vh;
  overflow: hidden;
  color: var(--white);
  background: #000;
  opacity: 0;
  transition: opacity 400ms ease;
}

.desktop.is-active {
  opacity: 1;
}

.wallpaper-drop {
  position: absolute;
  top: 0;
  left: 50%;
  z-index: 0;
  width: clamp(330px, 34vw, 470px);
  pointer-events: none;
  transform: translate(-50%, -110%);
}

.wallpaper-swing {
  transform-origin: 52% 0;
}

.wallpaper-swing img {
  display: block;
  width: 100%;
  height: auto;
  opacity: 0.72;
  filter: brightness(0.86);
  user-select: none;
}

.taskbar {
  position: absolute;
  right: 0;
  left: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  border-color: var(--line-soft);
  background: rgba(3, 3, 3, 0.82);
  backdrop-filter: blur(10px);
}

.desktop-area {
  position: absolute;
  inset: 0 0 43px;
  z-index: 2;
}

.file-icon {
  position: absolute;
  top: 28px;
  left: 25px;
  display: flex;
  width: 92px;
  padding: 8px 4px;
  flex-direction: column;
  align-items: center;
  gap: 9px;
  border: 1px solid transparent;
  color: #d5d5d5;
  background: transparent;
  cursor: default;
  font-size: 10px;
}

.file-icon:hover,
.file-icon:focus-visible,
.file-icon.is-selected {
  border-color: #292929;
  background: rgba(255, 255, 255, 0.035);
  outline: none;
}

.file-paper {
  position: relative;
  display: flex;
  width: 37px;
  height: 46px;
  padding: 13px 7px 7px;
  flex-direction: column;
  gap: 4px;
  border: 1px solid #8a8a8a;
  background: #111;
  box-shadow: 4px 5px 0 rgba(0, 0, 0, 0.5);
}

.file-paper::after {
  position: absolute;
  top: -1px;
  right: -1px;
  width: 10px;
  height: 10px;
  border-bottom: 1px solid #8a8a8a;
  border-left: 1px solid #8a8a8a;
  background: #000;
  content: "";
}

.file-paper i {
  display: block;
  height: 1px;
  background: #555;
}

.window {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 8;
  width: min(620px, calc(100vw - 38px));
  height: min(410px, calc(100vh - 130px));
  border: 1px solid #303030;
  background: rgba(5, 5, 5, 0.96);
  box-shadow: 0 30px 100px rgba(0, 0, 0, 0.8);
  transform: translate(-50%, -50%);
}

.window.is-opening {
  animation: window-open 200ms ease-out both;
}

.window-bar,
.window-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-color: #202020;
  color: #898989;
  background: #0a0a0a;
  font-size: 9px;
  letter-spacing: 0.07em;
}

.window-bar {
  height: 37px;
  padding-left: 13px;
  border-bottom: 1px solid #202020;
}

.window-title {
  display: flex;
  align-items: center;
  gap: 8px;
}

.window-file {
  width: 9px;
  height: 12px;
  border: 1px solid #6e6e6e;
}

.window-close {
  width: 39px;
  height: 36px;
  border: 0;
  border-left: 1px solid #202020;
  color: #777;
  background: transparent;
  cursor: pointer;
  font-size: 18px;
}

.window-close:hover,
.window-close:focus-visible {
  color: #fff;
  background: #181818;
  outline: none;
}

.window-content {
  display: flex;
  height: calc(100% - 61px);
  padding: 17px 18px 25px 0;
  gap: 18px;
  overflow: auto;
  color: #cfcfcf;
  font-size: 11px;
  line-height: 1.7;
  outline: none;
}

.line-numbers {
  display: flex;
  min-width: 38px;
  padding-left: 11px;
  flex-direction: column;
  align-items: flex-end;
  color: #3f3f3f;
  user-select: none;
}

.line-numbers span {
  height: 18.7px;
}

.readme-text {
  width: min(100%, 500px);
}

.readme-text p {
  margin: 0 0 17px;
}

.readme-alert {
  color: #e6e6e6;
  font-weight: 600;
  letter-spacing: 0.08em;
}

.readme-text strong {
  color: #fff;
  font-weight: 500;
}

.readme-text a {
  display: inline-block;
  margin: 0 0 20px;
  color: var(--accent);
  text-decoration: none;
  letter-spacing: 0.04em;
}

.readme-text a:hover,
.readme-text a:focus-visible {
  color: #fff;
  outline: none;
  text-decoration: underline;
}

.readme-id {
  color: #656565;
  font-size: 9px;
  letter-spacing: 0.08em;
}

.caret {
  display: inline-block;
  width: 6px;
  height: 12px;
  margin-left: 5px;
  vertical-align: -2px;
  background: #777;
  animation: caret 1s steps(1) infinite;
}

.window-footer {
  height: 24px;
  padding: 0 10px;
  border-top: 1px solid #202020;
  font-size: 8px;
}

.taskbar {
  bottom: 0;
  height: 43px;
  padding: 0 15px;
  border-top: 1px solid var(--line-soft);
}

.taskbar-home {
  display: grid;
  width: 28px;
  height: 28px;
  padding: 7px;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
  border: 1px solid #272727;
  background: #090909;
}

.taskbar-home span {
  background: #777;
}

@keyframes window-open {
  from { opacity: 0; transform: translate(-50%, -48%) scale(0.98); }
  to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

@keyframes caret {
  50% { opacity: 0; }
}

@media (max-width: 560px) {
  .login-screen {
    padding: 17px;
  }

  .wallpaper-drop {
    width: 340px;
  }

  .wallpaper-swing img {
    opacity: 0.58;
  }

  .file-icon {
    top: 20px;
    left: 13px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-delay: 0ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
  }

  .wallpaper-drop {
    transform: translate(-50%, 0);
  }
}
