canvas {
  position: fixed;
  top: 0;
  left: 0;
}

main {
  position: absolute;
}

main {
  width: 100%;
  height: 100%;
  /* display: flex;
  justify-content: center;
  align-items: center; */
}

body {
  font-family: Avenir, Helvetica, Arial, sans-serif;
  margin: 0;
  /* overflow: hidden; Hide scrollbars */
  overflow: auto;

  opacity: 0;
  transition: opacity 0.5s ease-in;
  background: rgb(24, 24, 24);
}

.home-icon {
  height: 25px;
  position: absolute;
  margin: 10px;
  transition: 0.1s;
}

.home-icon:hover,
.home-icon:focus {
  opacity: 0.5;
}

.help-icon {
  height: 25px;
  position: absolute;
  right: 10px;
  margin: 10px;
  transition: 0.1s;
}

.help-icon:hover,
.help-icon:focus {
  opacity: 0.5;
  cursor: pointer;
}

.content {
  bottom: 0;
  left: 0;
  display: flex;
  align-items: center;
}

.content-panel {
  width: 90%;
  margin: auto;
  text-align: center;
  color: white;
}

.grid {
  display: grid;
  grid-template-columns: minmax(130px, 300px) minmax(20px, auto) minmax(
      130px,
      300px
    );
  grid-template-rows: 3fr repeat(7, minmax(20px, 1fr));
  gap: 20px 0px;
  grid-auto-flow: column;
  perspective: 250px;
}

h1,
h2,
p {
  margin: 0;
  font-weight: 100;
  line-height: 1;
  letter-spacing: 0px;
}

h2 {
  font-size: 1.1em;
}

a {
  text-decoration: none;
}

.card {
  color: white;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: rgb(255, 255, 255, 0.1);
  text-decoration: none;
  padding: 5px 10px;

  /* box-shadow: 0px 0px 0px 0.5px #fff inset; */
  height: 100%;
  border-radius: 6px;
  border: 0.5px solid white;
  overflow: hidden;

  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  text-align: center;

  transition: 0.2s ease-out;
  will-change: transform;
}

/* The Modal (background) */
.modal {
  display: none; /* Hidden by default */
  position: fixed; /* Stay in place */
  z-index: 1; /* Sit on top */
  left: 0;
  top: 0;
  width: 100%; /* Full width */
  height: 100%; /* Full height */
  overflow: auto; /* Enable scroll if needed */
  background-color: rgb(0, 0, 0); /* Fallback color */
  background-color: rgba(0, 0, 0, 0.6);
  justify-content: center;
  align-items: center;
}

/* Add Animation */
@-webkit-keyframes animateModal {
  0% {
    -webkit-transform: translateY(-50vh) translateX(50vw) scale(0);
    transform: translateY(-50vh) translateX(50vw) scale(0);
    opacity: 0;
  }
  100% {
    -webkit-transform: translateY(0) translateX(0) scale(1);
    transform: translateY(0) translateX(0) scale(1);
    opacity: 1;
  }
}

@keyframes animateModal {
  0% {
    -webkit-transform: translateY(-50vh) translateX(50vw) scale(0);
    transform: translateY(-50vh) translateX(50vw) scale(0);
    opacity: 0;
  }
  100% {
    -webkit-transform: translateY(0) translateX(0) scale(1);
    transform: translateY(0) translateX(0) scale(1);
    opacity: 1;
  }
}

/* Modal Content/Box */
.modal-content {
  background-color: rgba(0, 0, 0, 0.9);
  color: white;
  padding: 20px;
  width: clamp(300px, 80%, 600px);
  box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.2);
  border-radius: 20px;

  --duration: 0.5s;
  -webkit-animation: animateModal var(--duration) ease 0s forwards;
  -moz-animation: animateModal var(--duration) ease 0s forwards;
  -ms-animation: animateModal var(--duration) ease 0s forwards;
  animation: animateModal var(--duration) ease 0s forwards;
}

.modal-content p {
  line-height: clamp(1.1, 1.4, 1.5);
}
.modal-content h2 {
  font-size: 1.4em;
}
.modal-content a {
  color: white;
  /* text-decoration: underline; */
  font-style: italic;
}
.modal-content a:hover,
.modal-content a:focus {
  opacity: 0.5;
}

.lesson-grid {
  display: grid;
  grid-template-columns: 4fr 0.5fr 8fr 0.5fr 8fr;
  grid-template-rows: 1fr;
  gap: 10px 10px;
  grid-auto-flow: row;
  text-align: center;
  margin-top: 20px;
}

.lesson-grid > div {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
}

.modal-content img {
  width: clamp(30px, 90%, 70px);
}

p#modal-text {
  font-size: clamp(0.5rem, 3.8vw, 1rem);
}

.home-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr;
  gap: 10px 10px;
  grid-auto-flow: row;
  text-align: center;
  margin-top: 20px;
  margin: 20px clamp(10px, 5%, 30px);
}

.image-left {
  grid-template-columns: 1fr 4fr;
}

.image-right {
  grid-template-columns: 4fr 1fr;
}

.home-grid > div {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
}

.left-align {
  text-align: left;
}

/* .lesson-grid > div > img {
  width: clamp(50px, 50%, 90px);
} */

/* The Close Button */
.close-modal {
  color: white;
  float: right;
  font-size: 20px;
  /* font-weight: bold; */
}

.close-modal:hover,
.close-modal:focus {
  opacity: 0.8;
  text-decoration: none;
  cursor: pointer;
}
