* {
  padding: 0;
  margin: 0;
  box-sizing: border-box;
}

body {
  width: 1180px;
  height: 820px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: url("img/hintergrund_memory.jpg");
}

.header-container {
  display: flex;
  align-items: center;
  position: fixed;
  top: 20px;
  right: 130px;
}

.header {
  max-width: 250px;
  margin-right: 20px;
}

h3 {
  font-family: "kit-rounded", sans-serif;
  font-weight: 700;
  font-style: normal;
  color: white;
  font-size: 30px;
  margin-right: 20px; /* Abstand zum Kartendeck */
  line-height: 1.5;
}

.memory-game {
  width: 730px;
  height: 730px;
  display: flex;
  flex-wrap: wrap;
  perspective: 1000px;
  -webkit-perspective: 1000px; /* Safari */
}

.memory-card {
  width: calc(25% - 10px);
  height: calc(33.333% - 10px);
  margin: 5px;
  position: relative;
  transform: scale(1);
  -webkit-transform: scale(1); /* Safari */
  transform-style: preserve-3d;
  -webkit-transform-style: preserve-3d; /* Safari */
  transition: transform 0.9s;
  -webkit-transition: transform 0.9s; /* Safari */
  box-shadow: 1px 1px 1px rgba(0,0,0,.3);
}

.memory-card:active {
  transform: scale(0.97);
  -webkit-transform: scale(0.97); /* Safari */
  transition: transform 0.5s;
  -webkit-transition: transform 0.5s; /* Safari */
}

.memory-card.flip {
  transform: rotateY(180deg);
  -webkit-transform: rotateY(180deg); /* Safari */
}

.front-face,
.back-face {
  width: 100%;
  height: 100%;
  padding: 20px;
  position: absolute;
  border-radius: 5px;
  background: #775AFF;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden; /* Safari */
}

.front-face {
  transform: rotateY(180deg);
  -webkit-transform: rotateY(180deg); /* Safari */
}
.wrapper{
  height: 100vh;
  width: 100vw;
  display: flex;
}

* {
  padding: 0;
  margin: 0;
  box-sizing: border-box;
}

body {
  width: 100vw;
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: url("img/hintergrund_memory.jpg");
  background-size: cover;
}

.header-container {
  display: flex;
  align-items: center;
  position: fixed;
  top: 20px;
  right: 130px;
}

.header {
  max-width: 250px;
  margin-right: 20px;
  margin-left: 20px;
}
.header img{
  margin-left: 20px;
}

h3 {
  font-family: "kit-rounded", sans-serif;
  font-weight: 700;
  font-style: normal;
  color: white;
  font-size: 30px;
  margin-right: 20px;
  line-height: 1.5;
}

.memory-game {
  width: 730px;
  height: 730px;
  display: flex;
  flex-wrap: wrap;
  perspective: 1000px;
  -webkit-perspective: 1000px; /* Safari */
}

.memory-card {
  width: calc(25% - 10px);
  height: calc(33.333% - 10px);
  margin: 5px;
  position: relative;
  transform: scale(1);
  -webkit-transform: scale(1); /* Safari */
  transform-style: preserve-3d;
  -webkit-transform-style: preserve-3d; /* Safari */
  transition: transform 0.9s;
  -webkit-transition: transform 0.9s; /* Safari */
  box-shadow: 1px 1px 1px rgba(0,0,0,.3);
}

.memory-card:active {
  transform: scale(0.97);
  -webkit-transform: scale(0.97); /* Safari */
  transition: transform 0.5s;
  -webkit-transition: transform 0.5s; /* Safari */
}

.memory-card.flip {
  transform: rotateY(180deg);
  -webkit-transform: rotateY(180deg); /* Safari */
}

.front-face,
.back-face {
  width: 100%;
  height: 100%;
  padding: 20px;
  position: absolute;
  border-radius: 5px;
  background: #775AFF;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden; /* Safari */
}

.front-face {
  transform: rotateY(180deg);
  -webkit-transform: rotateY(180deg); /* Safari */
}

.game-container {
  width: 100vw;
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

#win-message {
  display: none; /* Hide the message by default */
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: fixed;
  font-size: 2em;
  color: black;
  background-color: white;
  padding: 20px;
  border-radius: 20px;
  text-align: center;
  height: 700px;
  width: 900px;
  border: 5px solid;
  border-color: black;
  z-index: 20;
}

.wrapper {
   
  display: flex; /* Hide the message by default */
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

#zimmer-button {
  color: white;
  background-color: black;
  text-align: center;
  height: 40px;
  width: 180px;
  border-radius: 20px;
  font-family: "kit-rounded", sans-serif;
  font-weight: 700;
  font-size: 20px;
  border: 0;
  margin-top: 20px;
  position: relative;
  bottom:150px;
}

#restart-button {
  top: 90px;
  right: 20px;
}

#close-button {
  top: 20px;
  right: 20px;
}

#close-button, #restart-button {
  position: fixed;
  font-size: 1em;
  cursor: pointer;
  background-color: white;
  border-radius: 40px;
  text-align: center;
  height: 60px;
  width: 60px;
  border: 4px solid black;
}

.win img {
  margin: auto;
  display: block;
}

#restart-button img {
  margin: auto;
  display: block;
  max-width: 60%;
  height: auto;
}

#close-button img {
  margin: auto;
  display: block;
  max-width: 50%;
  height: auto;
}

.hidden {
  display: none;
}


#zimmer-button {
  position: relative;
  z-index: 2;
  color:white;
  background-color: black;
  text-align: center;
  height:40px;
  width: 170px;
  border-radius: 20px;
  font-family: "kit-rounded", sans-serif;
  font-weight: 700;
  font-style: normal;
  color: white;
  font-size: 20px;
}

#restart-button {
  top: 90px;
  right: 20px;
}

#close-button {
  top: 20px;
  right: 20px;
}

#close-button, #restart-button {
  position: fixed;
  font-size: 1em;
  cursor: pointer;
  background-color: white;
  border-radius: 40px;
  text-align: center;
  height: 60px;
  width: 60px;
  border: 4px solid;
  border-color: black;
}

.win img {
  margin: auto;
  display: block;
}

#restart-button img {
  margin: auto;
  display: block;
  max-width: 60%;
  height: auto;
}

#close-button img {
  margin: auto;
  display: block;
  max-width: 50%;
  height: auto;
}

.hidden {
  display: none;
}

