html, body {
    height: 100%;
    margin: 0;
    padding: 0;
	font-family: 'Poppins', 'Montserrat', sans-serif;
	background: #000000 !important;
	background-image: none !important;
	background-attachment: fixed;
	overflow: hidden;
}
p {
	font: 1.1em/2 Arial, Helvetica, sans-serif;
	font-weight: 600;
}
#izquierdo {
    float: left;
    width: 25%;
    height: 100vh;
    min-height: 100vh;
    max-height: 750px;
    margin: 0 auto;
    background: linear-gradient(145deg, rgba(30, 32, 36, 0.95), rgba(35, 39, 43, 0.95));
    box-shadow: 10px 10px 19px #1c1e22, -10px -10px 19px #262a2e;
    backdrop-filter: blur(10px);
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    overflow-y: hidden;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
}
#derecho {
    float: left;    
    width: 75%;
    height: 100vh;
    min-height: 100vh;
    max-height: 750px;
    background: transparent;
    backdrop-filter: blur(5px);
    overflow-y: hidden;
    overflow-x: hidden;
    padding: 8px 12px 3px 12px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}
#espacio {
	width: 25%;
	height: 10%;
}
#izquierdo input[type="number"] {
    box-sizing: border-box;
    width: 100%;
    max-width: 200px;
	margin: auto;
    padding: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    font-size: 1em;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.05);
    color: #c4cfde;
}

#izquierdo input[type="number"]:focus {
    outline: none;
    border-color: #ff014f;
    box-shadow: 0 0 10px rgba(255, 1, 79, 0.3);
    background: rgba(255, 255, 255, 0.08);
}

#izquierdo select[id="velo"] {
    width: 100%;
    max-width: 200px;
    margin: auto;
    padding: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    font-size: 1em;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.05);
    color: #c4cfde;
}

#izquierdo select[id="velo"]:focus {
    outline: none;
    border-color: #ff014f;
    box-shadow: 0 0 10px rgba(255, 1, 79, 0.3);
    background: rgba(255, 255, 255, 0.08);
}

#izquierdo select {
    width: 100%;
    max-width: 200px;
    margin: auto;
    padding: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    font-size: 1em;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.05);
    color: #c4cfde;
}

#izquierdo select:focus {
    outline: none;
    border-color: #ff014f;
    box-shadow: 0 0 10px rgba(255, 1, 79, 0.3);
    background: rgba(255, 255, 255, 0.08);
}
#izquierdo hr {
    width: 240px;
}
#titulo {
    text-align: center;
    padding: 8px;
    background: linear-gradient(145deg, rgba(30, 32, 36, 0.8), rgba(35, 39, 43, 0.8));
    color: #ffffff;
    margin-bottom: 6px;
    box-shadow: 10px 10px 19px #1c1e22, -10px -10px 19px #262a2e;
    border-bottom: 2px solid rgba(255, 1, 79, 0.3);
    flex-shrink: 0;
}

#titulo h1 {
    margin: 5px 0;
    font-size: 1.8em;
    text-shadow: 0 0 20px rgba(255, 1, 79, 0.5);
    font-weight: bold;
    background: linear-gradient(90deg, #ff014f 0%, #23f0ec 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

#titulo img {
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.5));
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    padding: 5px;
    border: 2px solid rgba(255, 1, 79, 0.3);
}
#datos{
  margin: 0.5rem;
  padding: 0.7rem;
  padding-bottom: 0.9rem;
  text-align: center;
  background: linear-gradient(145deg, rgba(30, 32, 36, 0.8), rgba(35, 39, 43, 0.8));
  border-radius: 15px;
  box-shadow: 10px 10px 19px #1c1e22, -10px -10px 19px #262a2e;
  border: 1px solid rgba(255, 255, 255, 0.05);
  min-height: auto;
  position: relative;
  flex-shrink: 0;
  flex-grow: 0;
}

