  * {
  padding: 0;
  margin: 0;
  box-sizing: border-box;
  }
  body {
  height: 100vh;
  display: flex;
  }
  p {
  font-size: .75rem;
  color: #000000;
  font-family: Tahoma;
  }
  .topmenu {
  position: fixed;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
  top: 2%; /* Положение от верхнего края */
  }
  button {
  display: flex;
  }
  @media (orientation: portrait) {
  .memory-game {
  height: 80vh;
  display: flex;
  width: 96%;
  position: fixed;
  left: 5%; /* Положение от левого края */
  top: 6%; /* Положение от верхнего края */
  flex-wrap: wrap;
  perspective: 1000px;
  }
  }
  @media (orientation: landscape) {
  .memory-game {
  height: 90vh;
  display: flex;
  width: 80%;
  position: fixed;
  left: 13%; /* Положение от левого края */
  top: 25px; /* Положение от верхнего края */
  flex-wrap: wrap;
  perspective: 15000px;
  }
  }
  @media (orientation: portrait) {
  .memory-card  {
  width: calc(23%);
  height: calc(15% - 6px);
  margin: 1px;
  transform: scale(1);
  transform-style: preserve-3d;
  transition: transform .25s;
  }
  }
  @media (orientation: landscape) {
  .memory-card  {
  width: calc(15%);
  height: calc(24% - 6px);
  margin: 2px;
  transform: scale(1);
  transform-style: preserve-3d;
  transition: transform .25s;
  }
  }
  .memory-card:active {
  transform: scale(0.97);
  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);
  }
  a {
  color: #0078e1; text-decoration: none
  }
  a:hover {
  color: #339933; text-decoration: underline
  }
  a.clicks {
  color: #ff0000; text-decoration: none
  }
  a.clicks:hover  {
  color: #ff0000; text-decoration: none
  }
  
  .victory-popup {
  display: none;
  position: fixed;
  top: 50%;
  left: 46%;
  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;
  font-family: Arial, sans-serif;
  border-radius: 10px;
}

.victory-popup.show {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.victory-popup h2 {
  color: #339933;
  margin-bottom: 15px;
  font-size: 1em;
}

.victory-popup p {
  font-size: 1em;
  margin-bottom: 25px;
}

.victory-popup button {
  background-color: #339933;
  color: white;
  padding: 12px 25px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-size: 1em;
  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);
}