body {
    margin: 0;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background-color: #ffffff;
}

.card-container {
    perspective: 1000px;
    border-radius: 15px;
}

.card {
    width: 300px;
    height: 400px;
    transform-style: preserve-3d;
    perspective: 1000px;
    transition: transform 0.5s;
    border-radius: 15px;
}

.card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 15px;
}

.card.is-rotated {
    transform: rotateY(180deg) rotateZ(5deg);
}

.card-front,
.card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #ffffff;
    border-radius: 15px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.card-back {
    transform: rotateY(180deg);
    border-radius: 15px;
}

.mailbox {
    position: absolute;
    bottom: 20px;
    right: 20px;
    font-size: 24px;
    cursor: pointer;
}

.items {
    position: absolute;
    bottom: 60px;
    right: 20px;
    display: none;
    flex-direction: column;
    gap: 10px;
    background-color: #fff;
    padding: 10px;
    border-radius: 15px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    max-height: 0;
    overflow: hidden;
    transform: translateY(50px); /* Initially move the items down */
    transition: transform 0.3s, max-height 0.3s;
}

.items.items-open {
    display: flex;
    transform: translateY(0); /* Move the items up when opened */
    max-height: 200px;
    overflow: auto;
}

.item {
    cursor: pointer;
    opacity: 0;
    transform: translateX(-20px); /* Initially move the items to the left */
    transition: transform 0.5s, opacity 0.5s;
}

.items-open .item {
    transform: translateX(0); /* Slide in from the left */
    opacity: 1;
}
