/* Board Pexeso Styles - Specifické styly pro pexeso nástěnku */

.game-container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 1.5rem 0;
  text-align: center;
}

.game-stats {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
  font-size: 1.5rem;
  font-weight: bold;
}

.pexeso-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, 200px);
  gap: 1rem;
  perspective: 1000px;
  justify-content: center;
}

.pex-card {
  background-color: transparent;
  width: 200px;
  height: 200px;
  cursor: pointer;
  position: relative;
}

.pex-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  text-align: center;
  transition: transform 0.6s;
  transform-style: preserve-3d;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.pex-card.flipped .pex-card-inner {
  transform: rotateY(180deg);
}

.pex-card.matched .pex-card-inner {
  cursor: default;
}

.pex-front,
.pex-back {
  position: absolute;
  width: 100%;
  height: 100%;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  padding: 10px;
  overflow: hidden;
  box-sizing: border-box;
}

.pex-front {
  background: linear-gradient(135deg, #FFCB2B 0%, #FFA500 100%);
  color: #FFFFFF;
  font-size: 2rem;
}

.pex-back {
  background-color: #FFFFFF;
  transform: rotateY(180deg);
  border: 2px solid #FFCB2B;
  color: #333;
  word-wrap: break-word;
  word-break: break-word;
  overflow-wrap: break-word;
  hyphens: auto;
  line-height: 1.3;
}

.pex-back span {
  display: block;
  width: 100%;
  max-height: 100%;
  overflow: hidden;
  padding: 4px;
  text-align: center;
  white-space: normal;
  word-break: break-word;
  overflow-wrap: break-word;
}

.pex-back img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.win-message {
  display: none;
  margin-top: 1.5rem;
  padding: 1.5rem;
  background: #D4EDDA;
  color: #155724;
  border-radius: 12px;
  animation: popIn 0.5s;
}

@keyframes popIn {
  from {
    transform: scale(0.8);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

