* {
  box-sizing: border-box;
  font-family: "Trebuchet MS", sans-serif;
  user-select: none;
}

:root {
  --gray: #c6c6c6;
  --orange: orange;
}

html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
}

h1,
p,
li {
  margin: 0;
  padding: 0;
  width: max-content;
  height: max-content;
}

.outer {
  width: 100%;
  height: 100%;
}

.header {
  width: 100%;
  height: 15%;
  background-color: var(--orange);
  color: white;
  display: flex;
  justify-content: space-around;

}

.title {
  width: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
}

.title h1 {
  margin: auto auto;
}

.timer {
  width: 15%;
  display: flex;
  justify-content: center;
  flex-direction: column;
}

.account {
  width: 15%;
  display: flex;
  justify-content: center;
  /*background-color: blue;*/
}

.account #avatar {
  aspect-ratio: 1;
  border-radius: 50%;
  border: 2px solid white;
  scale: 0.65;
  text-align: center;
  display: flex;
  justify-content: center;
  align-items: center;
}

.account #avatar::before {
  font-size: 1.5em;
}

#sign-in {
  bottom: 45%;
  min-width: 12em;
  z-index: 900;
}

#sign-in::backdrop {
  background-color: rgba(255, 255, 255, 0.1);
}

#sign-in form {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

#sign-in button {
  display: block;
  width: 20vw;
  padding: 0.75em 0;
  margin: .5em;
  border: none;
  border-radius: 0;
}

#sign-in button:nth-last-child(1) {
  width: max-content;
  padding-inline: 0.5em .5em;
  margin: auto;
  border-radius: 10px;
  background-color: black;
  color: white;
}

#leaderboard {
  display: none;
  position: fixed;
  left: 50%;
  transform: translate(-50%, 0);
  top: 50%;

  z-index: 1000;
  width: 45vw;
  min-width: 15em;
  height: 45vh;
  background-color: #ececec;
  border: 3px solid #777777;

  overflow: hidden;
}

#leaderboard ul {
  margin: 0;
  padding: 0;
  list-style: none;
  overflow: hidden;
  width: 100%;
}

#leaderboard li {
  padding: 10px 10px 10px 5vw;
  width: 100%;
  display: flex;
  justify-content: left;
  align-items: center;

  & img {
    margin-inline: 1em;
    width: 2em;
    border-radius: 50%;
  }

  & span {
    flex-grow: 2;
    text-align: right;
    padding-right: 2em;
  }
}

#leaderboard li:nth-child(even) {
  background-color: #dcdcdc;
}

#leaderboard li:nth-child(odd) {
  background-color: #efefef;
}

.game {
  height: 85%;
  width: 100%;
}

@media screen and (min-width: 500px) {
  .game {
    display: flex;
    justify-content: center;
  }

  .enter {
    height: 100%;
  }

  .result {
    height: 100%;
  }
}

@media screen and (max-width: 499px) {
  .enter {
    height: 70%;
  }

  .result {
    height: 30%;
  }
}

.enter {
  /*height: 100%;*/
  /*width: 50%;*/
  padding: 2%;
  display: flex;
  flex-direction: column;
  justify-content: space-evenly;
  flex: 1;
}

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

.row {
  display: flex;
  width: 100%;
  justify-content: center;
}

.cell {
  /*display: inline-flex;*/
  width: 4em;
  height: 4.5em;
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  background-color: var(--gray);
  text-transform: uppercase;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  margin-inline: 2px;
  transition: background-color 0.1s;
}

.row:nth-child(1) {
  transform: translateY(20%);
}

.row:nth-child(3) {
  transform: translateY(-20%);
}

.cell::after {
  content: "";
  display: block;
  padding-bottom: 100%;
}

.cell span {
  position: absolute;
  text-align: center;
  font-size: 150%;
}

.main {
  background-color: var(--orange);
}

.result {
  /*height: 100%;*/
  flex: 1;
}

.result .score {
  width: 100%;
  height: 10%;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.result .score label {
  width: 30%;
  text-align: center;
}

.result .words {
  width: 100%;
  height: 90%;
  /*overflow: hidden;*/
  /*display: flex;*/
}

.result .words .list {
  list-style-type: none;

  display: flex;
  flex-wrap: wrap;
  flex-direction: column;
  align-content: baseline;
  overflow: auto;
  height: 100%;

  border: 1px solid var(--gray);
  border-bottom: 0;
  border-top-left-radius: 25px;
  border-top-right-radius: 25px;

  /*margin: 0 auto;*/
  padding: 5%;
  margin-top: 0;
}

.result .words .list li {
  border-bottom: 2px solid var(--orange);
  min-width: 25%;
  margin: 2% 2%;
  text-transform: capitalize;
}

.display {
  display: inline-block;
  height: 1.2em;
  width: 100%;
  font-size: 200%;
  text-align: center;
  border-bottom: 2px solid;
  position: relative;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.display .caret {
  position: absolute;
  height: 100%;
  width: 2px;
  background-color: black;
  transform: translate(-80%, -5%);
  animation: 1s flash step-end infinite;
}

.controls {
  width: 100%;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-evenly;
  flex-wrap: wrap;
}

.controls button {
  padding: 0.25em;
  border-radius: 5px;
  background: var(--gray);
  margin: 0.25em;
}

progress::-moz-progress-bar {
  background: var(--orange);
}

progress::-webkit-progress-value {
  background: var(--orange);
}

progress {
  width: 70%;
  height: 35%;
  color: var(--orange);
  margin-right: 1em;
}

@keyframes flash {
  0% {
    background-color: transparent;
  }

  50% {
    background-color: black;
  }

  100% {
    background-color: transparent;
  }
}

@keyframes shake {
  0% {
    transform: translateX(0.2em);
  }

  50% {
    transform: translateX(-0.2em);
  }

  100% {
    transform: translateX(0px);
  }
}

/*@media (orientation: landscape) {*/
/*  .cell {*/
/*    width: 10%;*/
/*  }*/
/*}*/

/*@media (orientation: portrait) {*/
/*  .cell {*/
/*    width: 10%;*/
/*  }*/
/*}*/