/* https://coolors.co/ec4a49-f17e7e-63bcca-85cbd5-141414-008f00 */
:root {
  --blue: #63bcca;
  --light-blue: #85cbd5;
  --white: #ffffff;
  --light-gray: #e7e7e7;
  --red: #ec4a49;
  --light-red: #f17e7e;
  --black: #141414;
  --green: #008f00;
}

* {
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html,
.word-games-div {
  touch-action: manipulation;
}

.word-games-div {
  align-content: center;
  vertical-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;

  margin: 0 auto;
  max-width: 800px;
  display: flex;
  flex-direction: column;
  font-family: 'Open Sans', sans-serif;
  line-height: 30px;
  position: relative;
}

.container {
  display: flex;
  justify-content: center;
}

#scoreboard {
  display: flex;
  justify-content: center;
  flex-direction: column;
  margin-bottom: 1rem;
}

.punctuation {
  margin-top: 1rem !important;
}

#scoreboard > div {
  align-self: center;
  line-height: 1.5;
  margin: 8px 20px;
}

.hexGrid-container {
  display: flex;
  flex-direction: column;
  align-items: center;
}

#hexGrid {
  display: grid;
  grid-gap: 6px;
  width: 250px;
  margin: 0 auto;
  font-size: 0.9em;
  list-style-type: none;
  overflow: hidden;
  position: relative;
  grid-template-columns: repeat(6, 2fr);
  padding-bottom: 6.4%;
  margin-bottom: 2vh;
}

.hex {
  grid-column-end: span 2;
  position: relative;
  visibility: hidden;
  background-color: solid var(--blue);
  outline: 1px solid transparent; /* fix for jagged edges in FF on hover transition */
}

.hex::after {
  content: '';
  display: block;
  padding-bottom: 86.602%; /* =  100 / tan(60) * 1.5 */
}
.hexIn {
  position: absolute;
  width: 100%;
  padding-bottom: 115.47%; /* =  width / sin(60) */
  overflow: hidden;
  visibility: hidden;
  outline: 1px solid transparent; /* fix for jagged edges in FF on hover transition */
  -webkit-transform: rotate3d(0, 0, 1, -60deg) skewY(30deg);
  -ms-transform: rotate3d(0, 0, 1, -60deg) skewY(30deg);
  transform: rotate3d(0, 0, 1, -60deg) skewY(30deg);
}
.hexIn * {
  position: absolute;
  visibility: visible;
  outline: 1px solid transparent; /* fix for jagged edges in FF on hover transition */
}
.hexLink {
  display: block;
  width: 100%;
  height: 100%;
  text-align: center;
  background-color: var(--blue);
  overflow: hidden;
  -webkit-transform: skewY(-30deg) rotate3d(0, 0, 1, 60deg);
  -ms-transform: skewY(-30deg) rotate3d(0, 0, 1, 60deg);
  transform: skewY(-30deg) rotate3d(0, 0, 1, 60deg);
  -webkit-tap-highlight-color: transparent;
}

.hexLink:focus {
  outline: none;
}

#center-letter {
  background-color: var(--red);
}

input[type='text'] {
  background: transparent;
  border: none;
}

/*** HEX CONTENT *************************************************************/

.hex p {
  width: 100%;
  padding: 40%;
  box-sizing: border-box;
  background-color: transparent;
  font-size: 1.4em;
  color: var(--black);
  font-family: 'Open Sans', sans-serif;
  text-transform: uppercase;
  font-weight: 600;
}
/*** HEX HOVER *****************************************************************/

.hexLink:hover p,
.hexLink:focus p {
  background-color: var(--light-blue);
}

#center-letter.hexLink:hover p,
#center-letter.hexLink:focus p {
  background-color: var(--light-red);
}

/*** HEXAGON SIZING AND EVEN ROW INDENTATION *********************************/

.hex:nth-child(5n + 1) {
  /* first hexagon of odd rows */
  grid-column-start: 2;
}
.hex:nth-child(5n + 3) {
  /* first hexagon of even rows */
  grid-column-start: 1;
}

/*** INPUT & CURSOR ********************************************************************/

.cursor-container {
  font-size: 2rem;
  position: relative;
  margin: 30px auto;
  margin-top: 10px;
  display: flex;
}

#input-word {
  display: flex;
  height: 30px;
  align-items: center;
}

#test-word {
  text-align: center;
  font-family: 'Open Sans', sans-serif;
  padding-top: 3px;
}

#cursor {
  font-weight: 600;
  color: var(--blue);
  margin-top: -5px;
}

/*** TEXT **********************************************************************/

h1 {
  text-align: center;
  font-size: 3rem;
  font-weight: bold;
  font-family: 'Roboto Slab', serif;
}

.title {
  margin-top: 4.5vh;
  margin-bottom: 3vh;
  font-family: 'Oswald', serif;
  cursor: auto;
}

.title-highlight {
  color: var(--blue);
}

.title-highlight-variant {
  color: var(--red);
}
.title-highlight-variant:hover {
  cursor: pointer;
}

.scoreText {
  font-family: 'Open Sans', sans-serif;
  font-size: 15px;
  font-weight: normal;
  align-self: center;
}

ul {
  list-style-type: none;
  text-align: center;
}

#discoveredText {
  font-family: 'Open Sans', sans-serif;
  font-size: 15px;
  align-self: center;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
}

#discoveredText > ul {
  font-weight: bold;
}

.bold-text {
  font-weight: bold;
}

.dwords {
  font-weight: 100;
  padding: 0;
}

/*** BUTTONS *******************************************************************/

.button-container {
  display: inline-flex;
  margin: 30px auto;
  width: 300px;
}
.button {
  background-color: var(--white);
  border: 2px solid var(--light-gray);
  margin: 0 auto;
  color: var(--black);
  padding: 1rem;
  text-align: center;
  text-decoration: none;
  display: inline-block;
  font-size: 0.8em;
  border-radius: 30px;
  cursor: pointer;
}

.button:focus {
  outline: none;
}

.button:hover {
  background-color: var(--light-gray);
  color: var(--black);
  border: 2px solid var(--light-gray);
}

.button:focus-within {
  outline: white;
}

#shuffle_button {
  display: flex;
}

/*** NOTIFICATIONS AND SHAKE EFFECT ****************************************************************/

#too-short {
  display: none;
}
#invalid-word {
  display: none;
}
#already-found {
  display: none;
}
#miss-center {
  display: none;
}
#good,
#great,
#pangram,
#amazing {
  display: none;
  background-color: var(--blue);
  color: var(--white);
}
#pangram,
#amazing {
  background-color: var(--blue);
}

.container-notifications {
  position: relative;
  display: flex;
  justify-content: center;
  margin-top: 8px;
}

.notifications {
  position: absolute;
  background-color: #ec4a49;
  color: #fff;
  border-radius: 3px;
  padding: 5px;
  z-index: 100;
  pointer-events: none;
}

@keyframes backgroundLoop {
  0% {
    background: var(--white);
  }
  100% {
    background: var(--blue);
  }
}

.gameover-animation {
  animation-name: backgroundLoop;
  animation-duration: 2s;
  animation-iteration-count: infinite;
  animation-direction: alternate;
}
