/* CUSTOM-PROPS */
:root {
  --black: #000;

  --yellow: #ebe76c;
  --white: #fff;
  --yellowish: #f7ec09;
  --green: #f0b86e;
  --light-blue: #30a2ff;
  --pink: #0b0b0b;
  --dark-pink: #749bc2;
  --dark-blue: #836096;
  --blue: #b0daff;
}

/* LOADER  */
.loader-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  position: fixed;
  width: 100%;
  height: 100%;
  z-index: 999;
  background-color: var(--dark-blue);
  transition: opacity 0.3s ease;
}

.loader-wrapper--none {
  opacity: 0;
  pointer-events: none;
}

.loader {
  width: 4.8rem;
  height: 4.8rem;
  border: 0.5rem dotted var(--yellow);
  border-radius: 50%;
  display: inline-block;
  position: relative;
  box-sizing: border-box;
  animation: rotation 2s linear infinite;
}

@keyframes rotation {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

/* GLOBAL-STYLES  */
html {
  font-size: 62.5%;
  box-sizing: border-box;
  height: 100%;
  scroll-behavior: smooth;
}

*,
*::before,
*::after {
  box-sizing: inherit;
}

body {
  display: flex;
  flex-direction: column;
  height: 100%;
  background-color: #11e2f5;
  color: var(--black);
  font-family: "Smeshariki", "Arial", sans-serif;
  font-size: 3rem;
  line-height: 1.2;
  padding: 0;
  margin: 0;
}

img {
  max-width: 100%;
  height: auto;
}

/* FOCUS-STYLES  */
*:focus {
  outline: none;
  outline-offset: 0.3rem;
}

/* CONTAINER  */
.container {
  max-width: 120rem;
  width: 100%;
  padding-left: 2rem;
  padding-right: 2rem;
  margin-left: auto;
  margin-right: auto;
}

/* VISUALLY-HIDDEN  */
.visually-hidden {
  position: absolute;
  width: 0.1rem;
  height: 0.1rem;
  margin: -0.1rem;
  border: 0;
  padding: 0;
  clip: rect(0 0 0 0);
  overflow: hidden;
}

/* MAIN-CONTENT  */
.main-content {
  flex-grow: 1;
}

/* OVERLAY  */
.overlay {
  position: fixed;
  width: 100%;
  height: 100%;
  left: 0;
  top: 0;
  background-color: var(--yellow);
  color: var(--dark-blue);
  transition: transform 2.4s ease;
  z-index: 888;
  user-select: none;
}

.overlay--hidden {
  transform: translateY(-400%);
}

.overlay__container {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100vh;
}

.overlay__content {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 60rem;
}

.overlay__title {
  margin-top: 0;
  margin-bottom: 2rem;
  letter-spacing: 0.5rem;
  font-size: 8rem;
}

.overlay__description {
  letter-spacing: 0.2rem;
  font-size: 4rem;
  text-align: justify;
  margin-top: 0;
  margin-bottom: 4rem;
}

.overlay__button {
  background-color: var(--pink);
  color: var(--yellow);
  font-size: 4rem;
  border: 0;
  border-radius: 1rem;
  padding: 1rem 2rem;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.overlay__button:hover {
  box-shadow: rgba(17, 17, 26, 0.1) 0px 4px 16px,
    rgba(17, 17, 26, 0.1) 0px 8px 24px, rgba(17, 17, 26, 0.1) 0px 16px 56px;
}

.overlay__button:active {
  transform: scale(0.9);
  box-shadow: none;
}

/* OVERLAY-GOODLUCK  */
.overlay-goodluck {
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  width: 100%;
  height: 100%;
  background-color: var(--pink);
  z-index: 777;
  transition: opacity 0.5s ease;
  user-select: none;
}

.overlay-goodluck--hidden {
  opacity: 0;
  pointer-events: none;
}

.overlay-goodluck__content {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 65rem;
  text-align: center;
}

.overlay-goodluck__title {
  margin-top: 0;
  margin-bottom: 2rem;
  font-size: 8rem;
  color: var(--yellowish);
  letter-spacing: 0.3rem;
}

.overlay-goodluck__descrption {
  margin-top: 0;
  margin-bottom: 2.5rem;
  color: var(--yellow);
  font-size: 3rem;
  letter-spacing: 0.2rem;
}

.overlay-goodluck__button {
  font-size: 4rem;
  padding: 1rem 2rem;
  border: 0;
  border-radius: 1rem;
  background-color: var(--yellow);
  color: var(--pink);
  cursor: pointer;
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.overlay-goodluck__button:hover {
  box-shadow: rgba(0, 0, 0, 0.16) 0px 10px 36px 0px,
    rgba(0, 0, 0, 0.06) 0px 0px 0px 1px;
}

.overlay-goodluck__button:active {
  box-shadow: rgba(0, 0, 0, 0.16) 0px 10px 36px 0px,
    rgba(0, 0, 0, 0.06) 0px 0px 0px 1px;
  transform: scale(0.9);
}

/* SECTION-GAME  */
.section-game__container {
  position: relative;
  width: 100%;
  max-width: 55rem;
  margin-top: 4rem;
  border-radius: 2.5rem;
  background-color: var(--light-blue);
  color: var(--yellowish);
  box-shadow: rgba(0, 0, 0, 0.15) 0px 15px 25px,
    rgba(0, 0, 0, 0.05) 0px 5px 10px;
}

.section-game__content {
  display: block;
  padding: 2rem;
  margin-bottom: 5rem;
  text-align: center;
  font-size: 10rem;
  user-select: none;
}

.section-game__status {
  display: flex;
  align-items: center;
  justify-content: space-around;
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translate(-50%, 50%);
  width: 100%;
  font-size: 2.5rem;
}

.box {
  display: block;
  width: 14rem;
  text-align: center;
  padding: 0.5rem 3rem;
  border-radius: 0.5rem;
  background-color: var(--pink);
  box-shadow: rgba(0, 0, 0, 0.1) 0px 10px 15px -3px,
    rgba(0, 0, 0, 0.05) 0px 4px 6px -2px;
  user-select: none;
  transition: opacity 0.2s ease;
}

.section-game__timer--none {
  opacity: 0;
}

.section-game__table {
  border-collapse: collapse;
  margin-left: auto;
  margin-right: auto;
  min-height: 40rem;
  min-width: 40rem;
  box-shadow: rgba(0, 0, 0, 0.35) 0px 5px 15px;
}

.section-game__table,
.game-table__row,
.game-table__data {
  border: 2px solid var(--dark-pink);
}

.game-table__row {
  cursor: pointer;
  border-radius: 2rem;
}

.game-table__data {
  text-align: center;
  padding: 0;
  position: relative;
  transition: transform 0.3s ease;
  background-color: var(--light-blue);
  color: var(--yellowish);
  user-select: none;
}

.game-table__data--pen {
  pointer-events: none;
}

.game-table__row:nth-child(odd) .game-table__data:nth-child(odd),
.game-table__row:nth-child(even) .game-table__data:nth-child(even) {
  background-color: var(--yellowish);
  color: var(--light-blue);
}

.game-table__data:hover {
  transform: scale(1.15);
  z-index: 200;
}

.game-table__data-inner {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}

/* GAME OVER OR WIN  */
.overlay-win-lose {
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  width: 100%;
  height: 100%;
  left: 0;
  top: 0;
  user-select: none;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  z-index: 900;
}

.overlay-win-lose--win {
  opacity: 1;
  background-color: var(--light-blue);
  color: var(--yellowish);
  pointer-events: all;
}

.overlay-win-lose--lose {
  opacity: 1;
  background-color: var(--dark-pink);
  color: var(--yellow);
  pointer-events: all;
}

.overlay-win-lose__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.overlay-win-lose__title {
  margin-top: 0;
  margin-bottom: 2rem;
  letter-spacing: 0.3rem;
  font-size: 12rem;
}

.overlay-win-lose__button {
  display: block;
  font-size: 4rem;
  padding: 1.5rem 3rem;
  border: 0;
  border-radius: 1rem;
  color: var(--yellowish);
  background-color: transparent;
  cursor: pointer;
}

.overlay-win-lose__button:hover {
  text-decoration: underline;
}
