@keyframes fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
*,
*::after,
*::before {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html {
  font-size: 62.5%;
  text-rendering: optimizeLegibility;
  position: relative;
  min-height: 100%;
}
@media screen and (max-width: 999px) {
  html {
    font-size: 50%;
  }
}
@media screen and (max-width: 769px) {
  html {
    font-size: 35%;
  }
}
@media screen and (max-width: 349px) {
  html {
    font-size: 25%;
  }
}

body {
  font-size: 1.6rem;
}

a {
  color: #000000;
  text-decoration: none;
}

ul {
  list-style: none;
}

* {
  font-family: "Open Sans", sans-serif;
}

body {
  background-color: #161616;
}

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

.main-content-container {
  width: 114rem;
  max-width: 100%;
}
@media screen and (max-width: 1140px) {
  .main-content-container {
    width: 100%;
  }
}

.game {
  display: flex;
  flex-direction: column;
  align-items: center;
  color: #ffffff;
}
.game input, .game button {
  -webkit-appearance: none !important;
}
.game-level {
  position: relative;
  padding: 2rem;
  margin: 4rem 0 6rem 0;
  background-color: rgb(28, 28, 28);
  border-radius: 1rem;
  max-width: 100%;
  box-shadow: 5rem 5rem 20rem 0 rgba(244, 215, 238, 0.0901960784);
  border: 0.1rem solid #8787de;
}
.game-level::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  border-radius: 1rem;
  box-shadow: inset 0 0 0.3rem 0 #8787de;
}
@media screen and (max-width: 769px) {
  .game-level {
    padding: 2rem 0;
  }
}
.game-level.hidden {
  display: none;
}
.game-level {
  counter-reset: sentences;
}
.game-level-sentences {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding: 0 1.75rem 2rem 1.75rem;
}
.game-level-sentence {
  counter-increment: sentences;
  display: flex;
  flex-direction: row;
  justify-content: flex-start;
  align-items: flex-start;
  margin: 0 0 0.5rem 0;
}
.game-level-sentence:last-child {
  margin-bottom: 0;
}
.game-level-sentence::before {
  content: counter(sentences) ".";
  display: inline-block;
  margin: 0 1rem 0 0;
  font-size: 2rem;
  font-weight: 800;
}
@media screen and (max-width: 999px) {
  .game-level-sentence::before {
    font-size: 2.2rem;
  }
}
@media screen and (max-width: 769px) {
  .game-level-sentence::before {
    font-size: 2.6rem;
  }
}
.game-level-sentence-text {
  display: block;
  padding: 0.3rem 0 0 0;
  font-weight: 600;
}
@media screen and (max-width: 999px) {
  .game-level-sentence-text {
    padding-top: 0;
    font-size: 2.2rem;
  }
}
@media screen and (max-width: 769px) {
  .game-level-sentence-text {
    font-size: 2.6rem;
  }
}
.game-level-table-container {
  overflow-x: auto;
  padding: 2rem 0;
}
.game-level-table td {
  width: 4.5rem;
  min-width: 4.5rem;
  height: 4.5rem;
  min-height: 4.5rem;
}
.game-level-table-cell-content {
  position: relative;
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 100%;
}
.game-level-table tr.hidden {
  visibility: hidden;
}
.game-level-table tr.break-word {
  height: 2rem;
}
.game-level-table tr .destroy-animation-cell {
  position: absolute;
  top: calc(50% + 6rem);
  left: calc(50% + 2rem);
  z-index: 1;
  filter: drop-shadow(2px 4px 6px #ff0000);
}
.game-level-table tr .destroy-animation-cell-scratch {
  position: absolute;
  width: 35rem;
  height: 2rem;
  mask-image: url("/assets/horizontal-scratch.svg");
  mask-size: contain;
  mask-repeat: no-repeat;
  mask-position: center;
  background: #b81818;
  background: linear-gradient(90deg, rgb(184, 24, 24) 38%, rgb(59, 9, 9) 100%);
  animation-name: word-destroy-animation-scratch;
  animation-duration: 0.1s;
  animation-delay: 1s;
  animation-fill-mode: backwards;
  animation-iteration-count: 1;
}
.game-level-table tr .destroy-animation-cell-scratch.scratch-left {
  top: -9rem;
  left: -22rem;
  transform: rotateZ(45deg);
}
.game-level-table tr .destroy-animation-cell-scratch.scratch-right {
  top: -11rem;
  left: -12rem;
  transform: rotateZ(-22deg);
}
.game-level-table tr.word-destroy-animation {
  position: relative;
  animation-name: word-destroy-animation;
  animation-duration: 1.5s;
  animation-fill-mode: backwards;
  animation-iteration-count: 1;
  z-index: 10;
  pointer-events: none;
}
@media screen and (max-width: 769px) {
  .game-level-table tr.word-destroy-animation {
    animation-name: word-destroy-animation-mobile;
  }
}
.game-level-table tr.word-destroy-animation::after {
  content: "";
  position: absolute;
  top: -1rem;
  right: -1rem;
  bottom: -1rem;
  left: -1rem;
  background-color: rgb(28, 28, 28);
  z-index: -1;
}
.game-level-table.for-destroy-animation {
  position: fixed;
  top: var(--pos-y);
  left: var(--pos-x);
  animation-name: word-destroy-animation-show-fake-table;
  animation-duration: 1.5s;
  animation-fill-mode: backwards;
  animation-iteration-count: 1;
  z-index: 10;
}
@media screen and (max-width: 769px) {
  .game-level-table.for-destroy-animation {
    animation-name: word-destroy-animation-show-fake-table-mobile;
  }
}
.game .solution-letter .game-letter-input:disabled {
  font-size: 2.6rem;
  font-weight: 800;
  background-color: #0a064b;
  color: #ffffff;
}
.game .solution-letter::before {
  content: "";
  position: absolute;
  top: -0.3rem;
  right: -0.3rem;
  bottom: -0.3rem;
  left: -0.3rem;
  border: 0.8rem solid #002067;
  border-top: 0;
  border-bottom: 0;
  border-radius: 0.5rem;
  pointer-events: none;
  z-index: 1;
}
.game .solution-letter.solution-letter-start::before {
  border-top: 0.8rem solid #b3b5ff;
}
.game .solution-letter.solution-letter-end::before {
  border-bottom: 0.8rem solid #b3b5ff;
}
.game .sentence-number {
  font-size: 2rem;
  font-weight: 800;
}
@media screen and (max-width: 999px) {
  .game .sentence-number {
    font-size: 2.2rem;
  }
}
@media screen and (max-width: 769px) {
  .game .sentence-number {
    font-size: 2.6rem;
  }
}
.game .button-enter {
  position: relative;
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  width: 4rem;
  height: 4rem;
  background-color: rgb(0, 143, 48);
  border: 0;
  outline: 0;
  border-radius: 0.4rem;
  box-shadow: inset 0 0 5px 0px #38ff47;
  cursor: pointer;
}
.game .button-enter::after {
  content: "";
  position: absolute;
  width: 60%;
  height: 60%;
  display: inline-block;
  background-color: #ffffff;
  mask-image: url("/assets/icon-enter.svg");
  mask-repeat: no-repeat;
  mask-size: contain;
  mask-position: center;
}
.game .button-enter:hover {
  outline: 0.5rem solid #026b25;
}
.game .button-enter:focus, .game .button-enter:focus-within, .game .button-enter:active {
  outline: 0.5rem solid #2dc63a;
}
.game .button-enter:disabled {
  background-color: rgb(153, 153, 153);
}
.game .icon-try-count {
  position: relative;
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  color: #ffffff;
  filter: drop-shadow(0 0 0.5rem #b60000);
  animation-name: try-count-animation;
  animation-fill-mode: backwards;
  animation-duration: 1s;
  animation-iteration-count: 2;
}
.game .icon-try-count.danger {
  animation-duration: 3s;
  animation-iteration-count: infinite;
}
.game .icon-try-count::before {
  position: absolute;
  content: "";
  display: inline-block;
  width: 3.6rem;
  height: 3.6rem;
  mask-image: url("/assets/icon-heart.svg");
  mask-position: center;
  mask-repeat: no-repeat;
  mask-size: contain;
  background-color: #dd1515;
}
.game .icon-try-count span {
  padding: 0 0 0.5rem 0;
  font-size: 1.8rem;
  font-weight: 800;
  z-index: 1;
  text-shadow: 0 0 0.5rem #3f3f3f;
  line-height: 0;
}
.game .game-letter-input-outline {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  border: 0.5rem solid transparent;
  border-radius: 0.5rem;
  pointer-events: none;
  z-index: 2;
}
.game .next-level-button-container {
  margin: 4rem 0 0 0;
}
.game .button-next-level {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  height: 4rem;
  padding: 0 2rem;
  color: #ffffff;
  font-weight: 800;
  font-size: 1.8rem;
  letter-spacing: 0.5px;
  background-color: rgb(0, 143, 48);
  border: 0;
  outline: 0;
  border-radius: 0.4rem;
  box-shadow: inset 0 0 5px 0px #38ff47;
  cursor: pointer;
}
.game .button-next-level::before {
  content: "";
  display: inline-block;
  width: 2.5rem;
  height: 2.5rem;
  margin: 0 1rem 0 0;
  background-color: #ffffff;
  mask-image: url("/assets/icon-next.svg");
  mask-repeat: no-repeat;
  mask-size: contain;
  mask-position: center;
  z-index: 1;
}
.game .button-next-level:hover {
  outline: 0.5rem solid #026b25;
}
.game .button-next-level:disabled {
  background-color: rgb(153, 153, 153);
}
.game-letter-input {
  width: 4rem;
  height: 4rem;
  font-size: 2.2rem;
  text-align: center;
  border: 0;
  outline: 0;
  border-radius: 0.2rem;
  background-color: #ffffff;
  color: #000000;
  font-weight: 600;
  box-shadow: inset 0 0 0.3rem 0 black;
}
.game-letter-input:disabled {
  background: #b5ffa8;
  color: #003b02;
  opacity: 1;
}
.game-letter-input:hover + .game-letter-input-outline {
  border-color: #026b25;
}
.game-letter-input:focus + .game-letter-input-outline, .game-letter-input:focus-within + .game-letter-input-outline, .game-letter-input:active + .game-letter-input-outline {
  border-color: #2dc63a;
}
.game-letter-input.wrong-word-animation {
  animation-name: wrong-word-animation;
  animation-fill-mode: backwards;
  animation-duration: 3s;
  animation-iteration-count: 1;
  animation-delay: attr(data-animation-delay ms);
}
@keyframes wrong-word-animation {
  0% {
    background-color: #ffb2b2;
  }
  90% {
    background-color: #ffb2b2;
  }
  100% {
    background-color: #ffffff;
  }
}
@keyframes word-destroy-animation {
  0% {
    transform: scale(1) translateX(0rem);
    filter: drop-shadow(0 0 1rem #0a0a0a);
  }
  80% {
    transform: scale(1.5) translateX(3rem);
    filter: drop-shadow(0 0 4rem #0a0a0a);
  }
  90% {
    transform: scale(1.5) translateX(3rem);
    filter: drop-shadow(0 0 4rem #0a0a0a);
  }
  95% {
    transform: scale(1) translateX(0rem);
    filter: drop-shadow(0 0 1rem #0a0a0a);
  }
  100% {
    transform: scale(1) translateX(0rem);
    filter: drop-shadow(0 0 1rem #0a0a0a);
  }
}
@keyframes word-destroy-animation-mobile {
  0% {
    transform: scale(1) translateX(0rem);
    filter: drop-shadow(0 0 1rem #0a0a0a);
  }
  80% {
    transform: scale(1.1) translateX(3rem);
    filter: drop-shadow(0 0 4rem #0a0a0a);
  }
  90% {
    transform: scale(1.1) translateX(3rem);
    filter: drop-shadow(0 0 4rem #0a0a0a);
  }
  95% {
    transform: scale(1) translateX(0rem);
    filter: drop-shadow(0 0 1rem #0a0a0a);
  }
  100% {
    transform: scale(1) translateX(0rem);
    filter: drop-shadow(0 0 1rem #0a0a0a);
  }
}
@keyframes word-destroy-animation-scratch {
  0% {
    clip-path: polygon(0 0, 0% 0, 0% 100%, 0 100%);
  }
  100% {
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
  }
}
@keyframes word-destroy-animation-show-fake-table {
  0% {
    top: var(--pos-y);
    left: var(--pos-x);
  }
  80% {
    top: calc(50vh - var(--size-h) / 2);
    left: calc(50vw - var(--size-w) / 2);
  }
  90% {
    top: calc(50vh - var(--size-h) / 2);
    left: calc(50vw - var(--size-w) / 2);
  }
  95% {
    top: var(--pos-y);
    left: var(--pos-x);
  }
  100% {
    top: var(--pos-y);
    left: var(--pos-x);
  }
}
@keyframes word-destroy-animation-show-fake-table-mobile {
  0% {
    top: var(--pos-y);
    left: var(--pos-x);
  }
  80% {
    top: calc(50vh - var(--size-h) / 2);
    left: calc(var(--content-start) * -1);
  }
  90% {
    top: calc(50vh - var(--size-h) / 2);
    left: calc(var(--content-start-vw) * -1);
  }
  95% {
    top: var(--pos-y);
    left: var(--pos-x);
  }
  100% {
    top: var(--pos-y);
    left: var(--pos-x);
  }
}
@keyframes try-count-animation {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
  100% {
    transform: scale(1);
  }
}

header {
  position: fixed;
  top: 0;
  right: 0;
  display: flex;
  flex-direction: row;
  justify-content: flex-start;
  z-index: 10;
}
header .logo-container {
  padding: 1rem;
  background-color: white;
  border-bottom: 0.5rem solid #757575;
  border-left: 0.5rem solid #e9e9e9;
}
header .logo {
  display: inline-block;
  width: 20rem;
}
header .logo img {
  width: 100%;
}
@media screen and (max-width: 769px) {
  header .logo-container {
    padding: 0.5rem;
  }
  header .logo {
    width: 15rem;
  }
}

.home-header {
  margin: 8rem 0 0 0;
  text-align: center;
  font-size: 3rem;
  font-weight: 500;
  text-transform: uppercase;
  color: #ffffff;
  letter-spacing: 3px;
}

.home-game-container {
  padding: 0 0 2rem 0;
}
