/* ==========================================================================
   Base y Tipografía - Con la fuente 'Inter' y colores base del tema.
   ========================================================================== */
body {
    font-family: 'Inter', sans-serif;
    scroll-behavior: smooth;
    /* Fondo principal con un patrón sutil que evoca a los tapetes de juego */
    background-color: #b8282d;
}




/* ==========================================================================
   Contenedores Principales - Estilo de casino lujoso.
   ========================================================================== */
.main-container {
     background-color: #b8282d;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 4px 8px;
}

.main-container-vip {
     background-color: #222;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 4px 8px;
}


.main-container-rifa {
     background-color: #e4a530;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 4px 8px;
}

#logoContainer {
    width: 100%;
    max-width: 300px;
    margin-bottom: 2rem;
    padding: 1rem;
    border: 4px solid #fbbe4c;
    border-radius: 20px;
    /* Sombra dorada para un efecto de neón/lujo */
    box-shadow: 0 0 15px 5px rgba(251, 190, 76, 0.5), inset 0 0 10px rgba(251, 190, 76, 0.3);
    background-color: #d1363b;
}

#logoContainerRifa {
    width: 100%;
    max-width: 300px;
    margin-bottom: 2rem;
    padding: 1rem;
    border: 4px solid #e41c1c;
    border-radius: 20px;
    /* Sombra dorada para un efecto de neón/lujo */
    box-shadow: 0 0 15px 5px rgba(251, 76, 76, 0.5), inset 0 0 10px rgba(251, 76, 76, 0.3);
    background-color: #f5b438;
}

#siteLogo {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

.content-card, .content-card-dark {
    background-color: #fff;
    padding: 24px;
    border-radius: 16px;
    /* Borde dorado y sombra profunda para un look premium */
    border: 2px solid #fbbe4c;
    box-shadow: 0 15px 30px rgba(0,0,0,0.2), 0 0 10px rgba(251, 190, 76, 0.4);
    width: 100%;
    max-width: 800px;
    margin-bottom: 2rem;
}

.content-card-dark {
    background-color: #111;
    border-color: #3a3a3a;
    color: #f0f0f0;
    border: 2px solid #6e6e6e !important; 
}

.content-card-rules-play{
   background-color: #fff;
    padding: 24px;
    border-radius: 16px 16px 0 0 ;

    border: 2px solid #fbbe4c;
    border-bottom: none !important;
    box-shadow: 0 15px 30px rgba(0,0,0,0.2), 0 0 10px rgba(251, 190, 76, 0.4);
    width: 100%;
    max-width: 350px; 
}


#selectedFlagDisplay {
    font-size: 1.8rem;
    line-height: 1;
    z-index: 1;
    user-select: none;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
    /* Ajuste el ancho/posición para que no interfiera con la flecha */
   /* Resta el espacio de la flecha del ancho */
    height: 100%;
    padding-left: 0.2rem; /* Pequeño ajuste si el emoji queda muy pegado a la izquierda */
}


.country-code-select-hidden {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: none;
    cursor: pointer;
    z-index: 2; /* Asegura que esté por encima de la flecha y la bandera */
    
    font-size: 0;
    line-height: 0;
}

/* --- Estilos para las opciones del dropdown (cuando el select se abre) --- */
.country-code-select-hidden option {
    opacity: 1;
    font-size: 1rem;
    color: #333 !important;
    padding: 0.5rem;
    text-align: left;
    white-space: nowrap;
    line-height: normal;
}



/* --- NUEVO: Estilos para la flecha personalizada del desplegable --- */
.custom-arrow {
    position: absolute;
    top: 50%;
    right: 0.5rem; /* Ajusta esta distancia si es necesario */
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 5px solid #666; /* Color de la flecha, ajústalo si es necesario */
    pointer-events: none; /* Asegura que la flecha no bloquee los clics en el select transparente */
    z-index: 1; /* Asegura que esté sobre el wrapper pero debajo del select transparente */
}

/* --- Ajuste al .country-code-wrapper para hacer espacio para la flecha --- */
.country-code-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    
    width: 4.5rem; /* Mismo ancho que antes */
    height: 3.5rem; /* Misma altura que antes */
    
    border: 2px solid #d1d5db;
    border-radius: 8px;
    background-color: #f9f9f9;
    box-sizing: border-box;
    cursor: pointer;
    
    /* AÑADIDO: Padding a la derecha para dejar espacio a la flecha */
    padding-right: 1.5rem; /* Ajusta este padding. Debe ser suficiente para la flecha. */
}

/* Cambia el color del número y del overlay para los reservados */
.reserved-modal-card .card-placeholder-number {
  color: #b91c1c; /* red-700 */
}
.reserved-modal-card .card-owner-overlay {
  background-color: rgba(185, 28, 28, 0.85); /* red-700 con opacidad */
}

.reserved-modal-card img {
  opacity: 0.4;
  filter: grayscale(80%);
}

.card-owner-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  background-color: rgba(31, 41, 55, 0.85); /* bg-gray-800 con opacidad */
  color: white;
  font-size: 10px;
  font-weight: bold;
  text-align: center;
  padding: 3px 2px;
  line-height: 1.2;
  border-top-left-radius: 0.375rem; /* rounded-md */
  border-top-right-radius: 0.375rem; /* rounded-md */
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  pointer-events: none; /* Permite hacer clic a través del overlay a la imagen */
}

.paid-modal-card {
  border: 5x solid #22c55e; /* Un borde verde brillante (green-500) */
  opacity: 1 !important; /* Asegura que no esté atenuado */
  filter: grayscale(0%) !important; /* Asegura que esté a todo color */
  box-shadow: 0 0 12px 0 #22c55e; /* Sombra o resplandor verde opcional */
  background-color: #22c55e;
}

/* Cambia el color del número y del overlay para los pagados */
.paid-modal-card .card-placeholder-number {
  color: #15803d; /* green-700 */
}
.paid-modal-card .card-owner-overlay {
  background-color: rgba(21, 128, 61, 0.85); /* green-700 con opacidad */
}


/* 2. Para el recuadro del cartón en la modal */
.gifted-modal-card {
  background-color: #cffafe; /* cyan-100 */
  border: 2px solid #67e8f9; /* cyan-300 */
}
.gifted-modal-card .card-placeholder-number {
  color: #0e7490; /* cyan-700 */
}
.gifted-modal-card .card-owner-overlay {
  background-color: rgba(14, 116, 144, 0.85); /* cyan-700 con opacidad */
}

/* 3. Para la imagen del cartón cuando se carga */
.gifted-modal-card img {
  box-shadow: 0 0 12px rgba(6, 182, 212, 0.7); /* Resplandor azul */
}

.ws-bg{
  background-color: #1f272a !important; 
}

/* Estilo base para el recuadro que contiene el número */
.card-placeholder {
  display: flex;
  flex-direction: column; /* Para apilar el overlay y el número */
  justify-content: center;
  align-items: center;
  min-height: 90px; /* Dale una altura mínima para que los cuadros sean uniformes */
  background-color: #f9fafb; /* Un gris muy claro para los disponibles */
  border-radius: 0.375rem; /* rounded-md */
  cursor: pointer;
  transition: all 0.2s ease-in-out;
  position: relative; /* Necesario para el overlay del dueño */
}

.card-placeholder:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

/* Estilo para el número dentro del recuadro */
.card-placeholder-number {
  font-size: 1.75rem; /* 28px */
  font-weight: 700; /* bold */
  color: #464646; /* gray-700 */
}


.tutorialModal{
    width: 100vh;
    height: 100vh;

}



/* ==========================================================================
   Botones - Inspirados en fichas de casino y lingotes de oro.
   ========================================================================== */
.btn {
    padding: 12px 12px;
    border-radius: 50px; /* Bordes redondeados para simular fichas */
    font-weight: 700;
    font-size: 1rem;
    transition: all 0.3s ease;
    cursor: pointer;
    border: 2px solid transparent;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
}

.a-btn {
    display: inline-block; /* CLAVE: Permite que el enlace respete padding y margin vertical */
    text-decoration: none; /* CLAVE: Elimina el subrayado por defecto de los enlaces */
    vertical-align: middle; /* Ayuda a alinear el botón correctamente con otros elementos */
}

.btn-mini {
    padding: 12px 12px;
    border-radius: 50px; /* Bordes redondeados para simular fichas */
    font-weight: 700;
    font-size: 1rem;
    transition: all 0.3s ease;
    cursor: pointer;
    border: 2px solid transparent;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
}

.btn:after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background-color: rgba(255, 255, 255, 0.15);
    transform: rotate(45deg);
    transition: all 0.4s ease;
}

