@charset "utf-8";

:root {
  --border-radius: 6px;
  --center-text: center;
  --white-text: #fff;
  --app-background-color: #181720;
}

body {
  position: relative;
  width: 100%;
  height: 100svh;
  overflow: hidden;
  background-color: var(--app-background-color);
}

main {
  height: 100svh;
  display: grid;
  place-items: center;
}

video {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  min-width: 100%;
  min-height: 100%;
  width: auto;
  height: auto;
  z-index: -1;
  object-fit: cover;
}

.game-area {
  width: 520px;
  height: auto;
  display: grid;
  place-items: center;
  background: rgb(255 255 255 / 0.50);
  border-radius: var(--border-radius);
}


/* ------------------------------------------ */
/* Timer                                      */
/* ------------------------------------------ */
.timer {
  margin: 50px 0 15px;
  width: 170px;
  height: 170px;
  background-color: rgb(83 23 193 / 0.9);
  border: 1px solid rgb(83 23 193 / 0.2);
  box-shadow: 1px 1px 4px 1px rgb(154 129 200 / 0.15);
  border-radius: 50%;
  color: var(--white-text);
  font-size: 26px;
  text-align: center;
  display: grid;
  place-items: center;
}

.timer i {
  margin: 10px 0 -10px;
}

.time-display {
  font-size: 85px;
  font-weight: 600;
  margin-top: -40px;
}


/* ------------------------------------------ */
/* Random word display area                   */
/* ------------------------------------------ */
.random-word {
  width: 72%;
  height: 80px;
  margin: 20px 0 30px;
  background-color: rgb(83 23 193 / 0.9);
  border: 1px solid rgb(83 23 193 / 0.2);
  border-radius: var(--border-radius);
  font-variant: tabular-nums;
}

.word-display {
  color: var(--white-text);
  font-size: 50px;
  line-height: 75px;
  font-weight: 600;
  text-align: var(--center-text);

}

.matched {
  color: rgb(38 144 53);
}


/* ------------------------------------------ */
/* Number of hits                             */
/* ------------------------------------------ */
.hits {
  width: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-variant: tabular-nums;
}

.user-hits {
  font-size: 30px;
  font-weight: 600;
  color: rgb(25, 104, 36);
  /* color: rgb(83 23 193); */
}


/* ------------------------------------------ */
/* User input area                            */
/* ------------------------------------------ */
form {
  width: 50%;
}

input[type="text"] {
  width: 100%;
  height: 60px;
  font-size: 30px;
  font-weight: 600;
  color: rgb(48 23 193);
  text-align: var(--center-text);
  border-radius: 6px;
  background-color: var(--white-text);
  border: 2px solid rgb(48 23 193 / 0.6);
  box-shadow: 0.5px 0.5px 2px 0.5px rgb(154 129 200 / 0.2);
}

input[type="text"]:focus {
  border: 2px solid rgb(48 23 193 / 0.85);
}


/* ------------------------------------------ */
/* Button                                     */
/* ------------------------------------------ */
.button {
  margin: 30px 0 50px;
}

.start-button {
  height: 55px;
  width: 130px;
  padding-bottom: 4px;
  font-size: 28px;
  color: var(--white-text);
  font-weight: 500;
  background-color: rgb(211 4 248);
  border: 1px solid rgb(211 4 248);
  box-shadow: 0.5px 0.5px 2px rgb(83 23 193 / 0.25);
  border-radius: 50px;
  transition: all 0.3s ease-out;
}

.start-button:hover {
  background-color: rgb(214 68 240);
  border: 1px solid rgb(214 68 240);
}


/* ------------------------------------------ */
/* Score-board                                */
/* ------------------------------------------ */

.score-area {
  visibility: hidden;
  transition: all 0.25s ease-in-out;
}

.score-area.visible {
  visibility: visible;
}

.score-board {
  padding: 15px;
  width: 340px;
  height: 100vh;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  right: 0;
  background: rgb(255 255 255 / 0.50);
  color: rgb(83 23 193);
}

.the-scores {
  color: rgb(25, 104, 36);
  text-decoration: none;
  margin-top: 20px;
}

.the-scores li {
  display: flex;
  justify-content: space-between;
  font-weight: 600;
  font-family: 'Noto Sans Mono', monospace;
}

.score-board h2 {
  text-align: center;
}