* {
  font-family: "Rubik", sans-serif;
  box-sizing: border-box;
}

h1,
h2,
h3,
.tile,
button,
nav,
.input>label {
  font-family: "Comfortaa", sans-serif;
  text-transform: uppercase;
}

.logo {
  font-size: 1.8em;
  margin: 0;
}

.h3 {
  font-size: 1.2em;
}

.h4 {
  font-size: 1em;
  text-transform: none;
}

*::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

*::-webkit-scrollbar-thumb {
  background: #182931;
  border-radius: 10px;
}

*::-webkit-scrollbar-track {
  background: transparent;
}

a,
button {
  outline-color: #e73c7e;
}

body {
  padding: 1em;
  margin: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100vh;
}

.row,
.row>.tile,
.row>button,
header,
footer,
.footnote {
  display: flex;
  align-items: center;
  justify-content: center;
  touch-action: manipulation;
  text-align: center;
}

header>div {
  display: flex;
  align-items: center;
  gap: 12px;
}

nav {
  margin-bottom: 0.2em;
}

.row>.tile,
.row>button {
  margin: 2px;
  padding: 0;
  border-radius: 4px;
  color: #182931;
}

.tile {
  font-size: 1.5em;
  width: 2em;
  height: 2em;
  background-color: #f2f5f7;
  border: 3px solid #c4ccd3;
}

.row>.tile {
  padding-top: 0.18em;
}

.row.active>.tile {
  border-color: #cd4c6e;
}

.bodyText,
button {
  font-size: 1em;
}

button {
  background-color: #ebf0f3;
  text-transform: uppercase;
  font-weight: bold;
  border: 0;
  cursor: pointer;
  user-select: none;
}

aside button {
  height: 3em;
  width: 2em;
}

button:hover {
  background-color: #c4ccd3;
}

button.action {
  width: 60px;
}

.menu {
  margin: 0 3px;
  padding: 0 2px;
  display: inline-block;
}

.menu:hover {
  transform: scale(1.1, 1.1);
}

.hiContrast #colorMode {
  transform: scaleX(-1);
}

.tile[data-state="wrong"],
button[data-state="wrong"],
.shareStats:visited,
.shareStats {
  border-color: #182931;
  background-color: #182931;
  color: #ffffff;
}

.tile[data-state="near"],
button[data-state="near"],
.hiContrast .tile[data-state="correct"],
.hiContrast button[data-state="correct"],
.hiContrast .bar {
  border-color: #fca119;
  background-color: #fca119;
}

.tile[data-state="correct"],
button[data-state="correct"],
.bar {
  border-color: #23e0a8;
  background-color: #23e0a8;
}

.hiContrast .tile[data-state="near"],
.hiContrast button[data-state="near"] {
  border-color: #04b2e1;
  background-color: #04b2e1;
}

.shareStats   {
  display: none;
  font-size: 1.2em;
  padding: 10px;
  border-radius: 5px;
  text-decoration: none;
}

.shareStats:active,
.shareStats:hover {
  border-color: #2b4450;
  background-color: #2b4450;
}

#announcer,
.modal {
  position: absolute;
  display: none;
  top: 50%;
  left: 50%;
  transform: translateX(-50%) translateY(-50%);
  text-align: center;
  max-width: 400px;
  border-radius: 10px;
  padding: 1em 2em;
  border: 2px solid #ffffff;
  box-shadow: rgba(99, 99, 99, 0.2) 0px 2px 8px 0px;
  z-index: 100;
}

#announcer {
  color: #ffffff;
  background-color: #2b4450;
}

.modal,
.card,
article,
.input {
  font-size: 0.9em;
  color: #434e58;
  background-color: #ffffff;
  width: 90vw;
  max-width: 400px;
}

.modal .input {
  width: 100%;
}

article {
  margin: 1em auto;
}

.card {
  border: 3px solid #ebf0f3;
  position: relative;
  padding: 0.5em 1em;
  border-radius: 10px;
}

.card-link {
  height: 100%;
  left: 0;
  opacity: 0;
  position: absolute;
  top: 0;
  width: 100%;
}

.card:hover {
  background-color: #ebf0f3;
}

.card>h3 {
  text-transform: uppercase;
  margin: 0.4em 0.2em;
}

.card>p {
  margin: 0.2em;
}

header {
  justify-content: space-between;
  max-width: 440px;
  min-width: 400px;
  margin: 0 auto;
  height: 40px;
}

img {
  pointer-events: none;
}

header img {
  max-height: 40px;
}

footer {
  font-size: 0.8em;
}

.footnote {
  font-size: 0.9em;
  border-top: 1px solid #ebf0f3;
  padding-top: 1em;
  justify-content: space-between;
}

a,
a:visited {
  color: #182931;
}

a:hover,
a:active {
  color: #e73c7e;
  text-decoration-style: wavy;
}

.close {
  text-decoration: none;
  position: absolute;
  right: 15px;
  top: 15px;
}

hr {
  border-top: 1px solid #ebf0f3;
  margin: 1em 0;
}

#stats .row {
  justify-content: space-between;
  align-items: baseline;
}

#stats .row h5 {
  margin-top: 5px;
}

.stat {
  margin: 0 1em;
}

.stat h4 {
  font-size: 2em;
  margin: 0;
}

.bar {
  min-width: 2em;
  padding: 5px;
  min-height: 30px;
}

