/* Container*/
.playingCards ul.hand {
    display: flex;
    justify-content: center;
    gap: 8px;
    list-style-type: none;
    padding: 20px;
    margin: 20px auto;
    height: auto;
}

/* List Items*/
.playingCards ul.hand li {
    position: relative;
    float: none;
}

/* Card/checkbox */
.playingCards .card-checkbox {
    width: 285px; 
    height: 393px;
    background-color: #fff;
    border-radius: 12px;
    cursor: pointer;
    display: block;
    position: relative;
    bottom: 0;
    transition: all 0.3s ease;
    appearance: none;
    -webkit-appearance: none;
    background-size: cover;
    background-position: center;
    background-image: no-repeat;
    border: 4px solid #3D210B66;
}
.playingCards .card-checkbox:hover {
    bottom: 24px;
    border: 4px solid #FFE100;
    box-shadow: 0 12px 20px #00000033;
    z-index: 10;
}

.playingCards .card-checkbox:checked {
    border: 4px solid #EC7D15;
    bottom: 24px;
    transform: scale(1.1);
    box-shadow: 0 10px 15px #0000004d;
    z-index: 10;
}


@media (max-width: 800px) {
    .playingCards .card-checkbox {
        width: 100px;
        height: 140px;
    }
    .playingCards ul.hand {
        gap: 0px;
    }
}

.playingCards .card-checkbox {
    appearance: none;
    -webkit-appearance: none;
    background-size: cover;
    background-position: center;
    outline: none;
}


.playingCards ul.hand {
    display: flex;
    flex-wrap: wrap; 
    justify-content: center;
    gap: 15px;
    list-style-type: none;
    padding: 20px;
    margin: 20px auto;
}

/* Base card style */
.playingCards .card-checkbox {
    width: 240px; 
    height: 336px;
    appearance: none;
    -webkit-appearance: none;
    background-size: cover;
    background-position: center;
    border-radius: 10px;
    transition: all 0.3s ease;
    cursor: pointer;
}

/* Tablet and Phone sizes */
@media (max-width: 800px) {
    .playingCards ul.hand {
        display: grid; /* Swapping to Grid for more control */
        grid-template-columns: repeat(2, 1fr); /* FORCES exactly 2 columns */
        gap: 15px;
        padding: 15px;
        width: 90%; /* Keeps some margin on the sides */
    }

    .playingCards .card-checkbox {
        width: 100%;       /* Takes full width of the grid column */
        height: auto;      /* Height calculates automatically */
        aspect-ratio: 1 / 1.4; /* Keeps card shape */
    }
    
    /* Centers the cards within the grid */
    .playingCards ul.hand li {
        display: flex;
        justify-content: center;
    }
}

/* Small phone adjustment */
@media (max-width: 400px) {
    .playingCards ul.hand {
        grid-template-columns: repeat(2, 1fr); /* Still 2 per row */
        gap: 10px;
    }
}
