.card-flip {
    perspective: 1000px;
    height: 250px;
    margin-bottom: 30px;
}

.card {
    cursor: pointer;
}

.card-flip-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.8s;
    transform-style: preserve-3d;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    border-radius: 15px;
}

.card-flip.flipped .card-flip-inner {
    transform: rotateY(180deg);
}

.card-front, .card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 25px;
    text-align: left;
    border-radius: 15px;
    background: white;
    overflow-y: auto;
}

.card-back {
    transform: rotateY(180deg);
    background-color: #f8f9fa;
}

.latex-content {
    font-size: 1.1rem;
    line-height: 1.6;
    width: 100%;
    max-height: 100%;
}