#tableros {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-top: 20px;
}

.tablero {
    width: 400px;
    height: 600px;
    border: 1px solid black;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 5px;
    padding: 5px;
    background-color: #fff;
    border-radius: 8px;
    align-content: space-around;
}

.carta {
    width: 100%;
    aspect-ratio: 1/1;
    border: 1px solid #ddd;
    border-radius: 4px;
    object-fit: cover;
}

.tablero {
    break-inside: avoid;
    page-break-inside: avoid;
}

.carta {
    position: relative;
    background: white;
    transition: transform 0.2s;
}

.carta img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

@media print {
    @page {
        size: letter portrait;
        margin: 1.2cm;
    }

    body * {
        visibility: hidden;
    }

    .tablero-container, .tablero, .carta, .titulo-loteria {
        visibility: visible;
    }

    .tablero-container {
        width: 100%;
        justify-content: center;
    }
    
    .tablero {
        width: 18cm;
        height: 22cm;
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }

    .carta {
        aspect-ratio: 1/1;
        border: 1px solid #000;
    }
}

footer.footer.bg-light.mt-4.py-3 {
    display: block;
    width: 100%;
    bottom: 0;
}

.floating-buttons {
    position: fixed;
    bottom: 100px;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 1000;
}

.floating-buttons button {
    padding: 15px 30px;
    border-radius: 50px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transition: transform 0.2s, box-shadow 0.2s;
}

.floating-buttons button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.2);
}

/* Para dispositivos móviles */
@media (max-width: 768px) {
    .floating-buttons {
        bottom: 10px;
        right: 10px;
    }
    
    .floating-buttons button {
        padding: 12px 24px;
    }
}

.footer {
    background: rgba(255, 255, 255, 0.9);
    padding: 15px 0;
    position: fixed;
    bottom: 0;
    width: 100%;
    box-shadow: 0 -5px 15px rgba(0,0,0,0.1);
}

.footer p {
    margin: 0;
    color: #2c3e50;
    font-weight: 500;
}

.footer i.fa-heart {
    color: #e74c3c;
    animation: heartBeat 1.5s infinite;
}

.footer a {
    color: #3498db;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.footer a:hover {
    color: #2980b9;
}

@keyframes heartBeat {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    animation: fadeIn 0.3s;
}

.modal-contenido {
    background: white;
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
    animation: slideUp 0.3s;
}

.modal-icono {
    font-size: 48px;
    margin-bottom: 20px;
}

.modal-mensaje {
    font-size: 18px;
    margin-bottom: 25px;
    color: #333;
    font-family: Arial, sans-serif;
}

.modal-cerrar {
    background: #007bff;
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 25px;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.3s;
}

.modal-cerrar:hover {
    background: #0056b3;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { transform: translateY(50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}
