@keyframes hover {
    to {
        translate: 0px 12px;
    }
}

.hands {
    --cards: 9;
    --curvature: 70deg;
    counter-reset: cards;
    position: absolute;
    bottom: 0;
    width: 100%;
    display: flex;
    justify-content: center;
    transform: translateY(15vmin);
    transform-style: preserve-3d;
}

.hands > * {
    --hue: calc(360deg / var(--cards) * var(--index));
    --curve: calc(var(--curvature) * ((var(--index) - (var(--cards) - 1) / 2) / var(--cards)));
    position: absolute;
    counter-increment: cards;
    flex: 0 0 auto;
    width: 15vw;
    max-width: 20vh;
    aspect-ratio: 2/3;
    transform-origin: 50% 100%;
    transform: rotate(var(--curve)) translateY(-225%);
    transition: all 0.3s;
    cursor: pointer;
    font-size: 4vmin;
    transform-style: preserve-3d;
}

.hands > *::before {
    content: "";
    display: block;
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 4px;
    background-image: var(--img);
    background-size: cover;
    background-position: center;
    border: solid 2px hsla(var(--hue), 50%, 40%, 1);
    transition: all 0.3s, translate 0s;
    box-shadow: 0px 4px 10px hsla(var(--hue), 80%, 80%, 0);
    pointer-events: none;
}

.hands > *:hover {
    animation: hover 1s ease-in-out infinite alternate forwards;
}

.hands > *:hover::before {
    transform: translateY(-42.5%) rotate(calc(var(--curve) * -1)) scale(1.2);
    transition-duration: 0.2s, 0s;
    box-shadow: 0px 4px 15px hsla(var(--hue), 80%, 70%, 0.6);
    border: solid 2px hsla(var(--hue), 80%, 70%, 1);
    translate: 0px 0px 1px;
}

/* Per-card styles */
.hands:has(li:nth-child(1)) { --cards: 1; }
.hands > *:nth-child(1) {
    --index: 0;
    --img: url('images/shaders2.png');
}

.hands:has(li:nth-child(2)) { --cards: 2; }
.hands > *:nth-child(2) {
    --index: 1;
    --img: url('images/court-of-shadows2.png');
}

.hands:has(li:nth-child(3)) { --cards: 3; }
.hands > *:nth-child(3) {
    --index: 2;
    --img: url('images/multimancer2.png');
}

.hands:has(li:nth-child(4)) { --cards: 4; }
.hands > *:nth-child(4) {
    --index: 3;
    --img: url('images/packing2.png');
}

.hands:has(li:nth-child(5)) { --cards: 5; }
.hands > *:nth-child(5) {
    --index: 4;
    --img: url('images/DesertDash.png');
}

.hands:has(li:nth-child(6)) { --cards: 6; }
.hands > *:nth-child(6) {
    --index: 5;
    --img: url('images/boucning_buds.png');
}

.hands:has(li:nth-child(7)) { --cards: 7; }
.hands > *:nth-child(7) {
    --index: 6;
    --img: url('images/SatoriIdle.png');
}

.hands:has(li:nth-child(8)) { --cards: 8; }
.hands > *:nth-child(8) {
    --index: 7;
    --img: url('images/FYFCover.png');
}

.hands:has(li:nth-child(9)) { --cards: 9; }
.hands > *:nth-child(9) {
    --index: 8;
    --img: url('images/rootwords.png');
}

/* Add more if needed using this pattern */
