* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: #111;
    overflow: hidden;
    perspective: 1000px;
}

.container {
    width: 300px;
    height: 300px;
}

.prism {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    animation: rotatePrism 20s linear infinite;
}

.face {
    position: absolute;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.8em;
    font-weight: bold;
    color: #fff;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid #fff;
    backface-visibility: hidden;
}

.front {
    transform: translateZ(150px);
}

.back {
    transform: rotateY(180deg) translateZ(150px);
}

.left {
    transform: rotateY(-90deg) translateZ(150px);
}

.right {
    transform: rotateY(90deg) translateZ(150px);
}

.top {
    transform: rotateX(90deg) translateZ(150px);
}

.bottom {
    transform: rotateX(-90deg) translateZ(150px);
}

.text {
    transform-style: preserve-3d;
}

@keyframes rotatePrism {
    from {
        transform: rotateY(0deg);
    }
    to {
        transform: rotateY(360deg);
    }
}
