* {
  padding: 0;
  margin: 0;
  box-sizing: border-box;
}

body {
  height: 100vh;
  display: flex;
}

p {
  font-size: 1rem;
  color: #000000;
  font-family: Tahoma;
}

.front-face:hover,
.back-face:hover {
  opacity: 0.9;
  box-shadow: 0px 2px 2px 2px rgba(0,0,0,0.2);
}

.topmenu {
  position: fixed;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
  top: 2%; /* Положение от верхнего края */
}

button {
  display: flex;
}

.memory-game {
  height: 90vh;
  display: flex;
  width: 70%;
  position: fixed;
  left: 17%; /* Положение от левого края */
  top: 7%; /* Положение от верхнего края */
  flex-wrap: wrap;
  perspective: 15000px;
}

.memory-card {
  width: calc(15%);
  height: calc(24% - 6px);
  margin: 2px;
  transform-style: preserve-3d;
  transition: transform .25s;
}

.memory-card:active {
  transition: transform .25s;
}

.memory-card.flip {
  transform: rotateY(180deg);
}

.front-face,
.back-face {
  width: 100%;
  height: 100%;
  padding: 1px;
  position: absolute;
  border-radius: 0px;
  background: #808080;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.front-face {
  transform: rotateY(180deg) translateZ(1px);
  box-shadow: 0px 2px 2px 2px rgba(0,0,0,0.2);
}

a {
  color: #0078e1;
  text-decoration: none;
  transition: color 0.75s ease, text-decoration 0.1s ease;
}
  
a:hover {
  color: #339933;
  text-decoration: underline;
}
  
 a:active {
  color: #008000;
  text-decoration: underline;
  text-shadow: 1px 1px 1px rgba(50, 50, 50, 0.1);
  transition: none;
}

.victory-popup {
  display: none;
  position: fixed;
  top: 49%;
  left: 46.5%;
  transform: translate(-50%, -50%);
  background-color: #fff;
  border: 2px solid #D6F8D6;
  padding: 30px;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
  z-index: 1000;
  border-radius: 10px;
}

.victory-popup.show {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.victory-popup p {
  font-size: 1.2em;
  margin-bottom: 25px;
}

.victory-popup button {
  background-color: #339933;
  color: white;
  padding: 12px 25px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-size: 1.2em;
  transition: background-color 0.3s ease;
}

.victory-popup button:hover {
  background-color: #45a049;
  box-shadow: 0px 0px 2px 2px rgba(0,0,0,0.1);
}