#datos p {
    color: #c4cfde;
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 1em;
}
#info{
    margin: auto;
    display: block;
}
h4 {
    line-height: 2px;
}
#numero-ganador{
    line-height: 70px;
    background: linear-gradient(135deg, #ff014f 0%, #23f0ec 100%);
    color: white;
    margin: 3px auto 5px auto;
    height: 70px;
    width: 70px;
    border-radius: 50%;
    text-align: center;
    font-size: 42px;
    font-weight: bold;
    padding: 0;
    transition: all 0.3s ease;
    box-shadow: 0 0 30px rgba(255, 1, 79, 0.5), 0 0 0 4px rgba(35, 240, 236, 0.2);
    border: 3px solid rgba(255, 1, 79, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* Animación para el número */
.numero-animando {
    animation: numeroAnimacion 0.1s infinite;
    transform: scale(1.1);
    box-shadow: 0 6px 12px rgba(0,0,0,0.5);
}

@keyframes numeroAnimacion {
    0% {
        transform: scale(1) rotate(0deg);
    }
    50% {
        transform: scale(1.15) rotate(5deg);
    }
    100% {
        transform: scale(1) rotate(0deg);
    }
}

/* Efecto cuando aparece el número final */
#numero-ganador:not(.numero-animando) {
    animation: numeroFinal 0.5s ease-out;
}

@keyframes numeroFinal {
    0% {
        transform: scale(1.3);
        opacity: 0.7;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}
#tarjeta {
    width: 90%;
    max-width: 450px;
    margin: 3px auto 0 auto;
    border-collapse: separate;
    border-spacing: 4px;
    background: linear-gradient(145deg, rgba(30, 32, 36, 0.95), rgba(35, 39, 43, 0.95));
    padding: 8px;
    border-radius: 15px;
    box-shadow: 10px 10px 19px #1c1e22, -10px -10px 19px #262a2e;
    border: 1px solid rgba(255, 255, 255, 0.05);
    flex-shrink: 1;
}

#tarjeta td {
    background: linear-gradient(145deg, rgba(30, 32, 36, 0.8), rgba(35, 39, 43, 0.8));
    height: 50px;
    width: 50px;
    text-align: center;
    font-size: 20px;
    font-weight: bold;
    color: #c4cfde;
    border-radius: 10px;
    transition: all 0.3s ease;
    box-shadow: 5px 5px 10px #1c1e22, -5px -5px 10px #262a2e;
    border: 1px solid rgba(255, 255, 255, 0.05);
    cursor: pointer;
    padding: 3px;
}

#tarjeta td:hover {
    transform: translateY(-2px);
    box-shadow: 8px 8px 15px #1c1e22, -8px -8px 15px #262a2e;
    border-color: rgba(255, 1, 79, 0.3);
}
.hueco{
	background-image: url(img/bombo.png);
	background-position: center;
	background-size: 62px;
}
.marca {
    background: linear-gradient(135deg, rgba(35, 240, 236, 0.3) 0%, rgba(35, 240, 236, 0.2) 100%) !important;
    color: #23f0ec !important;
    font-weight: bold;
    box-shadow: 0 0 20px rgba(35, 240, 236, 0.4) !important;
    transform: scale(1.05);
    border-color: rgba(35, 240, 236, 0.5) !important;
}

.ganador {
    background: linear-gradient(135deg, rgba(255, 1, 79, 0.4) 0%, rgba(255, 1, 79, 0.3) 100%) !important;
    color: #ff014f !important;
    font-weight: bold;
    animation: ganadorAnimacion 0.8s ease-in-out infinite;
    box-shadow: 0 0 30px rgba(255, 1, 79, 0.6) !important;
    border: 3px solid #ff014f !important;
}

@keyframes ganadorAnimacion {
    0% {
        transform: scale(1) rotate(0deg);
        box-shadow: 0 0 30px rgba(255, 1, 79, 0.6);
    }
    50% {
        transform: scale(1.15) rotate(5deg);
        box-shadow: 0 0 40px rgba(255, 1, 79, 0.8);
    }
    100% {
        transform: scale(1) rotate(0deg);
        box-shadow: 0 0 30px rgba(255, 1, 79, 0.6);
    }
}

/* Mejorar botones */
.btn {
    border-radius: 25px !important;
    padding: 12px 30px !important;
    font-weight: bold !important;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.btn-default {
    background: linear-gradient(90deg, #ff014f 0%, #23f0ec 100%) !important;
    color: white !important;
    border: none !important;
}

.btn-default:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 20px rgba(255, 1, 79, 0.5);
    background: linear-gradient(90deg, #23f0ec 0%, #ff014f 100%) !important;
}

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

#reset {
    margin-top: 15px !important;
    margin-bottom: 15px !important;
    background: linear-gradient(135deg, rgba(255, 1, 79, 0.8) 0%, rgba(255, 1, 79, 0.6) 100%) !important;
    border: 1px solid rgba(255, 1, 79, 0.5) !important;
    display: block !important;
    width: 100% !important;
    max-width: 200px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: relative !important;
    z-index: 10 !important;
}

#reset:hover {
    background: linear-gradient(135deg, rgba(255, 1, 79, 1) 0%, rgba(255, 1, 79, 0.8) 100%) !important;
    box-shadow: 0 0 20px rgba(255, 1, 79, 0.5);
}

/* Mejorar información */
#info {
    background: rgba(255, 255, 255, 0.95);
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    margin: 20px;
}

#info h1 {
    color: #667eea;
    text-align: center;
    margin-bottom: 20px;
    font-size: 2em;
}

#info ul {
    list-style: none;
    padding: 0;
}

#info li {
    padding: 10px;
    margin: 10px 0;
    background: rgba(102, 126, 234, 0.1);
    border-radius: 8px;
    border-left: 4px solid #667eea;
    color: #333;
}

/* Título del número ganador */
#derecho h2 {
    text-align: center;
    color: #ffffff;
    font-size: 2em;
    text-shadow: 0 0 20px rgba(255, 1, 79, 0.5);
    margin: 20px 0;
    font-weight: bold;
    background: linear-gradient(90deg, #ff014f 0%, #23f0ec 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Scrollbar personalizado */
#derecho::-webkit-scrollbar {
    width: 10px;
}

