:root, html {
  color-scheme: light;
  color-scheme: only light;
}
img,
video,
canvas,
svg {
  filter: none !important;
}

body, html {
  padding: 0;
  margin: 0;
  width: 100%;
  height: 100%;
}

img {
    display: block;
    margin: 0 auto;
    position: absolute;
}

#game-container {
    width: 300px;
    height: 600px;
    background: #E6B822;
    position: relative;
    overflow: hidden;
}

#logo {
    display: block;
    margin: 0 auto;
    position: absolute;
    top: 0px;
    left: 0px;
}

#step1, #step2, #step3, #step4 {
  position: absolute;
  width: 100%;
  height: 100%;
}
#step2, #step3, #step4 {
    display: none;
}

#copy-step1, #copy-step2, #copy-step3, #copy-step4 {
    display: block;
    margin: 0 auto;
    position: absolute;
    top: 0px;
    left: 0px;
    opacity: 1;
}
#copy-step1 {
    opacity: 0;
}


#start-button {
    display: block;
    margin: 0 auto;
    position: absolute;
    top: 267px;
    left: 20px;
    width: 0px;
    height: 39px;
    cursor: pointer;
    transition: all 0.3s ease;
    background-image: url('images/btn-graj.png');
    background-repeat: no-repeat;
}
#start-button:hover {
    transform: scale(1.2);
}

#end-button {
    display: block;
    margin: 0 auto;
    position: absolute;
    top: 352px;
    left: 20px;
    width: 183px;
    height: 38px;
    cursor: pointer;
    transition: all 0.3s ease;
}
#end-button img {
    transition: all 0.3s ease;
}
#end-button:hover img {
    transform: scale(1.2);
}


#krowa {
    top: 230px;
    left: 96px;
    z-index: 10;
}
#serek {
    bottom: 0px;
    left: 20px;
}
#serek2 {
    width: 80%;
    bottom: -9px;
    right: 22px;
}

#badge {
    top: 300px;
    right: 20px;
    z-index: 10;
    transform: translateY(-500px) rotate(-10deg);
}
#key1 {
    top: 432px;
    left: 20px;
}
#key2 {
    top: 330px;
    left: 110px;
}
#key3 {
    top: 422px;
    left: 109px;
}
#key4 {
    top: 428px;
    right: 24px;
}

#arrows {
    bottom: 182px;
    left: 44px;
}
#hand {
    bottom: -101px;
    left: -16px;
}


#copy-bonusy {
    bottom: 56px;
    left: 0px;
}
#bonusy {
    position: absolute;
    bottom: 15px;
    left: 20px;
}
#bonusy img {
    width: 38px;
    height: 38px;
    display: inline-block;
    opacity: 0.5;
    position: relative;
}
#bonusy img.collected {
    opacity: 1;
}






.grid {
    position: absolute;
    margin: auto;
    left: 5px;
    top: 100px;
    display: flex;
    flex-wrap: wrap;
    width: 270px;
    height: 390px;
    padding: 15px 12px 14px 12px;
    background-image: url('images/plansza2.png');
    /* background-size: 100%; */
    background-repeat: no-repeat;
    background-position: center;
}
  
.grid div {
    width: 15px;
    height: 15px;
    /* opacity: 20%; */
    position: relative;
}

.pac-dot {
    background-color: #01B505;   
    border: 4px solid #F1E4AF;
    box-sizing: border-box;
    border-radius: 50%;
}

.wall {
    /* background-color: blue; */
}

.power-pellet {
    background-color: green;
    border-radius: 10px;
    z-index: 2;
}
.power-pellet:after {
    display: block;
    position: absolute;
    content: '';
    width: 40px;
    height: 41px;
    background-image: url('images/bonus2.png');
    background-size: cover;
    background-repeat: no-repeat;
    left: -13px;
    top: -13px;
}

.blinky, .pinky, .inky, .clyde {
    z-index: 5;
}
.blinky:after, .pinky:after, .inky:after, .clyde:after {
    display: block;
    position: absolute;
    content: '';
    width: 44px;
    height: 35px;
    background-image: url('images/duszek.png');
    background-size: cover;
    background-repeat: no-repeat;
    left: -13px;
    top: -20px;
}

.pac-man {
    z-index: 10;
    /* background-color: yellow;
    border-radius: 10px; */
}
.pac-man:after {
    display: block;
    position: absolute;
    content: '';
    width: 34px;
    height: 39px;
    background-image: url('images/gracz.png');
    background-size: cover;
    background-repeat: no-repeat;
    left: -13px;
    top: -15px;
}

/* .scared-ghost {
    background-color: aquamarine;
} */

#copy-step1,
#serek,
#krowa,
#key1, #key2, #key3, #key4,
#step2, #step3, #step4,
#serek2, #end-button
{
  transform: translateX(-300px);
  opacity: 0;
}




/* animation class */
.slide-in {
  animation: slideIn 0.6s ease-out forwards;
}

@keyframes slideIn {
  from {
    transform: translateX(-300px);
    opacity: 0;
  }

  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.fadeIn {
  animation: fadeIn 0.8s ease-out forwards;
}
@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.fadeOut {
  animation: fadeOut 1.8s ease-out forwards;
}
@keyframes fadeOut {
  from {
    opacity: 1;
  }

  to {
    opacity: 0;
  }
}

.reveal {
  animation: reveal 0.2s ease-out forwards;
}

@keyframes reveal {
  from {
    width:0px;
  }

  to {
    width: 90px;
  }
}

.slide-out {
  animation: slideOut 0.3s ease-out forwards;
}

@keyframes slideOut {
  from {
    transform: translateX(0px);
    opacity: 1;
  }

  to {
    transform: translateX(300px);
    opacity: 1;
  }
}

.slide-down {
  animation: slideDown 1s ease-out forwards;
}

@keyframes slideDown {
  from {
    transform: translateY(-500px) rotate(-40deg);
  }

  to {
    transform: translateY(0) rotate(0);
  }
}

.pulse {
  animation: pulse 1.2s ease-out infinite;
}
@keyframes pulse {
  0% {
    transform: scale(1) translateX(0);
    opacity: 1;
  }
  50% {
    transform: scale(1.2) translateX(0);
    opacity: 1;
  }
  100% {
    transform: scale(1) translateX(0);
    opacity: 1;
  }
}

.shake {
  animation: waveHand 2s ease-in-out;
  transform-origin: bottom center;
}

@keyframes waveHand {
  0% {
    transform: rotate(0deg) translateY(0);
    opacity: 1;
  }

  20% {
    transform: rotate(-7deg) translateY(0);
  }

  40% {
    transform: rotate(7deg) translateY(0);
  }

  60% {
    transform: rotate(0deg) translateY(0px);
  }
  70% {
    transform: rotate(0deg) translateY(-20px);
  }

  90% {
    transform: rotate(0deg) translateY(0);
    opacity: 1;
  }
  100% {
    transform: rotate(0deg) translateY(0);
    opacity: 1;
  }
}