@font-face {
  font-family: pixel-digivolve-cyrillic;
  src: url('/pixel-digivolve-cyrillic.otf');
  font-weight: normal;
  font-style: normal;
}

@keyframes flip {
  0% {
    transform: rotateX(0) scale(1);
  }
  50% {
    transform: rotateX(720deg) scale(1.5);
  }
  100% {
    transform: rotateX(1440deg) scale(1);
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: pixel-digivolve-cyrillic, sans-serif;
  font-size: 16px;
}

html,
body {
  height: 100vh;
}

html {
  --color-black: #000;
  --color-white: #fff;
  --color-yellow: #f2c62d;
  --color-yellow-dark: #c7a015;
  --color-yellow-light: #f7d043;
  --color-red: #f96363;
}

body {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 12px 44px;
  text-align: center;
  color: var(--color-white);
  background-color: var(--color-black);
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

button {
  border: 0;
  line-height: 1;
  color: var(--color-white);
  background-color: transparent;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;

  &.disabled {
    opacity: 0.2;
    cursor: default;
  }
}

.flip {
  animation: flip 0.7s;
}

.main {
  position: relative;
  width: 100%;
  max-width: 700px;
}

.coin {
  display: inline-block;
  z-index: 1;
  width: 182px;
  height: 182px;
  vertical-align: top;
  font-size: 0;
}

.label {
  margin-top: 40px;
  font-size: 32px;
}

.button {
  position: relative;
  z-index: 1;
  display: inline-block;
  width: 100%;
  max-width: 240px;
  margin-top: 24px;
  padding: 16px;
  border: 0;
  border-bottom: 4px solid var(--color-yellow-dark);
  border-radius: 8px;
  color: var(--color-black);
  background-color: var(--color-yellow);

  &:hover:not(.disabled),
  &:focus-visible:not(.disabled) {
    background-color: var(--color-yellow-light);
  }

  &.pressed:not(.disabled) {
    margin-top: 28px;
    border-bottom: 0;
  }
}

.flips {
  margin-top: 20px;
}

.reset {
  position: relative;
  z-index: 1;
  margin-top: 40px;
  border: 1px solid var(--color-red);
  border-radius: 8px;
  padding: 10px 14px;
  color: var(--color-red);
}

.arrow {
  position: absolute;
  top: 50%;
  height: 100%;
  transform: translateY(-50%);
  font-size: 70px;
  opacity: 0.8;

  &:hover:not(.disabled),
  &:focus-visible:not(.disabled) {
    opacity: 1;
    text-shadow: 0 0 10px var(--color-white);
  }
}

.arrow_left {
  left: 0;
  padding-right: calc(50% - 35px);
}

.arrow_right {
  right: 0;
  padding-left: calc(50% - 35px);
}

.flips-to-unlock {
  position: absolute;
  top: -60px;
  left: 50%;
  width: 100%;
  transform: translateX(-50%);
}
