@font-face {
  font-family: HovdenStich;
  src: url(fonts/HovdenStitch-Regular.otf);
}
@font-face {
  font-family: Brusher;
  src: url(fonts/Brusher-Regular.otf);
}

body {
  margin: 0;
  padding: 20px;
  text-align: center;

  -webkit-transition: background-image 1000ms linear;
  -ms-transition: background-image 1000ms linear;
  transition: background-image 1000ms linear;
  font-family: 'Montserrat', sans-serif;
  color: #f1f1f1;

  background-image: url(images/elements/background-night.webp);
  background-size: cover;
  background-repeat: no-repeat;
}

.wrapper {
  margin: 20px auto;
  width: 1360px;
  display: flex;
}

.sidebar-left,
.sidebar-right {
  margin: 0;
  width: 394px;
}

.matchbox {
  height: 236px;
  width: 177px;
  float: left;
  background-image: url(images/elements/matchbox-night.webp);
  background-size: cover;
  background-repeat: no-repeat;

  -webkit-transition: background-image 1000ms linear;
  -ms-transition: background-image 1000ms linear;
  transition: background-image 1000ms linear;
}

.moves {
  margin: 0;
  padding: 12px 0 0 30px;
  width: 197px;
  height: 95px;
  float: right;
  text-align: left;
  background-image: url(images/elements/moves-night.webp);
  background-size: cover;
  background-repeat: no-repeat;
  font-size: 26px;
  letter-spacing: 2px;
  font-weight: 600;
  font-family: 'times new roman', serif;
  color: #ded3d3;

  -webkit-transition: background-image 1000ms linear;
  -ms-transition: background-image 1000ms linear;
  transition: background-image 1000ms linear;
}

.round {
  margin: 20px 0;
  padding: 73px 21px 23px 31px;
  width: 146px;
  height: 108px;
  float: right;
  background-image: url(images/elements/rounds-night.webp);
  background-size: cover;
  background-repeat: no-repeat;
  color: #000;

  -webkit-transition: background-image 1000ms linear;
  -ms-transition: background-image 1000ms linear;
  transition: background-image 1000ms linear;
}

.memory-header {
  font-family: Brusher;
  font-weight: normal;
  font-size: 64px;
  line-height: 64px;
  padding: 53px 96px;
  margin: 0;

  background-image: url(images/elements/frame-memory-night.webp);
  background-repeat: no-repeat;
  background-size: cover;

  -webkit-transition: background-image 1000ms linear;
  -ms-transition: background-image 1000ms linear;
  transition: background-image 1000ms linear;
}

h2,
.round-number {
  font-family: HovdenStich;
  font-weight: normal;
  font-size: 42px;
  line-height: 42px;
  margin: 0;
  padding: 0;
}

.board {
  margin: 0 30px;
  flex-wrap: wrap;
  display: flex;
  max-width: 532px;
}

.card-slot {
  width: 113px;
  height: 148px;
  margin: 6px 8px;
  padding: 0;
}

.card {
  width: 113px;
  height: 148px;

  border-radius: 3px;
  -moz-border-radius: 3px;
  -webkit-border-radius: 3px;
}

.shadow {
  box-shadow: 0px 1px 4px rgba(0, 0, 0, 0.35);
  -moz-box-shadow: 0px 1px 4px rgba(0, 0, 0, 0.35);
  -webkit-box-shadow: 0px 1px 4px rgba(0, 0, 0, 0.35);
}

.won {
  position: absolute;
  z-index: 1;
  margin: 200px auto 0 auto;
  padding: 0;
  width: 532px;
  text-align: center;
  font-family: Brusher;
  font-weight: normal;
  font-size: 74px;
  line-height: 74px;

  color: #ffc571;

  display: none;
}

.replay {
  font-size: 16px;
  padding: 12px 18px;
  border: none;
  background-color: #201d2e;
  color: #faac3a;
  text-transform: uppercase;
  letter-spacing: 2px;

  border-radius: 8px;
  -moz-border-radius: 8px;
  -webkit-border-radius: 8px;
}

.replay:hover {
  box-shadow: 0px 0px 3px rgba(0, 0, 0, 0.35);
  -moz-box-shadow: 0px 0px 3px rgba(0, 0, 0, 0.35);
  -webkit-boxpshadow: 0px 0px 3px rgba(0, 0, 0, 0.35);
}

.you-win {
  padding: 0;
  margin: 0;
}

.clickoff {
  pointer-events: none;
}
.switch {
  margin-top: 180px;
  margin-left: -20px;
  width: 286px;
  height: 286px;
}

.switch-pozadina {
  position: absolute;
  z-index: 0;
  width: 286px;
  height: 286px;

  background-image: url(images/elements/switch-night-dial-bg.webp);
  background-repeat: no-repeat;
  background-size: cover;
}

.switch-dial {
  position: absolute;
  z-index: 2;
  width: 286px;
  height: 286px;

  background-repeat: no-repeat;
  background-size: cover;
}

@keyframes rotateDayToNight {
  from {
    transform: rotate(0deg);
    background-image: url(images/elements/switch-day-dial.webp);
  }

  to {
    transform: rotate(180deg);
    background-image: url(images/elements/switch-night-dial-2.webp);
  }
}

@keyframes rotateNightToDay {
  from {
    transform: rotate(180deg);
    background-image: url(images/elements/switch-night-dial-2.webp);
  }

  to {
    transform: rotate(360deg);
    background-image: url(images/elements/switch-day-dial.webp);
  }
}

.switch-sun-moon {
  position: absolute;
  z-index: 3;
  width: 286px;
  height: 286px;
  background-image: url(images/elements/switch-night-sun-moon.webp);
  background-repeat: no-repeat;
  background-size: cover;

  -webkit-transition: background-image 1000ms linear;
  -ms-transition: background-image 1000ms linear;
  transition: background-image 1000ms linear;
}

.candles-bg {
  position: absolute;
  right: 0;
  bottom: -70px;
  height: 462px;
  width: 401px;
  z-index: 1;
  background-image: url(images/elements/candles-night.webp);
  background-repeat: no-repeat;
  background-size: cover;
}

.candle-light {
  position: absolute;
  right: 0;
  bottom: -70px;
  height: 462px;
  width: 401px;
  z-index: 2;
  background-image: url(images/elements/candle-light-sprite.webp);
  background-repeat: no-repeat;
  background-size: cover;
  background-position: 0px 0px;

  animation-name: candleLight;
  animation-duration: 2s;
  animation-timing-function: steps(8);
  animation-iteration-count: infinite;
  animation-play-state: running;

  -webkit-transition: all 1000ms linear;
  -ms-transition: all 1000ms linear;
  transition: all 1000ms linear;
}

@keyframes candleLight {
  from {
    background-position: 0px 0px;
  }
  to {
    background-position: -3204px 0px;
  }
}
