@import url('https://fonts.googleapis.com/css2?family=Silkscreen&display=swap');

:root {
  --clr-bg: #000;
  --clr-fg: #fff;
  --clr-primary: #26ED90;
  --clr-primary-dark: #219E64;
  --clr-complementary: #ed2683;
  --clr-analogous-1: #26ed2d;
  --clr-analogous-2: #26e6ed;
  --clr-triadic-1: #2683ed;
  --clr-triadic-2: #9026ed;
  --clr-00dp: hsl(0, 0%, 7%);
  --clr-01dp: hsl(0, 0%, 11%);
  --clr-02dp: hsl(0, 0%, 13%);
  --clr-03dp: hsl(0, 0%, 14%);
  --clr-04dp: hsl(0, 0%, 15%);
  --clr-06dp: hsl(0, 0%, 17%);
  --clr-08dp: hsl(0, 0%, 18%);
  --clr-12dp: hsl(0, 0%, 20%);
  --clr-16dp: hsl(0, 0%, 21%);
  --clr-24dp: hsl(0, 0%, 22%);
  --clr-bg-transparent: rgba(0, 0, 0, 0.2);
  --clr-bg-transparent2: hsla(0, 0%, 7%, 60%);

  --vui-visible: none;
}

/* CSS Boilerplate https://www.joshwcomeau.com/css/custom-css-reset/ */

*,
*::before,
*::after {
  box-sizing: border-box;
}

* {
  margin: 0;
}

html,
body {
  height: 100%;
}

body {
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
}

input,
button,
textarea,
select {
  font: inherit;
}

p,
h1,
h2,
h3,
h4,
h5,
h6 {
  overflow-wrap: break-word;
}

#root,
#__next {
  isolation: isolate;
}

/* CSS */

*::selection {
  background: var(--clr-fg);
  color: var(--clr-bg);
}

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

a:hover,
a:active,
a:focus {
  text-decoration: underline;
}

html,
body {
  width: 100%;
  overflow: hidden;
}

body {
  color: var(--clr-fg);
  background-color: var(--clr-bg);
  font-family: 'Silkscreen', cursive, sans-serif;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
}

.autoview {
  text-align: center;
  font-size: 1.5rem;
  color: var(--clr-fg);
  background-color: var(--clr-bg);
  margin: 0;
  width: 100vw;
  height: 100vh;
  display: grid;
  place-content: center;
  border: 5px solid var(--clr-bg);
  box-sizing: content-box;
}

.autoview .click {
  width: 50px;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(100px, -45px);
  filter: grayscale();
}

.container {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
}

.canvas-container {
  display: grid;
  place-items: center;
  position: relative;
  width: 768px;
  height: 1024px;
  border: 2px solid white;
  transform: scale(.8);
}

canvas.fullscreen {
  width: 100%;
  height: 100%;
}

.bg {
  position: absolute;
  width: 100%;
  height: 100%;
  object-fit: cover;
  inset: 0;
  filter: brightness(2) contrast(2) grayscale();
}

.blink {
  font-size: 1.2em;
  animation: blink-animation 1s steps(2, start) infinite;
  -webkit-animation: blink-animation 1s steps(2, start) infinite;
}

@keyframes blink-animation {
  to {
    visibility: hidden;
  }
}

@-webkit-keyframes blink-animation {
  to {
    visibility: hidden;
  }
}

#vui {
  display: none;
  position: absolute;
  width: 100%;
  height: 100%;
  z-index: 999;
  top: 0;
  font-size: 1.75em;
}

.vui-container {
  display: grid;
  grid-template-columns: auto auto;
  justify-content: space-between;
  align-content: space-between;
  padding: 10px;
  height: 100%;
}

#vui input {
  background: none;
  border: none;
  color: var(--clr-fg);
  max-width: 300px;
  pointer-events: none;
}

#vui .vui-container div {
  display: var(--vui-visible);
}

#vui .vui-container div:nth-child(1) *,
#vui .vui-container div:nth-child(3) * {
  text-align: left;
}

