html {
  background-color: black;
  overflow: hidden;
}

canvas {
  border: none;
  outline: none;
}

#menu {
  visibility: visible;
  position: fixed;
  left: 0;
  top: 0;
  width: 100vw;
  height: 100vh;
}

.page-container {
  height: auto;
}

.games-list {
  position:fixed;
  top: 5px;
  right: 20px;
  height: 100vh;
}

.artwork {
  width: auto;
}

.hidden {
  visibility: hidden;
}

.menu-wrap {
  display:flex;
  justify-content: center;
  align-items: center;
  height: 100%;
}

.menu-img {
  color: white;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 4vh;
}

#background {
  position: fixed;
  left: 0;
  top: 0;
  width: 100vw;
  height: 100vh;
}

#corner {
  position: fixed;
  left: 0;
  bottom: 0;
  height: 50vh;
}

#game {
  text-align: center;
  color: white;
}

#startEmu {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  background: transparent;
  cursor: pointer;
  font-size: 5vw;
  border: 3px solid;
  border-radius: 1vw;
  padding: 1vw;
}

.file-button {
  position: absolute;
  top: 1vh;
  left: 1vw;
  cursor: pointer;
  border: none;
  width: 1.7vw;
  z-index: 999999;
  filter: invert(100%) sepia(0%) saturate(0%) hue-rotate(82deg) brightness(105%) contrast(105%);
}

.full-main {
  position: absolute;
  top: 1vh;
  left: 1vw;
  cursor: pointer;
  border: none;
  width: 1.7vw;
  z-index: 999999;
  filter: invert(100%) sepia(0%) saturate(0%) hue-rotate(82deg) brightness(105%) contrast(105%);
}

@keyframes growonce {
  0% {
    transform: scale(.5,.5) translate(15vw,0);
  }
  100% {
    transform: scale(1.0,1.0) translate(0,0);
  }
}

.grow {
  animation: growonce .3s forwards;
}

.shrink {
  transform: scale(.5,.5) translate(15vw,0);
}

@keyframes growonce-mobile {
  0% {
    transform: scale(.5,.5);
  }
  100% {
    transform: scale(1.0,1.0);
  }
}

.grow-mobile {
  animation: growonce-mobile .3s forwards;
}

.shrink-mobile {
  transform: scale(.5,.5);
}

/* custom: logos do menu maiores e uniformes */
img.menu-img {
  height: 13vh;
  max-width: 40vw;
  width: auto;
  object-fit: contain;
}

/* custom: capas (verticais) maiores p/ dar pra enxergar */
img.menu-img.boxart {
  height: 22vh !important;
  max-height: 22vh !important;
  max-width: 26vw !important;
}

/* custom: tela de loading pixelada */
#loading {
  position: fixed; left: 0; top: 0; width: 100vw; height: 100vh;
  display: flex; align-items: center; justify-content: center;
  background: #000; z-index: 100; color: #fff; font-family: monospace;
}
#loading:empty { display: none !important; }
#loading .ld-box { text-align: center; }
#loading .ld-label {
  font-size: 3.2vh; letter-spacing: 0.4vh; text-transform: uppercase;
  margin-bottom: 2.4vh; text-shadow: 0.3vh 0.3vh 0 #1a1a1a;
}
#loading .ld-bar {
  position: relative; width: 52vw; height: 5.5vh; border: 0.5vh solid #fff;
  background: #111; padding: 0.6vh; box-sizing: border-box; image-rendering: pixelated;
}
#loading .ld-fill {
  height: 100%; width: 0%; background: #39ff14;
  transition: width 0.12s steps(16, end);
}
#loading .ld-seg {
  position: absolute; left: 0.6vh; top: 0.6vh; right: 0.6vh; bottom: 0.6vh;
  background: repeating-linear-gradient(90deg, rgba(0,0,0,0) 0, rgba(0,0,0,0) 1.6vh, #111 1.6vh, #111 2.1vh);
  pointer-events: none;
}
#loading .ld-pct { margin-top: 1.8vh; font-size: 2.4vh; letter-spacing: 0.2vh; }

/* custom: gameplay atras da TV (tela ja e transparente na imagem) */
#background { z-index: 2; }
.games-list { z-index: 3; }

/* custom: contorno+halo branco p/ logos escuros (ex. Columns) ficarem visiveis no fundo escuro */
img.menu-img:not(.boxart) {
  filter:
    drop-shadow(0.12vh 0.12vh 0 rgba(255,255,255,0.92))
    drop-shadow(-0.12vh -0.12vh 0 rgba(255,255,255,0.92))
    drop-shadow(0.12vh -0.12vh 0 rgba(255,255,255,0.92))
    drop-shadow(-0.12vh 0.12vh 0 rgba(255,255,255,0.92))
    drop-shadow(0 0 0.7vh rgba(255,255,255,0.5));
}
