/* Playing Cards CSS - Full Deck (52 cards, no jokers) */
/* Based on SVG-cards 2.0 layout from Wikimedia Commons */

/* Rockwell Font Import */
@import url('https://fonts.googleapis.com/css2?family=Rockwell:wght@400;700&display=swap');

/* Card container and basic styling */
.card-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 20px;
    background: #0d4f3c;
    min-height: 100vh;
}

/* Suit headings */
.suit-heading {
    width: 100%;
    text-align: center;
    color: #fff;
    font-size: 1.8em;
    font-weight: bold;
    margin: 30px 0 20px 0;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    font-family: 'Rockwell', 'Times New Roman', serif;
}

.hearts-heading { color: #e74c3c; }
.diamonds-heading { color: #e74c3c; }
.clubs-heading { color: #fff; }
.spades-heading { color: #fff; }

.card {
    width: 60px;
    height: 84px;
    border: 1px solid #000;
    border-radius: 8px;
    background: #fff;
    position: relative;
    box-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 4px;
    font-family: 'Rockwell', 'Times New Roman', serif;
    font-weight: bold;
    font-size: 10px;
}

/* Card back design */
.card-back {
    background: linear-gradient(45deg, #1e3c72, #2a5298);
    background-image: 
        radial-gradient(circle at 20% 20%, #fff 2px, transparent 2px),
        radial-gradient(circle at 80% 80%, #fff 2px, transparent 2px),
        radial-gradient(circle at 40% 60%, #fff 1px, transparent 1px);
    background-size: 20px 20px, 20px 20px, 10px 10px;
}

/* Suit symbols */
.suit {
    font-size: 12px;
    text-align: center;
    line-height: 1;
}

.suit.hearts { color: #e74c3c; }
.suit.diamonds { color: #e74c3c; }
.suit.clubs { color: #000; }
.suit.spades { color: #000; }

/* Hide suit symbols in corner numbers for number cards, but show for face cards */
.corner-top .suit,
.corner-bottom .suit {
    display: none;
}

/* Show suit symbols in corner values for face cards (J, Q, K) */
.card.hearts-J .corner-top .suit,
.card.hearts-J .corner-bottom .suit,
.card.hearts-Q .corner-top .suit,
.card.hearts-Q .corner-bottom .suit,
.card.hearts-K .corner-top .suit,
.card.hearts-K .corner-bottom .suit,
.card.diamonds-J .corner-top .suit,
.card.diamonds-J .corner-bottom .suit,
.card.diamonds-Q .corner-top .suit,
.card.diamonds-Q .corner-bottom .suit,
.card.diamonds-K .corner-top .suit,
.card.diamonds-K .corner-bottom .suit,
.card.clubs-J .corner-top .suit,
.card.clubs-J .corner-bottom .suit,
.card.clubs-Q .corner-top .suit,
.card.clubs-Q .corner-bottom .suit,
.card.clubs-K .corner-top .suit,
.card.clubs-K .corner-bottom .suit,
.card.spades-J .corner-top .suit,
.card.spades-J .corner-bottom .suit,
.card.spades-Q .corner-top .suit,
.card.spades-Q .corner-bottom .suit,
.card.spades-K .corner-top .suit,
.card.spades-K .corner-bottom .suit {
    display: inline;
}

/* Hearts pips should be red */
.card.hearts-2 .pip, .card.hearts-3 .pip, .card.hearts-4 .pip, .card.hearts-5 .pip,
.card.hearts-6 .pip, .card.hearts-7 .pip, .card.hearts-8 .pip, .card.hearts-9 .pip,
.card.hearts-10 .pip {
    color: #e74c3c;
}

/* Diamonds pips should be red */
.card.diamonds-2 .pip, .card.diamonds-3 .pip, .card.diamonds-4 .pip, .card.diamonds-5 .pip,
.card.diamonds-6 .pip, .card.diamonds-7 .pip, .card.diamonds-8 .pip, .card.diamonds-9 .pip,
.card.diamonds-10 .pip {
    color: #e74c3c;
}

/* Clubs pips should be black */
.card.clubs-2 .pip, .card.clubs-3 .pip, .card.clubs-4 .pip, .card.clubs-5 .pip,
.card.clubs-6 .pip, .card.clubs-7 .pip, .card.clubs-8 .pip, .card.clubs-9 .pip,
.card.clubs-10 .pip {
    color: #000;
}

/* Spades pips should be black */
.card.spades-2 .pip, .card.spades-3 .pip, .card.spades-4 .pip, .card.spades-5 .pip,
.card.spades-6 .pip, .card.spades-7 .pip, .card.spades-8 .pip, .card.spades-9 .pip,
.card.spades-10 .pip {
    color: #000;
}

/* Card values */
.value {
    font-size: 10px;
    font-weight: bold;
    text-align: center;
}

/* Corner values */
.corner-top {
    position: absolute;
    top: 4px;
    left: 4px;
    font-size: 6px;
    line-height: 1;
    z-index: 10;
    font-family: 'Rockwell', 'Times New Roman', serif;
    font-weight: bold;
}

.corner-bottom {
    position: absolute;
    bottom: 4px;
    right: 4px;
    font-size: 6px;
    line-height: 1;
    z-index: 10;
    transform: rotate(180deg);
    font-family: 'Rockwell', 'Times New Roman', serif;
    font-weight: bold;
}

/* Center symbols for face cards and number cards */
.center-symbols {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    font-size: 1.2em;
    position: relative;
}

/* Face card images */
.face-image {
    width: 85%;
    height: 85%;
    object-fit: contain;
    border-radius: 4px;
    display: block !important;
    z-index: 1;
    position: relative;
    margin: auto;
}

/* Hide corner pips for standard deck - only show for gothic deck */
.standard-deck .corner-top .suit,
.standard-deck .corner-bottom .suit {
    display: none !important;
}

/* Face card images - using actual PNG files */
/* Removed background: none rule that might interfere with image display */

.card.hearts-J .center-symbols::before,
.card.hearts-Q .center-symbols::before,
.card.hearts-K .center-symbols::before,
.card.diamonds-J .center-symbols::before,
.card.diamonds-Q .center-symbols::before,
.card.diamonds-K .center-symbols::before,
.card.clubs-J .center-symbols::before,
.card.clubs-Q .center-symbols::before,
.card.clubs-K .center-symbols::before,
.card.spades-J .center-symbols::before,
.card.spades-Q .center-symbols::before,
.card.spades-K .center-symbols::before {
    display: none !important;
}

.card.hearts-J .center-symbols::after,
.card.hearts-Q .center-symbols::after,
.card.hearts-K .center-symbols::after,
.card.diamonds-J .center-symbols::after,
.card.diamonds-Q .center-symbols::after,
.card.diamonds-K .center-symbols::after,
.card.clubs-J .center-symbols::after,
.card.clubs-Q .center-symbols::after,
.card.clubs-K .center-symbols::after,
.card.spades-J .center-symbols::after,
.card.spades-Q .center-symbols::after,
.card.spades-K .center-symbols::after {
    display: none !important;
}

/* Pip positioning for realistic card layouts */
.pip {
    position: absolute;
    font-size: 2.1em;
    color: inherit;
}

/* 2-card layout - Based on SVG coordinates */
.card.hearts-2 .pip:nth-child(1) { top: 8%; left: 50%; transform: translateX(-50%); }
.card.hearts-2 .pip:nth-child(2) { bottom: 8%; left: 50%; transform: translateX(-50%) rotate(180deg); }

.card.diamonds-2 .pip:nth-child(1) { top: 8%; left: 50%; transform: translateX(-50%); }
.card.diamonds-2 .pip:nth-child(2) { bottom: 8%; left: 50%; transform: translateX(-50%) rotate(180deg); }

.card.clubs-2 .pip:nth-child(1) { top: 8%; left: 50%; transform: translateX(-50%); }
.card.clubs-2 .pip:nth-child(2) { bottom: 8%; left: 50%; transform: translateX(-50%) rotate(180deg); }

.card.spades-2 .pip:nth-child(1) { top: 8%; left: 50%; transform: translateX(-50%); }
.card.spades-2 .pip:nth-child(2) { bottom: 8%; left: 50%; transform: translateX(-50%) rotate(180deg); }

/* 3-card layout */
.card.hearts-3 .pip:nth-child(1) { top: 8%; left: 50%; transform: translateX(-50%); }
.card.hearts-3 .pip:nth-child(2) { top: 50%; left: 50%; transform: translate(-50%, -50%); }
.card.hearts-3 .pip:nth-child(3) { bottom: 8%; left: 50%; transform: translateX(-50%) rotate(180deg); }

.card.diamonds-3 .pip:nth-child(1) { top: 8%; left: 50%; transform: translateX(-50%); }
.card.diamonds-3 .pip:nth-child(2) { top: 50%; left: 50%; transform: translate(-50%, -50%); }
.card.diamonds-3 .pip:nth-child(3) { bottom: 8%; left: 50%; transform: translateX(-50%) rotate(180deg); }

.card.clubs-3 .pip:nth-child(1) { top: 8%; left: 50%; transform: translateX(-50%); }
.card.clubs-3 .pip:nth-child(2) { top: 50%; left: 50%; transform: translate(-50%, -50%); }
.card.clubs-3 .pip:nth-child(3) { bottom: 8%; left: 50%; transform: translateX(-50%) rotate(180deg); }

.card.spades-3 .pip:nth-child(1) { top: 8%; left: 50%; transform: translateX(-50%); }
.card.spades-3 .pip:nth-child(2) { top: 50%; left: 50%; transform: translate(-50%, -50%); }
.card.spades-3 .pip:nth-child(3) { bottom: 8%; left: 50%; transform: translateX(-50%) rotate(180deg); }

/* 4-card layout (top and bottom centre) */
.card.hearts-4 .pip:nth-child(1) { top: 8%; left: 25%; transform: translateX(-50%); }
.card.hearts-4 .pip:nth-child(2) { top: 8%; left: 75%; transform: translateX(-50%); }
.card.hearts-4 .pip:nth-child(3) { bottom: 8%; left: 25%; transform: translateX(-50%) rotate(180deg); }
.card.hearts-4 .pip:nth-child(4) { bottom: 8%; left: 75%; transform: translateX(-50%) rotate(180deg); }

.card.diamonds-4 .pip:nth-child(1) { top: 8%; left: 25%; transform: translateX(-50%); }
.card.diamonds-4 .pip:nth-child(2) { top: 8%; left: 75%; transform: translateX(-50%); }
.card.diamonds-4 .pip:nth-child(3) { bottom: 8%; left: 25%; transform: translateX(-50%) rotate(180deg); }
.card.diamonds-4 .pip:nth-child(4) { bottom: 8%; left: 75%; transform: translateX(-50%) rotate(180deg); }

.card.clubs-4 .pip:nth-child(1) { top: 8%; left: 25%; transform: translateX(-50%); }
.card.clubs-4 .pip:nth-child(2) { top: 8%; left: 75%; transform: translateX(-50%); }
.card.clubs-4 .pip:nth-child(3) { bottom: 8%; left: 25%; transform: translateX(-50%) rotate(180deg); }
.card.clubs-4 .pip:nth-child(4) { bottom: 8%; left: 75%; transform: translateX(-50%) rotate(180deg); }

.card.spades-4 .pip:nth-child(1) { top: 8%; left: 25%; transform: translateX(-50%); }
.card.spades-4 .pip:nth-child(2) { top: 8%; left: 75%; transform: translateX(-50%); }
.card.spades-4 .pip:nth-child(3) { bottom: 8%; left: 25%; transform: translateX(-50%) rotate(180deg); }
.card.spades-4 .pip:nth-child(4) { bottom: 8%; left: 75%; transform: translateX(-50%) rotate(180deg); }

/* 5-card layout (cross pattern) */
.card.hearts-5 .pip:nth-child(1) { top: 8%; left: 25%; transform: translateX(-50%); }
.card.hearts-5 .pip:nth-child(2) { top: 8%; left: 75%; transform: translateX(-50%); }
.card.hearts-5 .pip:nth-child(3) { top: 50%; left: 50%; transform: translate(-50%, -50%); }
.card.hearts-5 .pip:nth-child(4) { bottom: 8%; left: 25%; transform: translateX(-50%) rotate(180deg); }
.card.hearts-5 .pip:nth-child(5) { bottom: 8%; left: 75%; transform: translateX(-50%) rotate(180deg); }

.card.diamonds-5 .pip:nth-child(1) { top: 8%; left: 25%; transform: translateX(-50%); }
.card.diamonds-5 .pip:nth-child(2) { top: 8%; left: 75%; transform: translateX(-50%); }
.card.diamonds-5 .pip:nth-child(3) { top: 50%; left: 50%; transform: translate(-50%, -50%); }
.card.diamonds-5 .pip:nth-child(4) { bottom: 8%; left: 25%; transform: translateX(-50%) rotate(180deg); }
.card.diamonds-5 .pip:nth-child(5) { bottom: 8%; left: 75%; transform: translateX(-50%) rotate(180deg); }

.card.clubs-5 .pip:nth-child(1) { top: 8%; left: 25%; transform: translateX(-50%); }
.card.clubs-5 .pip:nth-child(2) { top: 8%; left: 75%; transform: translateX(-50%); }
.card.clubs-5 .pip:nth-child(3) { top: 50%; left: 50%; transform: translate(-50%, -50%); }
.card.clubs-5 .pip:nth-child(4) { bottom: 8%; left: 25%; transform: translateX(-50%) rotate(180deg); }
.card.clubs-5 .pip:nth-child(5) { bottom: 8%; left: 75%; transform: translateX(-50%) rotate(180deg); }

.card.spades-5 .pip:nth-child(1) { top: 8%; left: 25%; transform: translateX(-50%); }
.card.spades-5 .pip:nth-child(2) { top: 8%; left: 75%; transform: translateX(-50%); }
.card.spades-5 .pip:nth-child(3) { top: 50%; left: 50%; transform: translate(-50%, -50%); }
.card.spades-5 .pip:nth-child(4) { bottom: 8%; left: 25%; transform: translateX(-50%) rotate(180deg); }
.card.spades-5 .pip:nth-child(5) { bottom: 8%; left: 75%; transform: translateX(-50%) rotate(180deg); }

/* 6-card layout (two columns) */
.card.hearts-6 .pip:nth-child(1) { top: 8%; left: 25%; transform: translateX(-50%); }
.card.hearts-6 .pip:nth-child(2) { top: 8%; left: 75%; transform: translateX(-50%); }
.card.hearts-6 .pip:nth-child(3) { top: 50%; left: 25%; transform: translate(-50%, -50%); }
.card.hearts-6 .pip:nth-child(4) { top: 50%; left: 75%; transform: translate(-50%, -50%); }
.card.hearts-6 .pip:nth-child(5) { bottom: 8%; left: 25%; transform: translateX(-50%) rotate(180deg); }
.card.hearts-6 .pip:nth-child(6) { bottom: 8%; left: 75%; transform: translateX(-50%) rotate(180deg); }

.card.diamonds-6 .pip:nth-child(1) { top: 8%; left: 25%; transform: translateX(-50%); }
.card.diamonds-6 .pip:nth-child(2) { top: 8%; left: 75%; transform: translateX(-50%); }
.card.diamonds-6 .pip:nth-child(3) { top: 50%; left: 25%; transform: translate(-50%, -50%); }
.card.diamonds-6 .pip:nth-child(4) { top: 50%; left: 75%; transform: translate(-50%, -50%); }
.card.diamonds-6 .pip:nth-child(5) { bottom: 8%; left: 25%; transform: translateX(-50%) rotate(180deg); }
.card.diamonds-6 .pip:nth-child(6) { bottom: 8%; left: 75%; transform: translateX(-50%) rotate(180deg); }

.card.clubs-6 .pip:nth-child(1) { top: 8%; left: 25%; transform: translateX(-50%); }
.card.clubs-6 .pip:nth-child(2) { top: 8%; left: 75%; transform: translateX(-50%); }
.card.clubs-6 .pip:nth-child(3) { top: 50%; left: 25%; transform: translate(-50%, -50%); }
.card.clubs-6 .pip:nth-child(4) { top: 50%; left: 75%; transform: translate(-50%, -50%); }
.card.clubs-6 .pip:nth-child(5) { bottom: 8%; left: 25%; transform: translateX(-50%) rotate(180deg); }
.card.clubs-6 .pip:nth-child(6) { bottom: 8%; left: 75%; transform: translateX(-50%) rotate(180deg); }

.card.spades-6 .pip:nth-child(1) { top: 8%; left: 25%; transform: translateX(-50%); }
.card.spades-6 .pip:nth-child(2) { top: 8%; left: 75%; transform: translateX(-50%); }
.card.spades-6 .pip:nth-child(3) { top: 50%; left: 25%; transform: translate(-50%, -50%); }
.card.spades-6 .pip:nth-child(4) { top: 50%; left: 75%; transform: translate(-50%, -50%); }
.card.spades-6 .pip:nth-child(5) { bottom: 8%; left: 25%; transform: translateX(-50%) rotate(180deg); }
.card.spades-6 .pip:nth-child(6) { bottom: 8%; left: 75%; transform: translateX(-50%) rotate(180deg); }

/* 7-card layout (6-card positions + centre pip) */
.card.hearts-7 .pip:nth-child(1) { top: 8%; left: 25%; transform: translateX(-50%); }
.card.hearts-7 .pip:nth-child(2) { top: 8%; left: 75%; transform: translateX(-50%); }
.card.hearts-7 .pip:nth-child(3) { top: 50%; left: 25%; transform: translate(-50%, -50%); }
.card.hearts-7 .pip:nth-child(4) { top: 50%; left: 75%; transform: translate(-50%, -50%); }
.card.hearts-7 .pip:nth-child(5) { top: 35%; left: 50%; transform: translate(-50%, -50%); }
.card.hearts-7 .pip:nth-child(6) { bottom: 8%; left: 25%; transform: translateX(-50%) rotate(180deg); }
.card.hearts-7 .pip:nth-child(7) { bottom: 8%; left: 75%; transform: translateX(-50%) rotate(180deg); }

.card.diamonds-7 .pip:nth-child(1) { top: 8%; left: 25%; transform: translateX(-50%); }
.card.diamonds-7 .pip:nth-child(2) { top: 8%; left: 75%; transform: translateX(-50%); }
.card.diamonds-7 .pip:nth-child(3) { top: 50%; left: 25%; transform: translate(-50%, -50%); }
.card.diamonds-7 .pip:nth-child(4) { top: 50%; left: 75%; transform: translate(-50%, -50%); }
.card.diamonds-7 .pip:nth-child(5) { top: 35%; left: 50%; transform: translate(-50%, -50%); }
.card.diamonds-7 .pip:nth-child(6) { bottom: 8%; left: 25%; transform: translateX(-50%) rotate(180deg); }
.card.diamonds-7 .pip:nth-child(7) { bottom: 8%; left: 75%; transform: translateX(-50%) rotate(180deg); }

.card.clubs-7 .pip:nth-child(1) { top: 8%; left: 25%; transform: translateX(-50%); }
.card.clubs-7 .pip:nth-child(2) { top: 8%; left: 75%; transform: translateX(-50%); }
.card.clubs-7 .pip:nth-child(3) { top: 50%; left: 25%; transform: translate(-50%, -50%); }
.card.clubs-7 .pip:nth-child(4) { top: 50%; left: 75%; transform: translate(-50%, -50%); }
.card.clubs-7 .pip:nth-child(5) { top: 35%; left: 50%; transform: translate(-50%, -50%); }
.card.clubs-7 .pip:nth-child(6) { bottom: 8%; left: 25%; transform: translateX(-50%) rotate(180deg); }
.card.clubs-7 .pip:nth-child(7) { bottom: 8%; left: 75%; transform: translateX(-50%) rotate(180deg); }

.card.spades-7 .pip:nth-child(1) { top: 8%; left: 25%; transform: translateX(-50%); }
.card.spades-7 .pip:nth-child(2) { top: 8%; left: 75%; transform: translateX(-50%); }
.card.spades-7 .pip:nth-child(3) { top: 50%; left: 25%; transform: translate(-50%, -50%); }
.card.spades-7 .pip:nth-child(4) { top: 50%; left: 75%; transform: translate(-50%, -50%); }
.card.spades-7 .pip:nth-child(5) { top: 35%; left: 50%; transform: translate(-50%, -50%); }
.card.spades-7 .pip:nth-child(6) { bottom: 8%; left: 25%; transform: translateX(-50%) rotate(180deg); }
.card.spades-7 .pip:nth-child(7) { bottom: 8%; left: 75%; transform: translateX(-50%) rotate(180deg); }

/* 8-card layout (6-card + 7th pip + 8th pip) */
.card.hearts-8 .pip:nth-child(1) { top: 8%; left: 25%; transform: translateX(-50%); }
.card.hearts-8 .pip:nth-child(2) { top: 8%; left: 75%; transform: translateX(-50%); }
.card.hearts-8 .pip:nth-child(3) { top: 50%; left: 25%; transform: translate(-50%, -50%); }
.card.hearts-8 .pip:nth-child(4) { top: 50%; left: 75%; transform: translate(-50%, -50%); }
.card.hearts-8 .pip:nth-child(5) { top: 35%; left: 50%; transform: translate(-50%, -50%); }
.card.hearts-8 .pip:nth-child(6) { bottom: 8%; left: 25%; transform: translateX(-50%) rotate(180deg); }
.card.hearts-8 .pip:nth-child(7) { bottom: 8%; left: 75%; transform: translateX(-50%) rotate(180deg); }
.card.hearts-8 .pip:nth-child(8) { bottom: 35%; left: 50%; transform: translate(-50%, 50%) rotate(180deg); }

.card.diamonds-8 .pip:nth-child(1) { top: 8%; left: 25%; transform: translateX(-50%); }
.card.diamonds-8 .pip:nth-child(2) { top: 8%; left: 75%; transform: translateX(-50%); }
.card.diamonds-8 .pip:nth-child(3) { top: 50%; left: 25%; transform: translate(-50%, -50%); }
.card.diamonds-8 .pip:nth-child(4) { top: 50%; left: 75%; transform: translate(-50%, -50%); }
.card.diamonds-8 .pip:nth-child(5) { top: 35%; left: 50%; transform: translate(-50%, -50%); }
.card.diamonds-8 .pip:nth-child(6) { bottom: 8%; left: 25%; transform: translateX(-50%) rotate(180deg); }
.card.diamonds-8 .pip:nth-child(7) { bottom: 8%; left: 75%; transform: translateX(-50%) rotate(180deg); }
.card.diamonds-8 .pip:nth-child(8) { bottom: 35%; left: 50%; transform: translate(-50%, 50%) rotate(180deg); }

.card.clubs-8 .pip:nth-child(1) { top: 8%; left: 25%; transform: translateX(-50%); }
.card.clubs-8 .pip:nth-child(2) { top: 8%; left: 75%; transform: translateX(-50%); }
.card.clubs-8 .pip:nth-child(3) { top: 50%; left: 25%; transform: translate(-50%, -50%); }
.card.clubs-8 .pip:nth-child(4) { top: 50%; left: 75%; transform: translate(-50%, -50%); }
.card.clubs-8 .pip:nth-child(5) { top: 35%; left: 50%; transform: translate(-50%, -50%); }
.card.clubs-8 .pip:nth-child(6) { bottom: 8%; left: 25%; transform: translateX(-50%) rotate(180deg); }
.card.clubs-8 .pip:nth-child(7) { bottom: 8%; left: 75%; transform: translateX(-50%) rotate(180deg); }
.card.clubs-8 .pip:nth-child(8) { bottom: 35%; left: 50%; transform: translate(-50%, 50%) rotate(180deg); }

.card.spades-8 .pip:nth-child(1) { top: 8%; left: 25%; transform: translateX(-50%); }
.card.spades-8 .pip:nth-child(2) { top: 8%; left: 75%; transform: translateX(-50%); }
.card.spades-8 .pip:nth-child(3) { top: 50%; left: 25%; transform: translate(-50%, -50%); }
.card.spades-8 .pip:nth-child(4) { top: 50%; left: 75%; transform: translate(-50%, -50%); }
.card.spades-8 .pip:nth-child(5) { top: 35%; left: 50%; transform: translate(-50%, -50%); }
.card.spades-8 .pip:nth-child(6) { bottom: 8%; left: 25%; transform: translateX(-50%) rotate(180deg); }
.card.spades-8 .pip:nth-child(7) { bottom: 8%; left: 75%; transform: translateX(-50%) rotate(180deg); }
.card.spades-8 .pip:nth-child(8) { bottom: 35%; left: 50%; transform: translate(-50%, 50%) rotate(180deg); }

/* 9-card layout (2 rows of 4 pips each) */
.card.hearts-9 .pip:nth-child(1) { top: 8%; left: 25%; transform: translateX(-50%); }
.card.hearts-9 .pip:nth-child(2) { top: 8%; left: 75%; transform: translateX(-50%); }
.card.hearts-9 .pip:nth-child(3) { top: 42%; left: 25%; transform: translate(-50%, -50%); }
.card.hearts-9 .pip:nth-child(4) { top: 42%; left: 75%; transform: translate(-50%, -50%); }
.card.hearts-9 .pip:nth-child(5) { top: 58%; left: 25%; transform: translate(-50%, -50%) rotate(180deg); }
.card.hearts-9 .pip:nth-child(6) { top: 58%; left: 75%; transform: translate(-50%, -50%) rotate(180deg); }
.card.hearts-9 .pip:nth-child(7) { bottom: 8%; left: 25%; transform: translateX(-50%) rotate(180deg); }
.card.hearts-9 .pip:nth-child(8) { bottom: 8%; left: 75%; transform: translateX(-50%) rotate(180deg); }
.card.hearts-9 .pip:nth-child(9) { top: 50%; left: 50%; transform: translate(-50%, -50%); }

.card.diamonds-9 .pip:nth-child(1) { top: 8%; left: 25%; transform: translateX(-50%); }
.card.diamonds-9 .pip:nth-child(2) { top: 8%; left: 75%; transform: translateX(-50%); }
.card.diamonds-9 .pip:nth-child(3) { top: 42%; left: 25%; transform: translate(-50%, -50%); }
.card.diamonds-9 .pip:nth-child(4) { top: 42%; left: 75%; transform: translate(-50%, -50%); }
.card.diamonds-9 .pip:nth-child(5) { top: 58%; left: 25%; transform: translate(-50%, -50%) rotate(180deg); }
.card.diamonds-9 .pip:nth-child(6) { top: 58%; left: 75%; transform: translate(-50%, -50%) rotate(180deg); }
.card.diamonds-9 .pip:nth-child(7) { bottom: 8%; left: 25%; transform: translateX(-50%) rotate(180deg); }
.card.diamonds-9 .pip:nth-child(8) { bottom: 8%; left: 75%; transform: translateX(-50%) rotate(180deg); }
.card.diamonds-9 .pip:nth-child(9) { top: 50%; left: 50%; transform: translate(-50%, -50%); }

.card.clubs-9 .pip:nth-child(1) { top: 8%; left: 25%; transform: translateX(-50%); }
.card.clubs-9 .pip:nth-child(2) { top: 8%; left: 75%; transform: translateX(-50%); }
.card.clubs-9 .pip:nth-child(3) { top: 42%; left: 25%; transform: translate(-50%, -50%); }
.card.clubs-9 .pip:nth-child(4) { top: 42%; left: 75%; transform: translate(-50%, -50%); }
.card.clubs-9 .pip:nth-child(5) { top: 58%; left: 25%; transform: translate(-50%, -50%) rotate(180deg); }
.card.clubs-9 .pip:nth-child(6) { top: 58%; left: 75%; transform: translate(-50%, -50%) rotate(180deg); }
.card.clubs-9 .pip:nth-child(7) { bottom: 8%; left: 25%; transform: translateX(-50%) rotate(180deg); }
.card.clubs-9 .pip:nth-child(8) { bottom: 8%; left: 75%; transform: translateX(-50%) rotate(180deg); }
.card.clubs-9 .pip:nth-child(9) { top: 50%; left: 50%; transform: translate(-50%, -50%); }

.card.spades-9 .pip:nth-child(1) { top: 8%; left: 25%; transform: translateX(-50%); }
.card.spades-9 .pip:nth-child(2) { top: 8%; left: 75%; transform: translateX(-50%); }
.card.spades-9 .pip:nth-child(3) { top: 42%; left: 25%; transform: translate(-50%, -50%); }
.card.spades-9 .pip:nth-child(4) { top: 42%; left: 75%; transform: translate(-50%, -50%); }
.card.spades-9 .pip:nth-child(5) { top: 58%; left: 25%; transform: translate(-50%, -50%) rotate(180deg); }
.card.spades-9 .pip:nth-child(6) { top: 58%; left: 75%; transform: translate(-50%, -50%) rotate(180deg); }
.card.spades-9 .pip:nth-child(7) { bottom: 8%; left: 25%; transform: translateX(-50%) rotate(180deg); }
.card.spades-9 .pip:nth-child(8) { bottom: 8%; left: 75%; transform: translateX(-50%) rotate(180deg); }
.card.spades-9 .pip:nth-child(9) { top: 50%; left: 50%; transform: translate(-50%, -50%); }

/* 10-card layout (9-card + 2 additional pips for 5-card arrangements) */
.card.hearts-10 .pip:nth-child(1) { top: 8%; left: 25%; transform: translateX(-50%); }
.card.hearts-10 .pip:nth-child(2) { top: 8%; left: 75%; transform: translateX(-50%); }
.card.hearts-10 .pip:nth-child(3) { top: 42%; left: 25%; transform: translate(-50%, -50%); }
.card.hearts-10 .pip:nth-child(4) { top: 42%; left: 75%; transform: translate(-50%, -50%); }
.card.hearts-10 .pip:nth-child(5) { top: 58%; left: 25%; transform: translate(-50%, -50%) rotate(180deg); }
.card.hearts-10 .pip:nth-child(6) { top: 58%; left: 75%; transform: translate(-50%, -50%) rotate(180deg); }
.card.hearts-10 .pip:nth-child(7) { bottom: 8%; left: 25%; transform: translateX(-50%) rotate(180deg); }
.card.hearts-10 .pip:nth-child(8) { bottom: 8%; left: 75%; transform: translateX(-50%) rotate(180deg); }
.card.hearts-10 .pip:nth-child(9) { top: 29%; left: 50%; transform: translate(-50%, -50%); }
.card.hearts-10 .pip:nth-child(10) { bottom: 29%; left: 50%; transform: translate(-50%, 50%) rotate(180deg); }

.card.diamonds-10 .pip:nth-child(1) { top: 8%; left: 25%; transform: translateX(-50%); }
.card.diamonds-10 .pip:nth-child(2) { top: 8%; left: 75%; transform: translateX(-50%); }
.card.diamonds-10 .pip:nth-child(3) { top: 42%; left: 25%; transform: translate(-50%, -50%); }
.card.diamonds-10 .pip:nth-child(4) { top: 42%; left: 75%; transform: translate(-50%, -50%); }
.card.diamonds-10 .pip:nth-child(5) { top: 58%; left: 25%; transform: translate(-50%, -50%) rotate(180deg); }
.card.diamonds-10 .pip:nth-child(6) { top: 58%; left: 75%; transform: translate(-50%, -50%) rotate(180deg); }
.card.diamonds-10 .pip:nth-child(7) { bottom: 8%; left: 25%; transform: translateX(-50%) rotate(180deg); }
.card.diamonds-10 .pip:nth-child(8) { bottom: 8%; left: 75%; transform: translateX(-50%) rotate(180deg); }
.card.diamonds-10 .pip:nth-child(9) { top: 29%; left: 50%; transform: translate(-50%, -50%); }
.card.diamonds-10 .pip:nth-child(10) { bottom: 29%; left: 50%; transform: translate(-50%, 50%) rotate(180deg); }

.card.clubs-10 .pip:nth-child(1) { top: 8%; left: 25%; transform: translateX(-50%); }
.card.clubs-10 .pip:nth-child(2) { top: 8%; left: 75%; transform: translateX(-50%); }
.card.clubs-10 .pip:nth-child(3) { top: 42%; left: 25%; transform: translate(-50%, -50%); }
.card.clubs-10 .pip:nth-child(4) { top: 42%; left: 75%; transform: translate(-50%, -50%); }
.card.clubs-10 .pip:nth-child(5) { top: 58%; left: 25%; transform: translate(-50%, -50%) rotate(180deg); }
.card.clubs-10 .pip:nth-child(6) { top: 58%; left: 75%; transform: translate(-50%, -50%) rotate(180deg); }
.card.clubs-10 .pip:nth-child(7) { bottom: 8%; left: 25%; transform: translateX(-50%) rotate(180deg); }
.card.clubs-10 .pip:nth-child(8) { bottom: 8%; left: 75%; transform: translateX(-50%) rotate(180deg); }
.card.clubs-10 .pip:nth-child(9) { top: 29%; left: 50%; transform: translate(-50%, -50%); }
.card.clubs-10 .pip:nth-child(10) { bottom: 29%; left: 50%; transform: translate(-50%, 50%) rotate(180deg); }

.card.spades-10 .pip:nth-child(1) { top: 8%; left: 25%; transform: translateX(-50%); }
.card.spades-10 .pip:nth-child(2) { top: 8%; left: 75%; transform: translateX(-50%); }
.card.spades-10 .pip:nth-child(3) { top: 42%; left: 25%; transform: translate(-50%, -50%); }
.card.spades-10 .pip:nth-child(4) { top: 42%; left: 75%; transform: translate(-50%, -50%); }
.card.spades-10 .pip:nth-child(5) { top: 58%; left: 25%; transform: translate(-50%, -50%) rotate(180deg); }
.card.spades-10 .pip:nth-child(6) { top: 58%; left: 75%; transform: translate(-50%, -50%) rotate(180deg); }
.card.spades-10 .pip:nth-child(7) { bottom: 8%; left: 25%; transform: translateX(-50%) rotate(180deg); }
.card.spades-10 .pip:nth-child(8) { bottom: 8%; left: 75%; transform: translateX(-50%) rotate(180deg); }
.card.spades-10 .pip:nth-child(9) { top: 29%; left: 50%; transform: translate(-50%, -50%); }
.card.spades-10 .pip:nth-child(10) { bottom: 29%; left: 50%; transform: translate(-50%, 50%) rotate(180deg); }

/* Face cards styling */
.face-card {
    font-size: 8px;
    text-align: center;
}

/* Face cards and Ace styling - Using Rockwell font */
/* Ace cards keep their suit symbols */
.card.hearts-A .center-symbols::before { content: "♥"; color: #e74c3c; font-size: 2.1em; }
.card.diamonds-A .center-symbols::before { content: "♦"; color: #e74c3c; font-size: 2.1em; }
.card.clubs-A .center-symbols::before { content: "♣"; color: #000; font-size: 2.1em; }
/* Ace of Spades - now uses dynamic image loading */
.card.spades-A .center-symbols::before,
.card.spades-A .center-symbols::after {
    display: none !important;
}

/* Card labels */
.card-label {
    position: absolute;
    bottom: -25px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 8px;
    color: #fff;
    text-align: center;
    width: 100%;
    font-family: 'Rockwell', 'Times New Roman', serif;
    font-weight: bold;
}

/* ============================================================================
   SANTA DECK - DECK-LEVEL STYLING
   ============================================================================
   This styling applies to all cards with the 'santa' class across all games.
   ============================================================================ */

/* Santa deck - ensure cards with face images have proper layout */
.card.santa:has(.face-image) {
    padding: 0 !important;
    border: none !important;
    overflow: hidden !important;
    position: relative !important;
    z-index: 0; /* Create stacking context */
}

/* Santa deck - center-symbols container should fill entire card for face images */
.card.santa:has(.face-image) .center-symbols {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    height: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    display: block !important;
    flex: none !important;
    align-items: stretch !important;
    justify-content: stretch !important;
    box-sizing: border-box !important;
}

/* Santa deck - face images completely fill the card surface (FILL, not fit) */
.card.santa .face-image,
.card.santa img.face-image,
.card.santa .center-symbols .face-image {
    width: 100% !important;
    height: 100% !important;
    min-width: 100% !important;
    min-height: 100% !important;
    max-width: none !important;
    max-height: none !important;
    object-fit: cover !important;
    object-position: center !important;
    border-radius: inherit !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    z-index: 1 !important;
    display: block !important;
    box-sizing: border-box !important;
}

/* Santa deck - white stroke around corner elements (numbers and suit symbols) */
.card.santa .corner-top,
.card.santa .corner-bottom {
    position: absolute !important;
    z-index: 100 !important;
    text-shadow: 
        -2px -2px 0 white,
        2px -2px 0 white,
        -2px 2px 0 white,
        2px 2px 0 white,
        -1px -1px 0 white,
        1px -1px 0 white,
        -1px 1px 0 white,
        1px 1px 0 white,
        0 0 3px white;
    -webkit-text-stroke: 0px;
    background: none !important;
    pointer-events: none !important;
}

/* Ensure corner-top positioning for santa deck */
.card.santa .corner-top {
    top: 4px !important;
    left: 4px !important;
}

/* Ensure corner-bottom positioning for santa deck */
.card.santa .corner-bottom {
    bottom: 4px !important;
    right: 4px !important;
}

/* Santa deck - white stroke for pips (number cards) */
.card.santa .pip {
    position: absolute !important;
    z-index: 100 !important;
    text-shadow: 
        -2px -2px 0 white,
        2px -2px 0 white,
        -2px 2px 0 white,
        2px 2px 0 white,
        -1px -1px 0 white,
        1px -1px 0 white,
        -1px 1px 0 white,
        1px 1px 0 white,
        0 0 3px white;
    -webkit-text-stroke: 0px;
    pointer-events: none !important;
}

/* Santa deck - white stroke for suit symbols in corners */
.card.santa .suit {
    text-shadow: 
        -2px -2px 0 white,
        2px -2px 0 white,
        -2px 2px 0 white,
        2px 2px 0 white,
        -1px -1px 0 white,
        1px -1px 0 white,
        -1px 1px 0 white,
        1px 1px 0 white,
        0 0 3px white;
    -webkit-text-stroke: 0px;
}

/* Santa deck - white stroke for ace symbols (center symbols) */
.card.santa .center-symbols[data-suit="hearts"]::before,
.card.santa .center-symbols[data-suit="diamonds"]::before,
.card.santa .center-symbols[data-suit="clubs"]::before,
.card.santa .center-symbols[data-suit="spades"]::before {
    text-shadow: 
        -2px -2px 0 white,
        2px -2px 0 white,
        -2px 2px 0 white,
        2px 2px 0 white,
        -1px -1px 0 white,
        1px -1px 0 white,
        -1px 1px 0 white,
        1px 1px 0 white,
        0 0 3px white;
    -webkit-text-stroke: 0px;
}

/* Responsive design */
@media (max-width: 768px) {
    .card {
        width: 50px;
        height: 70px;
        font-size: 8px;
    }
    
    .card-container {
        gap: 5px;
        padding: 10px;
    }
    
    .center-symbols {
        font-size: 1em;
    }
}