* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: #082D5B url('raffle-nesfa-event.webp') center center no-repeat;
  background-size: cover;
  background-attachment: fixed;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.container {
  width: 100%;
  max-width: 600px;
}

.header-image {
  width: 100%;
  max-width: 600px;
  height: auto;
  border-radius: 20px;
  margin-bottom: 30px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.logo {
  max-width: 150px;
  width: 100%;
  height: auto;
  margin-bottom: 15px;
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.subtitle {
  text-align: center;
  color: #082D5B;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 15px;
  margin-top: 0;
  letter-spacing: 0.5px;
}

.total-clientes {
  text-align: center;
  background: #f8f9fa;
  border-radius: 12px;
  padding: 12px 25px;
  margin-bottom: 20px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.total-clientes:hover {
  background: #e9ecef;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
  transform: translateY(-2px);
}

.total-clientes:active {
  transform: translateY(0);
}

.total-label {
  color: #082D5B;
  font-size: 0.95rem;
  margin-right: 8px;
}

.total-numero {
  color: #EE6531;
  font-size: 1.5rem;
  font-weight: bold;
}

.loading {
  font-size: 1rem;
  font-weight: normal;
  opacity: 0.8;
}

.sorteio-box {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 20px;
  padding: 30px 30px 40px 30px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  min-height: 350px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
}

.inicial {
  text-align: center;
  width: 100%;
}

.descricao {
  font-size: 1rem;
  color: #082D5B;
  margin-bottom: 20px;
}

.btn-sortear {
  background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
  color: white;
  border: none;
  padding: 15px 40px;
  font-size: 1.2rem;
  border-radius: 50px;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(40, 167, 69, 0.4);
  transition: all 0.3s ease;
  font-weight: bold;
}

.btn-sortear:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 40px rgba(40, 167, 69, 0.6);
}

.btn-sortear:active {
  transform: translateY(-1px);
}

.countdown {
  text-align: center;
  width: 100%;
}

#countdown-number {
  font-size: 7rem;
  font-weight: bold;
  color: #EE6531;
  animation: pulse 1s ease-in-out;
}

@keyframes pulse {
  0% {
    transform: scale(0.5);
    opacity: 0;
  }
  50% {
    transform: scale(1.2);
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.resultado {
  text-align: center;
  width: 100%;
  animation: fadeInScale 0.5s ease-out;
}

@keyframes fadeInScale {
  0% {
    transform: scale(0.5);
    opacity: 0;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.trophy {
  font-size: 3.5rem;
  margin-bottom: 15px;
  animation: bounce 1s ease-in-out;
}

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

.resultado h2 {
  font-size: 1.8rem;
  color: #082D5B;
  margin-bottom: 20px;
}

.vencedor-info {
  background: #f8f9fa;
  padding: 20px;
  border-radius: 12px;
  margin-top: 15px;
}

.vencedor-nome {
  font-size: 1.5rem;
  font-weight: bold;
  color: #333;
  margin-bottom: 8px;
}

.vencedor-email {
  font-size: 1rem;
  color: #666;
  margin-bottom: 8px;
}

.vencedor-telefone {
  font-size: 1rem;
  color: #666;
}

.btn-novo {
  display: block;
  margin: 20px auto 0;
  background: #082D5B;
  color: white;
  border: 2px solid #082D5B;
  padding: 12px 35px;
  font-size: 1rem;
  border-radius: 50px;
  cursor: pointer;
  font-weight: bold;
  transition: all 0.3s ease;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.btn-novo:hover {
  background: #0a3a6e;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.erro {
  text-align: center;
  width: 100%;
  color: #dc3545;
  font-size: 1.2rem;
  padding: 20px;
}

.hidden {
  display: none !important;
}

/* Canvas de confetes */
#confetti-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9999;
  opacity: 0;
  transition: opacity 0.3s ease;
}

#confetti-canvas.active {
  opacity: 1;
}

@media (max-width: 768px) {
  body {
    background-position: right center;
    align-items: flex-end;
    padding-bottom: 40px;
  }

  .logo {
    max-width: 120px;
    margin-bottom: 12px;
  }

  .subtitle {
    font-size: 0.75rem;
    margin-bottom: 12px;
  }

  .total-clientes {
    padding: 10px 20px;
    margin-bottom: 15px;
    gap: 8px;
  }

  .total-label {
    font-size: 0.85rem;
  }

  .total-numero {
    font-size: 1.3rem;
  }

  .sorteio-box {
    padding: 25px 20px 30px 20px;
    min-height: 300px;
  }

  .descricao {
    font-size: 0.9rem;
    margin-bottom: 15px;
  }

  .btn-sortear {
    padding: 12px 30px;
    font-size: 1rem;
  }

  #countdown-number {
    font-size: 5rem;
  }

  .trophy {
    font-size: 2.5rem;
    margin-bottom: 10px;
  }

  .resultado h2 {
    font-size: 1.5rem;
    margin-bottom: 15px;
  }

  .vencedor-info {
    padding: 15px;
    margin-top: 10px;
  }

  .vencedor-nome {
    font-size: 1.2rem;
    margin-bottom: 6px;
  }

  .vencedor-email,
  .vencedor-telefone {
    font-size: 0.9rem;
    margin-bottom: 6px;
  }

  .btn-novo {
    margin-top: 15px;
    padding: 10px 30px;
    font-size: 0.9rem;
  }
}
