/* ── Deal animation ─────────────────────────────────────────── */
@keyframes dealCard {
    from {
        opacity: 0;
        transform: translateY(-55px) rotate(-6deg) scale(0.75);
        box-shadow: 0 0 0 rgba(0,0,0,0);
    }
    60% {
        transform: translateY(4px) rotate(1deg) scale(1.04);
    }
    to {
        opacity: 1;
        transform: translateY(0) rotate(0deg) scale(1);
        box-shadow: 3px 6px 18px rgba(0,0,0,0.5), 0 0 8px rgba(245,158,11,0.12);
    }
}

/* ── Card face ───────────────────────────────────────────────── */
.card-face {
    position: relative;
    width: 82px;
    height: 118px;
    border-radius: 10px;
    border: 1.5px solid #ccc;
    background: #fff;
    box-shadow: 3px 6px 18px rgba(0,0,0,0.5), 0 0 8px rgba(245,158,11,0.12);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 5px 6px;
    user-select: none;
    flex-shrink: 0;
    animation: dealCard 0.38s cubic-bezier(0.22, 0.61, 0.36, 1) both;
    transition: box-shadow 0.2s;
}

.card-face:hover {
    box-shadow: 3px 6px 18px rgba(0,0,0,0.5), 0 0 18px rgba(34,211,238,0.3);
}

/* Red suits */
.card-face.red { color: #c0392b; }
/* Black suits */
.card-face.black { color: #1a1a2e; }

/* ── Corner pip (top-left & bottom-right) ───────────────────── */
.card-corner {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1.1;
    gap: 1px;
}
.card-corner.flip {
    align-self: flex-end;
    transform: rotate(180deg);
}
.card-rank {
    font-size: 0.95rem;
    font-weight: 800;
    letter-spacing: -0.5px;
}
.card-suit-corner {
    font-size: 0.72rem;
}

/* ── Centre suit symbol ─────────────────────────────────────── */
.card-suit-center {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.1rem;
    pointer-events: none;
    opacity: 0.88;
}

/* ── Face-down back ─────────────────────────────────────────── */
.card-face.face-down {
    background:
        repeating-linear-gradient(
            45deg,
            #1b3d6f 0px, #1b3d6f 6px,
            #1e4a8a 6px, #1e4a8a 12px
        );
    border-color: #0d2137;
    overflow: hidden;
}
.card-face.face-down::after {
    content: '';
    position: absolute;
    inset: 5px;
    border: 2px solid rgba(255,255,255,0.18);
    border-radius: 6px;
}

/* ── Player / table areas ───────────────────────────────────── */
.player-area {
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
}

.active-player {
    border: 2px solid #ffc107 !important;
    background: rgba(255, 193, 7, 0.08) !important;
    box-shadow: 0 0 16px rgba(255, 193, 7, 0.3);
}

/* ── Results overlay ────────────────────────────────────────── */
.overlay-results {
    background: rgba(5, 5, 20, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: white;
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,0.1);
}
.overlay-results .table {
    color: white;
}

/* ── Auth layout ────────────────────────────────────────────── */
.auth-layout {
    min-height: 100vh;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
}
.auth-container {
    width: 100%;
    max-width: 420px;
    padding: 20px;
}

.auth-card {
    background: rgba(255,255,255,0.09);
    border: 1px solid rgba(255,255,255,0.14);
    border-radius: 16px;
    box-shadow: 0 8px 40px rgba(0,0,0,0.5);
}
