/*cards.css */
/*card container */
/* creation of the card used for the animation */

.card-container {
    width: 140px;
    height: 200px;
    perspective: 800px;
    display: inline-block;
    margin: 5px;
    position: relative;
    z-index: 10;
}
.card {
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    position: relative;
    z-index: 50;
    transition: transform 0.6s cubic-bezier(0.68, -0.55, 0.27, 1.55);
    cursor: pointer;
}
.card.flipped {
    transform: rotateY(180deg) scale(1.1);
    transition: transform 0.6s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}

/*The front and back of the cards styling */
.card-front, .card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
    backface-visibility: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    font-size: 18px;
    font-family: 'Georgia', serif;
    border-radius: 8px;
    border: 1px solid black;
    user-select: none;
}
/*Styling for the front of the card when flipped over */
.card-front {
    background: #ffffff;
    color: black;
    z-index: 2;
}

/*back of the card when dealt in */
.card-back {
    background: #a30000;
    color: white;
    transform: rotateY(180deg);
    box-shadow: 0 0 10px #ff4c4c;
    border: 1.5px solid black;
    border-radius: 12px;
    /*white dots, diagonal lines, cross lines, and base red design */
    background-image: radial-gradient(circle at center, rgba(255,255,255,0.05) 2px, transparent 3px), repeating-linear-gradient(45deg, rgba(255,255,255,0.05) 0px, rgba(255,255,255,0.05) 1px, transparent 1px, transparent 10px), repeating-linear-gradient(-45deg, rgba(255,255,255,0.05) 0px, rgba(255,255,255,0.05) 1px, transparent 1px, transparent 10px),
    linear-gradient(to bottom, #a30000, #660000);
    background-size: 20px 20px, 10px 10px, 10px 10px, 100% 100%; /*dots, diagonal lines, cross lines, and base */
}
.card-label {
    font-family: 'Neonderthaw', cursive;
    font-size: 3rem;
}

.red-card {
    color: red;
}

.black-card {
    color: black;
}
.cards-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.card-corner {
    position: absolute;
    font-size: 14px;
    text-align: center;
    line-height: 1.2;
}

.top-left {
    top: 4px;
    left: 6px;
}

.bottom-right {
    bottom: 4px;
    right: 6px;
    transform: rotate(180deg);
}
.card-center {
    font-size: 28px;
}
.card:hover {
    transform: scale(1.1);
    transition: transform 0.2 ease, box-shadow 0.2 ease;
    box-shadow: 0 6px 12px rgba(0,0,0,0.3);
    z-index: 20;
}
/*animations */
.card.match-animate {
    animation: pulse 0.6s ease;
}
@keyframes pulse {
    0% { transform: scale(1); background-color: white; }
    50% { transform: scale(1.3); background-color: yellow; }
    100% { transform: scale(1); background-color: white; }
}
.card-row {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 15px;
    margin-bottom: 20px;
}

.card-label {
    font-size: 1.5rem;
    color: #ffd700;
    margin-bottom: 10px;
    text-align: center;
    user-select: none;
}

.cards {
    display: flex;
    justify-content: center;
    gap: 15px;
}
/*for mobile */
@media (max-width: 768px) {
    .card-container {
        width: 100px;
        height: 140px;
    }
    .black-title, .jack-title {
        font-size: 3rem;
    }
}

.dealer-card {
    pointer-events: none;
    cursor: default;
}