#derecho::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.1);
    border-radius: 10px;
}

#derecho::-webkit-scrollbar-thumb {
    background: rgba(255, 1, 79, 0.5);
    border-radius: 10px;
}

#derecho::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 1, 79, 0.7);
}

/* Animación para mensajes */
@keyframes aparecerMensaje {
    0% {
        transform: translate(-50%, -50%) scale(0.5);
        opacity: 0;
    }
    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
}

/* Responsive Design for Lottery Game */
@media (max-width: 991px) {
    #izquierdo {
        width: 30%;
        min-height: auto;
    }
    
    #derecho {
        width: 70%;
        padding: 15px;
    }
    
    #espacio {
        width: 30%;
    }
    
    #titulo h1 {
        font-size: 1.5em;
    }
    
    #titulo img {
        width: 60px;
        height: 60px;
    }
    
    #numero-ganador {
        font-size: 3em;
        padding: 15px;
    }
    
    #tarjeta {
        font-size: 0.9em;
    }
    
    #tarjeta td {
        padding: 8px;
    }
}

@media (max-width: 768px) {
    body {
        display: flex;
        flex-direction: column;
        padding: 0;
    }
    
    /* Mantener sección izquierda completa e intacta */
    #izquierdo {
        width: 100%;
        float: none;
        height: auto;
        min-height: auto;
        border-right: none;
        border-bottom: 2px solid rgba(255, 1, 79, 0.2);
        order: 1;
        /* Mantener estructura original */
    }
    
    /* Título se mantiene igual */
    #izquierdo #titulo {
        padding: 10px;
        margin-bottom: 8px;
    }
    
    #izquierdo #titulo h1 {
        font-size: 1.8em;
        margin: 6px 0;
    }
    
    /* Datos se mantienen igual */
    #izquierdo #datos {
        margin: 0.6rem;
        padding: 0.8rem;
        padding-bottom: 1rem;
    }
    
    /* Solo ajustar sección derecha - reducir tamaños proporcionalmente */
    #derecho {
        width: 100%;
        float: none;
        padding: 10px 8px;
        max-height: none;
        height: auto;
        min-height: auto;
        order: 2;
        display: flex;
        flex-direction: column;
        gap: 10px;
        overflow-y: hidden;
        overflow-x: hidden;
    }
    
    /* Reducir tamaño del contenedor del número ganador */
    #derecho > div[style*="text-align: center"] {
        order: 1;
        background: linear-gradient(145deg, rgba(30, 32, 36, 0.8), rgba(35, 39, 43, 0.8));
        padding: 10px;
        border-radius: 15px;
        box-shadow: 5px 5px 15px rgba(0, 0, 0, 0.3);
        border: 1px solid rgba(255, 255, 255, 0.05);
    }
    
    #derecho h2 {
        font-size: 1.1em !important;
        margin-bottom: 8px !important;
    }
    
    #derecho #contador-sorteos {
        order: 1;
        font-size: 0.9em;
        margin-bottom: 8px;
        color: #23f0ec;
        font-weight: 600;
    }
    
    /* Reducir tamaño del número ganador */
    #derecho #numero-ganador {
        order: 2;
        margin: 8px auto;
        width: 80px;
        height: 80px;
        font-size: 2em;
        line-height: 80px;
    }
    
    /* Reducir tamaño de la tabla */
    #derecho #tarjeta {
        order: 3;
        margin: 0 auto;
        width: 95%;
        max-width: 100%;
        padding: 10px;
        border-spacing: 3px;
    }
    
    #espacio {
        display: none;
    }
    
    /* Reducir tamaño de celdas de la tabla */
    #tarjeta td {
        padding: 5px 2px;
        font-size: 0.85em;
        height: 42px;
        width: 42px;
        min-width: 38px;
    }
    
    /* Mejorar espaciado general */
    #derecho > * {
        margin-bottom: 15px;
    }
}

@media (max-width: 480px) {
    /* Sección izquierda se mantiene intacta, sin cambios */
    
    /* Solo reducir más los componentes de la derecha */
    #derecho {
        padding: 15px 10px;
        gap: 15px;
    }
    
    #derecho > div[style*="text-align: center"] {
        padding: 12px;
    }
    
    #derecho h2 {
        font-size: 1em !important;
        margin-bottom: 10px !important;
    }
    
    #derecho #contador-sorteos {
        font-size: 0.9em;
        margin-bottom: 10px;
    }
    
    /* Reducir más el número ganador */
    #derecho #numero-ganador {
        width: 80px;
        height: 80px;
        font-size: 1.8em;
        line-height: 80px;
        margin: 10px auto;
    }
    
    /* Reducir más la tabla */
    #derecho #tarjeta {
        padding: 10px;
        border-spacing: 3px;
        width: 98%;
    }
    
    #derecho #tarjeta td {
        padding: 5px 2px;
        font-size: 0.85em;
        height: 40px;
        width: 40px;
        min-width: 35px;
    }
}