.btn:hover:after {
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
}

.btn-mini:after {
    content: '';
    position: absolute;
    top: -50%;
    left: -70%;
    width: 200%;
    height: 90%;
    background-color: rgba(255, 255, 255, 0.15);
    transform: rotate(45deg);
    transition: all 0.2s ease;
}

.btn-mini:hover:after {
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
}

.btn:disabled {
    
    background-color: #6e6e6e !important;
    color: #000 !important;
    cursor: not-allowed;
    opacity: 0.6;
    box-shadow: none !important;
    border-color: #6b7280 !important;
}

.btn-primary {
    background: linear-gradient(145deg, #fbbe4c, #f8a72b);
    color: #4A3B24;
    border-color: #e5a32a;
    box-shadow: 0 4px 0 #c88a1e, 0 6px 12px rgba(0,0,0,0.3);
}
.btn-primary:hover:not(:disabled) {
    transform: translateY(2px);
    box-shadow: 0 2px 0 #c88a1e, 0 4px 6px rgba(0,0,0,0.4);
}

.btn-secondary {
    background-color: #6b7280;
    color: white;
    border-color: #4b5563;
    box-shadow: 0 4px 0 #374151, 0 6px 12px rgba(0,0,0,0.2);
}
.btn-secondary:hover:not(:disabled) {
    background-color: #4b5563;
    transform: translateY(2px);
    box-shadow: 0 2px 0 #374151, 0 4px 6px rgba(0,0,0,0.3);
}

/* Botón Negro */
.btn-thirdary{
    background-color: #252525;
    color: white;
    border-color: #1b1b1b;
    box-shadow: 0 4px 0 #000000, 0 6px 12px rgba(0,0,0,0.2);
}

.btn-how-to-play, .btn-rules{
    background: linear-gradient(145deg, #2e2e2e, #181818);
    color: #ffffff;
    border-color: #5a5a5a;
    box-shadow: 0 4px 0 #111, 0 6px 12px rgba(0,0,0,0.3);
}

.btn-how-to-play:hover:not(:disabled), .btn-rules:hover:not(:disabled) {
    transform: translateY(2px);
    box-shadow: 0 2px 0 #000000, 0 4px 6px rgba(0,0,0,0.4);
}

/* Botón Blanco - con Bordes */
.btn-fourtary{
    background-color: white; 
    color: #222; 
    border-style:inherit; 
    border-color:#555; 
    border-width: 2px;}

/* Botón de Éxito - Verde Casino */
.btn-success {
    background-color: #22c55e;
    color: white;
    border-color: #16a34a;
    box-shadow: 0 4px 0 #15803d, 0 6px 12px rgba(0,0,0,0.2);
}
.btn-success:hover:not(:disabled) {
    background-color: #16a34a;
    transform: translateY(2px);
    box-shadow: 0 2px 0 #15803d, 0 4px 6px rgba(0,0,0,0.3);
}

/* Botón de Peligro - Rojo Apuesta */
.btn-danger {
    background-color: #ef4444;
    color: white;
    border-color: #dc2626;
    box-shadow: 0 4px 0 #b91c1c, 0 6px 12px rgba(0,0,0,0.2);
}
.btn-danger:hover:not(:disabled) {
    background-color: #dc2626;
    transform: translateY(2px);
    box-shadow: 0 2px 0 #b91c1c, 0 4px 6px rgba(0,0,0,0.3);
}

/* Botón especial de Bingo */
.btn-bingo {
    background-color: #cf353a;
    border: 2px dashed #ffc662;
    color: #ffffff;
    box-shadow: 0 0 15px 2px #a71318, inset 0 0 8px rgba(255, 255, 255, 0.3);
    font-size: 1.2rem;
    font-weight: 900;
}
.btn-bingo:hover:not(:disabled){
    background-color: #a71318;
    transform: scale(1.05);
}

/* Botón especial de RIFA */
.btn-rifa {
    background-color: #ffc662;
    border: 2px dashed #cf353a;
    color: #a71318;
    box-shadow: 0 0 15px 2px #cea908, inset 0 0 8px rgba(255, 255, 255, 0.3);
    font-size: 1.2rem;
    font-weight: 900;
}
.btn-rifa:hover:not(:disabled){
    background-color: #cea908;
    transform: scale(1.05);
}



.btn-info{
    background-color: #22c5bd;
    color: white;
    border-color: #16a3a3;
    box-shadow: 0 4px 0 #158080, 0 6px 12px rgba(0,0,0,0.2);
}
.btn-info:hover:not(:disabled) {
    background-color: #16a39c;
    transform: translateY(2px);
    box-shadow: 0 2px 0 #157980, 0 4px 6px rgba(0,0,0,0.3);
} 

.btn-pulse-2 { /* This class is already in your bingo75.html */
    animation: pulse-2 2s infinite;
}
@keyframes pulse-2 {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.02); opacity: 0.95; }
    100% { transform: scale(1); opacity: 1; }
}

.btn-whatsapp {
    background-color: #39d325;
    color: white;
    border: none;
}
.btn-whatsapp:hover {
    background-color: #35aa1d;
}

.item-image { 
    width: 100%; height: auto; max-height: 240px; object-fit: contain; 
    border-radius: 8px; border: 1px solid #e5e7eb;
    margin-top: 16px; margin-bottom: 16px;
}

#whatsapp_group_link{
    
    box-shadow: 0 0 12px 1px #003313;
    justify-content: center;
    flex-wrap: wrap;
    color: white;
    background-color:#09a104;
    border: 2px #088536 solid;
}

/*#bulk-actions-container{
position:fixed;
right: auto;
margin: auto ;
z-index: 100;
}*/

.dinamica-claimed-winner {
    background-color: #fbbe4c !important; /* Fondo dorado */
    color: #4A3B24 !important; /* Texto oscuro para contraste */
    border: 2px solid #e5a32a !important; /* Borde dorado oscuro */
    cursor: not-allowed;
    opacity: 0.8;
    position: relative;
    font-weight: bold;
}

/* Opcional: Añade un pequeño ícono de "trofeo" o "check" al número reclamado */
.dinamica-claimed-winner::after {
    content: '🏆';
    position: absolute;
    top: 2px;
    right: 4px;
    font-size: 0.8rem;
}

.reserved-card-image-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center; 
    height: 200px; 
    
    border-radius: 8px;
    padding: 4px;
    background-color: #f9fafb;
    cursor: pointer; 
}
.reserved-card-image { 
    max-height: 100%; 
    max-width: 100%;  
    width: auto;      
    height: auto;     
    object-fit: contain; 
    border-radius: 4px; 
}

/* Estilos para los items de la lista de cartones pagados/regalados */
.paid-card-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px;
    border-radius: 6px;
    font-family: 'Inter', sans-serif;
}

.paid-card-item.paid {
    background-color: rgba(22, 163, 74, 0.2); /* Fondo verde semitransparente */
    border-left: 4px solid #16a34a; /* Borde verde */
}

.paid-card-item.gifted {
    background-color: rgba(59, 130, 246, 0.2); /* Fondo azul semitransparente */
    border-left: 4px solid #3b82f6; /* Borde azul */
}

.paid-card-item.dinamica {
  background-color: rgba(123, 22, 163, 0.2); /* Un lila muy claro */
  border-left: 4px solid #9333ea; /* Borde morado oscuro */
}

.paid-card-item .info {
    flex-grow: 1;
}

.paid-card-item .card-number {
    font-weight: 700;
    color: #000000;
    font-size: 1rem;
    margin-right: 12px;
}

.paid-card-item .user-name {
    font-weight: 500;
    color: #1a1b1b;
    font-size: 0.9rem;
    display: block;
}

.paid-card-item .user-phone {
    font-family: monospace;
    color: #2c2c2c;
    font-size: 0.8rem;
}

/* Para el scrollbar en la lista */
#paidCardsListDesktop::-webkit-scrollbar,
#paidCardsListMobile::-webkit-scrollbar {
  width: 6px;
}
#paidCardsListDesktop::-webkit-scrollbar-track,
#paidCardsListMobile::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
}
#paidCardsListDesktop::-webkit-scrollbar-thumb,
#paidCardsListMobile::-webkit-scrollbar-thumb {
  background: #d1363b; /* Usando el color rojo de tu tema */
  border-radius: 3px;
}
.overflow-x-auto::-webkit-scrollbar,
.overflow-y-auto::-webkit-scrollbar {
    width: 7px;
    height: 7px;
}
.overflow-x-auto::-webkit-scrollbar-thumb,
.overflow-y-auto::-webkit-scrollbar-thumb {
    background: #fbbe4c;
    border-radius: 4px;
}

