h1,
h2,
h3,
h4,
h5,
h6,
ul,
p,
body {
  margin: 0;
  padding: 0;
}
body {
  box-sizing: border-box;
  overflow: hidden;
  background-color: rgb(65, 65, 65);
  transition: background-color 0.3s ease;
}
img {
  display: block;
  width: 100%;
  height: 100%;
}
.container {
  height: 100vh;
}
.menu {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 10px 0;
  gap: 10px;

  color: white;
}
.menu__button {
  border: none;
  padding: 5px 10px;

  background-color: orange;
  cursor: pointer;

  transition: background-color 250ms cubic-bezier(0.19, 1, 0.22, 1);
}
.menu__button:hover,
.menu__button:focus {
  background-color: blueviolet;
}
#spiel {
  position: relative;

  height: inherit;
  display: flex;
  justify-content: center;
  align-items: center;
}
#karten {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  max-width: calc(5 * 200px + 4 * 10px);
  gap: 10px;
  margin: 0 auto;

  list-style: none;
}

.karte {
  position: relative;

  width: 170px;
  height: 100px;

  cursor: pointer;
  perspective: 1000;
  transform-style: preserve-3d;
}

.karte:hover .vorderseite,
.karte:focus .vorderseite {
  background-color: rgb(31, 31, 31);
}

.karte.isOpen .karte__container {
  transform: rotateY(180deg);
}
.karte__container {
  height: 100%;

  transition: transform 750ms cubic-bezier(0.45, 0, 0.15, 1);
  transform: translateZ(0);
  transform-style: preserve-3d;
  will-change: transform;
}

.vorderseite,
.rueckseite {
  position: absolute;

  width: 100%;
  height: 100%;

  outline: 2px solid black;
  backface-visibility: hidden;
}
.vorderseite {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;

  color: white;
  background-color: rgb(58, 58, 58);
  font-family: monospace;
  font-size: 18px;

  user-select: none;
  z-index: 2;

  transition: background-color 250ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.vorderseite > h1 {
  color: brown;
}
.rueckseite {
  transform: rotateY(180deg);
  z-index: 1;
}
.hero__start,
.hero__sieg {
  position: absolute;

  font-family: "Courier New", Courier, monospace;
  text-align: center;
  color: white;
}
.hero__start.unaktiv,
.hero__sieg.unaktiv {
  display: none;
}
.hero__titel {
  animation: anim_sprung 1s ease infinite;
}
.menu__info {
  position: relative;
}
.menu__erhoehung {
  position: absolute;

  opacity: 0;
  bottom: -20px;
  right: -20px;

  font-size: 15px;
}

.menu__erhoehung.aktiv {
  opacity: 0;
  transform: translateY(0);

  animation: anim_erhoehung 2000ms cubic-bezier(0.215, 0.61, 0.355, 1);
}

@keyframes anim_sprung {
  0%,
  100% {
    transform: translateY(0);
  }
  30% {
    transform: translateY(-15px);
  }
  50% {
    transform: translateY(0);
  }
  70% {
    transform: translateY(-7px);
  }
  90% {
    transform: translateY(0);
  }
}

@keyframes anim_erhoehung {
  0%,
  100% {
    opacity: 0;
    transform: translateY(0);
  }
  30% {
    opacity: 0.4;
    transform: translateY(-15px);
  }
  50% {
    opacity: 0.6;
    transform: translateY(-25px);
  }
  70% {
    opacity: 0.8;
    transform: translateY(-40px);
  }
  90% {
    opacity: 1;
    transform: translateY(-50px);
  }
}
