body {
  font-family: Arial, sans-serif;
  text-align: center;
  background-image: url('../images/underwater.jpeg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
}

@keyframes shake {
  0% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  50% { transform: translateX(5px); }
  75% { transform: translateX(-5px); }
  100% { transform: translateX(0); }
}

@keyframes shuffle {
  0% { transform: rotateY(0deg); }
  50% { transform: rotateY(180deg); }
  100% { transform: rotateY(0deg); }
}

#title-box {
  width: 60%;
  margin: 20px auto;
  padding: 2px 30px;
  background-color: rgba(0, 119, 182, 0.85);
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 119, 182, 0.6);
  color: white;
  text-align: center;
  font-weight: bold;
  font-size: 1.6rem;
  font-family: 'Arial Black', Arial, sans-serif;
  line-height: 1.1;
}

#rules {
  width: 60%;
  margin: 20px auto;
  text-align: left;
  background-color: rgba(255, 255, 255, 0.85);
  border: 2px solid #0077b6;
  border-radius: 10px;
  padding: 20px 30px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

#board-container {
  width: max-content;
  min-width: 540px;
  margin: 20px auto;
  padding: 20px;
  background-color: rgba(255, 255, 255, 0.9);
  border: 3px solid #0077b6;
  border-radius: 12px;
  box-shadow: 0 6px 15px rgba(0, 119, 182, 0.4);
  text-align: center;
}

#board-container.win {
  background-color: rgba(0, 255, 0, 0.3);
  border-color: green;
}

#board-container.lose {
  background-color: rgba(255, 0, 0, 0.3);
  border-color: red;
}

#board {
  display: grid;
  grid-template-columns: repeat(4, 100px);
  gap: 40px;
  margin: 10px auto 0;
}

#guess-counter {
  display: inline-block;
  margin-top: 5px;
  padding: 10px 25px;
  background-color: rgba(0, 119, 182, 0.9);
  color: white;
  font-weight: bold;
  font-size: 1.3rem;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 119, 182, 0.5);
}

#message {
  color: white;
  margin-top: -10px;
  margin-bottom: 8px;
  font-weight: bold;
  font-size: 1.2rem;
}

.card {
  width: 120px;
  height: 120px;
  background-color: lightgray;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  cursor: pointer;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.15);
  user-select: none;
}

.card.matched {
  border: 3px solid green;
  box-shadow: 0 0 10px 3px #4CAF50;
}

.card.mismatched {
  border: 3px solid red;
  box-shadow: 0 0 10px 3px #f44336;
  animation: shake 0.3s;
}

.card.shuffle {
  animation: shuffle 0.5s ease;
}

.card-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  pointer-events: none;
}

button {
  margin-top: 0;
  padding: 10px 20px;
}

















