@font-face {
  font-family: "Poppins";
  font-weight: 700;
  font-style: normal;
  src: url("/assets/Poppins-Bold-qTAUjFF7.ttf");
}
@font-face {
  font-family: "Poppins";
  font-weight: 900;
  font-style: italic;
  src: url("/assets/Poppins-BlackItalic-cm4Pcmzs.ttf");
}
:root {
  --background: snow;
  --foreground: rgb(125, 125, 125);
  --toggle-width: 32px;
  --toggle-height: 18px;
  --toggle-padding: 2px;
  --toggle-active-left: 16px;
  --toggle-size: 14px;
  --h1-size: 42px;
  --h2-size: 16px;
  --stat-size: 17px;
  --game-over-size: 24px;
  --smaller-size: 18px;
  --body-size: 14px;
  --controls-top-gap: 50px;
}

@media (min-width: 600px) {
  :root {
    --toggle-width: 40px;
    --toggle-height: 22px;
    --toggle-padding: 2px;
    --toggle-active-left: 20px;
    --toggle-size: 18px;
    --h1-size: 52px;
    --h2-size: 16px;
    --stat-size: 22px;
    --game-over-size: 32px;
    --smaller-size: 22px;
    --body-size: 16px;
  }
}
* {
  padding: 0;
  margin: 0;
  -webkit-touch-callout: none;
  -webkit-user-callout: none;
  -webkit-user-select: none;
  -webkit-user-drag: none;
  -webkit-user-modify: none;
  -webkit-highlight: none;
  user-select: none;
  touch-action: none;
}

html {
  overflow: hidden;
}

body {
  font-family: "Poppins", sans-serif;
  text-align: center;
  display: flex;
  justify-content: center;
  align-items: var(--alignment);
  background-color: var(--background);
  color: var(--foreground);
  height: 100svh;
  text-transform: uppercase;
  letter-spacing: 1px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background-image: radial-gradient(rgba(255, 255, 255, 0.25), rgba(0, 0, 0, 0));
  transition: background-color 0.5s, color 0.5s;
  font-size: var(--body-size);
  line-height: 1.4;
  font-weight: 700;
}
body.wordy {
  align-items: center;
}

main {
  max-width: 600px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 20px;
  line-height: 1.2;
  font-size: 18px;
  color: black;
}

h1 {
  font-size: var(--h1-size);
  font-style: italic;
  font-weight: 900;
}

h2 {
  font-size: var(--h2-size);
  font-weight: 700;
}

.game {
  position: relative;
  background-color: rgba(200, 200, 200, 0.25);
  padding: var(--game-top-padding) 0 var(--gap);
  display: flex;
  justify-content: center;
}

.game-canvas {
  display: block;
  pointer-events: none;
}

.tetris {
  position: relative;
  width: var(--game-width);
  height: var(--game-height);
  display: flex;
  flex-direction: column;
  gap: var(--game-gap);
}

.game-over {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background-color: var(--glass);
  backdrop-filter: blur(4px);
  font-size: var(--game-over-size);
  transition: background-color 0.5s;
}
.game-over .game-over-body {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.game-over[data-active=false] {
  display: none;
}

.smaller {
  font-size: var(--smaller-size);
}

.controls {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 0 40px;
}

.controls-top {
  display: flex;
  gap: var(--controls-top-gap);
  justify-content: space-between;
  align-items: center;
  padding-bottom: 10px;
}

.upnext {
  border-radius: 2px;
  position: absolute;
  top: var(--nextup-top);
  left: 20px;
  opacity: 0.75;
}

.toggle {
  line-height: 1;
}
.toggle label {
  display: block;
  margin-bottom: 7px;
}
.toggle input[type=checkbox] {
  position: relative;
  appearance: none;
  width: var(--toggle-width);
  height: var(--toggle-height);
}
.toggle input[type=checkbox]:before, .toggle input[type=checkbox]:after {
  content: "";
  display: block;
  box-sizing: border-box;
}
.toggle input[type=checkbox]:before {
  width: 100%;
  height: 100%;
  background-color: var(--foreground);
  border-radius: var(--toggle-height);
}
.toggle input[type=checkbox]:after {
  width: var(--toggle-size);
  height: var(--toggle-size);
  border-radius: 100%;
  background-color: var(--background);
  position: absolute;
  top: var(--toggle-padding);
  left: var(--toggle-padding);
  transition: background-color 0.5s;
}
.toggle input[type=checkbox]:checked:after {
  left: var(--toggle-active-left);
}
.toggle input[type=checkbox][data-variant=a]:checked:after {
  background-color: rgb(0, 240, 0);
}

.stat {
  font-size: var(--stat-size);
  display: flex;
  flex-direction: column-reverse;
}