#stage {
    padding: 30px;
}

/* Dominó padrão (em pé) */
.domino, .domino-flipped {
    width: 50px;
    /*height: 120px;*/
    height: 100px;
    background-color: #aaa;
    /*border: 2px solid #333;*/
    border-radius: 4px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    box-shadow: 2px 2px 5px rgba(0,0,0,0.5);
    overflow: hidden;
    transition: transform 0.3s;
    margin-bottom: 5px;
    
    
    border: 0;
    border-left: 1px solid #999;
    border-bottom: 5px solid #999;
    border-right: 1px solid #999;
    border-color: #ccc;

}

.domino-flipped {
    /*border-color: #ccc;*/
}

/* Dominó duplo (girado) */
.domino.duplo {
    transform: rotate(90deg);
    /*margin: -30px 0 -25px 0;*/
    margin: -26px 0 -20px 0;
    
    border: 0;
    border-bottom: 1px solid #999;
    border-right: 5px solid #999;
    border-top: 1px solid #999;
    border-color: #ccc;
}

.highlight {
    background-color: #fff;
    /*border-color: #ccc;*/
}

/* Linha entre metades */
.domino::after {
    content: "";
    position: absolute;
    /*top: 50%;*/
    top: 48px;
    left: 5%;
    width: 90%;
    height: 1px;
    background-color: #999;
    /*margin-bottom: 5px;*/
}

/* Cada metade */
.half {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(3, 1fr);
    align-items: center;
    justify-items: center;
    margin: 5px 1px;
}

/* Pontos */
.dot {
    width: 9px;
    height: 9px;
    background-color: #000;
    border-radius: 50%;
    box-shadow: 0 1px 1px rgba(0,0,0,0.5);
}


.domino.duplo .half .dot {
    box-shadow: 1px 0 1px rgba(0,0,0,0.5);
}




/* Mãos laterais e topo */
.top-hand, .left-hand, .right-hand {
    position: fixed;
    z-index: 10;
}
.top-hand {
    top: 0px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: row;
}
.left-hand {
    top: 50%;
    left: -50px;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
}
.right-hand {
    top: 50%;
    right: -50px;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
}


/* Peças dominó */
.domino-piece {
    background: white;
    /*border: 2px solid #333;*/
    /*border: 2px solid #999;*/
    border-radius: 6px;
    width: 40px;
    height: 80px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    box-shadow: 2px 2px 5px rgba(0,0,0,0.4);
    margin: 2px 2px;
}


/* Estilo peças nas mãos laterais e topo */
.left-hand .domino-piece,
.right-hand .domino-piece {
    width: 80px;
    height: 40px;
}

.top-hand .domino-piece,
.left-hand .domino-piece,
.right-hand .domino-piece {
    /*background: #eee;*/
    background: #fff;
}



/* Domino halves */
.domino-half {
    flex: 1;
    display: grid;
    grid-template-columns: 0.5fr 0.5fr 0.5fr;
    width: 100%;
    height: 100%;
}

/* Botões do carousel */
.carousel-btn {
    position: fixed;
    bottom: 0;
    width: 50px;
    height: 180px;
    background: rgba(0,0,0,0.5);
    border: none;
    color: white;
    font-size: 30px;
    cursor: pointer;
    user-select: none;
    z-index: 30;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s ease;
}
#btn-left {
    left: 0;
}
#btn-right {
    right: 0;
}

/* Classe para esconder os botões */
.hidden {
    opacity: 0;
    pointer-events: none;
}