@font-face {
  font-family: "Averta";
  src: url("fonts/averta.woff2") format("woff2"),
    url("fonts/averta.woff") format("woff");
  font-weight: 400;
  font-style: normal;
}

@font-face {
  font-family: "Averta Bold";
  src: url("fonts/averta-bold.woff2") format("woff2"),
    url("fonts/averta-bold.woff") format("woff");
  font-weight: 700;
  font-style: normal;
}

.memory-game-container {
    min-height: 100vh;
    padding: 0 4px;
    font-family: "Averta", sans-serif;
  }
  
  .memory-game {
    height: 100%;
    max-width: 1920px;
    margin: 0 auto;
    position: relative;
    height: 100%;
    z-index: 10;
  }
  
  .button-easy, .button-hard, .white-button {
  margin: 0;
  padding: 0;
  border: 0;
  font-size: 100%;
  font: inherit;
  vertical-align: baseline;
    text-decoration: inherit;
    color: inherit;
  }
  
  .no-text {
    overflow: hidden;
    text-indent: -999em;
  }
  
  #steps {
    position: relative;
    width: 100%;
    height: 100%;
  }
  
  .step-1, .step-2, .end-screen {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: left;
    gap: 14px;
  }
  
  .message-container {
    width: 100%;
  }
  
  .start-image {
    margin: 26px auto;
    width: 100%;
    max-width: 562px;
    height: auto;
  }
  
  .buttons-container {
    width: 100%;
    display: flex;
    justify-content: flex-start;
    gap: 18px;
  }
  
  .memory-button {
    position: relative;
    background: #353535 0% 0% no-repeat padding-box;
    color: #fff;
    padding: 27px 48px;
    border-radius: 37px;
    font-size: 24px;
    line-height: 27px;
    opacity: 1;
    transition: transform 0.3s;
    cursor: pointer;
  }
  
  a.memory-button:hover {
    animation: button-wiggle 0.6s infinite;
    color: #ffffff;
  }
  
  @keyframes button-wiggle {
    5% {
        transform: rotate(1deg)
    }
  
    25% {
        transform: rotate(4deg)
    }
  
    80% {
        transform: rotate(-3deg)
    }
  
    100% {
        transform: rotate(0deg)
    }
  }
  
  #steps {
    padding-inline-start: 0;
  }
  
  .step-1 {
    position: relative;
    top: 0;
    left: 0;
    height: 100%;
    transform: scale(0);
    opacity: 0;
    transform-origin: 50% 50%;
    z-index: -100;
    padding: 82px 0;
    background: #E8E8E6;
    background-size: cover;
    background-attachment: fixed;
    border-radius: 43px;
  }
  
  .step-1-content {
    margin: 0 auto;
    width: max-content;
  }
  
  .step-2 {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transform: scale(0);
    opacity: 0;
    transform-origin: 50% 50%;
    z-index: -100;
  }
  
  .show-on-win,
  .win .hide-on-win {
    transform: scale(0);
  }
  
  .hide-on-win,
  .win .show-on-win {
    transform: scale(1);
  }
  
  
  #steps .active-step {
    transition: all 0.5s;
    transform: scale(1);
    opacity: 1;
    z-index: 1;
  }
  
  .message-container {
    font-size: 24px;
    line-height: 27px;
  }

  .message-container .message.message-difficulty {
    margin-bottom: 8px;
  }
  
  .message-container .start-subtitle {
    color: #878787;
  }
  
  #memory-grid {
    display: grid;
    gap: 4px;
    width: 100%;
    max-height: 100%;
    height: max-content;
    position: absolute;
    align-items: center;
    justify-items: center;
    padding-inline-start: 0;
  }
  
  .easy #memory-grid {
    grid-template-columns: repeat(4, 1fr);
  }
  
  @media (max-width: 1024px) {
    .easy #memory-grid { grid-template-columns: repeat(3, 1fr); }
  }
  
  @media (max-width: 480px) {
    .easy #memory-grid { grid-template-columns: repeat(2, 1fr); }
  }
  
  .hard #memory-grid {
    grid-template-columns: repeat(6, 1fr);
  }
  
  @media (max-width: 1200px) {
    .hard #memory-grid { grid-template-columns: repeat(5, 1fr); }
  }
  
  @media (max-width: 1024px) {
    .hard #memory-grid { grid-template-columns: repeat(4, 1fr); }
  }
  
  @media (max-width: 768px) {
    .hard #memory-grid { grid-template-columns: repeat(3, 1fr); }
  }
  
  @media (max-width: 480px) {
    .hard #memory-grid { grid-template-columns: repeat(2, 1fr); }
  }
  
  
  /*Common Styles*/
  #memory-grid li {
    width: 100%;
    height: auto;
    border-radius: 20px;
    display: block;
    background-color: #fff;
    transition: all 0.3s;
    overflow: hidden;
    aspect-ratio: 1/1;
  }
  
  #memory-grid li .image {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 3px;
    background: 50% 50% no-repeat;
    background-size: contain;
    background-color: #fff;
    cursor: pointer;
    overflow: hidden;
    position: relative;
    transition: transform 0.4s;
  }
  
  #memory-grid li .image:after {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 100;
    content: '';
    background: url(../images/card_dots.png);
    background-color: #CFC5BC;
    background-repeat: no-repeat;
    background-size: 70%;
    background-position: center;
    transition: left 0.3s;
  }
  
  #memory-grid li.check .image:after,
  #memory-grid li.correct .image:after {
    left: -100%;
  }
  
  #memory-grid li.check {
    border-color: #a73828;
    background-color: #a73828;
  }
  
  #memory-grid li.correct {
    border-color: #dbab3c;
    background-color: #dbab3c;
    box-shadow: 0 0 0;
  }
  
  .end-screen {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    background-color: #00000080;
    z-index: 100;
  }
  
  .end-screen-container {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    width: 50%;
  }
  
  @media (max-width: 768px) {
    .end-screen-container { width: 100%; }
  }
  
  .smiley-face {
    position: absolute;
    width: 250px;
    height: 250px;
    border-radius: 50%;
    background: url(../images/smiley_face.png) 50% 50% no-repeat;
    background-color: #E8E8E6;
    z-index: 10;
    bottom: 85%;
  }
  
  .congrats-container {
    padding: 72px 54px 54px 54px;
    background-color: #A5888E;
    border-radius: 43px;
  }
  
  .congrats-container .congrats-subtitle {
    font-size: 18px;
    line-height: 20px;
    color: #fff;
    margin-top: 12px;
  }
  
  .end-screen-container .buttons-container {
    justify-content: center;
    margin-top: 10px;
  }
  
  .end-screen-container .buttons-container .memory-button {
    flex-grow: 1;
    color: #000;
    background-color: #E8E8E6;
  }