/* =====================================================
   🎡 Sorteo Corporativo - Estilo profesional colorido
   ===================================================== */

:root {
  --color-bg: #f7f9fc;
  --color-primary: #2563eb;
  --color-secondary: #1e3a8a;
  --color-accent: #facc15;
  --color-border: #e2e8f0;
  --color-text: #1e293b;
  --color-card: #ffffff;
  --radius: 12px;
  --shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  --primary: #004AAD;   /* azul institucional */
--secondary: #E30613; /* rojo */
--light: #F8F9FA;     /* fondo */
--text: #212529;
}

/* ===== RESET ===== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.5;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ===== HEADER ===== */
.site-header {
  background: linear-gradient(90deg, #2563eb, #3b82f6);
  color: #fff;
  padding: 1rem 2rem;
  box-shadow: var(--shadow);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.logo {
  width: 55px;
  height: 55px;
  object-fit: contain;
  filter: drop-shadow(0 0 4px rgba(255, 255, 255, 0.8));
}

.titles {
  flex-grow: 1;
}

.brand {
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 0.2rem;
}

.subtitle {
  font-size: 0.9rem;
  opacity: 0.9;
}

.seed-box {
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius);
  padding: 0.4rem 0.8rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.seed-box code {
  font-family: monospace;
  background: rgba(255, 255, 255, 0.2);
  padding: 0.1rem 0.5rem;
  border-radius: 4px;
}

/* ===== MAIN LAYOUT ===== */
.layout {
  flex: 1;
  display: grid;
  grid-template-columns: 310px 1fr 310px;
  gap: 1rem;
  padding: 1rem 1.5rem;
}

/* ===== PANEL ===== */
.panel {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.card {
  background: var(--color-card);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow);
  transition: all 0.2s ease-in-out;
}

.card:hover {
  transform: translateY(-1px);
}

.card-title {
  font-weight: 600;
  margin-bottom: 0.4rem;
  color: var(--color-secondary);
}

.card-subtitle {
  font-size: 0.9rem;
  color: #475569;
  margin-bottom: 0.5rem;
}

.actions,
.inline-actions {
  margin-top: 0.6rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.btn {
  background: var(--color-primary);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  padding: 0.45rem 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.btn:hover {
  background: #1d4ed8;
}

.btn-ghost {
  background: #e0e7ff;
  color: #1e3a8a;
}

.btn-danger {
  background: #ef4444;
}

.btn-lg {
  font-size: 1.1rem;
  padding: 0.8rem 1.2rem;
}

/* ===== WHEEL SECTION ===== */
.wheel-wrap {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

#wheelCanvas {
  border-radius: 50%;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.2);
  background: conic-gradient(
    #ef4444,
    #f97316,
    #facc15,
    #22c55e,
    #0ea5e9,
    #6366f1,
    #a855f7,
    #ec4899,
    #ef4444
  );
}

.wheel-logo {
  position: absolute;
  width: 110px;
  height: 110px;
  border-radius: 50%;
  background: #fff;
  padding: 8px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
  z-index: 2;
}

.pointer {
  position: absolute;
  top: 0;
  left: 50%;
  width: 0;
  height: 0;
  border-left: 12px solid transparent;
  border-right: 12px solid transparent;
  border-bottom: 25px solid var(--color-accent);
  transform: translateX(-50%);
  z-index: 3;
}

.hint {
  text-align: center;
  margin-top: 0.5rem;
  color: #64748b;
  font-size: 0.85rem;
}

/* ===== WINNER CARD ===== */
.winner-card {
  text-align: center;
}

.winner-display {
  margin-top: 0.6rem;
}

.winner-name {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--color-primary);
}

.winner-dui {
  font-size: 0.95rem;
  color: #475569;
}

/* ===== WINNERS LIST ===== */
.winners-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-height: 300px;
  overflow-y: auto;
}

.winner-card-item {
  background: linear-gradient(90deg, #e0f2fe, #f0f9ff);
  border-left: 4px solid var(--color-primary);
  border-radius: var(--radius);
  padding: 0.5rem 0.8rem;
  box-shadow: var(--shadow);
  animation: fadeIn 0.4s ease;
}

.winner-card-item strong {
  color: var(--color-primary);
}

/* ===== TABLES / MODALS ===== */
.table {
  width: 100%;
  border-collapse: collapse;
}

.table th,
.table td {
  border: 1px solid var(--color-border);
  padding: 0.4rem 0.6rem;
  font-size: 0.9rem;
}

.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 999;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
}

.modal-content {
  background: #fff;
  border-radius: var(--radius);
  max-width: 700px;
  width: 90%;
  margin: 4rem auto;
  padding: 1rem;
  box-shadow: var(--shadow);
  position: relative;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.modal-footer {
  text-align: right;
  margin-top: 1rem;
}

/* ===== FOOTER ===== */
.site-footer {
  background: #f1f5f9;
  padding: 0.7rem;
  text-align: center;
  color: #64748b;
  font-size: 0.85rem;
  border-top: 1px solid #e2e8f0;
}

/* ===== SCROLLBAR ===== */
.winners-list::-webkit-scrollbar {
  width: 6px;
}
.winners-list::-webkit-scrollbar-thumb {
  background: var(--color-primary);
  border-radius: 3px;
}

/* ===== ANIMACIONES ===== */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}




#ruletaCanvas {
  border: 8px solid #004AAD;
  box-shadow: 0 0 20px rgba(0,0,0,0.2);
  border-radius: 50%;
}
#ruletaLogo {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background-color: white;
  box-shadow: 0 0 10px rgba(0,0,0,0.1);
}




