.scene {
    width: 200px;
    height: 200px;
    perspective: 600px;
    margin: 80px auto;
}

.cube {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    transform: translateZ(-100px);
    transition: transform 2.5s cubic-bezier(0.25, 1, 0.5, 1); /* Smooth deceleration */
}

.cube__face {
    position: absolute;
    width: 200px;
    height: 200px;
    border: 2px solid #bf953f; /* Gold border */
    border-radius: 12px; /* Rounded corners */
    color: #bf953f;
    font-size: 24px;
    font-weight: bold;
    text-align: center;
    /* Radial gradient for a spotlight effect */
    background: radial-gradient(circle at center, #3a3a3a 0%, #1a1a1a 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    /* Inner shadow for depth */
    box-shadow: inset 0 0 40px rgba(0,0,0,0.8), 0 0 10px rgba(191, 149, 63, 0.2);
    padding: 20px;
    box-sizing: border-box;
    user-select: none;
    /* Engraved text effect */
    text-shadow: 0 2px 2px rgba(0,0,0,0.8);
}

.cube__face--1  { transform: rotateY(  0deg) translateZ(100px); }
.cube__face--2  { transform: rotateY( 90deg) translateZ(100px); }
.cube__face--3  { transform: rotateY(180deg) translateZ(100px); }
.cube__face--4  { transform: rotateY(-90deg) translateZ(100px); }
.cube__face--5  { transform: rotateX( 90deg) translateZ(100px); }
.cube__face--6  { transform: rotateX(-90deg) translateZ(100px); }

.controls {
    text-align: center;
    margin-top: 50px;
}

.result-display {
    text-align: center;
    margin-top: 30px;
    min-height: 2em;
    font-size: 1.5rem;
    color: #bf953f;
    opacity: 0;
    transition: opacity 0.5s;
}

.result-display.show {
    opacity: 1;
}

/* Button style matching the theme */
.roll-btn {
    background: linear-gradient(to right, #bf953f, #aa771c);
    border: none;
    color: #1a1a1a;
    padding: 12px 30px;
    font-size: 1.2rem;
    font-weight: bold;
    border-radius: 25px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 15px rgba(191, 149, 63, 0.4);
}

.roll-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(191, 149, 63, 0.6);
}

.roll-btn:active {
    transform: translateY(1px);
}

.roll-btn:disabled {
    background: #555;
    color: #888;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

#openCustomModal {
    height: auto; /* Override Bulma's fixed height if necessary */
    padding: 12px 30px;
    font-size: 1.2rem;
    font-weight: bold;
    border: none;
    display: inline-flex;
    align-items: center;
}
