@import url('https://fonts.googleapis.com/css2?family=Open+Sans:wght@700&display=swap');

body {
  background: white;
  font-family: 'Open Sans', sans-serif;;
  margin: 50px;
  user-select: none;
  overflow: hidden;
}

#gameContainer {
  width: 90vw;
  height: 90vw;

  max-width: 90vh;
  max-height: 90vh;

  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%,-50%);
}

#itemsContainer {
  display: grid;
  grid-template-columns: 300px 300px;
  gap: 20px;
  justify-content: center;
  width: fit-content;
  height: fit-content;
  transform-origin: top left;
}

.card {
  position: relative;
  width: 300px;
  height: 300px;
  perspective: 500px;
  cursor: pointer;
}

.content {
  position: absolute;
  width: 100%;
  height: 100%;

  transition: transform 1s;
  transform-style: preserve-3d;
  
}

.selected.card .content {
  transform: rotateY( 180deg ) ;
  transition: transform 0.5s;
}

.front,
.back {
  position: absolute;
  height: 100%;
  width: 100%;
  text-align: center;
  font-size: 50px;
  backface-visibility: hidden;
  border-radius: 25px;
  box-shadow: 0 0 15px rgba(0,0,0,0.1);
  display: flex;
  justify-content: center;
  align-items: center;
}

.front {
  background-image: url(Pattern.svg);
  background-color: lightsteelblue;
  background-size: cover;
}

.back {
  background: #03446A;
  color: white;
  transform: rotateY( 180deg );
}

/* Congratulations modal styles (moved from inline JS) */
.congrats-overlay{
  position: fixed;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.congrats-modal{
  background: #fff;
  color: #111;
  padding: 24px;
  border-radius: 12px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.3);
  max-width: 90%;
  text-align: center;
  transform: scale(0.9);
  transition: transform 220ms ease, opacity 220ms ease;
  opacity: 0;
}

.congrats-modal.visible{
  transform: scale(1);
  opacity: 1;
}

.congrats-msg{
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 12px;
}

.congrats-sub{
  font-size: 14px;
  color: #444;
  margin-bottom: 16px;
}

.congrats-btn{
  padding: 10px 18px;
  font-size: 16px;
  border: none;
  border-radius: 8px;
  background: #28a745;
  color: #fff;
  cursor: pointer;
}

.congrats-btn:hover{ filter: brightness(0.95); }

#installContainer {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 1000;
}

#installBtn {
  padding: 10px 20px;
  font-size: 16px;
  border: none;
  border-radius: 8px;
  background: #007bff;
  color: #fff;
  cursor: pointer;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

#installBtn:hover {
  background: #0056b3;
}