body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    background-image: url('../res/background.webp');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    font-family: sans-serif;
}

.game-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: center;
}

.row {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.card {
    width: calc(25vh * (80 / 120));
    height: 25vh;
    perspective: 1000px;
    cursor: pointer;
}

@media (orientation: portrait) {
    .card {
        width: 16vw;
        height: calc(16vw * (120 / 80));
    }
}

.card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.6s;
    transform-style: preserve-3d;
}

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

.card-front, .card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    font-weight: bold;
    font-size: 1.2rem;
    background-size: cover;
}

.card-front {
    background-color: #f0f4ff;
    color: #192335;
    background-image: url('/res/packed_images.jpg');
    background-size: 1400% 100%;
    background-position: 0% 0%;
}

.card-back {
    background-color: #d0e0ff;
    color: #192335;
    transform: rotateY(180deg);
    background-image: url('/res/packed_images.jpg');
    background-size: 1400% 100%;
}

@keyframes correct-glow {
    0% { box-shadow: 0 4px 8px rgba(0,0,0,0.1); }
    50% { box-shadow: 0 0 20px 5px rgba(100, 200, 255, 0.6); }
    100% { box-shadow: 0 4px 8px rgba(0,0,0,0.1); }
}

.card.correct .card-back {
    animation: correct-glow 1.5s ease-in-out infinite;
}

.floating-paper-box {
    background-image: url('../res/paper.png');
    background-size: cover;
    color: #666 !important;
    text-shadow: 1px 1px 1px rgba(0,0,0,0.8) !important;
}

button, .play-button {
    background-image: url('../res/button.png') !important;
    background-size: cover !important;
    background-color: transparent !important;
    border: none !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
}
