/* #region Variables */
:root {
  --background:  rgba(255, 255, 0, 0.651);
  --primary: rgba(1, 160, 1, 0.89);
  --fontVT323: 'VT323', monospace;
  --fontComputerSpeak: 'ComputerSpeakv03Regular';
  --fontBungee: 'Bungee Shade', cursive;
  --textShadow: 5px 5px 5px rgba(137, 158, 137, 0.25);
  --textShadowHover: 16px 6px 15px #ced0d3;
}
/* #endregion Variables */

/* #region Base */
html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  user-select: none;
}

body {
  font-family: var(--fontVT323);
  font-size: 100%;
  line-height: 1.4;
}

p {
  margin: 0 auto;
  padding: 0.25em;
  font-size: 1.5rem;
}
/* #endregion Base */

/* #region GameConsole */
.game-console {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  margin: auto;
  width: 100%;
  height: 100%;
  perspective: 200em;
  transform-origin: 50% 50%;
  transform-style: preserve-3d;
  transition: 2s;
}

.game-console > div {
  position: absolute;
  width: 100%;
  height: 100%;
  box-shadow: inset 0 0 1vw 0 #777;
}

.game-console div:nth-child(1) {
  background: linear-gradient(to left, #383838 0%, #050505 70%);
  transform: rotateY(90deg);
  transform-origin: left;
}

.game-console div:nth-child(2) {
  /* Permalink - use to edit and share this gradient: http://colorzilla.com/gradient-editor/#d6d8d8+0,2e2f30+97 */
  border: 10em #d6d8d8; /* Old browsers */
  transform: translateZ(-100vw);
  background: radial-gradient(var(--background) 95%, white);
}

.game-console div:nth-child(3) {
  background: linear-gradient(to right, #383838 0%, #050505 70%);
  transform: rotateY(-90deg);
  transform-origin: right;
}
.game-console div:nth-child(4) {
  height: 100vw;
  background: linear-gradient(to bottom, #383838 0%, #050505 70%);
  transform: rotateX(-90deg);
  transform-origin: top;
}
.game-console div:nth-child(5) {
  bottom: 0;
  height: 100vw;
  background: linear-gradient(to top, #383838 0%, #050505 70%);
  transform: rotateX(90deg);
  transform-origin: bottom;
}

@media (min-width: 768px) {
  .game-console {
    perspective: 300em;
  }
}

@media (min-width: 1280px) {
  .game-console {
    perspective: 400em;
  }
}
/* #endregion GameConsole */

/* #region loader */
.loader {
  position: absolute;
  top: 50%;
  left: 50%;
  display: block;
  width: 64px;
  height: 64px;
  margin-top: -32px;
  margin-left: -32px;
}

.loader:after {
  content: " ";
  display: block;
  width: 46px;
  height: 46px;
  margin: 1px;
  border-radius: 50%;
  border: 5px solid #fff;
  border-color: var(--primary) transparent var(--primary) transparent;
  animation: loaderspin 1.2s linear infinite;
}

@keyframes loaderspin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}
/* #endregion loader */

/* #region Header */
.header {
  position: relative;
  user-select: none;
  font-family: var(--fontBungee);
  text-align: center;
  color: var(--primary);
}

.header h1 {
  margin: 0;
  padding: .25em;
  line-height: 1.5em;
  font-size: 1.5rem;
  text-shadow: 0 0 0 var(--background);
  animation: glow .5s infinite alternate;
}

@keyframes glow {
  to {
    color:rgb(0, 151, 0);
    text-shadow: 0 0 50px rgb(255, 255, 255);
  }
}

@media screen and (min-width: 768px) {
  .header h1 {
    font-size: 2.5rem;
  }
  .header {
    margin: .5em;
  }
}

@media screen and (min-width: 1024px) {
  .header h1 {
    font-size: 3rem;
  }
  .header {
    margin: 1em;
  }
}
/* #endregion Header */

/* #region Buttons */
.btn {
  background-color:var(--primary);
  border: 1px solid black;
  box-shadow: .075em .075em .075em rgba(0, 0, 0, 0.75);
  padding: .25em 1em;
  font-family: var(--fontVT323);
  font-size: 1.5rem;
  text-transform: uppercase;
  cursor: pointer;
  transition: box-shadow 250ms;
}

.btn:hover {
  box-shadow: .1em .1em .075em rgba(0, 0, 0, 0.75);
}

.btn--start {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 4em;
  height: 2em;
  margin-top: -1em;
  margin-left: -2em;
}

.btn--next {
  margin-top: 1em;
}

.btn--newGame {
  margin-top: 1em;
}
/* #endregion Buttons */

.page {
  overflow: hidden;
}

.gameArena {
 padding: .25em;
}

.time-remaining {
  font-weight: 600;
  text-decoration: underline;
  text-shadow: var(--textShadow);
}

.category {
  font-size: 1.5rem;
  text-shadow: var(--textShadow);
}

.correct {
  font-family: var(--fontComputerSpeak);
  text-shadow: var(--textShadow);
  animation: correct 1s infinite;
  transform: rotate(-.5deg);
}

@media screen and (min-width: 768px) {
  .correct {
    font-size: 2.5rem;
  }
}

@media screen and (min-width: 1024px) {
  .correct {
    font-size: 3rem;
  }
}

@keyframes correct {
  50% {
    transform: rotate(.5deg);
  }
  100% {
    transform: rotate(-.5deg);
  }
  
}

.totals {
  max-width: 25em;
  margin: 1em 0;
  border: .175em solid var(--primary);
  padding: .5em;
  text-shadow: var(--textShadow);
}

.correct-answer {
  font-size: 1.5rem;
  text-shadow: var(--textShadow);
  animation: correctAnswer 2s;
}

@keyframes correctAnswer {
  0% { opacity: 0; }
  50% { opacity: 0; }
  100% { opacity: 1; }
}

.question {
  font-family: var(--fontVT323);
  font-size: 1.5rem;
  text-shadow: var(--textShadow);
}

.answer-button {
  display: block;
  overflow: hidden;
  width: 50%;
  border: 1px solid transparent;
  outline: none;
  background: transparent;
  padding: 0.5em;
  font-family: var(--fontVT323);
  font-size: 1.5rem;
  text-shadow: var(--textShadow);
  cursor: pointer;
  transition-property: background, color, border;
  transition-duration: 100ms;
}

.answer-button:hover {
  border: 1px solid black;
  background: var(--primary);
  color: var(--background);
}

.game-over {
  font-family: var(--fontComputerSpeak);
  font-size: 2.5rem;
  overflow: hidden;
  white-space: nowrap;
  animation: gameOver 3s ease-in;
}

@keyframes gameOver {
  from {
    opacity: 0;
    margin-left: 100%;
    width: 300%;
  }
  to {
    opacity: 1;
    margin-left: 0%;
    width:100%;
  }
}

@media screen and (min-width: 768px) {
  .game-over {
    font-size: 4rem;
  }
}

@media screen and (min-width: 1024px) {
  .game-over {
    font-size: 5rem;
  }
}

.play-again {
  font-family: var(--fontVT323);
  animation-name: playAgain;
  animation-duration: 3s;
}

@keyframes playAgain {
  0% {
    opacity: 0;
  }
  90% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}

@media screen and (min-width: 768px) {
  .gameArena button, .time-remaining, .category, .question, .totals, .play-again, .correct-answer {
    font-size: 2rem;
  }
}

@media screen and (min-width: 1024px) {
  .gameArena button, .time-remaining, .category, .question, .totals, .play-again, .correct-answer {
    font-size: 2.25rem;
  }
}

.footer {
  display: block;
  position: fixed;
  bottom: 0;
  width: 100%;
  padding: .5em;
  background-color: transparent;
  font-family: var(--fontVT323)
}
