/*
 * Estilos para o jogo de Dominó. O objetivo é criar uma mesa escura onde as
 * peças coloridas se destacam. Também são definidos estilos para o tabuleiro,
 * mão do jogador e modal de configuração, preservando consistência com
 * os demais jogos da plataforma.
 */

html, body {
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
    background-color: #1e272e;
    color: #ecf0f1;
    height: 100%;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    background: #0a3d62;
    color: #ecf0f1;
}

nav button, nav .home-link {
    margin-right: 8px;
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    background: #38ada9;
    color: #fff;
    cursor: pointer;
    font-size: 0.9rem;
    text-decoration: none;
}

nav button:hover, nav .home-link:hover {
    background: #079992;
}

#game-container {
    padding: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.status {
    font-size: 1rem;
    margin-bottom: 10px;
}

.board {
    display: flex;
    flex-wrap: wrap;
    min-height: 120px;
    min-width: 100px;
    background: #34495e;
    padding: 10px;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.5);
    margin-bottom: 10px;
}

.tile {
    width: 50px;
    height: 100px;
    background: #ecf0f1;
    color: #2c3e50;
    border: 2px solid #2c3e50;
    border-radius: 4px;
    margin: 2px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    cursor: pointer;
}
.tile.face-down {
    background: #bdc3c7;
    color: transparent;
    cursor: pointer;
}
.tile.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
.tile .half {
    flex: 1;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    border-bottom: 1px solid #2c3e50;
}
.tile .half:last-child {
    border-bottom: none;
}

.hand {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 4px;
    margin-top: 10px;
}

.boneyard {
    margin-top: 10px;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
}
.modal.hidden {
    display: none;
}
.modal-content {
    background: #f5f5f5;
    color: #2c3e50;
    padding: 20px;
    border-radius: 8px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    text-align: center;
}
.modal-content h2 {
    margin-top: 0;
}
.modal-content button {
    margin: 8px;
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    background: #e58e26;
    color: #fff;
    cursor: pointer;
}
.modal-content button:hover {
    background: #d35400;
}
.modal-content .close-btn {
    background: #c0392b;
}
.modal-content .close-btn:hover {
    background: #922b21;
}

#ranking-list {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 200px;
    overflow-y: auto;
    text-align: left;
}
#ranking-list li {
    padding: 4px 0;
    border-bottom: 1px solid #ccc;
}

@media (max-width: 600px) {
    .tile {
        width: 40px;
        height: 80px;
        font-size: 0.8rem;
    }
    nav button, nav .home-link {
        font-size: 0.7rem;
        padding: 4px 8px;
    }
}