/* أداة النرد — معزولة عن تنسيقات صدفة العامة. */
.dice-wrapper {
    perspective: 800px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
}

.dice-anim-wrapper {
    position: relative;
    width: 100px;
    height: 100px;
}

.dice-anim-wrapper.jumping {
    animation: diceJump 1.5s ease-out forwards;
}

@keyframes diceJump {
    0% { transform: translateY(0); }
    20% { transform: translateY(-150px) scale(1.1); }
    40% { transform: translateY(0); }
    50% { transform: translateY(-30px); }
    60% { transform: translateY(0); }
    70% { transform: translateY(-10px); }
    100% { transform: translateY(0); }
}

.dice-container {
    width: 100px;
    height: 100px;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 1.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.dice-face {
    position: absolute;
    width: 100%;
    height: 100%;
    background: linear-gradient(145deg, #ffffff, #f0f0f0);
    border: 1px solid #ddd;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    box-shadow: inset 0 0 15px rgba(0, 0, 0, 0.05);
    font-size: 3rem;
    font-weight: bold;
    color: #333;
    backface-visibility: hidden;
    text-shadow: 1px 1px 0 #fff, -1px -1px 0 rgba(0, 0, 0, 0.1);
}

.dice-face.one { transform: rotateY(0deg) translateZ(50px); }
.dice-face.two { transform: rotateX(-90deg) translateZ(50px); }
.dice-face.three { transform: rotateY(90deg) translateZ(50px); }
.dice-face.four { transform: rotateY(-90deg) translateZ(50px); }
.dice-face.five { transform: rotateX(90deg) translateZ(50px); }
.dice-face.six { transform: rotateY(180deg) translateZ(50px); }