/* Para el panel móvil activo */
#paidCardsMobilePanel.active {
    transform: translateY(0);
    background-color: #eee;
    box-shadow: 0 0 12px 0 #111;
}

.btn-introvideo{
    position: sticky; bottom: 0; left: 0; width: 100%;
    background: #ffffffd7;
    padding: 10px 0 10px 0;
}

#togglePaidListButton {
    width: 4rem;
    height: 4rem;
    background-color: #fbbe4c;
    position: fixed;
    /* CAMBIA bottom por top */
    top: 50%; /* Posiciona el botón al 65% desde la parte superior. Puedes ajustar este valor (ej. 50%, 60%) */
    right: 20px; /* 20px o 1.25rem es un buen espacio desde el borde */
    z-index: 30;
    box-shadow: 0 4px 8px rgba(0,0,0,1);

}

.burbujacartones{
    width: 50px;
}

#zoomedImage {
    display: block; 
    max-width: 100%; 
    max-height: 80dvh; 
    object-fit: contain; 
    clip-path: inset(0 2% 1% 2% round 10%);
    
}
#closeZoomModalButton { 
    position: absolute;
    top: 10px; 
    right: 10px; 
    z-index: 10; 
}

#adminReservationsListContainer {
    max-height: 450px; /* Altura máxima para el contenedor de la tabla */
    overflow-y: auto;  /* Scroll vertical cuando el contenido excede la altura máxima */
    overflow-x: auto;  /* Mantenemos el scroll horizontal si es necesario para la tabla */
    display: block;    /* Asegura que se comporte como bloque para el overflow */
    border-radius: 8px; /* Opcional: bordes redondeados */
    color: #000;
}

.main-container-vip,
.content-card-dark,
#page5 {
  overflow: visible !important;
}

#adminReservationsListContainer {
  -webkit-overflow-scrolling: touch;
}

#adminReservationsListContainer .styled-table th, 
#adminReservationsListContainer .styled-table td {
    text-align: center;
    vertical-align: middle;
    padding: 8px 6px; font-size: 0.85em;
    
}

.styled-table th:last-child.sticky,
.styled-table td.admin-actions-cell.sticky {
     box-shadow: -5px 0 8px -3px rgba(0, 0, 0, 0.2);
}



#adminReservationsListContainer .admin-actions-cell > div {
    gap: 0.25rem; 
}
#adminReservationsListContainer .admin-actions-cell .btn {
    padding: 4px 8px;
}

#adminSearchButton, #adminClearSearchButton{
    min-width: 15%;
    
}

#adminSearchPhoneInput{
    min-width: 60%;
} 


/* --- Estilos para la página de selección de juegos (jugar.html) --- */
.game-selector-card {
    background-color: #ffffff;
    border-radius: 0.75rem; /* rounded-xl */
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05); /* shadow-lg */
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    width: 100%;
 /* max-w-xs */
    cursor: pointer;
    text-decoration: none;
}

.game-selector-card:hover {
    transform: scale(1.05);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04); /* shadow-2xl */
}

.game-selector-card .image-container {
    width: 100%;
    height: 10rem; /* h-48 */
    overflow: hidden;
}

.game-selector-card .game-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.game-selector-card .text-container {
    padding: 1rem; /* p-4 */
    background-color: #222; /* bg-gray-800 */
    color: #ffffff;
    text-align: center;
}

.game-selector-card .game-title {
    font-size: 1.25rem; /* text-xl */
    font-weight: 700; /* font-bold */
    color: #facc15; /* text-yellow-400 */
}

.game-selector-card .game-subtitle {
    font-size: 1.125rem; /* text-lg */
    font-weight: 600; /* font-semibold */
    color: #e5e7eb; /* text-gray-200 */
}

/* --- Estilos para la Selección de Números de Rifa --- */
.item-selectable-box-simple {
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    background-color: #1f272a; /* Un gris claro */
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    border: 2px solid #e5e7eb;
   
}

.admin-selected {
    position: relative;
    transform: scale(1.05);
    box-shadow: 0 0 0 4px #fbbe4c, 0 8px 15px rgba(0,0,0,0.3);
    border: 2px solid #e5a32a; 
    filter: sepia(50%);
}


.item-selectable-box-simple:hover:not(.reserved):not(.selected) {
    border-color: #fbbe4c;
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.1);
}

.item-selectable-box-simple.selected {
    border-color: #fbbe4c;
    background-color: #1f272a;
    box-shadow: 0 0 0 3px #fbbe4c;
    transform: scale(1.05);
}

.item-selectable-box-simple.reserved {
    background-color: #e5e7eb;
    border-color: #d1d5db;
    cursor: not-allowed;
    opacity: 0.6;
}

.item-selectable-box-simple .item-number {
    font-weight: 700;
    color: #ffffff;
}

.item-selectable-box-simple.selected .item-number {
    color: #cccccc;
}

/* ESTILOS PARA LAS FILAS DE LA TABLA DE ADMIN */
.styled-table tbody tr.bingo-row-style {
    background-color: #fde047; /* Amarillo de Bingo */
    color: #1f2937; /* Texto oscuro */
    font-weight: 700;
}
.styled-table tbody tr.bingo-row-style:hover {
    background-color: #facc15; /* Amarillo más oscuro al pasar el mouse */
}

.styled-table tbody tr.raffle-row-style {
    background-color: #f87171; /* Rojo de Rifa */
    color: #1f2937; /* Texto oscuro */
    font-weight: 700;
}
.styled-table tbody tr.raffle-row-style:hover {
    background-color: #ef4444; /* Rojo más oscuro al pasar el mouse */
}

@media (max-width: 700px) {
    /* Ocultamos el texto dentro de los botones */
    #bulk-paid-btn-text,
    #bulk-gifted-btn-text, 
    #bulk-unmark-all-btn-text { 
        display: none;
    }

    /* Ajustamos el botón para que se vea bien solo con el ícono */
    #bulk-mark-paid-btn,
    #bulk-mark-gifted-btn,
    #bulk-unmark-all-btn {
        padding-left: 0.75rem;  /* 12px */
        padding-right: 0.75rem; /* 12px */
        gap: 0; /* Eliminamos el espacio que había entre el ícono y el texto */
    }
}

/* ==========================================================================
   Boletos de Lotería y Selección - ¡Siente la emoción de elegir!
   ========================================================================== */
.item-selectable-box {
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    background-color: #fffde8; /* Color de boleto de lotería */
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    position: relative;
    overflow: hidden;
    /* Borde discontinuo como un ticket recortable */
    border: 2px dashed #d1d5db;
}

.item-selectable-box:before { /* Simula el corte del ticket */
    content: '';
    position: absolute;
    left: 10px; right: 10px; top: 35%;
    height: 1px;
    border-top: 2px dashed #ccc;
}

.item-selectable-box:hover:not(.reserved):not(.selected) {
    border-color: #fbbe4c;
    box-shadow: 0 8px 15px rgba(0,0,0,0.15), 0 0 8px #fbbe4c;
    transform: translateY(-5px);
}

.item-selectable-box.selected {
    border-color: #fbbe4c;
    border-style: solid;
    background-color: #fef3c7;
    box-shadow: 0 0 0 3px #fbbe4c, inset 0 0 10px rgba(0,0,0,0.1);
    transform: scale(1.05);
}

.item-selectable-box.reserved {
    background-color: #e0e0e0;
    border-color: #b0b0b0;
    border-style: solid;
    cursor: not-allowed;
    filter: grayscale(80%);
}

.item-number {
    background-color: #d1363b;
    color: #ffffff;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 4px;
    border: 2px solid #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.item-selectable-box.selected .item-number {
    background-color: #fbbe4c;
    color: #4A3B24;
}

/*ADMIN SELECTED*/

.selectable-row {
    cursor: pointer;
    transition: background-color 0.2s ease-in-out;
}

/* Solo aplica el hover a las filas que NO están seleccionadas */
.selectable-row:not(.selected-row):hover {
    background-color: #fff6d8; /* Un gris más oscuro para el hover */
}

/* ¡REGLA MÁS ESPECÍFICA Y POTENTE! */
/* Esto asegura que la fila seleccionada (y su hover) siempre sea azul */
.styled-table tbody tr.selected-pending,
.styled-table tbody tr.selected-pending:hover {
    background-color: #e4a530 !important; /* Color índigo de selección */
    font-weight: bold !important;         /* Texto blanco para mejor lectura */
}

/* Selección para filas PAGADAS (Hereda de .paid-row) */
.styled-table tbody tr.selected-paid,
.styled-table tbody tr.selected-paid:hover {
    background-color: rgb(8, 194, 17) !important; /* Verde oscuro */
    
    font-weight: bold !important;
}