.bar>span {
  transform: rotate(-90deg);
  transform-origin: right, top;
  -ms-transform: rotate(-90deg);
  -ms-transform-origin: right, top;
  -webkit-transform: rotate(-90deg);
  -webkit-transform-origin: right, top;
  position: absolute;
}

@media only screen and (max-width: 500px) {
  .modal {
    min-width: 80%;
    padding: 0.5em 1em;
  }

  .modal>h2 {
    max-width: 80%;
    margin: 0 auto;
    margin-top: 1em;
  }

  hr {
    margin: 0.5em 0;
  }

  .bar {
    padding: 2px;
  }

  .stat {
    margin: 0 5px;
  }

  header {
    min-width: 100%;
  }

  h1.h3 {
    font-size: 0.9em;
  }
}

@media only screen and (max-width: 350px) {
  h1.h3 {
    display: none;
  }
}

.flip,
.pulse {
  z-index: 0;
}

.flip {
  -webkit-animation: flipin 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
  animation: flipin 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
}

.pulse {
  -webkit-animation: pulse 0.15s ease-in-out both;
  animation: pulse 0.15s ease-in-out both;
}

@-webkit-keyframes flipin {
  0% {
    -webkit-transform: rotateX(80deg);
    transform: rotateX(80deg);
    opacity: 0;
  }

  100% {
    -webkit-transform: rotateX(0);
    transform: rotateX(0);
    opacity: 1;
  }
}

@keyframes flipin {
  0% {
    -webkit-transform: rotateX(80deg);
    transform: rotateX(80deg);
    opacity: 0;
  }

  100% {
    -webkit-transform: rotateX(0);
    transform: rotateX(0);
    opacity: 1;
  }
}

@-webkit-keyframes pulse {
  0% {
    -webkit-transform: scale(1);
    transform: scale(1);
  }

  50% {
    -webkit-transform: scale(1.1);
    transform: scale(1.1);
  }

  100% {
    -webkit-transform: scale(1);
    transform: scale(1);
  }
}

@keyframes pulse {
  0% {
    -webkit-transform: scale(1);
    transform: scale(1);
  }

  50% {
    -webkit-transform: scale(1.1);
    transform: scale(1.1);
  }

  100% {
    -webkit-transform: scale(1);
    transform: scale(1);
  }
}

.cta,
.cta:visited,
.cta:active,
.cta:hover {
  font-size: 1.2em;
  border: 3px solid #e73c7e;
  background-color: #e73c7e;
  color: #fff;
  position: relative;
  padding: 0.5em 1em;
  border-radius: 10px;
  text-decoration: none;
  margin-bottom: 0.5em;
  display: inline-block;
}

.cta:disabled {
  border: 3px solid #182931;
  background-color: #182931;
  cursor: not-allowed;
}

.cta.sm {
  border-radius: 4px;
  border-width: 2px;
  font-size: 1em;
}

.flish:not([disabled]) {
  background:
    linear-gradient(-45deg, #b41757 40%, #e73c7e 0 60%, #b41757 0) right/300% 100% no-repeat,
    linear-gradient(-45deg, #e73c7e 40%, #b41757 0 60%, #e73c7e 0) right/300% 100% no-repeat;
  -webkit-background-clip: text, padding-box;
  background-clip: text, padding-box;
}

.flish:not([disabled]):hover {
  background-position: left;
  transition: 0.8s
}

#clipboard {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
}

.input {
  border-radius: 4px;
  background-color: #ffffff;
  border: 2px solid #c4ccd3;
  min-height: 3.5em;
  position: relative;
  margin-top: 1em;
}

.input:focus-within {
  border: 2px solid #e73c7e;
}

.input>label {
  display: block;
  font-size: 0.9em;
  line-height: 1em;
  margin: 0px;
  height: max-content;
  width: 100%;
  position: absolute;
  top: 0px;
  left: 0px;
  padding: 5px 0px 0px 5px;
  align-self: flex-start;
}

.input>input,
.input>textarea {
  background-color: transparent;
  border-style: hidden;
  border: 0 none;
  height: inherit;
  margin-top: 1.7em;
  padding: 0px 6px 0.5em 6px;
  width: 100%;
  max-width: 100%;
  font-family: "Rubik" sans-serif;
  font-size: 1.1em;
}

.input>textarea {
  resize: vertical;
  min-height: 4.2em;
}

#words {
  text-transform: uppercase;
  min-height: 6em;
}

.input>input::-webkit-input-placeholder,
.input>input::placeholder,
.input>textarea::-webkit-input-placeholder,
.input>textarea::placeholder {
  color: #e73c7e;
  opacity: 1;
  text-transform: none;
}

.input>input:focus,
.input>textarea:focus,
.input>label {
  outline: none;
  color: #182931;
}

.hint {
  display: inline-block;
  margin: 0.5em auto;
  font-size: 0.9em;
}

.hint::before {
  content: "\1F4A1";
  display: inline-block;
  margin-right: 8px;
}

#newGameForm {
  display: flex;
  flex-direction: column;
}

.validation {
  position: relative;
  border-radius: 3px;
  background-color: #b41757;
  color: #ffffff;
  font-size: 0.9em;
  padding: 3px 6px;
  float: right;
  display: none;
}

.validation::before {
  content: "";
  position: absolute;
  bottom: 70%;
  right: 10px;
  border-width: 10px;
  border-style: solid;
  border-color: transparent transparent #b41757 transparent;
}

#createdSuccessfully {
  display: none;
}

#share.cta {
  text-transform: uppercase;
  text-align: center;
  width: 100%;
  margin-top: 1em;
}
