.loteria-card {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2px;
    border: 2px solid #000;
    background-color: #f8f9fa;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    max-width: 300px;
    margin: 0 auto;
}

.loteria-card.card-25 {
    grid-template-columns: repeat(5, 1fr);
    max-width: 400px;
}

.loteria-cell {
    aspect-ratio: 1;
    border: 1px solid #000;
    position: relative;
    overflow: hidden;
    background-color: #ffffff;
}

.loteria-cell-content {
    width: 100%;
    height: 100%;
    position: relative;
}

.loteria-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.loteria-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 4px;
    background-color: rgba(255, 255, 255, 0.3);
}
.loteria-name {
    font-size: 0.7em;
    text-align: center;
    background-color: rgba(255, 255, 255, 0.8);
    padding: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #000;
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
}

.loteria-number {
    font-size: 0.7em;
    background-color: rgba(255, 255, 255, 0.8);
    padding: 1px 3px;
    border-radius: 3px;
    color: #000;
    position: absolute;
    top: 2px;
    right: 2px;
}

.loteria-cell:hover .loteria-overlay {
    background-color: rgba(59, 130, 246, 0.1);
}

@media (min-width: 1024px) {
    .loteria-card {
        max-width: 350px;
    }

    .loteria-card.card-25 {
        max-width: 450px;
    }

    .loteria-name, .loteria-number {
        font-size: 0.8em;
    }
}

    .game-container {
        background-color: #f3f4f6;
        border-radius: 12px;
        padding: 2rem;
        box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    }

    .game-title {
        color: #1f2937;
        text-align: center;
        margin-bottom: 2rem;
    }

    .game-section {
        background-color: #ffffff;
        border-radius: 8px;
        padding: 1.5rem;
        box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    }

    .game-section-title {
        color: #374151;
        border-bottom: 2px solid #e5e7eb;
        padding-bottom: 0.5rem;
        margin-bottom: 1rem;
    }

    .ready-button {
        transition: all 0.3s ease;
    }

    .ready-button:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    }

    .game-status {
        background-color: #e5e7eb;
        border-radius: 9999px;
        padding: 0.5rem 1rem;
        font-weight: 600;
    }

    .marked {
        background-color: rgba(16, 185, 129, 0.5);
    }

    .called {
        border: 2px solid #10B981;
    }

    #current-figure {
        width: 200px;
        height: 200px;
        margin: 0 auto;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        opacity: 0;
        transition: opacity 0.5s ease-in-out;
    }

    #current-figure img {
        max-width: 100%;
        max-height: 80%;
        object-fit: contain;
    }

    #history-list {
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
        justify-content: center;
    }

    .history-item {
        width: 60px;
        text-align: center;
        font-size: 0.8em;
    }

    .history-item img {
        width: 100%;
        height: 60px;
        object-fit: contain;
    }
    
    @media (min-width: 1024px) {
    .loteria-card {
        max-width: 350px;
    }

    .loteria-card.card-25 {
        max-width: 450px;
    }

    .loteria-name {
        font-size: 0.8em;
    }

    .loteria-number {
        font-size: 0.8em;
    }
}