body {
    background-color: #f0f0f0;
    font-family: Arial, Helvetica, sans-serif;
    color: #000;
    margin: 0;
    padding: 10px;
    box-sizing: border-box;
}
.container {
    max-width: 900px;
    margin: 0 auto;
    background: #fff;
    border: 1px solid #ccc;
    padding: 15px;
    box-shadow: 2px 2px 10px rgba(0,0,0,0.1);
    box-sizing: border-box;
}
h1, h3 { text-align: center; color: #111; margin-top: 5px; }
.subtitle { text-align: center; color: #666; margin-bottom: 15px; font-size: 14px; }
.card {
    background: #fafafa;
    border: 1px solid #ddd;
    padding: 15px;
    margin-bottom: 15px;
    border-radius: 4px;
}
input, select {
    width: 100%;
    padding: 10px;
    margin: 8px 0 15px 0;
    box-sizing: border-box;
    border: 1px solid #ccc;
    border-radius: 3px;
    font-size: 14px;
}
.btn {
    padding: 10px 15px;
    border: none;
    cursor: pointer;
    font-weight: bold;
    border-radius: 3px;
    width: 100%;
    font-size: 14px;
}
.btn.primary { background: #0000EE; color: #fff; }
.btn.primary:hover { background: #0000cc; }
.btn.secondary { background: #555; color: #fff; }
.btn.success { background: #28a745; color: #fff; width: 48%; }
.btn.danger { background: #dc3545; color: #fff; width: 48%; }
.btn.small { width: auto; padding: 5px 10px; font-size: 12px; }

.lobby-grid {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}
.players-box, .leaderboard-box {
    flex: 1;
    min-width: 260px;
    background: #fff;
    border: 1px solid #ccc;
    padding: 12px;
    min-height: 180px;
    box-sizing: border-box;
}
.player-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px;
    border-bottom: 1px solid #eee;
    font-size: 13px;
}
.user-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #e9ecef;
    padding: 10px;
    border-radius: 3px;
    font-size: 14px;
}
.modal {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    padding: 10px;
    box-sizing: border-box;
}
.modal-content {
    background: #fff;
    padding: 25px;
    width: 100%;
    max-width: 400px;
    text-align: center;
    border-radius: 5px;
    border: 2px solid #333;
    box-sizing: border-box;
}
.modal-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 15px;
    gap: 10px;
}
.game-header {
    background: #e9ecef;
    padding: 8px;
    text-align: center;
    margin-bottom: 15px;
    border-radius: 3px;
    font-weight: bold;
    font-size: 13px;
}
.game-container {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center;
}
.board-wrapper {
    flex: 2;
    min-width: 280px;
    text-align: center;
}
.board {
    display: grid;
    gap: 2px;
    background: #333;
    border: 2px solid #333;
    margin: 0 auto;
    width: fit-content;
}
.cell {
    background: #fff;
    width: 75px;
    height: 75px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 32px;
    font-weight: bold;
    cursor: pointer;
    user-select: none;
}
.cell.hard-cell {
    width: 24px;
    height: 24px;
    font-size: 12px;
}
.cell:hover { background: #f0f0f0; }

/* Zvýraznění posledního tahu (Chess.com světle žlutá) */
.highlight-last {
    background-color: #fff59d !important;
}

.chat-wrapper {
    flex: 1;
    min-width: 260px;
    border: 1px solid #ccc;
    background: #fafafa;
    padding: 10px;
    display: flex;
    flex-direction: column;
    height: 380px;
    box-sizing: border-box;
}
.quick-emojis {
    display: flex;
    justify-content: space-around;
    margin-bottom: 8px;
}
.quick-emojis button {
    font-size: 16px;
    background: #fff;
    border: 1px solid #ccc;
    padding: 6px 10px;
    cursor: pointer;
    border-radius: 3px;
}
.chat-messages {
    flex: 1;
    background: #fff;
    border: 1px solid #ddd;
    overflow-y: auto;
    padding: 8px;
    font-size: 12px;
    margin-bottom: 8px;
    text-align: left;
}
.chat-input-row {
    display: flex;
    gap: 5px;
}
.chat-input-row input { margin: 0; font-size: 13px; padding: 8px; }
.chat-input-row button { width: auto; padding: 8px 12px; font-size: 13px; }
.game-status {
    margin-top: 10px;
    font-weight: bold;
    font-size: 14px;
}

@media (max-width: 768px) {
    .game-container {
        flex-direction: column;
    }
    .chat-wrapper {
        height: 280px;
    }
}