@keyframes flip-top {
  to {
    transform: rotateX(90deg);
  }
}
@keyframes flip-bottom {
  to {
    transform: rotateX(0deg);
  }
}
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 14px;
  font-family: "Red Hat Text", sans-serif;
}

body {
  /*font-weight: 700;
  height: 100%;
  min-height: 100vh;
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  overflow: hidden;*/
  background: url(https://raw.githubusercontent.com/alleycaaat/frontend-mentor/main/countdown-timer/images/bg-stars.svg), linear-gradient(0deg, #251d2c 33%, #1e1e28 50%);
}

h1 {
  text-transform: uppercase;
  color: white;
  text-align: center;
  margin-bottom: 50px;
  letter-spacing: 5px;
}

main {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  margin: 0;
}
main .cards {
  display: flex;
  gap: 15px;
}
main .cards .card {
  text-align: center;
  font-size: 25px;
}
main .cards .card p {
  color: #8486a9;
  font-size: 11px;
  letter-spacing: 3px;
  text-transform: uppercase;
}
main .cards .card .flip-card {
  display: flex;
  flex-direction: column;
  box-shadow: 0 7px 3px 0 #151515;
  position: relative;
  margin: 15px auto;
}
main .cards .card .top-half,
main .cards .card .bottom-half,
main .cards .card .top-flip,
main .cards .card .bottom-flip {
  color: #fb6087;
  font-size: 35px;
  height: 43px;
  width: 77px;
  padding: 23px 7px;
  overflow: hidden;
  text-align: center;
  will-change: transform !important;
  box-shadow: 0 3px rgba(71, 83, 115, 0.2) inset;
}
main .cards .card .top-half,
main .cards .card .top-flip {
  color: #d54d6f;
  border-radius: 5px 5px 0 0;
  background-color: #2c2c44;
}
main .cards .card .top-half::before,
main .cards .card .top-flip::before {
  content: "";
  background-color: #191a24;
  height: 10px;
  width: 10px;
  border-radius: 100%;
  position: absolute;
  bottom: -5px;
  left: -5px;
}
main .cards .card .top-half::after,
main .cards .card .top-flip::after {
  content: "";
  background-color: #191a24;
  height: 10px;
  width: 10px;
  border-radius: 100%;
  position: absolute;
  bottom: -5px;
  right: -5px;
}
main .cards .card .bottom-half,
main .cards .card .bottom-flip {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  border-radius: 0 0 5px 5px;
  background-color: #343650;
  box-shadow: 0 -2px 5px 0 rgba(71, 83, 115, 0.7) inset;
}
main .cards .card .bottom-half::before,
main .cards .card .bottom-flip::before {
  content: "";
  background-color: #191a24;
  height: 10px;
  width: 10px;
  border-radius: 100%;
  position: absolute;
  top: -5px;
  left: -5px;
}
main .cards .card .bottom-half::after,
main .cards .card .bottom-flip::after {
  content: "";
  background-color: #191a24;
  height: 10px;
  width: 10px;
  border-radius: 100%;
  position: absolute;
  top: -5px;
  right: -5px;
}
main .cards .card .top-flip {
  position: absolute;
  transform-origin: bottom;
  transform: rotateX(0deg);
  animation: flip-top 0.5s ease-in forwards;
}
main .cards .card .bottom-flip {
  position: absolute;
  bottom: 0;
  transform-origin: top;
  transform: rotateX(90deg);
  animation: flip-bottom 0.5s ease-out 0.5s;
}

footer {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background-image: url(https://raw.githubusercontent.com/alleycaaat/frontend-mentor/main/countdown-timer/images/pattern-hills.svg);
  background-repeat: no-repeat;
  background-size: cover;
  position: absolute;
  min-height: 20%;
  width: 100%;
  bottom: 0;
}
footer .media {
  margin-top: 60px;
  margin-bottom: 15px;
}
footer .media a {
  text-decoration: none;
  margin: 5px 15px;
}
footer .media a :hover {
  filter: invert(58%) sepia(38%) saturate(4955%) hue-rotate(310deg) brightness(101%) contrast(102%);
}
footer .femc {
  margin-bottom: 10px;
  color: #8486a9;
}
footer .femc a {
  text-decoration: none;
  color: #fb6087;
}
footer .femc a:hover {
  text-transform: lowercase;
}
.desktop-img
{
    
}
.mobile-img
{
    display:none;
}

@media screen and (min-width: 320px) and (max-width: 767px){
  main h1 {
    font-size: 31px;
  }
  main .cards {
    gap: 25px;
  }
  main .cards .top-half,
main .cards .bottom-half,
main .cards .top-flip,
main .cards .bottom-flip {
    font-size: 36px !important;
    height: 40px !important;
    width: 62px !important;
    padding: 24px 6px !important;
}
.desktop-img {
    display:none;
}
.mobile-img
{
    display: block !important;
}

}