
.ruleta-container,
.ruleta-container p,
.ruleta-container h1,
.ruleta-container h2,
.ruleta-container h3,
.ruleta-container h4 {
  font-family: Arial, sans-serif;
}

.ruleta-container {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 32px;
  max-width: 900px;
  padding: 40px;
  height: 600px;
}
.ruleta-columna-1 {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  min-width: 450px;
  min-height: 450px;
  max-width: 450px;
  max-height: 450px;
  width: 450px;
  height: 450px;
  box-sizing: content-box;
}
.ruleta-columna-1,
.ruleta-columna-2 {
  width: 50%;
  box-sizing: border-box;
}
.ruleta-circulo {
  width: 500px;
  height: 500px;
  border: 2px solid #888;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #fff;
  position: relative;
  overflow: hidden;
}
.close-ruleta{
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 22px;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 20;
}
/* Contenedor de la ruleta giratoria */
.ruleta-rueda {
  width: 300px;
  height: 300px;
  border-radius: 50%;
  position: relative;
  transition: transform 4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  transform-origin: center;
  box-shadow: 0 0 0 8px #1976d2, 0 2px 16px #0002;
}

/* Sectores de la ruleta */
.ruleta-sector {
  position: absolute;
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: bold;
  color: #fff;
  text-align: center;
  padding: 4px;
  box-sizing: border-box;
  border-radius: 50%;
  transform-origin: center;
  font-family: 'Montserrat', Arial, sans-serif;
  text-shadow: 0 1px 2px #0008;
}

/* Colores alternados para los sectores */
.ruleta-sector:nth-child(odd) {
  background: #1565c0;
}

.ruleta-sector:nth-child(even) {
  background: #42a5f5;
}

/* Flecha indicadora */
.ruleta-flecha {
  position: absolute;
  top: -18px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 22px solid transparent;
  border-right: 22px solid transparent;
  border-top: 38px solid #ff2d2d;
  z-index: 10;
}

.ruleta-circulo h2 {
  color: #e74c3c;
  font-size: 2.5rem;
  margin-bottom: 12px;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 5;
  background: rgba(255, 255, 255, 0.9);
  padding: 10px 20px;
  border-radius: 20px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.ruleta-premios {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 1rem;
  text-align: left;
  display: none; /* Ocultamos la lista original */
}
.ruleta-columna-2 {
  flex: 1;
  min-width: 320px;
  height: 600px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
#ruleta-loader{
	display: none;
    color: #0c318a;
    font-size: 16px;
    margin-top: 5px;
    text-align: center;
}
.ruleta-contenido {
  text-align: center;
}
.ruleta-rut {
  padding: 5px 16px;
  margin-bottom: 16px;
  display: flex;
  justify-content: center;
  flex-direction: column;
  
}
.ruleta-rut input {
  padding: 10px;
  border-radius: 8px;
  border: 1px solid;
  font-family: Arial, sans-serif;
  font-size: 16px;
}

.ruleta-condiciones {
  padding: 2px 16px;
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.ruleta-girar {
  padding: 5px 16px;
  display: flex;
  justify-content: center;
}
#btn-girar {
  font-size: 1.2rem;
  padding: 8px 32px;
  border-radius: 6px;
  background: #3137DE;
  cursor: pointer;
  transition: background 0.2s;
  border: none;
  width: 100%;
  color: #71FFDD;
  font-family: Arial, sans-serif;
  font-weight: bold;
}
#btn-girar:disabled {
  background: #eee;
  color: #aaa;
  font-family: Arial, sans-serif;
  cursor: not-allowed;
  border: none;
  width: 100%;
}
.ruleta-error {
  color: #e74c3c;
  font-size: 0.9rem;
  margin-left: 8px;
  font-family: Arial, sans-serif;
}
.ruleta-modal {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.3s ease-in-out;
}
.ruleta-modal.fade-out {
  opacity: 0;
}
.ruleta-modal-contenido {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.15);
  transition: transform 0.3s ease-in-out;
}
.ruleta-modal.fade-out .ruleta-modal-contenido {
  transform: scale(0.9);
}

/* Ruleta SVG tipo pie */
#ruleta-svg {
  width: 450px;
  height: 450px;
  display: block;
  border-radius: 50%;
  background: #1976d2;
  box-shadow: 0 0 0 8px #1976d2, 0 2px 16px #0002;
}

