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

:root {
    --dice-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
    --bounce-height: 0px;
    --primary-color: #4CAF50;
    --primary-dark: #45a049;
    --text-color: #ffffff;
}

body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #1a1a1a, #2c2c2c);
    font-family: 'Segoe UI', Arial, sans-serif;
    overflow: hidden;
    gap: 60px;
}

.game-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 40px;
}

.container {
    perspective: 1200px;
    width: 200px;
    height: 200px;
    position: relative;
}

.dice {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    transition: transform 0.1s ease;
    cursor: grab;
    transform: translateZ(var(--bounce-height));
}

.dice:active {
    cursor: grabbing;
}

.face {
    position: absolute;
    width: 100%;
    height: 100%;
    background: linear-gradient(145deg, #ffffff, #f0f0f0);
    border: 2px solid rgba(0, 0, 0, 0.1);
    border-radius: 15px;
    display: grid;
    grid-template: repeat(3, 1fr) / repeat(3, 1fr);
    gap: 5px;
    padding: 15px;
    box-shadow: inset 0 0 15px rgba(0, 0, 0, 0.1);
}

.face::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, 
        rgba(255,255,255,0.3) 0%, 
        rgba(255,255,255,0) 50%, 
        rgba(0,0,0,0.1) 100%);
    border-radius: 13px;
    pointer-events: none;
}

.dot {
    background: linear-gradient(145deg, #333, #222);
    border-radius: 50%;
    margin: auto;
    width: 25px;
    height: 25px;
    box-shadow: inset -2px -2px 4px rgba(0, 0, 0, 0.5),
                inset 2px 2px 4px rgba(255, 255, 255, 0.1),
                0 0 5px rgba(0, 0, 0, 0.2);
    position: relative;
}

.dot::after {
    content: '';
    position: absolute;
    top: 20%;
    left: 20%;
    width: 30%;
    height: 30%;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
}

/* Face positions */
.front  { transform: translateZ(100px); }
.back   { transform: translateZ(-100px) rotateY(180deg); }
.right  { transform: translateX(100px) rotateY(90deg); }
.left   { transform: translateX(-100px) rotateY(-90deg); }
.top    { transform: translateY(-100px) rotateX(90deg); }
.bottom { transform: translateY(100px) rotateX(-90deg); }

/* Dot positions */
.front .dot { grid-area: 2 / 2; }

.back .dot:nth-child(1) { grid-area: 1 / 1; }
.back .dot:nth-child(2) { grid-area: 1 / 3; }
.back .dot:nth-child(3) { grid-area: 2 / 1; }
.back .dot:nth-child(4) { grid-area: 2 / 3; }
.back .dot:nth-child(5) { grid-area: 3 / 1; }
.back .dot:nth-child(6) { grid-area: 3 / 3; }

.right .dot:nth-child(1) { grid-area: 1 / 1; }
.right .dot:nth-child(2) { grid-area: 2 / 2; }
.right .dot:nth-child(3) { grid-area: 3 / 3; }

.left .dot:nth-child(1) { grid-area: 1 / 1; }
.left .dot:nth-child(2) { grid-area: 1 / 3; }
.left .dot:nth-child(3) { grid-area: 3 / 1; }
.left .dot:nth-child(4) { grid-area: 3 / 3; }

.top .dot:nth-child(1) { grid-area: 1 / 1; }
.top .dot:nth-child(2) { grid-area: 1 / 3; }
.top .dot:nth-child(3) { grid-area: 2 / 2; }
.top .dot:nth-child(4) { grid-area: 3 / 1; }
.top .dot:nth-child(5) { grid-area: 3 / 3; }

.bottom .dot:nth-child(1) { grid-area: 1 / 1; }
.bottom .dot:nth-child(2) { grid-area: 3 / 3; }

/* Enhanced button style */
.button-container {
    position: relative;
    margin-top: 20px;
    transform: scale(1.2); /* Aumenta todo o container do botão */
}

#rollButton {
    padding: 22px 48px;
    font-size: 1.4rem;
    background: linear-gradient(145deg, var(--primary-color), var(--primary-dark));
    color: var(--text-color);
    border: none;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2),
                inset 0 -3px 6px rgba(0, 0, 0, 0.2),
                inset 0 3px 6px rgba(255, 255, 255, 0.2);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: bold;
    position: relative;
    overflow: hidden;
    min-width: 240px; /* Largura mínima fixa */
}

#rollButton::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        120deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
    transition: 0.5s;
}

#rollButton:hover {
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 12px 30px rgba(76, 175, 80, 0.4);
    background: linear-gradient(145deg, var(--primary-color), var(--primary-color));
}

#rollButton:hover::before {
    left: 100%;
}

#rollButton:active {
    transform: translateY(2px) scale(0.98);
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.15);
}

#rollButton:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

#rollButton:disabled::before {
    display: none;
}

/* Hint text */
.hint-text {
    color: #888;
    font-size: 0.9rem;
    text-align: center;
    margin-top: 15px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.container:hover + .hint-text {
    opacity: 1;
}
