body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: #f4f4f4;
}

h1, h2 {
    color: #333;
}

#grid {
    display: grid;
    grid-template-columns: repeat(8, 50px);
    grid-gap: 5px;
    margin: 20px 0;
}

.grid-row {
    display: flex;
}

.grid-cell {
    width: 60px;
    height: 60px;
    background-color: #e0e0e0;
    border: 1px solid #999;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.grid-cell.occupied {
    background-color: #007BFF;
    color: white;
    font-weight: bold;
}

#combat-result {
    margin-top: 20px;
}
    
#combat-mode {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#player1-zone {
    flex: 1;
    text-align: left;
    margin-right: 20px;
}

#player2-zone {
    flex: 1;
    text-align: right;
    margin-left: 20px;
}

#game-board {
    flex: 2;
    text-align: center;
}

#troop-selection {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 20px;
}

.troop-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-bottom: 20px;
}

.troop-item {
    width: 80px;
    height: 80px;

    display: flex;
    align-items: center;
    justify-content: center;
    cursor: grab;
    user-select: none;
}

.troop-item:active {
    cursor: grabbing;
}

#board-grid {
    margin: 0 auto;
    position: relative;
    width: 620px;
    height: 620px;
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    grid-template-rows: repeat(10, 1fr);
    gap: 2px;
    background-color: #f4f4f4;
    border: black;  
}

#player1-troop-list {
    position: absolute;
    left: 20%;
    top: 50%;
    transform: translateY(-50%);
    width: 20%;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

#player2-troop-list {
    position: absolute;
    right: 20%;
    top: 50%;
    transform: translateY(-50%);
    width: 20%;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

#player1-troop-list .troop-item, #player2-troop-list .troop-item {
    width: 60px;
    height: 60px    ;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: grab;
    user-select: none;
}

#player1-troop-list .troop-item:active, #player2-troop-list .troop-item:active {
    cursor: grabbing;
}

.grid-cell .troop-item {
    width: 100%;
    height: 100%;
    background-color: inherit;
    border: none;
    cursor: default;
}
