body {
    font-family: 'Arial', sans-serif;
    background-color: #f5f0e6; /* vintage beige */
    color: #3e2723; /* dark brown */
    margin: 0;
    padding: 0;
}

.container {
    max-width: 960px;
    margin: auto;
    padding: 20px;
    text-align: center;
}


.board {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    gap: 10px;
    justify-items: center;
    max-width: 600px;
    margin: auto;
}

.card {
    width: 80px;
    height: 100px;
    background-color: #d7ccc8; /* vintage card back */
    border: 2px solid #8d6e63;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    cursor: pointer;
}

.card.flipped {
    background-color: #fff;
}

.hidden {
    display: none;
}

.error {
    color: red;
}

.timer {
    font-size: 1.2rem;
    margin-bottom: 10px;
}

.message {
    margin-top: 20px;
    font-size: 1.5rem;
}

.scoreboard {
    margin: 10px 0;
    font-size: 1.2rem;
}

.scoreboard span {
    margin: 0 10px;
}

.scoreboard .active {
    text-decoration: underline;
}

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Ensure hidden class overrides modal display */
.modal.hidden {
    display: none;
}

.modal-content {
    background: #f5f0e6;
    padding: 20px;
    border-radius: 8px;
    position: relative;
    width: 360px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.close-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
}

@media (max-width: 600px) {
    .card {
        width: 60px;
        height: 80px;
        font-size: 1.5rem;
    }
    .modal-content {
        width: 90%;
    }
}

#player-list button {
    display: block;
    margin: 5px 0;
}

.chat {
    max-width: 600px;
    margin: 10px auto;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.chat-messages {
    border: 1px solid #8d6e63;
    background: #fff;
    height: 120px;
    overflow-y: auto;
    padding: 5px;
    text-align: left;
}

#leaderboard-modal ol {
    text-align: left;
}
