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

body {
    font-family: Arial, sans-serif;
    background-color: #f0f0f0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

#gameContainer {
    background-color: white;
    border: 2px solid #333;
    border-radius: 8px;
    padding: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

#gameHeader {
    margin-bottom: 10px;
    padding: 10px;
    background-color: #f5f5f5;
    border-radius: 4px;
}

#playerInfo {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

#currentPlayerDisplay {
    font-size: 18px;
    font-weight: bold;
}

#scoresDisplay {
    display: flex;
    gap: 20px;
    font-size: 16px;
}

#scoresDisplay div {
    padding: 5px 10px;
    background-color: white;
    border-radius: 4px;
}

#gameCanvas {
    display: block;
    border: 1px solid #ccc;
    background-color: #fff;
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
    max-width: 100%;
    height: auto;
}

#infoBar {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
    padding: 10px;
    background-color: #f5f5f5;
    border-radius: 4px;
}

#infoText {
    flex: 0 0 auto;
    width: 305px;
    padding: 8px;
    font-size: 14px;
    border: 1px solid #ccc;
    border-radius: 4px;
    background-color: white;
    font-family: Arial, sans-serif;
}

button {
    padding: 8px 16px;
    font-size: 14px;
    cursor: pointer;
    border: 1px solid #333;
    border-radius: 4px;
    background-color: #fff;
    transition: background-color 0.2s;
}

button:hover {
    background-color: #e0e0e0;
}

button:active {
    background-color: #d0d0d0;
}

/* Modal styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    overflow: auto;
}

.modal-content {
    background-color: #fefefe;
    margin: 15% auto;
    padding: 20px;
    border: 1px solid #888;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.modal-content h2 {
    margin-bottom: 20px;
    color: #333;
}

#highScoreList {
    margin-bottom: 20px;
}

#highScoreList ol {
    list-style-position: inside;
    padding: 0;
}

#highScoreList li {
    padding: 8px;
    border-bottom: 1px solid #eee;
    font-size: 16px;
}

#highScoreList li:last-child {
    border-bottom: none;
}

#usernameInput {
    width: 100%;
    padding: 10px;
    font-size: 16px;
    border: 1px solid #ccc;
    border-radius: 4px;
    margin-bottom: 20px;
}

.modal-content button {
    margin-right: 10px;
}

#gameHeader {
    margin-bottom: 10px;
    padding: 10px;
    background-color: #f5f5f5;
    border-radius: 4px;
}

#playerInfo {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

#currentPlayerDisplay {
    font-size: 18px;
    font-weight: bold;
}

#scoresDisplay {
    display: flex;
    gap: 20px;
    font-size: 16px;
}

#scoresDisplay div {
    padding: 5px 10px;
    background-color: white;
    border-radius: 4px;
}

#waitingModal .modal-content {
    text-align: center;
    margin: 20px auto 0;
    width: 60%;
    max-width: 335px;
    padding: 13px;
}

#diceRollModal .modal-content {
    text-align: center;
    margin: 20px auto 0;
}

.tile-preview {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
    align-items: center;
    padding: 5px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #f9f9f9;
    min-height: 30px;
}

.tile-preview img {
    width: 20px;
    height: 20px;
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
}

#waitingText,
#diceRollText {
    font-size: 18px;
    color: #666;
    margin: 20px 0;
}

@media (max-width: 768px) {
    #infoBar {
        flex-direction: column;
        align-items: stretch;
    }
    
    button {
        width: 100%;
        margin-bottom: 5px;
    }
    
    #gameCanvas {
        width: 100% !important;
        height: auto !important;
    }
}