#vui .vui-container div:nth-child(2) *,
#vui .vui-container div:nth-child(4) * {
  text-align: right;
}

#vui .info {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

#vui .info input {
  text-align: center;
}

#vui .start {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}

#vui .start img {
  width: 600px;
}

#vui .controls {
  margin-top: 5rem;
  font-size: .8em;
}

#vui .bottom {
  margin-top: 15rem;
  font-size: .6em;
  opacity: .5;
  width: 500px;
}

#table {
  display: none;
}

.leaderboard td {
  padding: .25rem 1rem;
}

.upload:not([open]) {
  display: none;
}

.upload {
  text-align: center;
  font-size: 1.5rem;
  color: var(--clr-fg);
  background-color: var(--clr-bg);
  margin: 0;
  display: grid;
  place-content: center;
  gap: 1rem;
  margin: auto;
  max-width: 500px;
  box-sizing: content-box;
}

.upload input {
  background-color: var(--clr-bg);
  color: var(--clr-fg);
  border: 2px solid var(--clr-fg);
  padding: 5px 10px;
}

.upload div:nth-child(3) input {
  width: 285px;
}

.upload button {
  --clr-btn: var(--clr-fg);
  background-color: var(--clr-bg);
  color: var(--clr-btn);
  border: 2px solid var(--clr-btn);
  padding: 5px 10px;
  cursor: pointer;
}

.upload div:last-child button:nth-child(2) {
  --clr-btn: lime;
  color: var(--clr-btn);
  border: 2px solid var(--clr-btn);
}

.upload div:last-child button:nth-child(1) {
  --clr-btn: red;
  color: var(--clr-btn);
  border: 2px solid var(--clr-btn);
}

.upload button:hover,
.upload div:last-child button:nth-child(1):hover,
.upload div:last-child button:nth-child(2):hover {
  background-color: var(--clr-btn);
  color: var(--clr-bg);
}

.unsupported {
  max-width: 600px;
  color: red;
}

.left .buttons {
  display: flex;
  align-items: center;
  justify-content: space-around;
}

.left .buttons h1 {
  padding: 5px 15px;
  cursor: pointer;
  border-top: 2px solid var(--clr-bg);
  border-left: 2px solid var(--clr-bg);
  border-right: 2px solid var(--clr-bg);
}

.left .buttons h1:hover {
  background-color: var(--clr-fg);
  color: var(--clr-bg);
}

.left .buttons h1.active {
  border-top: 2px solid var(--clr-fg);
  border-left: 2px solid var(--clr-fg);
  border-right: 2px solid var(--clr-fg);
}

.about {
  display: none;
}

.leaderboard {
  border: 2px solid var(--clr-fg);
  padding: 2rem 1rem;
}

.about {
  color: var(--clr-fg);
  font-size: .75em;
  border: 2px solid var(--clr-fg);
  padding: 1rem;
  text-align: left;
  max-width: 525px;
  max-height: 600px;
  overflow-y: scroll;
}

.about .gap {
  margin-top: 1rem;
}

.about i {
  font-style: normal;
  color: yellow;
}

.about a {
  color: var(--clr-fg);
}

.tooltip-container {
  cursor: pointer;
  position: relative;
  display: inline-block;
}

.tooltip {
  opacity: 0;
  z-index: 99;
  color: var(--clr-fg);
  width: max-content;
  display: block;
  font-size: 11px;
  padding: 5px 10px;
  border-radius: 3px;
  text-align: center;
  background: var(--clr-06dp);
  position: absolute;
  right: 50%;
  transform: translateX(50%);
  bottom: 40px;
  pointer-events: none;
  font-size: 1rem;
}

.tooltip:before,
.tooltip:after {
  content: '';
  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
  border-top: 10px solid var(--clr-06dp);
  position: absolute;
  bottom: -10px;
  left: 43%;
}

.tooltip-container:hover .tooltip {
  opacity: 1;
}