html, body {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  width: 100%;
  overflow-x: hidden;
}

.flex-parent {
    display: flex;
    width: 70%;
    justify-content: center;
    margin: 0 auto;
    max-width: 850px;
}

.flex-button {
    flex: 0 0 50%;
}

.flex-result-container {
    width: 100%;
    display: block;
}

.flex-row-box {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.flex-swap {
    display: flex;
    align-items: center;
    justify-content: center;
}

.battle-column {
    flex: 0 0 400px;
    overflow: auto;
}

.table-column {
    display: flex;
    justify-content: center;
}

.row {
    display: flex;
    align-items: center;
    text-align: center;
    flex-shrink: 0;
    width: 48%;
}

.attack {
    justify-content: right;
    color: #c72300;
}

.defend {
    justify-content: left;
    color: #020097;
}

.label {
    font-size: 1rem;
    font-weight: bold;
}

.checkbox {
    display: flex;
    align-items: center;
    font-weight: bold;
}

.terrain-select {
    margin-left: 5px;
}

.input["checkbox"] {
    margin-right: 5px;
}

.percent-win {
    height: 80px;
    font-size: 3rem;
}

.losses {
    height: 50px;
    font-size: 2rem;
}

.loss-header {
    font-size: 1.5rem;
    justify-content: center;
    width: 100%;
}

.modifier {
    margin-bottom: 10px;
}

.attack-title {
    color: #c72300;
    text-align: center;
}

.defend-title {
    color: #020097;
    text-align: center;
}

.unit-input {
    display: block;
    margin: 0 auto;
}

@media (max-width: 800px) {
    body {
        overflow-x: auto;
    }

    table {
        margin-left: auto;
        margin-right: auto;
    }

    .battle-column {
        flex: 1 1 auto;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    .flex-swap {
        margin: 10px 0;
    }

    .flex-parent {
        flex-direction: column;
        width: 100%;
    }

    .flex-button {
        flex: 0 0 50%;
        width: 50%;
        margin-left: auto;
        margin-right: auto;
    }
}
