.raspadinha-titulo {
  color: #ffcc00;
  font-weight: bold;
  font-size: 2rem;
  margin-bottom: 3rem;
}

/* Desktop: coloca lado a lado (2 ou 3 cards dependendo do tamanho da tela) */
@media (min-width: 992px) {
  .raspadinhas-grid {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  }
}

.raspadinhas-grid {
  display: grid;
  gap: 2rem;
  justify-items: center;
  padding: 0 1rem;
}

/* Card clicável */
.raspadinha-card {
  display: flex;
  flex-direction: column;
  background-color: #222;
  border-radius: 15px;
  overflow: hidden;
  text-decoration: none;
  color: #fff;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  width: 100%;
  max-width: 600px;
}

/* Imagem do card */
.raspadinha-imagem-container img {
  width: 100%;
  object-fit: contain;
  transition: transform 0.3s ease;
}

.raspadinha-card:hover .raspadinha-imagem-container img {
  transform: scale(1.05);
}

/* Detalhes do card */
.raspadinha-detalhes {
  padding: 1rem 1.2rem;
}

.raspadinha-detalhes h5 {
  color: #ffcc00;
  margin-bottom: 0.5rem;
  font-size: 1.4rem;
}

.raspadinha-detalhes p {
  font-size: 0.95rem;
  margin: 0.2rem 0;
}

.status-aberto {
  color: #00ff99;
  font-weight: bold;
}

/* Responsividade */
@media (max-width: 992px) {
  .raspadinha-imagem-container img {
    height: 220px;
  }

  .raspadinha-detalhes h5 {
    font-size: 1.3rem;
  }
}

@media (max-width: 576px) {
  .raspadinha-titulo {
    font-size: 1.6rem;
    margin-top: 1px;
  }

  .raspadinha-imagem-container img {
    height: 180px;
    margin-bottom: 30px;
  }

  .raspadinha-detalhes h5 {
    font-size: 1.1rem;
    margin-top: -50px;
  }

  .raspadinha-detalhes p {
    font-size: 0.85rem;
  }
}

/* ---- layout grid / cards ---- */
.raspadinha-jogos-grid {
  display: grid;
  grid-template-columns: repeat(3, 150px);
  grid-gap: 15px;
  justify-content: center;
  margin: 20px auto;
  position: relative;
  /* IMPORTANTE para o canvas absoluto */
}

.raspadinha-jogos-card {
  position: relative;
  width: 150px;
  height: 150px;
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  background: #444444ff;
  box-shadow: 0 4px 6px rgba(70, 67, 67, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
}

.raspadinha-jogos-card .raspadinha-jogos-premio-img {
  visibility: hidden;
  /* tornamos visível via JS na inicialização */
  max-width: 90%;
  max-height: 90%;
  object-fit: contain;
  display: block;
  margin: auto;
}

/* canvas único cobrindo a grid */
#raspadinha-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  /* CSS size */
  height: 100%;
  /* CSS size */
  z-index: 10;
  border-radius: 12px;
  -webkit-tap-highlight-color: transparent;
  touch-action: none;
  /* evitar scroll ao raspar */
  cursor: crosshair;
}

/* Responsividade */
@media (max-width: 992px) {
  .raspadinha-jogos-grid {
    grid-template-columns: repeat(3, 120px);
    grid-gap: 12px;
  }

  .raspadinha-jogos-card {
    width: 120px;
    height: 120px;
  }
}

@media (max-width: 576px) {
  .raspadinha-jogos-grid {
    grid-template-columns: repeat(3, 100px);
    grid-gap: 10px;
    padding: 0 10px;
  }

  .raspadinha-jogos-card {
    width: 100px;
    height: 100px;
  }
}

#raspadinha-grid {
  position: relative;
}

/* Mensagem perdeu */
.raspadinha-perdeu {
  color: #ff4d4d !important;
  font-size: 22px;
  font-weight: bold;
  animation: shake 0.6s;
}

@keyframes shake {
  0% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-5px);
  }
  50% {
    transform: translateX(5px);
  }
  75% {
    transform: translateX(-5px);
  }
  100% {
    transform: translateX(0);
  }
}

/* Mensagem ganhou */
.raspadinha-ganhou {
  color: #00b609 !important;
  font-size: 22px;
  font-weight: bold;
  position: relative;
}

/* Contêiner de confetes */
#confetti-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: hidden;
  z-index: 20;
}

.confetti {
  position: absolute;
  width: 10px;
  height: 10px;
  background-color: #ffcc00;
  opacity: 0.9;
  transform: rotate(45deg);
  animation: fall 3s linear infinite;
  border-radius: 2px;
}

@keyframes fall {
  0% {
    transform: translateY(0) rotate(0deg);
    opacity: 1;
  }
  100% {
    transform: translateY(500px) rotate(360deg);
    opacity: 0;
  }
}

.card-raspadinha-help {
  background: #2c2c2c;
  /* fundo escuro */
  color: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.raspadinha-help-top {
  background: #3a3a3a;
  /* tom um pouco diferente para destaque */
  border-top-left-radius: 12px;
  border-top-right-radius: 12px;
}

.raspadinha-help-title {
  font-weight: 700;
  font-size: 1.2rem;
  margin-bottom: 0.3rem;
  color: #ffb74d;
}

.raspadinha-help-price {
  font-size: 1rem;
  margin-bottom: 0;
  margin-top: 20px;
  color: #caff00;
}

.raspadinha-help-bottom {
  background: #2c2c2c;
  border-top: 1px solid #555;
  border-bottom-left-radius: 12px;
  border-bottom-right-radius: 12px;
  flex-grow: 1;
}

.raspadinha-help-bottom h6 {
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: #fff;
}

.raspadinha-help-bottom ul {
  padding-left: 1.2rem;
  margin: 0;
}

.raspadinha-help-bottom li {
  margin-bottom: 0.4rem;
  font-size: 0.95rem;
  color: #ccc;
}

/* Mobile adjustments */
@media (max-width: 767px) {
  .card-raspadinha-help {
    margin-top: 1rem;
  }
}

/* Garante que o card ocupe toda a altura da raspadinha no desktop */
@media (min-width: 768px) {
  .card-raspadinha-help {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
  }
}

@keyframes blink-win {
  0%,
  100% {
    box-shadow: 0 0 5px 2px gold;
    transform: scale(1);
  }

  50% {
    box-shadow: 0 0 20px 5px gold;
    transform: scale(1.05);
  }
}

.raspadinha-card-win {
  animation: blink-win 0.8s ease-in-out infinite;
  border-radius: 8px;
  /* Mantém bordas arredondadas */
}
