* {
    margin:0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, Helvetica, sans-serif;
}

body {
  min-height: 100vh;
  background: linear-gradient(
    -45deg,
    #0f172a,
    #1e293b,
    #020617,
    #1f2933
  );
  background-size: 400% 400%;
  animation: fundoAnimado 12s ease infinite;

  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

@keyframes fundoAnimado {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}


h1 {
    margin-bottom: 20px;
}

.tabuleiro {
  display: grid;
  grid-template-columns: repeat(3, 110px);
  gap: 12px;
  margin-bottom: 25px;
}


.casa {
  width: 110px;
  height: 110px;
  background: linear-gradient(145deg, #1e293b, #0f172a);
  border: 2px solid rgba(255,255,255,0.1);
  font-size: 3.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: 
    background 0.3s ease,
    transform 0.15s ease,
    box-shadow 0.3s ease;
}


.casa:hover {
  background: #1e3a8a;
  transform: scale(1.05);
  box-shadow: 0 0 15px rgba(59,130,246,0.5);
}


.casa.X {
  color: #ff3b3b;
  text-shadow:
    0 0 10px rgba(255, 59, 59, 0.9),
    0 0 25px rgba(255, 59, 59, 0.6);
  animation: surgirX 0.35s ease-out;
}


.casa.O {
  color: #38bdf8;
  text-shadow:
    0 0 10px rgba(56, 189, 248, 0.9),
    0 0 25px rgba(56, 189, 248, 0.6);
  animation: surgirO 0.45s ease-out;
}


@keyframes surgirX {
  0% {
    transform: scale(0) rotate(-90deg);
    opacity: 0;
  }
  100% {
    transform: scale(1) rotate(0);
    opacity: 1;
  }
}

@keyframes surgirO {
  0% {
    transform: scale(0);
    opacity: 0;
  }
  60% {
    transform: scale(1.2);
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.casa.vencedora {
  background: radial-gradient(circle, #facc15, #eab308);
  box-shadow:
    0 0 20px rgba(250, 204, 21, 0.9),
    0 0 40px rgba(250, 204, 21, 0.6);
  animation: glow 1s infinite alternate;
}


@keyframes glow {
  0% {
    transform: scale(1);
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.6);
  }
  100% {
    transform: scale(1.15);
    box-shadow: 0 0 30px rgba(255, 215, 0, 1);
  }
}

#status {
  margin-bottom: 18px;
  font-size: 1.3rem;
  color: #e5e7eb;
  text-shadow: 0 0 6px rgba(255,255,255,0.3);
}


button {
  padding: 12px 26px;
  border: none;
  background: linear-gradient(145deg, #ef4444, #b91c1c);
  color: #fff;
  font-size: 1rem;
  cursor: pointer;
  border-radius: 10px;
  box-shadow: 0 8px 20px rgba(239,68,68,0.5);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

button:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 12px 30px rgba(239,68,68,0.8);
}