/* Selección para filas REGALADAS (Hereda de .gifted-row) */
.styled-table tbody tr.selected-gifted,
.styled-table tbody tr.selected-gifted:hover {
    background-color: #0d9cd4 !important; /* Cian/Azul oscuro */
    font-weight: bold !important;
}

.styled-table tbody tr.selected-dinamica,
.styled-table tbody tr.selected-dinamica:hover {
    background-color: #a50dd4 !important; 
    font-weight: bold !important;
}


/* Celdas de acciones para que coincidan con el color de selección */
.styled-table tbody tr.selected-pending .admin-actions-cell,
.styled-table tbody tr.selected-paid .admin-actions-cell,
.styled-table tbody tr.selected-gifted .admin-actions-cell, 
.styled-table tbody tr.selected-dinamica .admin-actions-cell{
    
    background-color: inherit !important; /* Hereda el color de su fila (tr) */
}

/* ==========================================================================
   Sección del Juego de Bingo - El corazón del sorteo.
   ========================================================================== */
.bingo-main-display {
    width: 160px; height: 160px;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    font-size: 5rem; font-weight: 900;
    margin: auto;
    /* Efecto de esfera 3D para la bolilla */
    background: radial-gradient(circle at 65% 35%, #fde047, #fbbe4c 60%, #e5a32a 100%);
    color: #4A3B24;
    border-radius: 50%;
    border: 5px solid #fff;
    box-shadow:
        inset -15px -15px 20px rgba(0,0,0,0.2), /* Sombra interior */
        0 0 30px rgba(255, 255, 255, 0.5),      /* Brillo exterior */
        5px 10px 25px rgba(0,0,0,0.4);       /* Sombra de apoyo */
    text-shadow: 2px 2px 3px rgba(0,0,0,0.2);
}

.bingo-main-letter {
    font-size: 2.5rem;
    font-weight: 700;
    color: #d1363b;
    height: 40px;
    line-height: 1;
}

.bingo-main-number-value {
    font-size: 5rem;
    line-height: 1;
}

.bingo-recent-numbers span {
    display: inline-block;
    width: 45px; height: 45px;
    line-height: 45px; text-align: center;
    border-radius: 50%;
    background: radial-gradient(circle, #df4a4f, #d1363b);
    color: #fff;
    margin: 5px;
    font-weight: 600;
    font-size: 1.1rem;
    border: 2px solid rgba(255,255,255,0.7);
    box-shadow: inset 2px 2px 5px rgba(0,0,0,0.3);
}

.bingo-board-container { display: flex; flex-direction: column; align-items: center; }

.bingo-board-header {
    display: grid; grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 4px; width: 100%; max-width: 400px; margin-bottom: 4px;
}

.bingo-board-letter {
    font-weight: bold; text-align: center; font-size: 2rem;
    color: #fbbe4c; padding: 5px 0; background-color: #d1363b;
    border-radius: 8px;
    text-shadow: 1px 1px 2px #000;
}

.bingo-board {
    display: grid; grid-template-columns: repeat(5, 1fr);
    gap: 10px; width: 100%; max-width: 400px;
    background-color: #a71318; padding: 5px; border-radius: 8px;
}

.bingo-number-cell {
    width: 100%; aspect-ratio: 1 / 1; display: flex;
    align-items: center; justify-content: center;
    border-radius: 50%; /* Celdas redondas */
    font-size: 1.2rem; font-weight: bold;
    cursor: default; background-color: #fff;
    transition: all 0.3s ease;
    border: 2px solid #ddd;
}

.bingo-number-cell.called {
    background: radial-gradient(circle, #fde047, #fbbe4c);
    color: #4A3B24;
    border-color: #c88a1e;
    transform: scale(1.1);
    box-shadow: 0 0 10px #fbbe4c;
}


#adminDiagnosticsContainer{
    background-color: #111;
    border-radius: 20px;
}


/* ==========================================================================
   Modales - Una ventana emergente con estilo.
   ========================================================================== */
.modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background-color: rgba(0,0,0,0.8);
    display: flex; align-items: center; justify-content: center;
    z-index: 2000; padding: 16px;
    backdrop-filter: blur(5px);
}

#howToPlayVideo{
max-height: 80vh;
}

.modal-content, .modal-content-big, .modal-content-dark 
{
padding: 24px; border-radius: 12px;
box-shadow: 0 10px 25px rgba(0,0,0,0.2); width: 100%;
border: 3px solid #fbbe4c;
position: relative;
animation: modal-pop-in 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);

}

.modal-content {   
    background: #fff;
    max-width: 500px;  
}

.modal-content-big {  
    background: #fff;
}

.modal-content-dark {
    background: #222;   
    max-width: 500px;
}

