body {
    font-family: 'Fira Sans', sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    margin: 0;
    background-color: #ffffff;
}

.container {
    text-align: center;
    width: 100%;
    max-width: 1200px;
    padding: 0 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.feedback {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 1.2em;
    text-align: center;
    z-index: 1000;
    animation: fade-out 1s ease-in-out;
}

@keyframes fade-out {
    0% {
        opacity: 1;
    }
    100% {
        opacity: 0;
    }
}

.game-container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 500px; /* Increased height for more space */
    max-width: 1200px;
    margin: 0 auto;
    border-radius: 10px;
    background-color: #ffffff00;
    overflow: hidden;
    padding: 0 40px; /* Add padding to create space for labels */
}

.label-left, .label-right {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 22px;
    color: #818181;
    user-select: none;
    pointer-events: none;
    background-color: rgba(96, 96, 96, 0);
    z-index: 1;
    padding: 10px;
    white-space: nowrap; /* Prevent text from wrapping */
}

.label-left {
    left: 5px; /* Align close to the left edge of the container */
    transform: translateY(-50%) rotate(-90deg); /* Rotate -90 degrees */
}

.label-right {
    right: 5px; /* Align close to the right edge of the container */
    transform: translateY(-50%) rotate(90deg); /* Rotate 90 degrees */
}

.game {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.card {
    position: absolute;
    width: 80%;
    height: 80%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background-color: rgb(255, 255, 255);
}

.card img {
    max-width: 70%;
    max-height: 70%;
    border: 30px solid #ffffff;
    border-radius: 20px;
    box-shadow: 0 0 20px rgba(0,0,0,0.1);
}

.label {
    margin-top: 10px;
    font-size: 18px;
    padding: 0 10px;
    text-align: center;
}

.results {
    margin-top: 20px;
    display: flex;
    justify-content: center;
    gap: 20px;
}

.results p {
    font-size: 24px;
    margin: 0;
}

.end-message {
    font-size: 24px;
    font-weight: bold;
    color: #333;
    padding: 20px;
    text-align: center;
    margin: 40px 20px; /* Add margin above, below, left, and right */
    border-radius: 10px;
    background-color: #ffffff00;
    max-width: 60%;
    word-wrap: break-word;
}

/* Media Queries for Responsiveness */
@media (max-width: 600px) {
    .label-left, .label-right {
        font-size: 14px;
        padding: 8px; /* Increase padding to keep space between labels and card */
    }

    .label-left {
        left: 0; /* Align close to the left edge for small screens */
    }

    .label-right {
        right: 0; /* Align close to the right edge for small screens */
    }

    .game-container {
        height: 450px; /* Reduce height for smaller screens */
        padding: 0 30px; /* Adjust padding for smaller screens */
    }

    .card {
        width: 75%; /* Further reduce width for small screens */
        height: 75%;
    }

    .card img {
        max-width: 65%; /* Further reduce max width for small screens */
        max-height: 65%;
    }

    .results p {
        font-size: 20px;
    }

    .end-message {
        font-size: 20px;
        padding: 15px;
        margin: 30px 10px; /* Adjust margin for smaller screens */
    }
}

@media (max-width: 400px) {
    .label-left, .label-right {
        font-size: 12px;
        padding: 6px; /* Adjust padding to maintain space */
    }

    .label-left {
        left: 0; /* Align close to the left edge for smallest screens */
    }

    .label-right {
        right: 0; /* Align close to the right edge for smallest screens */
    }

    .game-container {
        height: 350px; /* Further reduce height for smallest screens */
        padding: 0 20px; /* Adjust padding for smallest screens */
    }

    .card {
        width: 70%; /* Further reduce width for the smallest screens */
        height: 70%;
    }

    .card img {
        max-width: 60%; /* Further reduce max width for smallest screens */
        max-height: 60%;
    }

    .results p {
        font-size: 18px;
    }

    .end-message {
        font-size: 18px;
        padding: 10px;
        margin: 20px 5px; /* Further adjust margin for smallest screens */
    }
}