body {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    background-color: #f0f0f0;
    overflow-x: hidden;
}

.to-guess {
    margin-bottom: 20px;
    text-align: center;
}

.to-guess .character-container {
    width: 120px;
    height: 150px;
    position: relative;
    transform-style: preserve-3d;
    border: 1px solid #ccc;
    border-radius: 8px;
    overflow: hidden;
    background-color: white;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.to-guess img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 10px;
    width: 100%;
    padding: 0 10px;
    box-sizing: border-box;
}

.character {
    perspective: 1000px;
}

.character-container {
    width: 120px;
    height: 150px;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.6s;
    border: 1px solid #ccc;
    border-radius: 8px;
    overflow: hidden;
    background-color: white;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.character-container.flip {
    transform: rotateY(180deg);
}

.character .front,
.character .back {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

.character .front {
    transform: rotateY(0deg);
}

.character .back {
    transform: rotateY(-180deg);
}

.character-container.flip .front {
    transform: rotateY(180deg);
}

.character-container.flip .back {
    transform: rotateY(0deg);
}

.character img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