@keyframes modal-pop-in {
    from { transform: scale(0.7); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}


/* ==========================================================================
   Ajustes de Botones para Responsividad (miscartones.html - Botón Descargar)
   ========================================================================== */

/* Regla para ocultar el texto en pantallas pequeñas */
@media (max-width: 500px) { /* Este breakpoint es 'md' en Tailwind, común para tabletas y móviles */

    /* Oculta el texto dentro del span */
    .button-text-hide-on-small {
        display: none !important; /* Usamos !important para asegurar que anule otras reglas */
    }

    /* Ajuste para el botón cuando el texto está oculto */
    .btn-secondary.inline-flex.items-center.justify-center {
        /* Tamaño fijo y circular para un mejor "tappable area" en móviles */
        width: 44px;  /* Ajusta el ancho para que el ícono quepa bien */
        height: 44px; /* Ajusta el alto para que el ícono quepa bien */
        padding: 0 !important; /* Elimina el padding para que el ícono se centre */
        border-radius: 9999px; /* Hace el botón circular */
        flex-shrink: 0; /* Evita que el botón se haga más pequeño de lo definido */
        /* Aseguramos que el contenido (el SVG) se centre perfectamente */
        justify-content: center !important;
    }

    /* Ajuste para el SVG dentro de este tipo de botón cuando el texto está oculto */
    .btn-secondary.inline-flex.items-center.justify-center svg {
        width: 24px !important;  /* Tamaño del ícono SVG dentro del botón pequeño */
        height: 24px !important;
        margin-right: 0 !important; /* Elimina cualquier margen derecho del SVG */
    }

    /* Opcional: Si los botones en general se apilan y desbordan el contenedor */
     .admin-actions-cell > div {
        grid-template-columns: repeat(auto-fit, minmax(40px, 1fr)) !important;
        gap: 0.25rem !important;
    } 
}

/* Opcional: Para pantallas aún más pequeñas (smartphones muy compactos) */
@media (max-width: 500px) { /* Este breakpoint es más pequeño que 'sm' en Tailwind */
    .btn-secondary.inline-flex.items-center.justify-center {
        
        width: 80px;
        height: 40px;
    }
    .btn-secondary.inline-flex.items-center.justify-center svg {
        
        width: 80px !important;
        height: 20px !important;
    }
}

/* ==========================================================================
   Animaciones y Efectos Especiales - Dando vida al juego.
   ========================================================================== */
@keyframes pulse {
    0% { transform: scale(1); box-shadow: 0 4px 0 var(--shadow-color, #c88a1e), 0 6px 12px rgba(0,0,0,0.3); }
    50% { transform: scale(1.05); box-shadow: 0 4px 0 var(--shadow-color, #c88a1e), 0 10px 20px rgba(0,0,0,0.4); }
    100% { transform: scale(1); box-shadow: 0 4px 0 var(--shadow-color, #c88a1e), 0 6px 12px rgba(0,0,0,0.3); }
}

.btn-pulse {
    animation: pulse 2s infinite;
}
.btn-pulse.btn-primary { --shadow-color: #c88a1e; }
.btn-pulse.btn-danger { --shadow-color: #c81e1e; }
.btn-pulse.btn-success { --shadow-color: #15803d; }

.btn-details-icon{
    background-color: #fbbe4c;
    padding: 2%;
    border-radius: 10px;
    width: 3.5rem;
}



/* Efecto de brillo */
.glow-effect {
    box-shadow: 0 0 8px #fbbe4c, 0 0 16px #fbbe4c, 0 0 24px #fbbe4c;
    animation: glow-animation 1.5s infinite alternate;
}

@keyframes glow-animation {
  from { box-shadow: 0 0 8px #f8a72b, 0 0 16px #f8a72b, 0 0 24px #f8a72b; }
  to { box-shadow: 0 0 16px #fbbe4c, 0 0 32px #fbbe4c, 0 0 48px #fbbe4c; }
}


/* ==========================================================================
   Resto de Estilos (Tablas, Formularios, etc.) - Adaptados al tema.
   ========================================================================== */
.form-input, textarea.form-input {
    width: 100%; padding: 12px 15px;
    border: 2px solid #d1d5db;
    border-radius: 8px;
    transition: all 0.2s;
   
}
/* 1. Estilos base para PC (pantallas grandes) */
.info-modal {
    max-width: 600px; /* Un ancho máximo elegante para PC */
    max-height: 90vh; /* Altura máxima para que no ocupe toda la pantalla verticalmente */
    width: 100%;
    display: flex; /* Usamos flexbox para controlar la distribución interna */
    flex-direction: column; /* Apila el título, contenido y botón verticalmente */
}

.info-modal .text-sm { /* El contenedor del contenido de texto */
    flex-grow: 1; /* Permite que este contenedor crezca y ocupe el espacio disponible */
    overflow-y: auto; /* AÑADE UN SCROLL si el contenido es muy largo */
    padding-right: 10px; /* Espacio para que el scroll no pegue al texto */
}

/* 2. Estilos específicos para MÓVILES (pantallas de 768px o menos) */
@media (max-width: 768px) {
    /* Hacemos que el overlay alinee el modal arriba en lugar de al centro */
    #rulesModal, #howToPlayModal {
        align-items: flex-start;
    }

    /* Hacemos que el modal ocupe toda la pantalla en móviles */
    .info-modal {
        width: 100%;
        height: 100%;
        max-width: none; /* Quitamos el límite de ancho */
        max-height: none; /* Quitamos el límite de alto */
        border-radius: 0; /* Sin bordes redondeados en pantalla completa */
        border: none;
    }
}

.form-input:focus, textarea.form-input:focus {
    outline: none;
    border-color: #fbbe4c;
 
    box-shadow: 0 0 0 3px rgba(251, 190, 76, 0.4);
}

.styled-table {
    width: 100%; border-collapse: collapse;
    font-size: 0.9em; box-shadow: 0 0 20px rgba(0,0,0,0.15);
    border-radius: 8px; 
  /* overflow: hidden; /* Clave para que el border-radius funcione en la tabla */
}
.styled-table th, .styled-table td {
    padding: 12px 15px; text-align: left;
}
.styled-table thead th {
    background-color: #d1363b;
    color: #ffffff;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.styled-table tbody tr {
    border-bottom: 1px solid #e0e0e0;
    background-color: #fff;
}


/* Estilo para la celda de PAGO si es de BINGO */
.styled-table td.pago-bingo {
    background-color: #e7a11f; /* Amarillo de Bingo */
    color: #161616; /* Texto oscuro */
    font-weight: 700;
   
    border: 5px dotted #ffb326;
}

/* Estilo para la celda de PAGO si es de RIFA */
.styled-table td.pago-rifa {
    background-color: #b62626; /* Rojo de Rifa */
    color: #fff;; /* Texto blanco para mejor contraste sobre rojo */
    font-weight: 700;
    border: 5px dotted #e43939;
}
.styled-table tbody tr:nth-of-type(even) { background-color: #f9f9f9; }
.styled-table tbody tr:last-of-type { border-bottom: 3px solid #fbbe4c; }
.styled-table tbody tr:hover { background-color: #fef3c7; color: #4A3B24; }
.paid-row { background-color: #84e2a5 !important; font-weight: bold;}
.gifted-row { background-color: #6dd4dd !important; font-weight: bold;}
.dinamica-row { background-color: #d8b4fe !important; font-weight: bold; } 


.gifted-row:hover { background-color: #5ab4bd !important; }
.paid-row:hover { background-color: #63c284 !important; }
.dinamica-row:hover { background-color: #c084fc !important; } 
#VocesPanel{

    border-top: 2px solid #fbbe4c;
    border-radius: 20px 20px 0 0;
    background-color: #1d1d1d;
    border-bottom: 2px solid #fbbe4c;
}


#actions-footer {
    position: sticky; bottom: 0; left: 0; width: 100%;
    background: linear-gradient(180deg, rgba(255,255,255,0.95) 0%, white 100%);
    padding: 1rem;
    box-shadow: 0 -5px 20px rgba(0,0,0,0.15);
    z-index: 10;
    display: flex; flex-direction: column; gap: 0.75rem;
    border-top: 2px solid #fbbe4c;
    border-radius: 20px 20px 0 0;
    
}

#itemsList {
    padding-bottom: 150px;
}

.actions-dropdown {
    position: relative; /* CLAVE: Este debe ser relative para que el menú se posicione dentro de él */
    display: inline-block; /* O `block` si quieres que ocupe todo el ancho disponible */
}

.actions-dropdown-menu {
    position: absolute;
    /* CLAVE: Posicionamiento para abrir a la IZQUIERDA */
   /* Forzamos que se alinee al 100% a la derecha del padre */
    right: auto;
    left: 65% !important;
    top: 0; /* Posiciona el menú al MISMO NIVEL VERTICAL que el botón */
    /* Si quieres que aparezca JUSTO debajo del botón, mantén top: 100%; */
    /* Si top: 100% lo hace muy bajo, puedes usar top: 0 y right: calc(100% + Xpx); donde X es el espacio. */
    /* Para que aparezca directamente a la izquierda, top: 0; es común. */

    z-index: 5;
    margin-top: 0; /* Resetear margin-top si top:0; si no es necesario */
    margin-right: 0.25rem; /* Pequeño espacio entre el botón y el menú (a la derecha del menú) */

    background-color: white;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    width: 120px; /* Ancho del menú */
    display: flex;
    flex-direction: column;

    /* CLAVE: Prevenir que estire la pantalla (desbordamiento horizontal) */
    max-width: calc(100vw - 20px); /* Limita el ancho máximo para no salirse de la ventana */
    overflow-x: hidden; /* Oculta si el contenido desborda horizontalmente */
    white-space: nowrap; /* Asegura que el texto en los ítems no se envuelva */
    box-sizing: border-box; /* Incluye padding/border en el cálculo de width/max-width */

    max-width: calc(100vw - 20px) !important; /* */
    overflow-x: hidden !important; /* */
    white-space: nowrap !important; /* */
    box-sizing: border-box !important; /* */
}

/* El resto de tus estilos para botones dentro del menú se mantienen */
.actions-dropdown-menu button {
    text-align: left;
    padding: 0.5rem 1rem;
    width: 100%;
    border-radius: 0;
}


/* ==== FIN: ESTILOS PARA EL MENÚ DE ACCIONES ==== */



/* ==========================================================================
   Pantalla de Carga - Manteniendo la emoción.
   ========================================================================== */
.loading-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background-color: rgba(29, 4, 5, 0.9);
    display: flex; flex-direction: column; justify-content: center; align-items: center;
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease-in-out;
    backdrop-filter: blur(3px);
}
.loading-overlay:not(.hidden) {
    opacity: 1;
    pointer-events: auto;
}
.loading-overlay.hidden {
    display: none;
}
.loading-spinner {
    border: 8px solid rgba(251, 190, 76, 0.3);
    border-top: 8px solid #fbbe4c;
    border-radius: 50%;
    width: 60px; height: 60px;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

.loading-overlay p {
    font-size: 1.2rem;
    color: #fff;
    font-weight: 500;
    text-shadow: 1px 1px 2px #000;
}

/* ==========================================================================
    Resto de estilos no modificados explícitamente pero que deben estar
   ========================================================================== */
/* Copia aquí los estilos que no necesitaban un rediseño temático profundo */
/* pero que son necesarios para la funcionalidad, adaptando colores si es necesario. */

.toast {
    position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%);
    padding: 12px 20px; border-radius: 8px; box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    font-size: 14px; z-index: 1000; opacity: 0;
    transition: opacity 0.3s ease-in-out, transform 0.3s ease-in-out;
    pointer-events: none; color: white;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); pointer-events: auto; }
.toast.success { background-color: #16a34a; }
.toast.error   { background-color: #dc2626; }
.toast.info    { background-color: #2563eb; }

/* ... (otros estilos menores) ... */
.prose {
    color: #333;
    max-width: 65ch;
    line-height: 1.6;
}
.prose h2 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #111;
    margin-bottom: 1rem;
    margin-top: 1.5rem;
    border-bottom: 2px solid #fbbe4c;
    padding-bottom: 0.5rem;
}
.prose p { margin-top: 0.5em; margin-bottom: 0.5em; }
.prose ul, .prose ol { margin-top: 0.5em; margin-bottom: 0.5em; padding-left: 1.625em; }
.prose li { margin-top: 0.25em; margin-bottom: 0.25em; }


@media (max-width: 640px) {
    #logoContainer {
        max-width: 200px;
    }
    .bingo-main-display {
        width: 120px;
        height: 120px;
    }
    .bingo-main-letter {
        font-size: 2rem;
    }
    .bingo-main-number-value {
        font-size: 3.5rem;
    }
}



/* --- Estilos para la Ruleta de la Rifa --- */

#raffle-container {
    display: flex;
    justify-content: center;
    align-items: center;
}

#wheel-pointer {
    /* El triángulo que apunta al ganador */
    width: 0;
    height: 0;
    border-left: 20px solid transparent;
    border-right: 20px solid transparent;
    border-top: 30px solid #222; /* Amarillo de Tailwind (yellow-400) */
    
    position: absolute; /* Asegura que esté por encima de la ruleta */
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10; /* Le da una capa superior para que siempre sea visible */
}

#raffle-wheel {
    /* Estilos base para ASEGURAR que sea un círculo visible */
    display: block; /* O 'flex', para contrarrestar reseteos de Tailwind */
    position: relative; /* CRUCIAL para que los segmentos se posicionen dentro de él */
    width: 100%;
    height: 100%;
    border-radius: 50%;
    box-sizing: border-box; /* Buena práctica */
    
    /* Estilos visuales */
    border: 8px solid #4b5563; /* Borde gris oscuro */
    background: conic-gradient(
        #3b82f6 0deg 36deg, #84cc16 36deg 72deg,
        #ef4444 72deg 108deg, #f97316 108deg 144deg,
        #8b5cf6 144deg 180deg, #14b8a6 180deg 216deg,
        #ec4899 216deg 252deg, #6366f1 252deg 288deg,
        #f59e0b 288deg 324deg, #10b981 324deg 360deg
    );
    overflow: hidden; /* Oculta cualquier cosa que se salga del círculo */

    /* Animación de giro */
    transition: transform 7s cubic-bezier(0.25, 1, 0.5, 1);
}

.ticket-segment {
    /* Cada "radio" o "porción de pizza" de la ruleta */
    position: absolute; /* Se posiciona relativo al #raffle-wheel */
    width: 50%;
    height: 50%;
    top: 0;
    left: 50%;
    transform-origin: 0% 100%; /* El pivote de rotación está en la esquina inferior izquierda */
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding-top: 10px;
    box-sizing: border-box;
    /* La línea de abajo es para debug: descoméntala para ver los segmentos */
    /* border: 1px solid white; */
}

.ticket-number {
    display: block; /* Asegura que se le puedan aplicar transformaciones */
    color: white;
    font-weight: 700; /* Un poco más grueso para mejor visibilidad */
    font-size: 1.1rem; /* Un poco más grande */
    text-shadow: 1px 1px 3px rgba(0,0,0,0.7); /* Sombra más pronunciada */

    /* --- CAMBIO CLAVE: POSICIONAMIENTO CORREGIDO --- */
    /* Rota el número para que apunte hacia afuera desde el centro */
    transform: rotate(90deg); 
    
    /* Lo posicionamos absolutamente dentro de su segmento padre */
    position: absolute; 
    top: 20px;  /* Lo empuja hacia abajo desde el borde superior del segmento */
    left: 20px; /* Lo empuja hacia la derecha, alejándolo del centro de la ruleta */
    width: 50px; /* Le damos un ancho para que el texto se centre bien */
    text-align: center;
}

@keyframes pulse-winner {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}


.no-transition {
    transition: none !important;
    animation: none !important; /* Anula cualquier animación CSS en progreso */
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.spin-continuous {
    animation: spin 2s linear infinite; /* 2 segundos por giro, lineal, infinito */
}

/* For the main display of the number, ensure it looks premium */
#raffle-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 150px; /* Ajusta el tamaño según necesites, debe ser igual a height */
    height: 150px; /* Para hacerlo redondo, width y height deben ser iguales */
    border-radius: 50%; /* Esto crea el aspecto redondo */
    background-color: #4A3B24; /* Un fondo oscuro de tu paleta */
    color: #fff; /* Color del texto por defecto, que contraste */
    font-size: 24px;
    font-weight: bold;
    text-align: center;
    overflow: hidden; /* Asegura que el contenido no se salga del círculo */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); /* Sombra suave opcional */
    transition: background-color 0.3s ease, transform 0.2s ease; /* Transiciones suaves para cambios de estado */
    border: 3px solid #d1363b; /* Borde rojo, un color de tu bingo */
}

/* Estado cuando se encuentra el ganador */
#raffle-display.winner-found {
    background-color: #fbbe4c; /* Amarillo de tu bingo al encontrar el ganador */
    color: #4A3B24; /* Texto oscuro al encontrar el ganador */
    transform: scale(1.1); /* Pequeña animación de escala al encontrar el ganador */
    border-color: #4A3B24; /* Borde oscuro al encontrar el ganador */
}

/* Estilos para el número dentro del display */
#raffle-display #raffle-display-text {
    font-family: 'Inter', sans-serif; /* Usa tu fuente */
    font-size: 36px; /* Tamaño del número del ganador */
    font-weight: bold;
    margin: 0; /* Sin margen por defecto */
    line-height: 1; /* Asegura que no haya espacio extra */
    padding-top: 5px; /* Ajuste fino si el texto está muy arriba */
}

/* Estilos para el nombre de usuario dentro del display */
#raffle-display #raffle-user-text {
    font-family: 'Inter', sans-serif; /* Usa tu fuente */
    font-size: 14px; /* Tamaño del nombre del ganador */
    color: #eee; /* Color más claro para el nombre por defecto */
    margin-top: 5px; /* Pequeño espacio sobre el nombre */
}

/* Color del nombre cuando se encuentra el ganador */
#raffle-display.winner-found #raffle-user-text {
    color: #d1363b; /* Rojo de tu bingo para el nombre del ganador */
}

/* Animación de "pulso" para cuando la ruleta está girando */
.raffle-display-pulsate {
    animation: pulsate 1s infinite alternate; /* Animación de pulsación */
}

@keyframes pulsate {
    0% { transform: scale(1); }
    100% { transform: scale(1.05); } /* Aumenta ligeramente el tamaño */
}





@keyframes pulse-winner-text {
    0%, 100% { text-shadow: 0 0 20px rgba(250, 204, 21, 0.5); }
    50% { text-shadow: 0 0 40px rgba(250, 204, 21, 1); }
}


/* Estilo para cada "gajo" o segmento de la ruleta SVG */
.wheel-segment {
    stroke: #222; /* Color del borde entre gajos (gris oscuro) */
    stroke-width: 1;
}


/* Ensure your raffle wheel SVG styles are robust enough for the aesthetic */
#raffle-wheel-svg {
    width: 100%;
    height: 100%;
    overflow: visible;
    /* Add a subtle shadow to the SVG itself for depth */
    filter: drop-shadow(0px 0px 8px rgba(0, 0, 0, 0.5));
}


.wheel-text {
    font-size: 4px; /* Adjust if numbers are too small/large on wheel */
    font-weight: 600;
    fill: white;
    text-anchor: middle;
    /* Add text shadow for better readability against various segment colors */
    text-shadow: 1px 1px 2px rgba(0,0,0,0.7);
}


/* --- GENERAL SIDEBAR STYLES (Should already exist if copied from bingo75.html) --- */
.sidebar {
    position: fixed;
    top: 0;
    right: 0;
    width: 300px; /* Ancho de la sidebar */
    height: 100%;
    background-color: #f8f9fa; /* Fondo claro, como tu body principal */
    box-shadow: -2px 0 5px rgba(0, 0, 0, 0.5);
    transform: translateX(100%); /* Oculta la sidebar por defecto */
    transition: transform 0.3s ease-in-out;
    z-index: 1000; /* Asegura que esté encima de otros elementos */
    display: flex;
    flex-direction: column;
}

.sidebar.open {
    transform: translateX(0); /* Muestra la sidebar */
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background-color: #bb1515; /* Color oscuro de tu paleta */
    color: #fff;
    font-size: 1.2em;
    font-weight: bold;
}

.close-sidebar-button {
    background: none;
    border: none;
    font-size: 2em;
    color: #fff;
    cursor: pointer;
    line-height: 1; /* Alineación vertical */
    padding: 0;
}

.sidebar-content {
    background-color: #fbbe4c;
    flex-grow: 1;
    padding: 15px;
    overflow-y: auto; /* Permite scroll si la lista es larga */
}

.sidebar-search-input {
    width: 100%;
    padding: 8px;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.sidebar-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-list-item {
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 10px;
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9em;
    color: #333;
}

/* --- TOGGLE BUTTON STYLES (Should also exist) --- */
.toggle-sidebar-button {
    position: fixed;
    top: 20px; /* Ajusta la posición vertical */
    right: 20px; /* Ajusta la posición horizontal */
    background-color: #d1363b; /* Rojo de tu paleta */
    color: #fff;
    border: none;
    border-radius: 50%; /* Botón redondo */
    width: 50px; /* Tamaño del botón */
    height: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5em;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    z-index: 999; /* Menor que la sidebar, mayor que el contenido */
}

/* Estilos para los iconos SVG dentro del botón */
.toggle-sidebar-button svg {
    width: 24px;
    height: 24px;
    color: #fff;
}

input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/*EDITOR DE NOMBRE*/

.user-header-info {
    width: 100%;
    max-width: 800px;
    margin: 20px auto 20px auto;
    background-color: #ffffff; /* Color de fondo del contenedor */
    border: 2px solid #fbbe4c;
    border-radius: 12px;
    padding: 15px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.user-header-info h2 {
    color: #4A3B24; /* Color de texto general para el h2 */
    margin: 0;
    display: flex; /* Para alinear el botón, "Hola," y el nombre */
    align-items: center; /* Alinea verticalmente los ítems en el centro */
    flex-wrap: wrap; /* ¡CLAVE! Permite que los elementos dentro del h2 se envuelvan a la siguiente línea */
    gap: 0.5rem; /* Pequeño espacio entre los elementos del h2 */
}

/* Ajustes para el botón dentro del user-header-info */
.user-header-info .btn-mini {
    padding: 8px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    box-shadow: none;
    flex-shrink: 0; /* Evita que el botón se encoja */
}

/* Ajustes para el SVG dentro del botón btn-mini */
.user-header-info .btn-mini svg {
    width: 20px;
    height: 20px;
}

/* Contenedor del span de nombre/input */
#displayUserNameContainer {
    position: relative;
    display: inline-flex; /* Cambiado a inline-flex para que funcione con flex-wrap y herede flex-1 */
    align-items: center; /* Alinea el texto/input verticalmente en el centro del contenedor */
    flex-grow: 1; /* Permite que este contenedor crezca y ocupe el espacio disponible en la fila */
    min-width: 80px; /* Ancho mínimo para nombres cortos */
    text-align: center; /* Centra el texto y el input dentro de su contenedor */
    /* IMPORTANTE: Establecemos la fuente y altura de línea aquí. Los hijos heredarán. */
    font-size: 1.25rem; /* Tamaño de fuente para el nombre (ajústalo si no es text-xl) */
    line-height: 1.5rem; /* Altura de línea para el texto. Debe ser consistente. */
    /* NO fijamos 'height' aquí para permitir que el contenedor se ajuste a múltiples líneas de texto */
    /* DEBUG: background-color: lime; /* DEBUG: Quita el comentario para ver el área del contenedor */
}

/* El span del nombre (modo visualización) */
#displayUserName {
    display: inline-block; /* Crucial para que tome dimensiones y respete width/height */
    white-space: normal; /* ¡CLAVE! Permite que el texto se envuelva a la siguiente línea */
    word-break: break-word; /* Rompe palabras largas si no caben en la línea */
    overflow: hidden; /* Oculta cualquier desbordamiento si aún ocurre (aunque wrap debería evitarlo) */
    text-overflow: ellipsis; /* No aplicará si el texto envuelve, solo si desborda una sola línea */
    padding: 0;
    margin: 0;
    font-size: inherit; /* Hereda del padre displayUserNameContainer */
    line-height: inherit; /* Hereda del padre displayUserNameContainer */
    color: inherit; /* Hereda del h2 principal */
    vertical-align: middle;
    width: 100%; /* Toma el 100% del ancho disponible en #displayUserNameContainer */
    box-sizing: border-box; /* Incluye padding en el width */
    min-height: 1.5rem; /* Asegura una altura mínima para nombres cortos, igual que line-height */
    display: flex; /* Usamos flex para centrar verticalmente el texto dentro del espacio disponible */
    align-items: center; /* Centra el contenido verticalmente */
    justify-content: center; /* Centra el contenido horizontalmente */
    /* DEBUG: background-color: yellow; /* DEBUG: Quita el comentario para ver el área del span */
}

/* Estilos para el input de edición de nombre (modo edición) */
#editUserNameInput {
    position: absolute; /* Se superpone */
    top: 0;
    left: 0;
    width: 100%; /* Ocupa el 100% del #displayUserNameContainer */
    height: 100%; /* Ocupa el 100% del #displayUserNameContainer */
    box-sizing: border-box; /* Incluye padding/border en el 100% del tamaño */
    background-color: #fef3c7; /* ¡CLAVE! Fondo del mismo color que user-header-info para cubrir el texto */
    border: none;
    border-bottom: 2px solid #fbbe4c;
    text-align: center;
    color: #4A3B24; /* Color del texto del input (oscuro para contraste) */
    font-weight: bold;
    font-size: inherit; /* Hereda del padre displayUserNameContainer */
    line-height: inherit; /* Hereda del padre displayUserNameContainer */
    padding: 0 5px; /* Un poco de padding horizontal */
    margin: 0;
    outline: none;
    transition: border-color 0.2s ease-in-out;
    vertical-align: middle;
    z-index: 1; /* Asegura que el input esté por encima del span si hay algún solapamiento residual */
    /* Este input estará 'hidden' por JavaScript. No necesitamos 'display: none;' aquí,
       ya que la clase 'hidden' de Tailwind lo manejará. */
    /* DEBUG: background-color: cyan; /* DEBUG: Quita el comentario para ver el área del input */
}

/* Estilo para el borde del input al enfocar */
#editUserNameInput:focus {
    border-color: #d1363b;
}

/* Ajustamos el hover para que coincida con el tema misterioso */
.item-selectable-box-simple:hover:not(.dinamica-claimed-winner) {
    border-color: #fbbe4c !important;
    transform: scale(1.08);
}
.dinamica-gratis-modal-card {
  background-color: #e9d5ff; /* Un tono morado claro */
  border: 2px solid #c084fc; /* Un borde morado más oscuro */
}
.dinamica-gratis-modal-card .card-placeholder-number {
  color: #7e22ce; /* Texto morado oscuro para el número */
}
.dinamica-gratis-modal-card .card-owner-overlay {
  background-color: rgba(126, 34, 206, 0.85); /* Overlay morado oscuro semitransparente */
}



.bg-purple{
background-color: #31044e;
}

#attemptsStatus {
    position: sticky;
    top: 10px; /* Or any other value like 10px, 20px, etc., depending on desired spacing from the top */
    z-index: 10; /* Ensures it stays above other content when scrolling */
    margin: 4px ; /* Adjusted margin for better sticky behavior */
    font-weight: bold;
    border-radius: 8px; /* Adjusted border-radius to match other elements */
    background-color: rgba(89, 12, 156, 0.932); /* Changed background for better contrast with the main container */
    border: 2px solid #fbbe4c; /* Adjusted border for better theme integration */
    box-shadow: 0 2px 5px rgba(0,0,0,0.2); /* Added subtle shadow for depth */
}

#countdownOverlay {
background-color: rgba(0, 0, 0, 0.6); /* Fondo oscurecido */
}

#countdownContainer {
background-color: white;
border-radius: 0.5rem;
padding: 2rem;
text-align: center;
}

#countdownText {
font-size: 5rem;
font-weight: bold;
color: #8b5cf6; /* Un color llamativo */
}

.item-selectable-box-simple.played-by-user {
    background-color: #7f1d1d; /* Un rojo oscuro */
    border-color: #ef4444; /* Borde rojo brillante */
    color: #fecaca; /* Texto rojo claro */
    cursor: not-allowed;
    opacity: 0.8;
    pointer-events: none; /* ¡Clave! Evita que se pueda volver a hacer clic */
}

/* Añade esto a tu archivo style.css */

/* Estilo para el botón flotante del trofeo */
#toggleWinnersListButton {
    width: 4rem;
    height: 4rem;
    background-color: #fbbe4c;
    position: fixed;
    /* CAMBIA bottom por top */
    top: 50%; /* Posiciona el botón al 65% desde la parte superior. Puedes ajustar este valor (ej. 50%, 60%) */
    right: 20px; /* 20px o 1.25rem es un buen espacio desde el borde */
    z-index: 30;
    box-shadow: 0 4px 8px rgba(0,0,0,1);

}

