body {
    background-color: #333;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    margin: 0;
    padding: 0;
    user-select: none;
}

h1 { color: #FFF; font-size: 3em; }
h3 { color: #FFF; font-size: 1.2rem; }

.container {
    position: relative;
    display: flex;
    gap: 3rem;
    margin-top: 3rem;
}

.card-deck {
    width: 14rem;
    height: 18rem;
    border: 1px solid #CCC;
    border-radius: 1rem;
    cursor: pointer;
    perspective: 1000px;
}

.flip-overlay {
    position: absolute;
    width: 95%;
    height: 100%;
    transition: transform .2s;
    transform-style: preserve-3d;
    border-radius: 1rem;
    animation: flip;
}

.flip-overlay.flip {
    transform: rotateY(180deg) translateX(-18rem);
    background-color: #FFF;
}
.card-deck > svg { visibility: hidden; }
.card-deck.is-cards > svg { visibility: visible; }

.full-deck {
    box-shadow:
        0 -1px 1px rgba(0,0,0,0.15),
        0 -10px 0 -5px #EEE,
        0 -10px 1px -4px rgba(0,0,0,0.15),
        0 -20px 0 -10px #EEE,
        0 -20px 1px -9px rgba(0,0,0,0.15);
}

.card-slot { width: 14rem; }
.card {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 14rem;
    height: 18rem;
    background-color: #FFF;
    border: 1px solid #CCC;
    border-radius: 1rem;
    font-size: 5rem;
}

.card::before,
.card::after {
    content: attr(data-card-value);
    position: absolute;
    font-size: 3rem;
}

.card::before { top: 1rem; left: 1rem; }
.card::after { 
    right: 1rem;
    bottom: 1rem;
    transform: rotate(180deg);
}

.card.red { color: #F00; }
.card.black { color: #000; }