/* Basic reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Score Panel Styling */
.score-panel {
    margin-bottom: 1rem;
    /* Space below the score panel */
}

/* Score Display Styling */
#score {
    font-size: 1.5rem;
    /* Adjusted font size for the actual score */
    font-weight: bold;
    color: #17a2b8;
    /* Bootstrap info color for consistency */
}

/* Reset Button Styling */
#resetButton {
    margin-top: 1rem;
    /* Space above the button */
    width: auto;
    /* Let it size according to its content */
}

/* Styling for each card */
.card {
    margin: 4px;
    /* Adjusted margin for spacing */
    flex: 0 0 calc(25% - 8px);
    /* Adjust width for 4 cards per row, accounting for the margin */
    height: 150px;
    /* Adjust height for mobile screens */
    perspective: 1000px;
    /* Perspective for 3D flipping effect */
    border-radius: 8px;
    /* Match border-radius to Bootstrap style */
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    /* Shadow for depth */
}

/* Common styling for the front and back of the card */
.card-front,
.card-back {
    width: 100%;
    height: 100%;
    position: absolute;
    backface-visibility: hidden;
    /* Hide the back of flipped elements */
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.6s;
    transform-style: preserve-3d;
}

/* Styling for the front of the card */
.card-front {
    background: #e6e6e6;
    /* Light grey color for the card front */
    color: #333;
    /* Darker text to contrast with the light background */
    font-size: 3em;
    /* Size of the emoji */
    user-select: none;
    /* Prevent text selection */
}

/* Styling for the back of the card */
.card-back {
    background: linear-gradient(160deg, #2c3a4a 0%, #23303c 100%); /* brand charcoal, was off-brand orange-purple */
    /* Gradient based on the logo */
    transform: rotateY(180deg);
    /* Flip the back side */
}

/* Adjusted flipping behavior */
.card.flipped .card-front {
    transform: rotateY(-180deg);
    /* Flip the front side */
}

.card.flipped .card-back {
    transform: rotateY(0deg);
    /* Reset to initial position */
}

/* Ensure images are properly scaled within cards */
.card-back {
    background-size: contain;
    /* or 'cover' depending on the desired effect */
    background-position: center;
    background-repeat: no-repeat;
}

/* Responsive adjustments for smaller screens */
@media (max-width: 1200px) {

    /* For large screens */
    .card {
        flex: 0 0 calc(33.333% - 8px);
        /* 3 cards per row */
    }
}

@media (max-width: 992px) {

    /* For medium screens */
    .card {
        flex: 0 0 calc(50% - 8px);
        /* 2 cards per row */
    }
}

@media (max-width: 768px) {

    /* For small screens */
    .card {
        flex: 0 0 calc(50% - 8px);
        /* 2 cards per row */
    }
}

@media (max-width: 576px) {

    /* For extra small screens */
    .card {
        flex: 0 0 100%;
        /* Full width for small screens */
        height: 200px;
        /* Fixed height for consistency */
    }
}