.army-builder {
    max-width: 1000px;
    margin: 0 auto;
}

.army-builder-section {
    background: #f4f4f4;
    padding: 30px;
    margin-bottom: 30px;
}

.army-builder-section h2 {
    margin-top: 0;
    margin-bottom: 20px;
}

.army-builder select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ccc;
    background: #fff;
    font-size: 16px;
    box-sizing: border-box;
}

.army-main-general {
    background: #fff;
    padding: 20px;
    margin-bottom: 30px;
    border-left: 5px solid #d0674a;
}

.army-main-general h3 {
    margin-top: 0;
}

.general-points {
    display: block;
    margin-top: 10px;
    font-weight: 700;
}

.army-division {
    background: #fff;
    padding: 25px;
    margin-bottom: 25px;
    border: 1px solid #ddd;
}

.army-division h3 {
    margin-top: 0;
    margin-bottom: 25px;
}

.division-general {
    padding: 20px;
    margin-bottom: 25px;
    background: #f7f7f7;
    border-left: 4px solid #617955;
}

.division-general h4 {
    margin-top: 0;
    margin-bottom: 12px;
}

.division-unit-category {
    margin-top: 25px;
}

.division-unit-category h4 {
    margin-top: 0;
    margin-bottom: 12px;
}

.unit-select {
    width: calc(100% - 110px) !important;
    display: inline-block;
    vertical-align: top;
}

.army-add-unit {
    width: 100px;
    margin-left: 6px;
    padding: 12px 10px;
    border: none;
    background: #d0674a;
    color: #fff;
    cursor: pointer;
    font-weight: 700;
    vertical-align: top;
}

.army-add-unit:hover {
    opacity: 0.85;
}

.division-units {
    margin-top: 25px;
    padding-top: 10px;
}

.army-unit-row {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 0;
    border-bottom: 1px solid #ddd;
}

.unit-name {
    flex: 1;
    font-weight: 600;
}

.unit-category {
    min-width: 80px;
    opacity: 0.7;
}

.unit-movement {
    min-width: 60px;
    font-weight: 600;
    white-space: nowrap;
}

.unit-shooting {
    min-width: 55px;
    font-weight: 600;
    white-space: nowrap;
}

.unit-points {
    font-weight: 700;
    white-space: nowrap;
}

.army-remove-unit {
    padding: 8px 12px;
    border: none;
    background: #d0674a;
    color: #fff;
    cursor: pointer;
}

.army-remove-unit:hover {
    opacity: 0.85;
}

.army-builder-summary {
    padding: 30px;
    background: #617955;
    color: #fff;
}

.army-builder-summary h2 {
    margin-top: 0;
}

.summary-line {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.25);
}

.summary-total {
    margin-top: 10px;
    padding-top: 20px;
    font-size: 20px;
    font-weight: 700;
}

.summary-remaining {
    font-size: 18px;
    font-weight: 700;
}

.points-over {
    color: #ffcccc;
}

@media (max-width: 600px) {

    .army-builder-section {
        padding: 20px;
    }

    .army-division {
        padding: 20px;
    }

    .unit-select {
        width: 100% !important;
        margin-bottom: 10px;
    }

    .army-add-unit {
        width: 100%;
        margin-left: 0;
    }

    .army-unit-row {
        flex-wrap: wrap;
        gap: 8px;
    }

    .unit-name {
        flex-basis: 100%;
    }

    .unit-category {
        min-width: auto;
    }

    .unit-movement {
        min-width: auto;
    }

    .unit-shooting {
        min-width: auto;
    }

    .army-remove-unit {
        width: 100%;
    }
}
