.flashcards-quest {
    width: 800px;
    height: 505px;
    display: flex;
    flex-direction: column;
}

.flashcards-quest h3 {
    font-family: 'Press Start 2P', monospace;
    color: #a06041;
    padding-top: 10px;
    padding-bottom: 10px;
    border-radius: 5px;
    text-align: center;
    font-size: 31px;
    width: 800px;
    margin-top: 15px;
    margin-bottom: 4px;
}

.flashcard-container {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    perspective: 1000px;
}

.flashcard {
    width: 300px;
    height: 300px;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.6s;
    cursor: pointer;
}

.flashcard.flipped {
    transform: rotateY(180deg);
}

.flashcard-front,
.flashcard-back {
    position: absolute;
    width: 300px;
    height: 300px;
    backface-visibility: hidden;
    background: #e2b740;
    border-radius: 10px;
    box-shadow: 5px 5px 10px rgba(160, 96, 65, 0.7);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    overflow: hidden; /* Add this to contain overflow */
}

.flashcard-back {
    background: #ad8d34;
    transform: rotateY(180deg);
}

.flashcard h4 {
    font-size:25px;
    margin: 0 0 20px 0;
    color: black;
    flex-shrink: 0; /* Prevent shrinking */
}

.flashcard p{
    color:black;
}

.flashcard p {
    margin: 0 0 15px 0;
    line-height: 1.4;
    overflow-y: auto; /* Make long text scrollable */
    max-height: 60px; /* Limit height */
}

.explanation {
    font-style: italic;
    color: rgb(36 36 36);
    font-size: 0.9em;
    margin-top: 10px;
    flex-shrink: 0; /* Prevent shrinking */
}

.flashcard-controls {
    align-self: center;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    gap: 0px 230px;
}

.flashcard-complete {
    text-align: center;
    padding: 15px 0;
}

.flashcard-controls span {
    color: #754833;
}

#prev-card {
    background-color: #a06041;
}

#prev-card:hover{
    background-color: #bf7856;
}

#next-card {
    background-color: #a06041;
}

#next-card:hover {
    background-color: #bf7856;
}

#show-answer {
    color: white;
    background-color: #a06041;
}

#show-answer:hover{
    background-color:#bf7856;
}

