:root {
  --ink: #080808;
  --panel: #f2f2ed;
  --paper: #fbfbf7;
  --signal: #dfff00;
  --violet: #7d73ff;
  --line: rgba(255, 255, 255, .18);
  color: var(--panel);
  background: var(--ink);
  font-family: "PingFang SC", "Noto Sans SC", "Microsoft YaHei", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
  letter-spacing: 0;
}

html,
body {
  width: 100%;
  min-height: 100%;
}

body {
  margin: 0;
  overflow: hidden;
  background: var(--ink);
}

button,
input {
  color: inherit;
  font: inherit;
}

button {
  cursor: pointer;
}

:focus-visible {
  outline: 2px solid var(--signal);
  outline-offset: 3px;
}

::selection {
  color: var(--ink);
  background: var(--signal);
}

.access-bar {
  position: fixed;
  inset: 0 0 auto;
  z-index: 10;
  display: grid;
  height: 58px;
  grid-template-columns: 1fr auto;
  align-items: center;
  color: var(--panel);
  background: #101010;
  border-bottom: 1px solid var(--line);
}

.access-brand {
  display: flex;
  min-width: 0;
  height: 100%;
  align-items: center;
}

.access-brand strong {
  display: grid;
  width: 76px;
  height: 100%;
  place-items: center;
  border-right: 1px solid var(--line);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 22px;
}

.access-brand span {
  padding: 0 18px;
  overflow: hidden;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.game-score {
  display: flex;
  height: 100%;
  align-items: center;
  gap: 22px;
  padding: 0 22px;
  border-left: 1px solid var(--line);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 10px;
}

.game-score strong {
  margin-left: 5px;
  color: var(--signal);
  font-size: 17px;
}

.access-scene {
  position: fixed;
  inset: 58px 0 0;
  overflow: hidden;
  background: #050505 url("/assets/login-cyberpunk-bg-v1.jpg") center center / cover no-repeat;
}

.game-canvas {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
}

.game-canvas:focus {
  outline: 0;
}

.access-card {
  --game-camera-y: 0px;
  position: absolute;
  z-index: 3;
  top: 64%;
  left: 50%;
  width: min(440px, calc(100% - 40px));
  padding: 28px;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid #050505;
  border-radius: 6px;
  box-shadow: 0 28px 80px rgba(0, 0, 0, .42);
  transform: translate(-50%, calc(-50% + var(--game-camera-y)));
  will-change: transform;
}

.access-card::before {
  position: absolute;
  inset: -1px auto -1px -1px;
  width: 5px;
  background: var(--signal);
  content: "";
}

.access-kicker {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #5f615b;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 10px;
  font-weight: 700;
}

.access-kicker::before {
  width: 26px;
  height: 2px;
  background: var(--violet);
  content: "";
}

h1 {
  margin: 15px 0 8px;
  font-family: "Arial Narrow", "Roboto Condensed", "PingFang SC", sans-serif;
  font-size: 38px;
  line-height: 1.08;
}

.access-card > p {
  margin: 0 0 24px;
  color: #5b5d57;
  font-size: 14px;
  line-height: 1.75;
}

label {
  display: block;
  margin-bottom: 8px;
  color: #5f615b;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 10px;
  font-weight: 800;
}

.password-row {
  display: grid;
  grid-template-columns: 1fr 52px;
  border: 1px solid var(--ink);
  background: #fff;
}

input {
  min-width: 0;
  height: 52px;
  padding: 0 14px;
  color: var(--ink);
  background: transparent;
  border: 0;
  outline: 0;
  font-size: 17px;
}

.password-row:focus-within {
  box-shadow: 0 0 0 3px var(--signal);
}

.password-row button {
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  color: var(--ink);
  background: var(--signal);
  border: 0;
  border-left: 1px solid var(--ink);
  font-size: 22px;
  font-weight: 900;
}

.password-row button:hover {
  color: var(--paper);
  background: var(--ink);
}

.error {
  margin: 12px 0 0;
  color: #bd4839;
  font-size: 13px;
  font-weight: 800;
}

.game-controls {
  position: absolute;
  z-index: 5;
  inset: auto 50% 20px auto;
  display: flex;
  gap: 7px;
  transform: translateX(50%);
}

.game-controls button {
  display: grid;
  width: 44px;
  height: 38px;
  place-items: center;
  color: var(--panel);
  background: rgba(8, 8, 8, .82);
  border: 1px solid rgba(255, 255, 255, .42);
  box-shadow: inset 0 -3px rgba(255, 255, 255, .1);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 14px;
  font-weight: 900;
  touch-action: none;
}

.game-controls .jump {
  width: 76px;
  color: var(--ink);
  background: var(--signal);
  border-color: var(--signal);
}

.game-controls button:active,
.game-controls button.is-active {
  transform: translateY(2px);
  box-shadow: inset 0 -1px rgba(255, 255, 255, .1);
}

@media (max-width: 620px) {
  .access-brand strong {
    width: 58px;
  }

  .access-brand span {
    display: none;
  }

  .game-score {
    gap: 12px;
    padding: 0 12px;
  }

  .access-card {
    top: 62%;
    width: calc(100% - 28px);
    padding: 22px;
  }

  h1 {
    font-size: 32px;
  }

  .access-card > p {
    margin-bottom: 18px;
  }

  .game-controls {
    bottom: 14px;
  }
}

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