:root {
  --color-blue: #78a4e3;
  --color-white-opacity-07: rgba(255, 255, 255, 0.7);
  --box-shadow: 0px 0px 8px 4px #ffae1e inset;
  --grey-button: rgba(177, 177, 193, 1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  width: 100%;
  height: 100%;
}

/*
*
Body
*
*/

body {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  margin: auto;
  background-color: var(--color-blue);
  background-image: url(../img/baby-room.jpg);
  background-position: top;
  background-repeat: no-repeat;
  background-size: cover;
}

/* -----------------          START : Header style          ----------------- */

.my-header {
  width: 85%;
  margin: 1rem auto 0;
  padding: 1rem;
  color: black;
  background-color: var(--color-white-opacity-07);
  border-radius: 15px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.my-header--greeting {
  font-size: medium;
  text-align: center;
  padding-bottom: 5px;
}

/* 
CountDown Container Style
*/

.container--countdown {
  width: 90%;
  display: none;
}

.container__div {
  display: flex;
  justify-content: center;
  align-items: center;
  column-gap: 1.2rem;
}

.container__div--p,
.container__div--icon,
.progress {
  font-weight: 600;
  margin-bottom: 1rem;
  font-size: 1.25rem;
  text-align: center;
}

.container__div--icon {
  height: 30px;
  width: auto;
}

/*
*
* START : Progress Bar
*
*/

.progress,
.progress-inner {
  border-radius: 15px !important;
}

.progress {
  width: 100%;
  height: 15px;
  background: rgb(148, 6, 6);
  background: linear-gradient(
    90deg,
    rgba(148, 6, 6, 1) 0%,
    rgba(224, 110, 3, 1) 51%,
    rgba(33, 167, 8, 1) 100%
  );
  position: relative;
}

.progress-inner {
  background: rgb(2, 0, 24);
  background: linear-gradient(
    90deg,
    rgba(2, 0, 24, 1) 0%,
    rgba(177, 177, 193, 1) 100%
  );
  position: absolute;
  width: 100%;
  height: 100%;
}

.progress-inner.animate {
  animation-timing-function: linear;
  animation-name: countdown;
  animation-iteration-count: 1;
  animation-direction: normal;
}

@keyframes countdown {
  from {
    width: 100%;
  }

  to {
    width: 0%;
  }
}

/*
*
* STOP : Progress Bar
*
*/

/* 
* START : EndGame Message
*/

.container--endgame-message {
  font-size: medium;
  font-weight: 600;
  text-align: center;
  height: 78px;
  padding: 20px 0 5px;
  display: none;
}

/* 
* STOP : EndGame Message
*/

/* 
*
* START : Button Style
*
*/

.btn-start {
  padding: 10px 15px;
  min-width: 40%;
  background-color: var(--color-blue);
  border: none;
  border-radius: 10px;
  outline: none;
  font-weight: 600;
  cursor: pointer;
}

/* 
*
* STOP : Button Style
*
*/

/* ----------------- END : Header style ----------------- */

/* ----------------- Memory board Style ----------------- */

/* * START : Memory Game Area * */
.my-main {
  width: 100%;
  height: 100%;
}

.container--memory-grid {
  width: 90%;
  height: 100%;
  margin: auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.memory-game {
  width: 100%;
  height: 90%;
  margin: auto;
  display: flex;
  flex-wrap: wrap;
  perspective: 1000px;
}

/*
*
STOP : Memory Game Area
*
*/

/*
*
START : Memory Cards
*
*/

.memory-card {
  width: calc(25% - 10px);
  height: calc(33.333% - 10px);
  margin: 5px;
  position: relative;
  transform: scale(1);
  transform-style: preserve-3d;
  transition: transform 0.5s;
}

.memory-card :active {
  transform: scale(0.97);
  transition: transform 0.2s;
}

.memory-card.flip {
  transform: rotateY(180deg);
}

.front-face,
.back-face {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  padding: 3px;
  position: absolute;
  border-radius: 5px;
  backface-visibility: hidden;
  cursor: pointer;
}

.front-face {
  transform: rotateY(180deg);
  background-color: #ece8e8;
}

.back-face {
  background-color: rgba(236, 232, 232, 0.65);
  border: solid 2px black;
}

.back-face:hover {
  box-shadow: var(--box-shadow);
}

/*
*
STOP : Memory Cards
*
*/

/*
*
START : Footer
*
*/

.my-footer {
  font-size: 1rem;
  font-weight: 400;
  border-radius: 15px;
}

.my-footer__ul--inline {
  display: flex;
  flex-direction: row;
  column-gap: 20px;
  margin: 10px 0;
  padding: 0 10px;
  background-color: var(--color-white-opacity-07);
  border-radius: 15px;
}

.my-footer ul li {
  list-style-type: none;
}

/*
*
******************** MEDIA QUERIES ***********************
*
*/
@media screen and (min-width: 425px) {
  .front-face,
  .back-face {
    padding: 10px;
  }
}

@media screen and (min-width: 768px) {
  .my-header {
    width: 70%;
  }

  .my-header--greeting,
  .container--countdown {
    height: 84px;
  }

  .container__div--p {
    font-size: 1.5rem;
  }

  .container--endgame-message {
    height: 84px;
  }

  .container--memory-grid {
    width: 70%;
  }
}

@media screen and (min-width: 1024px) {
  .container__div--icon {
    height: 40px;
  }

  .front-face,
  .back-face {
    padding: 20px;
  }
}

@media screen and (min-width: 1440px) {
  .my-header {
    margin-top: 50px;
    height: 20%;
    justify-content: space-evenly;
  }

  .my-main {
    height: 80%;
  }

  .memory-game {
    width: 600px;
    height: 530px;
    margin: 0 auto;
  }

  .my-footer {
    font-size: 1rem;
  }
}

@media screen and (min-width: 2560px) {
  .my-header {
    width: 70%;
  }

  .container__div {
    margin-bottom: 2rem;
  }

  .container__div--p {
    font-size: 3.5rem;
  }

  .container__div--icon {
    height: 90px;
  }

  .progress,
  .progress-inner {
    border-radius: 20px !important;
  }

  .progress {
    height: 40px;
    border: solid 3px #f5f5f5;
  }

  .btn-start {
    font-size: 3rem;
    padding-top: 30px;
    padding-bottom: 30px;
  }

  .container--memory-grid {
    width: 70%;
  }

  .memory-game {
    width: 1100px;
    height: 1100px;
    margin: 0 auto;
  }

  .my-footer {
    font-size: 1.5rem;
  }

  .my-footer__ul--inline {
    flex-direction: column;
    column-gap: 300px;
    margin: auto;
  }
}
