* { box-sizing: border-box; -webkit-user-select: none; user-select: none; }
body {
  margin: 0;
  min-height: 100vh;
  font: 14px Arial, sans-serif;
  background: black;
  color: white;
}
#page-layout { min-height: 100vh; display: grid; place-items: center; }
#player { max-width: 100vw; padding: 8px; position: relative; }
.toolbar {
  display: grid;
  gap: 8px;
  width: var(--toolbar-width, 593px);
  max-width: 100%;
  margin: 0 auto 8px;
  position: relative;
  left: var(--toolbar-offset, 0.5px);
}
.toolbar-heading, .versions, .display-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-width: 0; }
.toolbar-heading { column-gap: 16px; }
.release-links { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.display-controls { justify-content: flex-end; min-height: 24px; }
.toolbar h1, .versions a { font-weight: bold; line-height: 1; }
.toolbar h1 { margin: 0; font-size: 26px; }
.versions { column-gap: 12px; }
.versions a { color: #999; font-size: 20px; text-decoration: none; }
.versions [data-mode="classic"][aria-current="page"] { color: #eacb83; }
.versions [data-mode="continued"][aria-current="page"] { color: #9bcdf7; }
.versions a:hover { color: white; }
#release { padding: 3px 5px; border: 1px solid transparent; color: #bbb; white-space: nowrap; text-decoration: none; text-underline-offset: 3px; }
#release:hover { text-decoration: underline; }
#github, #discord { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; }
#github { color: white; }
#discord { background: #5865f2; border-radius: 4px; }
footer { margin-top: 8px; text-align: center; line-height: 20px; height: 40px; }
button, select { font: inherit; }
.toolbar button, .toolbar select { height: 24px; }
#fullscreen { display: inline-flex; align-items: center; justify-content: center; width: 28px; padding: 0; }
#release.has-update {
  position: relative;
  isolation: isolate;
  color: #f4f4f4;
  border: 1px solid transparent;
  border-radius: 2px;
  background: #080808;
  animation: update-glow 2.6s ease-in-out infinite;
}
#release.has-update::before {
  content: '';
  position: absolute;
  inset: -1px;
  z-index: -1;
  padding: 1px;
  border-radius: inherit;
  background: linear-gradient(165deg, #ffe890 0%, #ffd463 36%, #ffb135 64%, #f07c0b 100%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#fff 0 0) content-box exclude, linear-gradient(#fff 0 0);
  pointer-events: none;
}
@keyframes update-glow {
  0%, 100% { box-shadow: 0 -2px 5px #ffdb5b4d, 0 2px 5px #ff8a183d, 0 0 12px #ffad2426; }
  50% { box-shadow: 0 -2px 7px #ffe07b80, 0 2px 7px #ff941a73, 0 0 17px #ffad2447; }
}
@media (prefers-reduced-motion: reduce) {
  #release.has-update:not(.preview-update) { animation: none; }
}
a { color: #8ab4f8; }
button[aria-pressed="true"] { font-weight: bold; }
#viewport { max-width: calc(100vw - 16px); overflow: auto; }
#screen { position: relative; width: 600px; height: 330px; background: black; overflow: hidden; }
#screen:focus { outline: none; }
#startup-screen { position: absolute; inset: 0; width: 100%; height: 100%; image-rendering: pixelated; }
canvas { display: block; width: 100%; height: 100%; image-rendering: pixelated; visibility: hidden; }
#screen.ready canvas { visibility: visible; }
#loading {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 8px;
  color: white;
  visibility: hidden;
}
#loading.has-message { visibility: visible; background: #000c; }
#screen.ready #loading { display: none; }
#changelog-dialog { position: absolute; inset: 0; overflow: hidden; }
#changelog-canvas { visibility: visible; }
#changelog-close {
  position: absolute;
  left: 84%;
  top: 3.33%;
  width: 12%;
  height: 4.85%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}
#changelog-close:focus-visible { outline: 1px solid white; }
.changelog-text {
  position: absolute;
  top: 0;
  left: 0;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: pre-wrap;
}
#player:fullscreen, body.browser-fullscreen #player {
  width: 100vw;
  max-width: none;
  height: 100vh;
  display: flex;
  flex-direction: column;
  background: black;
}
#player:fullscreen .toolbar, body.browser-fullscreen .toolbar,
#player:fullscreen footer, body.browser-fullscreen footer { flex-shrink: 0; }
#player:fullscreen #viewport, body.browser-fullscreen #viewport {
  flex: 1;
  min-height: 0;
  max-width: none;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: black;
}
#player:fullscreen #screen, body.browser-fullscreen #screen { flex-shrink: 0; }
