/* ============================================================
   TWENTY ONE
============================================================ */

.twenty-one-wrapper {
    width: 100%;
    max-width: 940px;
    padding: 20px;
}

.twenty-one-topbar {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 14px;
}

.twenty-one-stat {
    padding: 10px 12px;
    border: 1px solid #3e5964;
    border-radius: 4px;
    background: #132a33;
    text-align: center;
}

.twenty-one-stat span {
    display: block;
    margin-bottom: 3px;
    color: #9fb5be;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.twenty-one-stat strong {
    color: #ffffff;
    font-size: 18px;
}

.twenty-one-table {
    position: relative;
    min-height: 590px;
    overflow: hidden;
    padding: 24px;
    border: 6px solid #7a5632;
    border-radius: 42px;
    background:
        radial-gradient(
            circle at 50% 42%,
            #177a45 0%,
            #115f37 52%,
            #0b4227 100%
        );
    box-shadow:
        inset 0 0 0 3px rgba(255,255,255,.07),
        inset 0 0 60px rgba(0,0,0,.28);
}

.twenty-one-table::after {
    content: '';
    position: absolute;
    inset: 24px;
    pointer-events: none;
    border: 1px solid rgba(255,255,255,.14);
    border-radius: 30px;
}

.twenty-one-seat {
    position: relative;
    z-index: 2;
    min-width: 0;
    text-align: center;
}

.twenty-one-dealer {
    width: min(500px, 100%);
    margin: 0 auto;
}

.twenty-one-bottom-seats {
    position: absolute;
    z-index: 2;
    right: 24px;
    bottom: 24px;
    left: 24px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.twenty-one-seat-title {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 6px 11px;
    border: 1px solid rgba(255,255,255,.14);
    border-radius: 999px;
    background: rgba(0,0,0,.25);
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

.twenty-one-seat-title strong {
    min-width: 26px;
    color: #ffe597;
    font-size: 15px;
}

.twenty-one-cards {
    min-height: 130px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: nowrap;
    gap: 0;
    margin-top: 8px;
    padding: 0 18px;
}

.twenty-one-card + .twenty-one-card {
    margin-left: -22px;
}

.twenty-one-card:nth-child(1) {
    z-index: 1;
}

.twenty-one-card:nth-child(2) {
    z-index: 2;
}

.twenty-one-card:nth-child(3) {
    z-index: 3;
}

.twenty-one-card:nth-child(4) {
    z-index: 4;
}

.twenty-one-card:nth-child(5) {
    z-index: 5;
}

.twenty-one-card:nth-child(6) {
    z-index: 6;
}

.twenty-one-card:nth-child(7) {
    z-index: 7;
}

.twenty-one-card:nth-child(8) {
    z-index: 8;
}

.twenty-one-card:nth-child(9) {
    z-index: 9;
}

.twenty-one-card:nth-child(10) {
    z-index: 10;
}

.twenty-one-card:nth-child(even) {
    transform: translateY(5px);
}

.twenty-one-card {
    position: relative;
    width: 76px;
    height: 110px;
    border: 1px solid #d5d5d5;
    border-radius: 7px;
    background: #ffffff;
    color: #111111;
    box-shadow: 0 5px 12px rgba(0,0,0,.25);
    animation: twenty-one-deal .22s ease-out;
    user-select: none;
}

.twenty-one-card.is-red {
    color: #c73333;
}

.twenty-one-card-corner {
    position: absolute;
    top: 6px;
    left: 7px;
    font-size: 15px;
    font-weight: 800;
    line-height: .95;
}

.twenty-one-card-corner.bottom {
    top: auto;
    right: 7px;
    bottom: 6px;
    left: auto;
    transform: rotate(180deg);
}

.twenty-one-card-suit {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    font-size: 35px;
}

.twenty-one-card.is-hidden {
    overflow: hidden;
    border: 4px solid #ffffff;
    background:
        repeating-linear-gradient(
            45deg,
            #07546f,
            #07546f 6px,
            #0c6f91 6px,
            #0c6f91 12px
        );
}

.twenty-one-card.is-hidden::after {
    content: 'NF';
    position: absolute;
    inset: 9px;
    display: grid;
    place-items: center;
    border: 2px solid rgba(255,255,255,.65);
    border-radius: 4px;
    color: #ffffff;
    font-size: 17px;
    font-weight: 900;
}

.twenty-one-seat-status {
    min-height: 18px;
    margin-top: 7px;
    color: #e0ece7;
    font-size: 11px;
    font-weight: 700;
}

.twenty-one-message {
    position: absolute;
    z-index: 3;
    top: 47%;
    left: 50%;
    max-width: 70%;
    padding: 10px 15px;
    transform: translate(-50%, -50%);
    border: 1px solid rgba(255,255,255,.18);
    border-radius: 999px;
    background: rgba(0,0,0,.28);
    color: #ffffff;
    font-size: 13px;
    font-weight: 700;
    text-align: center;
}

.twenty-one-message.is-win {
    background: rgba(91, 166, 49, .94);
}

.twenty-one-message.is-lose {
    background: rgba(180, 53, 53, .94);
}

.twenty-one-message.is-push {
    background: rgba(7, 84, 111, .94);
}

.twenty-one-actions {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.twenty-one-actions button {
    min-width: 110px;
}

.twenty-one-controls {
    margin-top: 13px;
    color: #aec1c8;
    font-size: 10px;
    line-height: 1.55;
    text-align: center;
}

@keyframes twenty-one-deal {
    from {
        opacity: 0;
        transform: translateY(-12px) rotate(-2deg);
    }

    to {
        opacity: 1;
        transform: translateY(0) rotate(0);
    }
}

/* ============================================================
   RESPONSIVE
============================================================ */

@media (max-width: 760px) {

    .twenty-one-wrapper {
        padding: 12px;
    }

    .twenty-one-table {
        min-height: 760px;
        border-radius: 34px;
    }

    .twenty-one-table::after {
        border-radius: 24px;
    }

    .twenty-one-bottom-seats {
        position: static;
        margin-top: 245px;
        grid-template-columns: 1fr;
    }

    .twenty-one-message {
        top: 37%;
    }
}

@media (max-width: 520px) {

    .twenty-one-topbar {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .twenty-one-table {
        min-height: 720px;
        padding: 16px 8px;
        border-width: 4px;
        border-radius: 28px;
    }

    .twenty-one-card {
        width: 64px;
        height: 92px;
    }

    .twenty-one-card-suit {
        font-size: 29px;
    }

    .twenty-one-card-corner {
        font-size: 13px;
    }

    .twenty-one-cards {
        min-height: 108px;
        padding: 0 10px;
    }

    .twenty-one-card + .twenty-one-card {
        margin-left: -19px;
    }

    .twenty-one-actions button {
        flex: 1 1 42%;
        min-width: 0;
    }
}