body {
  background-color: var(--light);
  color: var(--text);
}
header, .boton-principal {
  background-color: var(--primary);
  color: white;
}
.boton-secundario {
  background-color: var(--secondary);
  color: white;
}




.slider {
  width: 300px;        /* ancho del panel izquierda/derecha */
  height: 250px;       /* alto del slider */
  overflow: hidden;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  margin-bottom: 15px;
}

.slides {
  display: flex;
  width: 400%;         /* 4 imágenes */
  height: 100%;
  animation: slide 16s infinite;
}

.slides img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Animación del slider */
@keyframes slide {
  0%   { margin-left: 0; }
  20%  { margin-left: 0; }

  25%  { margin-left: -100%; }
  45%  { margin-left: -100%; }

  50%  { margin-left: -200%; }
  70%  { margin-left: -200%; }

  75%  { margin-left: -300%; }
  95%  { margin-left: -300%; }

  100% { margin-left: 0; }
}




.slider {
  width: 300px;
  height: 250px;
  overflow: hidden;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  margin-bottom: 15px;
}

.slides {
  display: flex;
  width: 400%;
  height: 100%;
  animation: slide 16s infinite;
}

/* 👇 ELIGE UNA OPCIÓN */
.slides img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* cover = llena / contain = completa */
  background-color: #fff;
}




/* =====================================================
   📱 RESPONSIVE PARA MÓVILES
   ===================================================== */

@media (max-width: 768px) {

  /* 1) Cambiar 3 columnas → 1 columna */
  .layout {
    grid-template-columns: 1fr;
    padding: 0.5rem;
    gap: 1rem;
  }

  /* 2) Paneles centrados uno bajo otro */
  .panel {
    width: 100%;
    max-width: 100%;
  }

  /* 3) Slider ajustado al ancho completo */
  .slider {
    width: 100%;
    height: auto; /* más pequeño para móvil */
    aspect-ratio: 4 / 4;
  }
  .slider img {
  object-fit: cover;       
  }    

  /* 4) Ruleta centrada y más pequeña */
  #wheelCanvas {
    width: 300px !important;
    height: 300px !important;
  }

  .wheel-logo {
    width: 75px;
    height: 75px;
  }

  .pointer {
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-bottom: 20px solid var(--color-accent);
  }

  /* 5) Texto más compacto */
  .brand {
    font-size: 1.2rem;
  }

  .subtitle {
    font-size: 0.75rem;
  }

  .card-title {
    font-size: 1.1rem;
  }

  /* 6) Cards más pegadas una detrás de otra */
  .card {
    padding: 0.8rem;
  }

  .winner-name {
    font-size: 1.15rem;
  }

  /* 7) Ocultar el HINT largo (opcional) */
  .hint {
    font-size: 0.7rem;
    padding: 0 1rem;
  }

  /* 8) Ajustar la cabecera */
  .site-header {
    padding: 0.8rem;
  }

  .header-inner {
    flex-direction: column;
    text-align: center;
  }

  .seed-box {
    margin-top: 0.5rem;
  }

  /* 9) Modal responsive */
  .modal-content {
    width: 95%;
    margin: 2rem auto;
  }
}
