body {
    /*font-family: sans-serif;*/
    /*display: flex;*/
    /*flex-direction: column;*/
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background-color: #f0f0f0;
    margin: 0;
    padding: 0px; /* Add some padding for very small screens */
    box-sizing: border-box; /* Include padding in element's total width and height */
}

.flashcard-container {
    perspective: 100%;
    width: 100%; /* Make width responsive */
    max-width: 800px; /* Set a maximum width for larger screens */
    height: 600px; /* Adjust height slightly for better content fit */
    margin-bottom: 0px;
}

.flashcard {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.6s;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.flashcard-front, .flashcard-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px 30px 20px 30px;
    box-sizing: border-box;
    background-color: white;
    border-radius: 10px;
}

.flashcard-back {
    transform: rotateY(180deg);
    background-color: #e6ffe6; /* Light green for correct answer side */
}

.flashcard.wrong-answer .flashcard-back {
    background-color: #ffe6e6; /* Light red background for wrong answer */
    /*border: 2px solid #dc3545; /* Red border */
    justify-content: center !important;
}

/* General styling for feedback messages */
.feedback-message {
    font-size: 3em; /* Big font size */
    font-weight: bold;
    margin: 0; /* Remove default paragraph margins */
    padding: 0;
    line-height: 1; /* Tight line height */
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2); /* Subtle shadow for impact */
}

.correct-feedback {
    color: #28a745; /* Green color for "Correct" */
}

.wrong-feedback {
    color: #dc3545; /* Red color for "Wrong" */
    margin-bottom: 20px; /* Space between "Wrong" and correct answer */
}

.correct-answer-display {
    font-size: 1.1em; /* Font size for the correct answer text */
    color: #333; /* Darker text color for readability */
    text-align: center;
    max-width: 90%; /* Ensure it doesn't overflow on small screens */
    padding: 0 10px; /* Some horizontal padding */
    box-sizing: border-box;
}

.correct-answer-display span {
    font-weight: bold;
    color: #28a745; /* Green for the actual correct answer text */
}

.flashcard.flipped {
    transform: rotateY(180deg);
}

#question-text {
    font-size: 1.2em; /* Use em for relative sizing */
    margin-bottom: 20px;
    text-align: center;
    line-height: 1.4; /* Improve readability */
}

#options-container {
    width: 100%; /* Ensure options take full width of container */
    display: flex;
    flex-direction: column;
    gap: 8px; /* Add gap between options */
}

.option {
    display: block;
    width: 100%; /* Make options take full width */
    padding: 10px;
    margin: 0; /* Remove vertical margin, use gap */
    border: 1px solid #ddd;
    border-radius: 5px;
    cursor: pointer;
    text-align: left;
    background-color: #f9f9f9;
}

.option:hover {
    background-color: #eee;
}

.option.correct {
    background-color: #d4edda; /* Green for correct answer */
    border-color: #28a745;
}

.option.incorrect {
    background-color: #f8d7da; /* Red for incorrect answer */
    border-color: #dc3545;
}

#correct-answer-text {
    font-size: 1.1em; /* Adjust font size */
}

#next-card-btn {
    padding: 10px 20px;
    font-size: 1em;
    cursor: pointer;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 5px;
    display: none; /* Hidden until an answer is selected */
    margin-top: 15px; /* Add some space above the button */
    margin-left: 20px; /* Add some space above the button */
    align-items: center!important;
}

/* Adjust height for smaller screens if needed */
@media (max-width: 600px) {
    .flashcard-container {
        height: 500px;
    }
}

/* Media queries for smaller screens */
@media (max-width: 480px) {
    .flashcard-container {
        height: 500px; /* Slightly smaller height for very small phones */
    }

    .flashcard-front, .flashcard-back {
        padding: 20px 20px 20px 20px; /* Reduce padding on smaller screens */
    }

    #question-text {
        font-size: 1.1em; /* Smaller font size for questions */
        margin-bottom: 15px;
    }

    .option {
        font-size: 0.9em; /* Smaller font size for options */
        padding: 8px;
    }

    #correct-answer-text {
        font-size: 1em;
    }

    #next-card-btn {
        padding: 8px 15px;
        font-size: 0.9em;
    }
}

/* Media query for even smaller screens if necessary */
@media (max-width: 320px) {
    .flashcard-container {
        height: 500px;
    }
    #question-text {
        font-size: 1em;
    }
    .option {
        font-size: 0.85em;
    }
}