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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  background: linear-gradient(135deg, #0055a4 0%, #003d7a 100%);
  min-height: 100vh;
  overflow-x: hidden;
}

/* Loader / Spinner */
.loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 85, 164, 0.95);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
}

.loader.active {
  opacity: 1;
  visibility: visible;
}

.spinner {
  width: 60px;
  height: 60px;
  border: 5px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Página Splash (index.html) */
.splash-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 20px;
  cursor: pointer;
}

.splash-image {
  max-width: 100%;
  height: auto;
  max-height: 90vh;
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  animation: fadeIn 0.6s ease;
}

.splash-image:hover {
  transform: scale(1.02);
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.5);
}

/* Página Registro */
.registro-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 20px;
}

.registro-card {
  background: white;
  border-radius: 20px;
  padding: 40px 30px;
  max-width: 450px;
  width: 100%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s, transform 0.5s;
}

.registro-card.fade-in {
  opacity: 1;
  transform: translateY(0);
}

.logo-container {
  text-align: center;
  margin-bottom: 30px;
}

.carrefour-logo {
  width: 180px;
  height: auto;
}

.titulo-sorteo {
  font-size: 36px;
  font-weight: 900;
  color: #0055a4;
  text-align: center;
  margin-bottom: 10px;
  letter-spacing: 2px;
}

.subtitulo {
  text-align: center;
  color: #666;
  margin-bottom: 30px;
  font-size: 16px;
}

.formulario {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.campo-grupo {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.campo-grupo label {
  font-size: 14px;
  font-weight: 600;
  color: #333;
}

.campo-grupo input {
  padding: 14px 16px;
  border: 2px solid #e0e0e0;
  border-radius: 10px;
  font-size: 16px;
  transition: border-color 0.3s, box-shadow 0.3s;
  outline: none;
}

.campo-grupo input:focus {
  border-color: #0055a4;
  box-shadow: 0 0 0 3px rgba(0, 85, 164, 0.1);
}

.btn-participar {
  background: linear-gradient(135deg, #0055a4 0%, #003d7a 100%);
  color: white;
  padding: 16px;
  border: none;
  border-radius: 10px;
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  margin-top: 10px;
  transition: transform 0.2s, box-shadow 0.2s;
  letter-spacing: 1px;
}

.btn-participar:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(0, 85, 164, 0.4);
}

.btn-participar:active {
  transform: translateY(0);
}

/* Página Gracias */
.gracias-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 20px;
}

.gracias-card {
  background: white;
  border-radius: 20px;
  padding: 50px 40px;
  max-width: 500px;
  width: 100%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  text-align: center;
  opacity: 0;
  transform: scale(0.9);
  transition: opacity 0.5s, transform 0.5s;
}

.gracias-card.fade-in {
  opacity: 1;
  transform: scale(1);
}

.logo-container-grande {
  margin-bottom: 30px;
}

.carrefour-logo-grande {
  width: 200px;
  height: auto;
}

.checkmark-container {
  margin: 20px 0 30px;
}

.checkmark {
  width: 80px;
  height: 80px;
  margin: 0 auto;
}

.checkmark-circle {
  stroke: #4caf50;
  stroke-width: 2;
  stroke-dasharray: 166;
  stroke-dashoffset: 166;
  animation: stroke 0.6s cubic-bezier(0.65, 0, 0.45, 1) forwards;
}

.checkmark-check {
  stroke: #4caf50;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-dasharray: 48;
  stroke-dashoffset: 48;
  animation: stroke 0.3s cubic-bezier(0.65, 0, 0.45, 1) 0.4s forwards;
}

@keyframes stroke {
  100% {
    stroke-dashoffset: 0;
  }
}

.mensaje-gracias {
  font-size: 32px;
  font-weight: 900;
  color: #0055a4;
  margin-bottom: 15px;
}

.mensaje-detalle {
  font-size: 18px;
  color: #666;
  margin-bottom: 10px;
}

.mensaje-redireccion {
  font-size: 14px;
  color: #999;
  font-style: italic;
}

/* Animaciones generales */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive */
@media (max-width: 768px) {
  .registro-card,
  .gracias-card {
    padding: 30px 20px;
  }

  .titulo-sorteo {
    font-size: 28px;
  }

  .mensaje-gracias {
    font-size: 26px;
  }

  .carrefour-logo {
    width: 150px;
  }

  .carrefour-logo-grande {
    width: 170px;
  }
}
