* {
  touch-action: manipulation;
}

body {
  font-family: 'Proxima Nova', Helvetica, Futura, Calibri, sans-serif;
  font-weight: 400;
  line-height: 1.5;
  background-color: #f8f8f8;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: 100vh;
  color: #24373d;
  overflow: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  margin-top: 0;
  margin-bottom: 0.2rem;
  text-align: center;
}

h2 {
  font-size: 2rem;
}

p {
  margin-top: 0;
  margin-bottom: 1rem;
  font-weight: 400;
  font-size: 1rem;
  line-height: 1.5;
}

/*
#reset-button {
  font-size: 1em;
  padding: 0.5em 1em;
  background-color: #e74c3c;
  border: none;
  color: white;
  border-radius: 0.5em;
  cursor: pointer;
  margin-left: 1em;
}

#reset-button:hover {
  background-color: #c0392b;
}
*/

#button-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 60%;
  max-width: 600px;
  margin-top: 10px;
}

#reset-button, #about-button {
  font-size: 1em;
  padding: 0.5em 1em;
  border: none;
  color: white;
  border-radius: 0.5em;
  cursor: pointer;
  width: calc(50% - 10px);
}

#reset-button {
  background-color: #63aad6;
}

#about-button {
  background-color: #8bcbe8;
}

#reset-button:hover, #about-button:hover {
  background-color: #76bce8;
}

#game-board {
  position: relative;
  height: calc(100vh - 100px);
  /* height: calc(100vh - env(safe-area-inset-bottom) - 160px); */
  width: 60%;
  margin: 20px auto;
  border: none;
  overflow: hidden;
  background-color: #f7f7f7;
  /* Use CSS media queries to adjust width based on screen size */
  width: 100%;
  touch-action: none; /* disable default touch behaviors like pinch zoom and double tap zoom.*/
}

#game-board::before {
  content: '';
  display: block;
  width: 100%;
  height: 1px;
  background-color: #ccc;
  margin-bottom: 20px;
}

@media screen and (min-width: 767px) {
  #game-board {
    width: calc(90% - 40px);
  }
}

@media screen and (min-width: 960px) {
  #game-board {
    width: calc(80% - 40px);
  }
}

@media screen and (max-width: 767px) {
  body {
    font-size: 16px;
  }
  h1 {
    font-size: 32px;
  }
  .key {
    font-size: 48px;
  }
}

@media screen and (max-width: 767px) {
  .key {
    width: 120px;
    height: 120px;
    line-height: 100px;
    font-size: 36px;
  }
}

.key {
  position: absolute;
  top: -90px;
  left: 50%;
  transform: translateX(-50%);
  width: 90px;
  height: 90px;
  line-height: 90px;
  font-size: 3em;
  background-color: #3498db;
  color: white;
  border: none;
  box-shadow: none;
  text-align: center;
  border-radius: 45px;
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}


.key.success-highlight {
  backgroundColor: "#87cefa";
  color: white;
  -webkit-appearance: none;
}

.success {
  position: absolute;
  font-size: 2em;
  color: white;
  animation: explode 0.5s ease-in-out forwards;
}

@keyframes explode {
  from {
    transform: scale(1);
    opacity: 1;
  }
  to {
    transform: scale(3);
    opacity: 0;
  }
}


.blink {
  animation: blink 0.5s linear;
}

@keyframes blink {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}


/* The modal container */
.modal {
  position: fixed;
  z-index: 1;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.5);
  display: none;
  justify-content: center;
  align-items: center;
}

/* Style for the modal content */
.modal-content {
  background-color: #f7f7f7;
  border-radius: 5px;
  padding: 1.5em;
  max-width: 80%;
  text-align: left;
  position: relative;
  overflow: auto;
  max-height: 70vh;
}

/* Style for the modal title */
.modal-title {
  font-weight: 700;
  font-size: 1.5em;
  margin-bottom: 0.5em;
}

/* Style for the links */
.modal-content a {
  color: #3498db;
}

/* Style for the close button */
.modal-close {
  color: #aaa;
  font-size: 2em;
  padding: 0.25em;
  position: absolute;
  top: 1.2em;
  right: 1.2em;
  cursor: pointer;
  transform: translate(50%, -50%);
}

.modal-close:hover,
.modal-close:focus {
  color: #24373d;
  text-decoration: none;
  cursor: pointer;
  background-color: #f7f7f7;
  border-radius: 50%;
  padding: 0.2em;
}

@media screen and (max-width: 767px) {
  .modal {
    font-size: 16px;
  }
  .modal-content {
    margin: 20px auto;
  }
}