/* Estilo para el panel de ganadores cuando está activo */
#winnersMobilePanel.active {
    transform: translateY(0); /* Mueve el panel para que sea visible */
    box-shadow: 0 -5px 15px rgba(0,0,0,0.2);
}

 /* Estilos adicionales específicos para esta página para mejorar la legibilidad del texto */
        .privacy-content h2 {
            font-size: 1.5rem; /* 24px */
            font-weight: 600;
            margin-top: 1.5rem; /* 24px */
            margin-bottom: 0.75rem; /* 12px */
            border-bottom: 1px solid #e5e7eb; /* Gris claro */
            padding-bottom: 0.5rem; /* 8px */
            color: #1f2937; /* Gris oscuro */
        }
        .privacy-content h3 {
            font-size: 1.25rem; /* 20px */
            font-weight: 600;
            margin-top: 1.25rem; /* 20px */
            margin-bottom: 0.5rem; /* 8px */
            color: #374151; /* Gris medio */
        }
        .privacy-content p {
            line-height: 1.6;
            margin-bottom: 1rem; /* 16px */
            color: #4b5563; /* Gris */
        }
        .privacy-content ul {
            list-style-type: disc;
            padding-left: 1.5rem; /* 24px */
            margin-bottom: 1rem; /* 16px */
            color: #4b5563;
        }
        .privacy-content li {
            margin-bottom: 0.5rem; /* 8px */
        }
        .privacy-content strong {
            color: #111827; /* Gris muy oscuro */
        }

