:root {
  --primary: #fca311;
  --secondary: #14213d;
  --background: #000000;
  --text: #ffffff;
  --accent: #4cc9f0;
  --glass-bg: rgba(255, 255, 255, 0.05);
  --glass-border: rgba(255, 255, 255, 0.1);
  --font-main: "Outfit", sans-serif;
}

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

body {
  background-color: var(--background);
  background-image:
    radial-gradient(at 100% 0%, hsla(249, 100%, 53%, 0.2) 0px, transparent 50%),
    radial-gradient(at 0% 100%, hsla(189, 100%, 56%, 0.2) 0px, transparent 50%);
  font-family: var(--font-main);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

.glow-bg {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 600px;
  height: 600px;
  background: radial-gradient(
    circle,
    rgba(76, 201, 240, 0.2) 0%,
    transparent 70%
  );
  transform: translate(-50%, -50%);
  filter: blur(100px);
  z-index: -1;
}

.main-container {
  width: 100%;
  max-width: 1200px;
  padding: 2rem;
  position: relative;
  z-index: 1;
}

.glass-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 24px;
  display: flex;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  position: relative;
  min-height: 600px;
}

/* Columna Izquierda: Imagen */
.card-left {
  flex: 1;
  background: rgba(0, 0, 0, 0.2);
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 4rem;
  position: relative;
}

.image-wrapper {
  position: relative;
  max-width: 400px;
}

.promo-image {
  width: 100%;
  height: auto;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  z-index: 2;
  position: relative;
  animation: float 6s ease-in-out infinite;
}

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

.image-glow {
  position: absolute;
  width: 120%;
  height: 120%;
  background: radial-gradient(
    circle,
    rgba(252, 163, 17, 0.4) 0%,
    transparent 60%
  );
  top: -10%;
  left: -10%;
  filter: blur(30px);
  z-index: 1;
}

/* Columna Derecha: Contenido */
.card-right {
  flex: 1.2;
  padding: 4rem 3rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.header {
  margin-bottom: 2rem;
}

.badge {
  background: rgba(252, 163, 17, 0.2);
  color: var(--primary);
  padding: 0.5rem 1rem;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  display: inline-block;
  margin-bottom: 1rem;
  border: 1px solid rgba(252, 163, 17, 0.3);
}

h1 {
  font-size: 3rem;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 0.5rem;
  background: linear-gradient(90deg, #ffffff, #a0a0a0);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.subtitle {
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.6);
}

/* Área de resultados */
.raffle-display {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 16px;
  padding: 2rem;
  text-align: center;
  position: relative;
  min-height: 200px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  margin: 2rem 0;
}

.placeholder-text {
  font-size: 1.5rem;
  color: rgba(255, 255, 255, 0.3);
  font-style: italic;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 0.3;
  }
  50% {
    opacity: 0.6;
  }
}

.hidden {
  display: none !important;
}

.winner-reveal {
  animation: popIn 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

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

.trophy-icon {
  font-size: 3rem;
  color: var(--primary);
  margin-bottom: 1rem;
  filter: drop-shadow(0 0 10px rgba(252, 163, 17, 0.6));
}

#winnerName {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--primary);
  text-shadow: 0 0 20px rgba(252, 163, 17, 0.5);
  margin-bottom: 0.5rem;
}

.congrats-text {
  color: var(--accent);
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  font-size: 0.9rem;
}

/* Controles */
.controls {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.cta-button {
  background: linear-gradient(90deg, var(--primary), #e08e00);
  border: none;
  padding: 1rem 3rem;
  border-radius: 50px;
  color: #000;
  font-family: var(--font-main);
  font-weight: 800;
  font-size: 1.2rem;
  cursor: pointer;
  box-shadow: 0 10px 20px rgba(252, 163, 17, 0.3);
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  position: relative;
  overflow: hidden;
  width: 100%;
  justify-content: center;
}

.cta-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 30px rgba(252, 163, 17, 0.5);
}

.cta-button:active {
  transform: translateY(1px);
}

.btn-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.4) 0%,
    transparent 60%
  );
  transform: translate(-50%, -50%) scale(0);
  transition: transform 0.6s ease-out;
}

.cta-button:hover .btn-glow {
  transform: translate(-50%, -50%) scale(1);
  opacity: 0;
}

.loader {
  display: flex;
  align-items: center;
  gap: 10px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
}

.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top: 2px solid var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Ticket Strip (Decorativo) */
.ticket-strip {
  margin-top: 2rem;
  display: flex;
  justify-content: center;
  gap: 1rem;
  opacity: 0.3;
}

.ticket {
  background: rgba(255, 255, 255, 0.1);
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-size: 0.8rem;
  border: 1px dashed rgba(255, 255, 255, 0.3);
}

/* Grand Winner Text */
.grand-winner-text {
  font-size: 3.5rem;
  font-weight: 800;
  color: var(--primary);
  text-shadow: 0 0 30px rgba(252, 163, 17, 0.4);
  animation: pulse 2s infinite;
  margin: 1rem 0;
}

.raffle-display h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
  color: var(--primary);
}

/* Message Sent */
.msg-sent {
  margin-top: 1rem;
  color: #4cc9f0;
  font-size: 0.9rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  animation: slideUp 0.5s ease-out;
}

@keyframes slideUp {
  0% {
    transform: translateY(10px);
    opacity: 0;
  }
  100% {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Responsividad */
@media (max-width: 900px) {
  .glass-card {
    flex-direction: column;
    min-height: auto;
  }

  .card-left {
    padding: 2rem;
    min-height: 300px;
  }

  .card-right {
    padding: 2rem;
  }

  h1 {
    font-size: 2.5rem;
  }
}
