
/* ==========================
   MEMORY – STYLES
========================== */

.memory-card {
  width: 100px;
  height: 100px;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.5s;
  cursor: pointer;
  border-radius: 6px;
  background-color: transparent;
  border: none;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15); 
  transform: rotateY(0deg);
}

.memory-card.flip {
  transform: rotateY(180deg);
}

.memory-card .front,
.memory-card .back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  border-radius: 0; /* 6px; */
}

.memory-card .front {
  transform: rotateY(180deg);
  background: transparent;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

.memory-card .front img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain; /* oder 'cover', je nach gewünschtem Effekt */
  user-select: none;
  pointer-events: none;
}

/*.memory-card .back {
  background: url('memory_back.png') center center no-repeat;
  background-size: contain;
}*/

.memory-card .back {
  background-position: center center;
  background-repeat: no-repeat;
  background-size: contain;
}



/* Spielfeld-Layout für Memory */
.spielfeld .memory-game {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 12px;
  width: 100%;
  height: 100%;
  justify-items: center;
}

/* MEMORY – Bild im Polaroid an Container anpassen */
.polaroid img {
  width: 100%;
  height: auto;
  display: block;
}

/* MEMORY – Tatze skalieren */
#nextRound {
  all: unset;
  cursor: pointer;
  display: inline-block;
  margin-top: 0.3rem;
}

#nextRound div {
  width: 90px;
}

@media (max-width: 768px) {
  .memory-card {
    width: 90px;
    height: 90px;
  }

  #nextRound div {
    width: 70px;
  }

  #nextRound span {
    font-size: 0.75rem;
  }
}

/* Radiobuttons nebeneinander */
#pairOptions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
}

#pairOptions label {
  white-space: nowrap;
  font-size: 0.9rem;
}