.admin-panel-modern {
    background-color: #111; /* Equivalente a bg-gray-800 con transparencia */
    border: 1px solid #222; /* border-gray-600 */
    backdrop-filter: blur(5px); /* Efecto de vidrio esmerilado */
    -webkit-backdrop-filter: blur(5px);
}

.admin-sub-panel {
    background-color: #2e2e2e; /* bg-gray-700 semi-transparente */
    border: 1px solid #222; /* Borde sutil */
    padding: 1rem; /* 16px */
    border-radius: 0.75rem; /* rounded-xl */
    height: 100%; /* Asegura que ambas columnas tengan la misma altura */
    display: flex;
    flex-direction: column;
}

/* Ajuste para que los botones sean un poco más pequeños dentro del panel */
.admin-sub-panel .btn {
    padding: 10px 12px;
    font-size: 0.9rem; /* 14px */
}

.side-menu-button {
    width: 50px;
    height: 50px;
    border-radius: 50%; /* Círculo perfecto */
    background-color: #1f2937; /* Un color oscuro para los botones */
    color: #ffffff; /* Color del ícono */
    border: 2px solid #4A3B24; /* Borde oscuro sutil */
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
}

.side-menu-button:hover {
    background-color: #374151; /* Un poco más claro al pasar el mouse */
    transform: scale(1.1); /* Efecto de crecimiento */
    box-shadow: 0 0 10px #4A3B24;
    z-index: 100;
}

