body {
  font-family: 'Comic Sans MS', cursive;
  background: radial-gradient(#ffe0ec, #fff5f9);
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  margin: 0;
}

.container {
  background: #fff6dc;
  border: 5px dotted #ff8a65;
  border-radius: 30px;
  padding: 30px;
  box-shadow: 0 0 25px rgba(0, 0, 0, 0.2);
  text-align: center;
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

h1 {
  font-size: 2.5em;
  color: #ec407a;
  margin-bottom: 20px;
}

.scoreboard {
  display: flex;
  justify-content: space-around;
  margin-bottom: 20px;
  font-size: 18px;
  color: #6a1b9a;
}

.board {
  display: grid;
  grid-template-columns: repeat(3, 100px);
  grid-gap: 10px;
  justify-content: center;
  margin-bottom: 20px;
}

.cell {
  background: #fff3e0;
  border: 3px dashed #f57c00;
  border-radius: 20px;
  font-size: 40px;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100px;
  cursor: pointer;
  transition: transform 0.2s ease-in-out;
  animation: pop 0.3s ease-in-out;
}

.cell:hover {
  background: #ffe082;
  transform: scale(1.05);
}

@keyframes pop {
  0% { transform: scale(0.95); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

.reset-btn, .finalizar-btn {
  background-color: #ba68c8;
  color: white;
  padding: 10px 20px;
  margin: 5px;
  border: none;
  border-radius: 15px;
  font-size: 16px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.reset-btn:hover, .finalizar-btn:hover {
  background-color: #ab47bc;
}

#message {
  font-size: 20px;
  color: #4e342e;
  margin-top: 15px;
  font-weight: bold;
}

.alerta {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: #ffcc80;
  border: 2px solid #ff6f00;
  padding: 15px 30px;
  border-radius: 15px;
  color: #4e342e;
  font-weight: bold;
  box-shadow: 0 0 10px rgba(0,0,0,0.2);
  z-index: 1000;
  animation: fadeInOut 2.5s ease forwards;
}

.alerta-oculta {
  display: none;
}

@keyframes fadeInOut {
  0% { opacity: 0; transform: translateY(-20px) translateX(-50%); }
  10% { opacity: 1; transform: translateY(0) translateX(-50%); }
  90% { opacity: 1; }
  100% { opacity: 0; transform: translateY(-20px) translateX(-50%); }
}