.ruleta-flecha-svg {
  position: absolute;
  top: 50%;
  right: -20px;
  transform: translateY(-50%) rotate(90deg);
  width: 0;
  height: 0;
  border-left: 24px solid transparent;
  border-right: 24px solid transparent;
  border-top: 40px solid #ff2d2d;
  z-index: 10;
}

/* Texto de los sectores SVG */
.ruleta-sector-text {
  font-size: 18px;
  fill: #fff;
  text-anchor: start;
  dominant-baseline: middle;
  pointer-events: none;
  font-weight: bold;
  font-family: Arial, sans-serif;
} 

/* titulo h2*/
h2.fonts-h2 {
    color: #0d318a;
    font-size: 1.8rem;
    font-family: Arial, sans-serif;
}
.parrafo-size {
  font-size: 16px;
  font-family: Arial, sans-serif;
  color: #0c318a !important;
}
.parrafo-size a {
    color: #0c318a;
    text-decoration: underline;
}
.ruleta-premio-modal {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10001;
  opacity: 0;
  transition: opacity 0.3s ease-in-out;
}
.ruleta-premio-modal.show {
  opacity: 1;
}
.ruleta-premio-contenido {
    background: #fff;
    border-radius: 16px;
    padding: 34px;
    text-align: center;
    display: flex;
    width: 400px;
    flex-direction: column;
    transform: scale(0.9);
    transition: transform 0.3s ease-in-out;
    position: relative;
}
.ruleta-premio-modal.show .ruleta-premio-contenido {
  transform: scale(1);
}
.ruleta-premio-contenido h2 {
  color: #0d318a;
  font-size: 1.8rem;
  margin-bottom: 18px;
  font-family: Arial, sans-serif;
}
.ruleta-premio-img{
    max-width: 200px;
    display: block;
    margin: 0 auto;
}
#premio-mensaje {
  font-size: 1.5rem;
  color: #0c318a;
  margin: 10px 0px;
  border: 2.5px dotted #0d318a; 
  padding: 12px 0;           
  background: #f5f8ff;
  font-family: Arial, sans-serif;
}
#btn-listo {
  background: #3137DE;
  color: #71FFDD;
  border: none;
  border-radius: 8px;
  padding: 10px 32px;
  font-size: 1.1rem;
  cursor: pointer;
  text-decoration: none;
  font-family: Arial, sans-serif;
  font-weight: bold;
}

@media (max-width: 600px) {
  .ruleta-container {
    flex-direction: column-reverse;
    gap: 16px;
    padding: 12px;
    max-width: 100vw;
	height: auto;
  }
  .ruleta-columna-1,
  .ruleta-columna-2 {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }
  .ruleta-columna-1 {
    min-width: 350px;
    min-height: 350px;
    max-width: 350px;
    max-height: 350px;
    width: 350px;
    height: 350px;
  }
  #ruleta-svg {
    width: 350px;
    height: 350px;
    margin: 0 auto;
    box-shadow: 0 0 0 0px #1976d2, 0 2px 16px #0002;
  }
  .ruleta-premio-contenido {
    width: 95vw;
    min-width: unset;
    padding: 16px;
  }
  .ruleta-sector-text {
    font-size: 14px;
  }
  .ruleta-flecha-svg {
    right: -10px;
  }
  .ruleta-modal {
    align-items: flex-start;
  }
  .ruleta-contenido{ padding: 16px 16px 0px; }
  .ruleta-modal-contenido {
    max-height: 90vh;
    overflow-y: auto;
    margin-top: 40px;
  }
  .body-modal-open {
    overflow: hidden !important;
    position: fixed;
    width: 100vw;
  }
}

/* ===== ESTILOS DEL ADMIN ===== */

/* Switch para modo demo/productivo */
.switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
}

.slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
}

input:checked + .slider {
    background-color: #2271b1;
}

input:checked + .slider:before {
    transform: translateX(26px);
}

.slider.round {
    border-radius: 34px;
}

.slider.round:before {
    border-radius: 50%;
}

/* Estilos para la página de admin */
.ruleta-admin-card {
    max-width: 600px;
    margin-bottom: 20px;
}

.ruleta-status-demo {
    color: #d63638;
    font-weight: bold;
}

.ruleta-status-prod {
    color: #00a32a;
    font-weight: bold;
}

.ruleta-probabilities {
    background: #f6f7f7;
    padding: 15px;
    border-radius: 5px;
    margin-top: 10px;
}

.ruleta-probabilities ul {
    margin: 0;
    padding-left: 20px;
}

.ruleta-probabilities li {
    margin-bottom: 5px;
}