.side-menu-button svg {
    width: 28px;
    height: 28px;
}

#admin-side-menu {
    position: fixed;
    /* --- INICIO DE LA CORRECCIÓN --- */
    top: 50%; /* ⬇️ Mueve el borde superior del menú a la mitad de la pantalla */
    transform: translateY(-50%); /* ⬆️ Sube el menú la mitad de su propia altura para centrarlo */
    /* --- FIN DE LA CORRECCIÓN --- */
    left: 0;
    background-color: #fbbe4c;
    padding: 1rem 0;
    border-top-right-radius: 1.25rem;
    border-bottom-right-radius: 1.25rem;
    box-shadow: 4px 0 15px rgba(0,0,0,0.2);
    z-index: 1000;
    transition: all 0.3s ease-in-out;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
}



.drag-handle {
    width: 100%;
    cursor: grab; /* Cambia el cursor para indicar que se puede arrastrar */
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px; /* Espacio vertical entre las líneas */
}

.drag-handle span {
    display: block;
    width: 28px; /* Ancho de las líneas */
    height: 3px; /* Grosor de las líneas */
    background-color: #4A3B24; /* Un color oscuro de tu paleta para que contraste */
    border-radius: 99px; /* Hace que los bordes de las líneas sean redondeados */
}


#menu-buttons-container {
    display: flex;
    flex-direction: column;
    gap: 0.75rem; /* 12px, equivalente a gap-3 de Tailwind */
    transition: max-height 0.3s ease-out, opacity 0.3s ease-out, transform 0.3s ease-out;
    transform-origin: top;
    overflow: hidden;
    max-height: 500px; /* Una altura máxima suficientemente grande */
    opacity: 1;
    z-index: 10;
     padding: 0.5rem; 

    /* Opcional: Usa Flexbox para organizar y centrar los botones */

    align-items: center;
}

/* Estado colapsado: aquí es donde ocurre la magia */
#admin-side-menu.collapsed #menu-buttons-container {
    max-height: 0;
    opacity: 0;
    /* Un pequeño efecto de escala para que se vea mejor */
    transform: scaleY(0.8);
    /* Importante para que no ocupe espacio cuando está oculto */
    margin-top: 0; 
    pointer-events: none;
}

#admin-side-menu.menu-collapsed #menu-buttons-container {
    display: none;
    
}

#admin-side-menu.menu-collapsed{
padding: 1rem !important;
text-align: center !important;
justify-content: center !important;
align-items: center !important;

}

/*EDITOR DE TEXTO DE RULES Y HOW TO PLAY*/

.custom-editor {
    border: 1px solid #4a5568; /* border-gray-600 */
    border-radius: 0.375rem; /* rounded-md */
    padding: 0.75rem;
    min-height: 200px;
    background-color: #1f2937; /* bg-gray-800 */
    color: white;
    overflow-y: auto;
    outline: none; /* Quita el borde al enfocar */
}
.custom-editor:focus-within {
    border-color: #fbbe4c; /* Color de tu marca para el foco */
}

.editor-toolbar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: -1px; /* Une la barra de herramientas al editor */
    padding: 8px;
    background-color: #374151; /* bg-gray-700 */
    border-top-left-radius: 0.375rem;
    border-top-right-radius: 0.375rem;
    border: 1px solid #4a5568; /* border-gray-600 */
}

.toolbar-button, .toolbar-select {
    background-color: #4b5563; /* bg-gray-600 */
    color: white;
    border: 1px solid #6b7280; /* border-gray-500 */
    padding: 4px 10px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
}
.toolbar-button:hover, .toolbar-select:hover {
    background-color: #6b7280; /* bg-gray-500 */
}

.toolbar-color {
    background-color: transparent;
    border: none;
    width: 28px;
    height: 28px;
    padding: 2px;
    border-radius: 50%;
    cursor: pointer;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}
/* Estilo para el indicador de color dentro del input */
.toolbar-color::-webkit-color-swatch-wrapper {
    padding: 0;
}
.toolbar-color::-webkit-color-swatch {
    border: 1px solid #9ca3af; /* border-gray-400 */
    border-radius: 50%;
}
/* Añade esto a tu CSS */
.toolbar-group {
    display: flex;
    gap: 1px;
}
.toolbar-group .toolbar-button {
    border-radius: 0;
}
.toolbar-group .toolbar-button:first-child {
    border-top-left-radius: 4px;
    border-bottom-left-radius: 4px;
}
.toolbar-group .toolbar-button:last-child {
    border-top-right-radius: 4px;
    border-bottom-right-radius: 4px;
}

.custom-editor a {
    color: #60a5fa; /* Un azul claro y legible */
    text-decoration: underline;
    cursor: pointer;
}

#rulesModalContent a,
#howToPlayModalContent a {
    color: #60a5fa; /* Un azul claro y legible */
    text-decoration: underline;
}

 .link-input-container {
    display: flex;
    gap: 5px;
    align-items: center;
}
.link-url-input {
    background-color: #1f2937;
    color: white;
    border: 1px solid #4a5568;
    border-radius: 4px;
    padding: 4px 8px;
    outline: none;
}
.link-save-btn, .link-cancel-btn {
    background-color: #4b5563;
    color: white;
    border: 1px solid #6b7280;
    border-radius: 4px;
    padding: 4px 8px;
    cursor: pointer;
}
.link-save-btn {
    color: #86efac; /* Verde */
}
.link-cancel-btn {
    color: #fca5a5; /* Rojo */
}
body.modal-open {
    overflow: hidden;
}

#closeHowToPlayModal, #closeRulesModal{
    min-height: 3rem;
}

/* Estilos para el nuevo editor de modalidades */
.pattern-list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background-color: #374151; /* bg-gray-700 */
    border-radius: 8px;
    color: white;
}

.pattern-list-item .actions button {
    margin-left: 8px;
}