.card-list {
    display: table;
    table-layout: fixed;
    margin: auto;
}

.card-trick-number {
    display: inline-block;
    padding-top: 1.5em;
    width: 15%;
}

.small-card-list-container {
    display: flex;
    flex-direction: row;
}

.card-list-wrapped {
    display: flex;
    flex-direction: row;
    padding-left: 25px;
    padding-right: 0px;
    flex-wrap: wrap;
    justify-content: left;
}

.card-tricks-wrapped {
    display: flex;
    flex-direction: row;
    padding-left: 50px;
    padding-right: 50px;
    flex-wrap: wrap;
    justify-content: left;
}

.card-wrapper {
    display: table-cell;
    position: relative;
}

.card-wrapper:last-child, .card-wrapper:hover, .card-wrapper.selected {
    overflow: visible;
}

.card-wrapper:overflow {
    margin-left: 0px;
}

.card {
    display: block;
    position: relative;
    z-index: 50;
}

.css-card {
    width: 96px;
    height: 145px;
    background-color: white;
    border: 2px solid black;
    border-radius: 10px;
    padding: 10px;
}

.single-image-card img {
    display: block;
    border: 1px solid rgb(59, 59, 59);
    border-radius: 17px;
    height: 200px;
    width: 133px;
    max-height: 38vw;
    max-width: 25vw;
}

#handcards-container {
    margin-left: -45px;
}

#handcards {
    position: relative;
}

#handcards .card-wrapper:hover, #handcards .selected {
    margin-top: -1em;
    top: -1em;
}

.frontside:hover img {
    cursor: pointer;
    /*border: 1px solid rgb(0, 182, 82);*/
}

.tiny .single-image-card img {
    border-radius: 7px;
    border: 1px solid rgb(59, 59, 59);
    height: 80px;
    width: 52px;
}

.small .single-image-card img {
    border-radius: 11px;
    border: 1px solid rgb(59, 59, 59);
    height: 133px;
    width: 89px;
}

.single-image-card .highlight {
    cursor: pointer;
    position: absolute;
    left: 0;
    top: 0;
    background-color: rgba(252, 247, 0, 0.281);
}

.single-image-card .highlight {
    border-radius: 17px;
    width: 133px;
    height: 100%;
}

.small .single-image-card .highlight {
    border-radius: 11px;
    height: 133px;
    width: 89px;
}


#ouvert-cards {
    flex: 1 1 0px;
    padding-top: 1ex;
}

#ouvert-cards .card-list {
    width: 100%;
}


.backside2, .backside {
    background-image: url('images/backside.jpg');
    background-size: 129px 199px !important;
    border-radius: 16px;
    border: 1px solid rgb(59, 59, 59);
    height: 199px;
    width: 129px;
}

.small .backside2, .small .backside {
    border-radius: 11px;
    border: 1px solid rgb(59, 59, 59);
    background-size: 89px 133px !important;
    height: 133px;
    width: 89px;
}

.backside3 {
    background-color: #E5E5F7;
    opacity: 1;
    background-image:  linear-gradient(135deg, #444CF7 25%, transparent 25%), linear-gradient(225deg, #444CF7 25%, transparent 25%), linear-gradient(45deg, #444CF7 25%, transparent 25%), linear-gradient(315deg, #444CF7 25%, #E5E5F7 25%);
    background-position:  20px 0, 20px 0, 0 0, 0 0;
    background-size: 20px 20px !important;
    background-repeat: repeat !important;
}

.disabled {
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.2);
    border-radius: 14px;
}

.disabled:hover {
    cursor: auto;
}

.card-log-winning-player {
    display: inline-block;
    padding-right: 2em;
    width: 10%;
}

.card-list-container {
    display: flex; 
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
}

.card-list-item {
    flex: 1 1 10px;
}

.card-list-item.blinds {
    flex: 1 1 0px;
}

.card-list-item.last-cards {
    margin-left: 0;
    margin-right: 0;
}



.color-H, .color-K, .color-P, .color-X {
    font-size: 22px;
}

.color-P, .color-X {
    color: black;
}

.color-H, .color-K {
    color: red;
}

.color-sign {
    margin-top: -5px;
}

.top-left {
    position: absolute;
    top: 5px;
    left: 5px;
}

.bottom-right {
    position: absolute;
    bottom: 5px;
    right: 5px;
    transform: rotate(180deg);
}

.top-right {
    position: absolute;
    top: 2px;
    right: 5px;
    font-size: 50px;
}

.bottom-left {
    position: absolute;
    bottom: 2px;
    left: 5px;
    font-size: 50px;
    transform: rotate(180deg);
}

.center {
    font-size: 32px;
    margin-top: 42px;
}



@keyframes top-left {
    from {
        transform: translateY(-2em) translateX(-150px) rotate(-45deg) 
    }
    to {
        transform: translateY(2em) translateX(-2em) rotate(-45deg) 
    }
}
  
@keyframes top-right {
    from {
        transform: translateY(-6em) translateX(150px) rotate(45deg) 
    }
    to {
        transform: translateY(-2em) translateX(2em) rotate(45deg) 
    }
}

@keyframes bottom-left {
    from {
        transform: translateY(180px) translateX(-180px) rotate(+45deg) 
    }
    to {
        transform: translateY(2em) translateX(-2em) rotate(+45deg) 
    }
}

@keyframes bottom-right {
    from {
        transform: translateY(12em) translateX(180px) rotate(-45deg) 
    }
    to {
        transform: translateY(6em) translateX(2em) rotate(-45deg) 
    }
}

@keyframes bottom {
    from {
        transform: translateY(8em)
    }
    to {
        transform: translateY(4em)
    }
}


.card-top-left {
    position: absolute;
    left: 50%;
    right: 50%;
    transform: translateY(2em) translateX(-2em) rotate(-45deg);
    animation-name: top-left;
    animation-duration: 0.5s;
    box-shadow: -3px 3px 3px rgba(0,0,0,0.5);
}

.card-top-right {
    position: absolute;
    left: 50%;
    right: 50%;
    transform: translateY(-2em) translateX(2em) rotate(45deg);
    animation-name: top-right;
    animation-duration: 0.5s;
    box-shadow: 3px 3px 3px rgba(0,0,0,0.5);
}

.card-bottom-right {
    position: absolute;
    left: 50%;
    right: 50%;
    transform: translateY(6em) translateX(2em) rotate(-45deg);
    animation-name: bottom-right;
    animation-duration: 0.5s;
    box-shadow: 3px 3px 3px rgba(0,0,0,0.5);
}

.card-bottom-left {
    position: absolute;
    left: 50%;
    right: 50%;
    transform: translateY(2em) translateX(-2em) rotate(45deg);
    animation-name: bottom-left;
    animation-duration: 0.5s;
    box-shadow: 3px 3px 3px rgba(0,0,0,0.5);
}

.card-bottom {
    position: absolute;
    left: 50%;
    right: 50%;
    transform: translateY(4em);
    animation-name: bottom;
    animation-duration: 0.5s;
    box-shadow: 3px 3px 3px rgba(0,0,0,0.5);
}
