/* split.css */

.split-container {
    text-align: center;
    padding: 0px 16px 16px 16px;
}

.split-form {
    margin-bottom: 30px;
    background: linear-gradient(180deg, rgba(37, 44, 62, 0.78), rgba(22, 27, 39, 0.78));
    padding: 28px;
    border-radius: 16px;
    border: 1px solid rgba(255, 223, 143, 0.12);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.24);
    max-width: 420px;
    margin-left: auto;
    margin-right: auto;
    width: 100%;
}

@media (min-width: 1025px) {
    .split-form {
        max-width: 546px;
    }
}

#split-form-dynamic-content {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.input-single-column {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
    max-width: 320px;
    margin-left: auto;
    margin-right: auto;
    position: relative;
}

.split-map-selector {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 0 auto 20px;
    width: 100%;
    max-width: 320px;
    text-align: left;
}

#split-map-selector-container .split-map-selector {
    margin: 16px auto 0;
}

.split-map-label {
    color: #ffdf8f;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.split-map-dropdown {
    position: relative;
    width: 100%;
}

.split-map-trigger {
    width: 100%;
    padding: 12px 42px 12px 14px;
    border-radius: 12px;
    border: 1px solid rgba(126, 136, 164, 0.24);
    background: linear-gradient(180deg, rgba(35, 43, 61, 0.96), rgba(22, 29, 42, 0.98));
    color: #fff9e7;
    font-size: 14px;
    text-align: left;
    cursor: pointer;
    position: relative;
    transition: all 0.25s ease;
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.18);
}

.split-map-trigger::after {
    content: '';
    position: absolute;
    top: 50%;
    right: 16px;
    width: 9px;
    height: 9px;
    border-right: 2px solid rgba(255, 223, 143, 0.9);
    border-bottom: 2px solid rgba(255, 223, 143, 0.9);
    transform: translateY(-65%) rotate(45deg);
    transition: transform 0.2s ease;
}

.split-map-trigger:hover,
.split-map-dropdown.open .split-map-trigger {
    border-color: rgba(255, 223, 143, 0.4);
    box-shadow: 0 14px 26px rgba(0, 0, 0, 0.22);
}

.split-map-trigger:focus {
    outline: none;
    border-color: #ffdf8f;
    box-shadow: 0 0 0 4px rgba(255, 223, 143, 0.12), 0 14px 26px rgba(0, 0, 0, 0.22);
}

.split-map-dropdown.open .split-map-trigger::after {
    transform: translateY(-35%) rotate(225deg);
}

.split-map-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    gap: 8px;
    padding: 10px;
    border-radius: 14px;
    border: 1px solid rgba(255, 223, 143, 0.12);
    background: linear-gradient(180deg, rgba(28, 35, 49, 0.98), rgba(17, 22, 33, 0.98));
    box-shadow: 0 18px 36px rgba(0, 0, 0, 0.34);
    z-index: 40;
}

.split-map-dropdown.open .split-map-menu {
    display: flex;
}

.split-map-option {
    width: 100%;
    padding: 11px 12px;
    border: 1px solid transparent;
    border-radius: 10px;
    background: rgba(40, 51, 67, 0.66);
    color: #dfeaf2;
    text-align: left;
    cursor: pointer;
    transition: all 0.18s ease;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.split-map-option:hover {
    background: rgba(52, 67, 87, 0.9);
    border-color: rgba(121, 164, 183, 0.34);
    transform: translateY(-1px);
}

.split-map-option.active {
    background: linear-gradient(180deg, rgba(64, 91, 109, 0.96), rgba(47, 69, 84, 0.98));
    border-color: rgba(138, 189, 211, 0.42);
    color: #f4fbff;
}

.split-map-option.locked,
.auto-split-map-option.locked {
    color: rgba(223, 234, 242, 0.72);
    cursor: not-allowed;
}

.split-map-option.locked {
    background: rgba(40, 51, 67, 0.42);
    border-color: rgba(121, 164, 183, 0.14);
}

.split-map-option.locked:hover {
    background: rgba(40, 51, 67, 0.42);
    border-color: rgba(121, 164, 183, 0.14);
    transform: none;
}

.split-map-option-copy {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.split-map-option-title {
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
}

.split-map-option-subtitle {
    font-size: 11px;
    color: rgba(223, 234, 242, 0.72);
    white-space: nowrap;
}

.split-map-option-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.split-map-lock {
    flex-shrink: 0;
    font-size: 14px;
    opacity: 0.9;
}

.input-wrapper {
    position: relative;
    width: 100%;
}

.clear-input {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #6c757d;
    font-size: 18px;
    font-weight: bold;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
    z-index: 15;
}

.clear-input:hover {
    color: #dc3545;
    background: rgba(220, 53, 69, 0.1);
}

.input-single-column .player-input {
    width: 100%;
    padding: 14px 36px 14px 14px !important;
    background: rgba(33, 39, 56, 0.92);
    border: 1px solid rgba(126, 136, 164, 0.24);
    border-radius: 12px;
    color: #fff9e7;
    font-size: 14px;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.input-single-column .player-input:focus {
    outline: none;
    border-color: #ffdf8f;
    box-shadow: 0 0 15px rgba(255, 223, 143, 0.3);
    transform: scale(1.02);
}

.split-btn {
    padding: 12px 24px;
    background: linear-gradient(145deg, #2a2f42, #1e2332);
    color: #ffdf8f;
    border: 2px solid #3a3f5a;
    border-radius: 10px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.2);
}

.split-btn:hover {
    background: linear-gradient(145deg, #32374e, #242940);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 223, 143, 0.3);
    border-color: #ffdf8f;
}

.split-results {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 24px;
    text-align: left;
}

.split-results:empty { display: none; }

.split-layout {
    display: flex;
    gap: 24px;
    min-height: 500px;
    align-items: flex-start;
}

@media (min-width: 1025px) {
    .split-layout.split-sidebar-visible {
        width: 100%;
        max-width: 1180px;
        margin-inline: auto;
    }

    .split-layout.split-sidebar-visible .split-results {
        width: 100%;
        max-width: 900px;
    }
}

.split-sidebar {
    width: 260px;
    flex-shrink: 0;
    background:
        linear-gradient(180deg, rgba(34, 40, 56, 0.96), rgba(18, 22, 32, 0.96)),
        linear-gradient(145deg, rgba(255, 223, 143, 0.06), transparent 48%);
    border-radius: 12px;
    padding: 16px;
    border: 1px solid rgba(255, 223, 143, 0.14);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.24);
    position: sticky;
    top: 16px;
    height: fit-content;
    max-height: calc(100vh - 80px);
    overflow-y: auto;
    text-align: left;
}

.split-sidebar-visible .split-sidebar {
    margin-top: 0;
}

.split-main-content { flex: 1; min-width: 0; }

.sidebar-content h3 {
    color: #ffdf8f;
    margin-bottom: 12px;
    text-align: left;
    font-size: 0.98em;
    border-bottom: 1px solid rgba(255, 223, 143, 0.18);
    padding-bottom: 8px;
    letter-spacing: 0.02em;
}

.quick-report-items {
    display: flex;
    flex-direction: column;
    gap: 7px;
    margin-bottom: 16px;
    padding-left: 14px;
}

.quick-report-item {
    display: grid;
    grid-template-columns: 34px auto minmax(0, 1fr);
    align-items: center;
    gap: 8px 10px;
    padding: 8px 9px;
    border-radius: 9px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
    border: 1px solid transparent;
    text-align: left;
    font-size: 0.82em;
    line-height: 1.3;
    position: relative;
}

.quick-report-item:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
}

.quick-report-item.selected {
    border-color: #ffe08a;
    box-shadow:
        0 0 0 1px rgba(255, 224, 138, 0.7),
        0 0 16px rgba(255, 224, 138, 0.34);
    transform: translateY(-1px);
}

.quick-report-item.selected::before {
    content: '';
    position: absolute;
    left: -13px;
    top: 50%;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #ffe08a;
    box-shadow: 0 0 8px rgba(255, 224, 138, 0.72);
    transform: translateY(-50%);
}

.quick-report-rank {
    color: #fff1bd;
    font-weight: 800;
}

.quick-report-diff {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: inherit;
    opacity: 0.92;
    white-space: nowrap;
}

.quick-report-diff-label {
    white-space: nowrap;
}

.quick-report-diff-value {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    padding: 0 6px;
    border-radius: 999px;
    color: #fff6d8;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid currentColor;
    font-weight: 900;
    line-height: 1;
}

.quick-report-status {
    color: #f2d596;
    font-size: 0.78em;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    opacity: 0.88;
    justify-self: end;
    text-align: right;
    white-space: normal;
    overflow-wrap: normal;
    word-break: normal;
    min-width: 0;
}

.quick-report-item.good-diff {
    background: rgba(40, 167, 69, 0.15);
    color: #28a745;
    border-color: rgba(40, 167, 69, 0.3);
}

.quick-report-item.medium-diff {
    background: rgba(255, 193, 7, 0.15);
    color: #ffc107;
    border-color: rgba(255, 193, 7, 0.3);
}

.quick-report-item.bad-diff {
    background: rgba(220, 53, 69, 0.15);
    color: #dc3545;
    border-color: rgba(220, 53, 69, 0.3);
}

.quick-report-item.good-diff:hover { background: rgba(40, 167, 69, 0.25); }
.quick-report-item.medium-diff:hover { background: rgba(255, 193, 7, 0.25); }
.quick-report-item.bad-diff:hover { background: rgba(220, 53, 69, 0.25); }

.quick-report-item.dangerous-split {
    color: #ffb06a;
    background:
        linear-gradient(90deg, rgba(188, 77, 42, 0.24), rgba(253, 126, 20, 0.13) 48%, rgba(42, 47, 66, 0.06)),
        rgba(42, 47, 66, 0.88);
    border-color: rgba(229, 118, 64, 0.52);
}

.quick-report-item.dangerous-split:hover,
.quick-report-item.dangerous-split.selected {
    color: #ffd0a1;
    border-color: rgba(255, 151, 83, 0.74);
    box-shadow:
        0 0 0 1px rgba(255, 151, 83, 0.62),
        0 0 16px rgba(229, 118, 64, 0.3);
}

.quick-report-item.dangerous-split.balanced-dangerous-split {
    color: #cde77a;
    background:
        linear-gradient(90deg, rgba(118, 151, 55, 0.24), rgba(203, 184, 73, 0.13) 48%, rgba(42, 47, 66, 0.06)),
        rgba(42, 47, 66, 0.88);
    border-color: rgba(190, 208, 92, 0.52);
}

.quick-report-item.dangerous-split.balanced-dangerous-split:hover,
.quick-report-item.dangerous-split.balanced-dangerous-split.selected {
    color: #e8f5a8;
    border-color: rgba(213, 226, 112, 0.76);
    box-shadow:
        0 0 0 1px rgba(213, 226, 112, 0.58),
        0 0 16px rgba(190, 208, 92, 0.28);
}

.quick-report-item.medium-diff.dangerous-split,
.quick-report-item.medium-diff.dangerous-split.balanced-dangerous-split {
    color: #e1c46c;
    background:
        linear-gradient(90deg, rgba(116, 94, 35, 0.26), rgba(77, 67, 39, 0.18) 48%, rgba(42, 47, 66, 0.06)),
        rgba(42, 47, 66, 0.88);
    border-color: rgba(218, 165, 32, 0.42);
}

.quick-report-item.medium-diff.dangerous-split:hover,
.quick-report-item.medium-diff.dangerous-split.selected,
.quick-report-item.medium-diff.dangerous-split.balanced-dangerous-split:hover,
.quick-report-item.medium-diff.dangerous-split.balanced-dangerous-split.selected {
    color: #f0d884;
    border-color: rgba(218, 165, 32, 0.68);
    box-shadow:
        0 0 0 1px rgba(218, 165, 32, 0.5),
        0 0 16px rgba(218, 165, 32, 0.24);
}

.quick-report-item.bad-diff.dangerous-split,
.quick-report-item.bad-diff.dangerous-split.balanced-dangerous-split {
    color: #ff6f7d;
    background:
        linear-gradient(90deg, rgba(120, 36, 54, 0.28), rgba(72, 30, 44, 0.18) 48%, rgba(42, 47, 66, 0.06)),
        rgba(42, 47, 66, 0.88);
    border-color: rgba(220, 53, 69, 0.52);
}

.quick-report-item.bad-diff.dangerous-split:hover,
.quick-report-item.bad-diff.dangerous-split.selected,
.quick-report-item.bad-diff.dangerous-split.balanced-dangerous-split:hover,
.quick-report-item.bad-diff.dangerous-split.balanced-dangerous-split.selected {
    color: #ff96a0;
    border-color: rgba(220, 53, 69, 0.74);
    box-shadow:
        0 0 0 1px rgba(220, 53, 69, 0.58),
        0 0 16px rgba(220, 53, 69, 0.28);
}

.sidebar-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sidebar-actions #civ-plus-split-btn {
    width: 100%;
    max-width: none;
}

.civ-plus-actions-row {
    display: flex;
    gap: 8px;
    width: 100%;
}

.civ-plus-actions-row .civ-plus-split-btn {
    flex: 1 1 0;
    min-width: 0;
}

.civ-plus-actions-row .civ-plus-player3-split-btn {
    font-size: 11px;
    white-space: normal;
}

.sidebar-btn {
    padding: 10px 14px;
    border: none;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.reset-btn {
    background: rgba(58, 63, 90, 0.8);
    color: #ffdf8f;
    border: 2px solid #3a3f5a;
}

.reset-btn:hover {
    background: rgba(74, 79, 106, 0.8);
    transform: translateY(-1px);
}

.confirm-btn {
    background: linear-gradient(145deg, #ffdf8f, #e6c97d);
    color: #181c29 !important;
    border: 2px solid #ffdf8f;
    font-weight: 700;
}

.confirm-btn:hover:not(:disabled) {
    background: linear-gradient(145deg, #181c29, #1e2332);
    color: #ffdf8f !important;
    transform: translateY(-1px);
}

.confirm-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.split-result {
    background:
        linear-gradient(180deg, rgba(43, 50, 70, 0.96), rgba(24, 29, 42, 0.98)),
        linear-gradient(145deg, #2a2f42, #1e2332);
    border-radius: 12px;
    padding: 16px;
    border: 1px solid rgba(126, 136, 164, 0.22);
    transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.22);
    position: relative;
    cursor: pointer;
    min-height: 160px;
    margin-bottom: 16px;
}

.split-result:last-child { margin-bottom: 0; }
.split-result.selected {
    border-color: #ffe08a;
    box-shadow:
        0 0 0 2px rgba(255, 224, 138, 0.28),
        0 0 28px rgba(255, 224, 138, 0.34),
        0 16px 38px rgba(0, 0, 0, 0.26);
}
.split-result.dangerous-split {
    border-color: rgba(229, 118, 64, 0.55);
    background:
        linear-gradient(90deg, rgba(118, 55, 36, 0.58) 0%, rgba(76, 49, 42, 0.28) 38%, rgba(24, 29, 42, 0.98) 76%),
        linear-gradient(180deg, rgba(43, 50, 70, 0.96), rgba(24, 29, 42, 0.98));
    box-shadow:
        0 14px 34px rgba(0, 0, 0, 0.24),
        inset 4px 0 0 rgba(229, 118, 64, 0.72);
}
.split-result.dangerous-split.selected {
    border-color: rgba(255, 151, 83, 0.8);
    box-shadow:
        0 0 0 2px rgba(255, 151, 83, 0.26),
        0 0 26px rgba(229, 118, 64, 0.34),
        0 16px 38px rgba(0, 0, 0, 0.26),
        inset 4px 0 0 rgba(255, 151, 83, 0.86);
}
.split-result:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 223, 143, 0.3);
}
.split-result.dangerous-split:hover {
    border-color: rgba(255, 151, 83, 0.78);
    box-shadow:
        0 7px 22px rgba(0, 0, 0, 0.34),
        0 0 18px rgba(229, 118, 64, 0.22),
        inset 4px 0 0 rgba(255, 151, 83, 0.86);
}

.split-result.dangerous-split.balanced-dangerous-split {
    border-color: rgba(190, 208, 92, 0.56);
    background:
        linear-gradient(90deg, rgba(82, 103, 41, 0.56) 0%, rgba(83, 77, 43, 0.26) 38%, rgba(24, 29, 42, 0.98) 76%),
        linear-gradient(180deg, rgba(43, 50, 70, 0.96), rgba(24, 29, 42, 0.98));
    box-shadow:
        0 14px 34px rgba(0, 0, 0, 0.24),
        inset 4px 0 0 rgba(190, 208, 92, 0.72);
}

.split-result.dangerous-split.balanced-dangerous-split.selected {
    border-color: rgba(213, 226, 112, 0.82);
    box-shadow:
        0 0 0 2px rgba(213, 226, 112, 0.24),
        0 0 26px rgba(190, 208, 92, 0.3),
        0 16px 38px rgba(0, 0, 0, 0.26),
        inset 4px 0 0 rgba(213, 226, 112, 0.84);
}

.split-result.dangerous-split.balanced-dangerous-split:hover {
    border-color: rgba(213, 226, 112, 0.78);
    box-shadow:
        0 7px 22px rgba(0, 0, 0, 0.34),
        0 0 18px rgba(190, 208, 92, 0.22),
        inset 4px 0 0 rgba(213, 226, 112, 0.84);
}

.split-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 14px;
    flex-wrap: wrap;
    gap: 10px;
}

.split-selection {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 0;
}

.split-rating-type {
    font-size: 0.8em;
    font-weight: 600;
    color: #cdd7e1;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 5px 10px;
    white-space: nowrap;
}

.split-difference {
    font-size: 0.8em;
    font-weight: 800;
    padding: 4px 8px;
    border-radius: 999px;
    z-index: 2;
    white-space: nowrap;
    flex-shrink: 0;
    line-height: 1.25;
    letter-spacing: 0.01em;
}

.good-diff { color: #7edb8f; background: rgba(40, 167, 69, 0.1); border: 1px solid rgba(40, 167, 69, 0.28); }
.medium-diff { color: #e1c46c; background: rgba(218, 165, 32, 0.09); border: 1px solid rgba(218, 165, 32, 0.24); }
.bad-diff { color: #ffb06a; background: rgba(188, 77, 42, 0.14); border: 1px solid rgba(229, 118, 64, 0.44); }

.split-selection input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.custom-checkbox {
    width: 18px;
    height: 18px;
    border: 2px solid #3a3f5a;
    border-radius: 3px;
    background: rgba(42, 47, 66, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.custom-checkbox::after {
    content: '';
    width: 10px;
    height: 10px;
    background: #ffdf8f;
    border-radius: 1px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.split-selection input[type="radio"]:checked ~ .custom-checkbox { border-color: #ffdf8f; background: rgba(255, 223, 143, 0.1); }
.split-selection input[type="radio"]:checked ~ .custom-checkbox::after { opacity: 1; }

.split-selection label {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    line-height: 1.4;
    min-width: 0;
    flex: 1;
}

.split-title {
    color: #fff6d8;
    font-weight: 800;
}

.warnings-container {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    align-items: center;
}

.split-selection label:hover {
    color: #fff;
    text-shadow: 0 0 6px rgba(255, 223, 143, 0.5);
}

.teams-container {
    display: flex;
    justify-content: space-between;
    align-items: stretch;
    gap: 24px;
    margin-bottom: 12px;
}

.team {
    flex: 1;
    background: rgba(24, 29, 42, 0.58);
    border: 1px solid rgba(126, 136, 164, 0.14);
    border-radius: 9px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

#split-page .split-sidebar {
    background:
        linear-gradient(180deg, rgba(34, 40, 56, 0.96), rgba(18, 22, 32, 0.96)),
        linear-gradient(145deg, rgba(255, 223, 143, 0.06), transparent 48%);
    border-radius: 12px;
}

#split-page .quick-report-item {
    border-radius: 9px;
}

#split-page .split-result {
    border-radius: 12px;
    border-color: rgba(126, 136, 164, 0.22);
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.22);
    overflow: visible;
}

#split-page .split-result.selected {
    border-color: #ffe08a;
    box-shadow:
        0 0 0 2px rgba(255, 224, 138, 0.28),
        0 0 28px rgba(255, 224, 138, 0.34),
        0 16px 38px rgba(0, 0, 0, 0.26);
}

#split-page .split-result:hover {
    border-color: rgba(255, 223, 143, 0.3);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

#split-page .split-result.dangerous-split {
    border-color: rgba(229, 118, 64, 0.55);
    box-shadow:
        0 14px 34px rgba(0, 0, 0, 0.24),
        inset 4px 0 0 rgba(229, 118, 64, 0.72);
}

#split-page .split-result.dangerous-split.selected {
    border-color: rgba(255, 151, 83, 0.8);
    box-shadow:
        0 0 0 2px rgba(255, 151, 83, 0.26),
        0 0 26px rgba(229, 118, 64, 0.34),
        0 16px 38px rgba(0, 0, 0, 0.26),
        inset 4px 0 0 rgba(255, 151, 83, 0.86);
}

#split-page .split-result.dangerous-split:hover {
    border-color: rgba(255, 151, 83, 0.78);
    box-shadow:
        0 7px 22px rgba(0, 0, 0, 0.34),
        0 0 18px rgba(229, 118, 64, 0.22),
        inset 4px 0 0 rgba(255, 151, 83, 0.86);
}

#split-page .split-result.dangerous-split.balanced-dangerous-split {
    border-color: rgba(190, 208, 92, 0.56);
    box-shadow:
        0 14px 34px rgba(0, 0, 0, 0.24),
        inset 4px 0 0 rgba(190, 208, 92, 0.72);
}

#split-page .split-result.dangerous-split.balanced-dangerous-split.selected {
    border-color: rgba(213, 226, 112, 0.82);
    box-shadow:
        0 0 0 2px rgba(213, 226, 112, 0.24),
        0 0 26px rgba(190, 208, 92, 0.3),
        0 16px 38px rgba(0, 0, 0, 0.26),
        inset 4px 0 0 rgba(213, 226, 112, 0.84);
}

#split-page .split-result.dangerous-split.balanced-dangerous-split:hover {
    border-color: rgba(213, 226, 112, 0.78);
    box-shadow:
        0 7px 22px rgba(0, 0, 0, 0.34),
        0 0 18px rgba(190, 208, 92, 0.22),
        inset 4px 0 0 rgba(213, 226, 112, 0.84);
}

.team-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    width: 100%;
    gap: 10px;
}

.team-header h4 {
    color: #ffdf8f;
    margin-bottom: 0;
    font-size: 1em;
    text-align: left;
    flex: 0 1 auto;
}

.team-meta {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    flex-shrink: 0;
}

.team-rating-inline {
    color: #f0d89a;
    font-size: 0.78em;
    font-weight: 800;
    line-height: 1;
    padding: 4px 7px;
    border-radius: 999px;
    background: rgba(255, 223, 143, 0.1);
    border: 1px solid rgba(255, 223, 143, 0.18);
}

.team-advantage {
    font-size: 15px;
    font-weight: bold;
    line-height: 1;
    animation: pulse 2s infinite;
    background: none;
    border: none;
    padding: 0;
}

.team-rating {
    color: #ffdf8f;
    font-weight: 600;
    margin-bottom: 12px;
    text-align: center;
    font-size: 0.95em;
}

.vs {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 800;
    color: #ffdf8f;
    min-width: 50px;
    text-shadow: 0 0 8px rgba(255, 223, 143, 0.5);
}

.team-players {
    list-style: none;
    flex-grow: 1;
    margin: 0;
    padding: 0;
    margin-bottom: 12px;
}

.team-players li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    border-bottom: 1px solid rgba(58, 63, 90, 0.4);
    font-size: 0.9em;
}

.team-players li:last-child { border-bottom: none; padding-bottom: 0; }

.rating {
    color: #ffdf8f;
    font-weight: 700;
    background: rgba(255, 223, 143, 0.1);
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.8em;
}

.confirm-split-btn-container {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    width: auto;
    min-width: 280px;
    text-align: center;
    background: rgba(24, 28, 41, 0.95);
    padding: 12px;
    border-radius: 12px;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 223, 143, 0.3);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.6);
}

.confirm-split-btn {
    padding: 14px 30px;
    background: linear-gradient(145deg, #ffdf8f, #e6c97d);
    color: #181c29 !important;
    border: 2px solid #ffdf8f;
    border-radius: 10px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 700;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 3px 12px rgba(255, 223, 143, 0.4);
    width: 100%;
}

.confirm-split-btn:hover {
    background: linear-gradient(145deg, #181c29, #1e2332);
    color: #ffdf8f !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 223, 143, 0.5);
}

.placeholder {
    text-align: center;
    color: #8b8fa8;
    font-style: italic;
    padding: 40px 20px;
    font-size: 16px;
}

.custom-dropdown {
    position: absolute;
    top: 0;
    left: 100%;
    margin-left: 8px;
    background: #1e2332;
    border: 1px solid #3a3f5a;
    border-radius: 8px;
    max-height: 300px;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    min-width: 200px;
}

.dropdown-option {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    border-bottom: 1px solid #2a2f42;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
}

.dropdown-option:last-child { border-bottom: none; }
.dropdown-option:hover, .dropdown-option.hover { background: rgba(255, 223, 143, 0.1); }

.player-nickname { color: #ffdf8f; font-weight: 600; }

.player-rating {
    color: #8b8fa8;
    font-size: 12px;
    background: rgba(255, 223, 143, 0.1);
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 600;
}

.split-form { display: block; }
.split-sidebar { display: none; }
.split-sidebar-visible .split-form { display: none; }
.split-sidebar-visible .split-results { display: block; }

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.mode-switcher {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: nowrap;
    align-items: stretch;
}

.mode-btn {
    padding: 10px 20px;
    background: linear-gradient(145deg, #2a2f42, #1e2332);
    color: #ffdf8f;
    border: 2px solid #3a3f5a;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1.1;
}

#civ-plus-split-btn,
#civ-plus-player3-split-btn {
    padding: 8px 16px;
    min-height: 40px;
}

#back-to-monitoring-btn,
.additional-splits-btn,
#civ-plus-split-btn,
#civ-plus-player3-split-btn {
    align-self: stretch;
}

.mode-btn.active {
    background: linear-gradient(145deg, #ffdf8f, #e6c97d);
    color: #181c29;
    border-color: #ffdf8f;
    box-shadow: 0 0 15px rgba(255, 223, 143, 0.4);
}

.mode-btn:hover:not(.active) {
    background: linear-gradient(145deg, #32374e, #242940);
    border-color: #ffdf8f;
}

.mode-btn.clear-btn {
    background: linear-gradient(145deg, #2a2f42, #1e2332);
    color: #8a8fa3;
    border: 2px solid #5a5f73;
    margin-left: 10px;
}

.mode-btn.clear-btn:hover {
    background: linear-gradient(145deg, #32374e, #242940);
    border-color: #8a8fa3;
    color: #ffdf8f;
    box-shadow: 0 0 10px rgba(138, 143, 163, 0.3);
    transform: translateY(-1px);
}

.player-input-optional { transition: all 0.3s ease; }
.player-input-optional.hidden { display: none; }

.team-advantage.good-diff { color: #28a745; text-shadow: 0 0 8px rgba(40, 167, 69, 0.5); }
.team-advantage.medium-diff { color: #ffc107; text-shadow: 0 0 8px rgba(255, 193, 7, 0.5); }
.team-advantage.bad-diff { color: #dc3545; text-shadow: 0 0 8px rgba(220, 53, 69, 0.5); }

.strongest-warning,
.recommended-warning,
.unbalanced-warning,
.special-duo-warning,
.don-pair-warning,
.fly-king-warning,
.antik-warning {
    font-size: 0.72em;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 999px;
    white-space: nowrap;
    display: inline-block;
    margin: 0;
    border: 1px solid;
    line-height: 1.25;
    opacity: 0.9;
}

.warning-icon {
    position: relative;
    cursor: help;
    z-index: 20;
}

.warning-icon[data-tooltip]::before,
.warning-icon[data-tooltip]::after {
    position: absolute;
    left: 50%;
    pointer-events: none;
    opacity: 0;
    transform: translate(-50%, 6px);
    transition: opacity 0.16s ease, transform 0.16s ease;
    z-index: 2000;
}

.warning-icon[data-tooltip]::before {
    content: '';
    bottom: calc(100% + 4px);
    width: 8px;
    height: 8px;
    background: rgba(18, 22, 32, 0.98);
    border-left: 1px solid rgba(255, 223, 143, 0.24);
    border-top: 1px solid rgba(255, 223, 143, 0.24);
    transform: translate(-50%, 6px) rotate(225deg);
}

.warning-icon[data-tooltip]::after {
    content: attr(data-tooltip);
    bottom: calc(100% + 8px);
    width: max-content;
    max-width: 240px;
    padding: 7px 9px;
    border-radius: 8px;
    color: #ffdf8f;
    background: rgba(18, 22, 32, 0.98);
    border: 1px solid rgba(255, 223, 143, 0.24);
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.38);
    font-size: 12px;
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: 0;
    text-align: center;
    text-transform: none;
    white-space: normal;
}

.warning-icon[data-tooltip]:hover::before,
.warning-icon[data-tooltip]:hover::after {
    opacity: 1;
}

.warning-icon[data-tooltip]:hover::before {
    transform: translate(-50%, 0) rotate(225deg);
}

.warning-icon[data-tooltip]:hover::after {
    transform: translate(-50%, 0);
}

.strongest-warning {
    color: #ffb06a;
    background: rgba(188, 77, 42, 0.14);
    border-color: rgba(229, 118, 64, 0.44);
}

.recommended-warning {
    color: #7edb8f;
    background: rgba(40, 167, 69, 0.1);
    border-color: rgba(40, 167, 69, 0.28);
}

.unbalanced-warning {
    color: #f3ad64;
    background: rgba(253, 126, 20, 0.1);
    border-color: rgba(253, 126, 20, 0.28);
}

.special-duo-warning {
    color: #b99cff;
    background: rgba(111, 66, 193, 0.09);
    border-color: rgba(111, 66, 193, 0.24);
}

.don-pair-warning {
    color: #d7b7ff;
    background: rgba(142, 90, 214, 0.09);
    border-color: rgba(142, 90, 214, 0.24);
}

.fly-king-warning {
    color: #e1c46c;
    background: rgba(218, 165, 32, 0.09);
    border-color: rgba(218, 165, 32, 0.24);
}

.antik-warning {
    color: #ffbba0;
    background: rgba(229, 118, 64, 0.1);
    border-color: rgba(229, 118, 64, 0.26);
}

.rating.elite { color: #ff9a9a; background: rgba(220, 53, 69, 0.24); border: 1px solid rgba(220, 53, 69, 0.48); }
.rating.expert { color: #dca5aa; background: rgba(177, 85, 97, 0.18); border: 1px solid rgba(177, 85, 97, 0.36); }
.rating.advanced { color: #ffbd7a; background: rgba(255, 140, 0, 0.18); border: 1px solid rgba(255, 140, 0, 0.36); }
.rating.intermediate { color: #ffd869; background: rgba(255, 193, 7, 0.15); border: 1px solid rgba(255, 193, 7, 0.4); }
.rating.beginner { color: #d7ddea; background: rgba(126, 136, 164, 0.075); border: 1px solid rgba(126, 136, 164, 0.16); }

.additional-splits-btn {
    background: rgba(30, 35, 50, 0.8);
    color: #ffdf8f;
    border: 2px solid rgba(255, 223, 143, 0.3);
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.3s ease;
    padding: 10px 18px;
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
    animation: borderPulse 2s ease-in-out infinite;
}

.split-sidebar-visible .split-results {
    margin-top: 0;
}

.additional-splits-btn:hover {
    background: rgba(255, 223, 143, 0.1);
    border-color: rgba(255, 223, 143, 0.6);
    box-shadow: 0 0 15px rgba(255, 223, 143, 0.3);
    transform: translateY(-1px);
    animation: none;
}

.additional-splits-btn:active { transform: translateY(0); }

.additional-splits-btn:disabled {
    background: rgba(60, 60, 60, 0.5);
    color: #888;
    border-color: #555;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
    animation: none;
}

.additional-splits-btn.active {
    background: rgba(255, 223, 143, 0.15);
    border-color: #ffdf8f;
    box-shadow: 0 0 20px rgba(255, 223, 143, 0.4);
    color: #ffdf8f;
    animation: activeBorderPulse 1.5s ease-in-out infinite;
}

@keyframes borderPulse {
    0%, 100% { border-color: rgba(255, 223, 143, 0.3); box-shadow: 0 0 0 rgba(255, 223, 143, 0); }
    50% { border-color: rgba(255, 223, 143, 0.6); box-shadow: 0 0 8px rgba(255, 223, 143, 0.2); }
}

@keyframes activeBorderPulse {
    0%, 100% { border-color: rgba(255, 223, 143, 0.8); box-shadow: 0 0 15px rgba(255, 223, 143, 0.3); }
    50% { border-color: #ffdf8f; box-shadow: 0 0 20px rgba(255, 223, 143, 0.6); }
}

.additional-splits-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 223, 143, 0.2), transparent);
    transition: left 0.5s ease;
}

.additional-splits-btn:hover::before { left: 100%; }

@media (max-width: 1024px) {
    .split-layout { flex-direction: column; gap: 16px; }
    .split-main-content {
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
    }
    .split-results {
        width: 100%;
        max-width: 100%;
        align-self: stretch;
    }
    .split-result {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    .split-form {
        flex: 0 1 420px;
        width: min(100%, 420px) !important;
        margin: 0 auto 30px !important;
    }
    #split-form-dynamic-content {
        width: 100%;
        align-items: center;
        justify-content: center;
    }
    .split-map-selector,
    .input-single-column {
        width: min(100%, 320px);
        margin-left: auto !important;
        margin-right: auto !important;
    }
    .split-sidebar { width: 100%; position: static; max-height: none; }
    .quick-report-items { flex-direction: row; flex-wrap: wrap; justify-content: center; }
    .quick-report-item { min-width: 150px; }
}

@media (max-width: 768px) {
    .split-form { padding: 16px; }
    .input-single-column { max-width: 260px; }
    .split-result { padding: 12px; min-height: 140px; margin-bottom: 12px; }
    .split-difference { font-size: 0.76em; padding: 3px 7px; }
    .split-header { flex-direction: column; align-items: flex-start; gap: 8px; }
    .split-difference { align-self: flex-start; }
    .split-selection { width: 100%; }
    .teams-container {
        flex-direction: column;
        gap: 12px;
        margin-bottom: 10px;
    }

    .team:nth-child(1) { order: 1; }
    .vs {
        order: 2;
        min-width: 100%;
        margin: 8px 0;
        padding: 10px 0;
        border-top: 1px solid rgba(255, 223, 143, 0.2);
        border-bottom: 1px solid rgba(255, 223, 143, 0.2);
        font-size: 18px;
        writing-mode: horizontal-tb;
        text-align: center;
    }
    .team:nth-child(3) { order: 3; }

    .team { padding: 10px; }
    .team-header h4 { font-size: 0.95em; margin-bottom: 0; }
    .team-rating-inline { font-size: 0.74em; padding: 3px 6px; }
    .team-advantage {
        font-size: 14px;
    }
    .team-rating { font-size: 0.85em; margin-bottom: 6px; }
    .team-players li { padding: 5px 0; font-size: 0.85em; }
    .rating { padding: 2px 6px; font-size: 0.75em; }
    .confirm-split-btn-container { width: 90%; bottom: 16px; min-width: auto; padding: 10px; }
    .confirm-split-btn { padding: 12px 20px; font-size: 13px; }
    .split-sidebar { padding: 12px; }
    .sidebar-content h3 { font-size: 1em; }
    .quick-report-item { padding: 6px 10px; font-size: 0.8em; min-width: 140px; }
    .sidebar-btn { padding: 8px 12px; font-size: 11px; }
    .mode-switcher { gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
    .mode-btn { padding: 8px 16px; font-size: 13px; }
    #civ-plus-split-btn { padding: 6px 14px; min-height: 36px; }
    .additional-splits-btn { padding: 8px 14px; font-size: 12px; }
    .custom-dropdown { position: absolute; top: 100%; left: 0; right: 0; margin-left: 0; margin-top: 4px; min-width: auto; }
}

@media (max-width: 480px) {
    .input-single-column { max-width: 220px; }
    .input-single-column .player-input { padding: 12px 36px 12px 12px !important; font-size: 13px; }
    .split-result { padding: 10px; min-height: 130px; margin-bottom: 10px; }
    .split-difference { font-size: 0.74em; padding: 3px 7px; }
    .split-header { gap: 6px; }
    .teams-container {
        flex-direction: column;
        gap: 10px;
    }

    .vs {
        order: 2;
        min-width: 100%;
        margin: 6px 0;
        padding: 8px 0;
        border-top: 1px solid rgba(255, 223, 143, 0.2);
        border-bottom: 1px solid rgba(255, 223, 143, 0.2);
        font-size: 16px;
        writing-mode: horizontal-tb;
        text-align: center;
    }

    .team:nth-child(1) { order: 1; }
    .team:nth-child(3) { order: 3; }

    .confirm-split-btn-container { width: 95%; padding: 8px; }
    .confirm-split-btn { padding: 10px 16px; font-size: 12px; min-width: 180px; }
    .quick-report-items { flex-direction: column; align-items: center; }
    .quick-report-item { width: 100%; max-width: 220px; }
    .team-header { flex-direction: row; justify-content: space-between; }
    .team-advantage { font-size: 14px; }

    .mode-switcher {
        flex-direction: row;
        flex-wrap: nowrap;
        justify-content: center;
        gap: 6px;
        margin-bottom: 14px;
    }

    .mode-btn {
        flex: 1;
        max-width: 92px;
        min-width: 72px;
        padding: 7px 10px;
        font-size: 11px;
    }

    #civ-plus-split-btn,
    #civ-plus-player3-split-btn {
        max-width: 86px;
        min-height: 32px;
        padding: 5px 8px;
    }

    .sidebar-actions #civ-plus-split-btn,
    .sidebar-actions #civ-plus-player3-split-btn {
        max-width: none;
    }

    .mode-btn:not(.clear-btn):not(.additional-splits-btn) {
        order: 1;
    }

    .mode-btn.clear-btn {
        order: 2;
        margin-left: 0;
        flex: 1;
        max-width: 110px;
    }

    .additional-splits-btn {
        order: 3;
        flex: 1;
        max-width: 128px;
        font-size: 10px;
        padding: 7px 9px;
    }
}

@media (max-width: 360px) {
    .mode-btn {
        padding: 6px 7px;
        font-size: 10px;
        min-width: 64px;
    }

    .mode-btn.clear-btn {
        padding: 6px 7px;
        font-size: 10px;
    }

    .additional-splits-btn {
        font-size: 9px;
        padding: 6px 7px;
    }
}

/* Split cards: compact rosters, readable rating badges and a gold VS divider. */
.split-result .teams-container { gap: 20px; margin-bottom: 0; }
.split-result .team { min-width: 0; padding: 10px 16px; background: linear-gradient(150deg,rgba(8,17,29,.85),rgba(11,21,34,.78)); border-color: rgba(144,166,197,.13); }
.split-result .team-header { margin-bottom: 4px; padding-bottom: 7px; border-bottom: 1px solid rgba(144,166,197,.1); }
.split-result .team-players { margin-bottom: 0; }
.split-result .team-players li { min-height: 32px; gap: 12px; padding: 4px 0; border-bottom-color: rgba(144,166,197,.1); }
.split-result .team-players li:last-child { padding-bottom: 0; }
.split-player-name { display: flex; align-items: center; gap: 12px; min-width: 0; color: #e2e8f1; }
.split-player-nickname { min-width: 0; overflow-wrap: anywhere; }
.split-player-icon { width: 16px; height: 16px; flex: 0 0 16px; color: #d7ddea; }
.split-result .team-players .rating { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; min-width: 52px; min-height: 24px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.2; box-shadow: inset 0 1px 0 rgba(255,255,255,.08),0 2px 6px rgba(0,0,0,.18); }
.split-result .rating.elite { background: linear-gradient(180deg,rgba(146,48,60,.50),rgba(104,30,41,.56)); border-color: rgba(237,119,132,.26); }
.split-result .rating.expert { background: linear-gradient(180deg,rgba(111,56,66,.38),rgba(78,40,49,.44)); border-color: rgba(211,125,137,.25); }
.split-result .rating.advanced { background: linear-gradient(180deg,rgba(140,83,23,.50),rgba(96,54,13,.54)); border-color: rgba(235,154,66,.26); }
.split-result .rating.intermediate { background: linear-gradient(180deg,rgba(140,98,23,.50),rgba(96,62,13,.54)); border-color: rgba(235,181,66,.26); }
.split-result :is(.split-player-icon.elite, .rating.elite) { color: #ff9a9a; }
.split-result :is(.split-player-icon.expert, .rating.expert) { color: #dca5aa; }
.split-result :is(.split-player-icon.advanced, .rating.advanced) { color: #ffbd7a; }
.split-result :is(.split-player-icon.intermediate, .rating.intermediate) { color: #ffd869; }
.split-result :is(.split-player-icon.beginner, .rating.beginner) { color: #d7ddea; }
.split-result .team-rating-inline { padding: 4px 10px; color: #ffe08a; background: linear-gradient(180deg,rgba(255,224,138,.12),rgba(255,224,138,.04)); box-shadow: inset 0 1px 0 rgba(255,255,255,.06); font-variant-numeric: tabular-nums; }
.split-result .vs { flex-direction: column; gap: 10px; align-self: stretch; min-width: 58px; color: #ffda6b; font-size: 24px; }
.split-result .vs::before, .split-result .vs::after { content: ''; display: block; width: 1px; flex: 1; min-height: 22px; max-height: 52px; background: linear-gradient(to bottom,transparent,rgba(243,191,69,.85)); }
.split-result .vs::after { background: linear-gradient(to bottom,rgba(243,191,69,.85),transparent); }
@media (max-width: 768px) {
    .split-result .teams-container { gap: 10px; }
    .split-result .team { padding: 10px 12px; }
    .split-result .vs { flex-direction: row; align-self: center; width: 100%; min-width: 0; margin: 0; padding: 2px 0; border: 0; gap: 14px; font-size: 18px; }
    .split-result .vs::before, .split-result .vs::after { width: auto; height: 1px; min-height: 0; max-height: none; max-width: 90px; background: linear-gradient(to right,transparent,rgba(243,191,69,.85)); }
    .split-result .vs::after { background: linear-gradient(to right,rgba(243,191,69,.85),transparent); }
}
/* Quick overview: compact team cards, preserving the existing variant order. */
#split-page .split-sidebar { width: 340px; padding: 14px; }
#split-page .quick-report-items { padding-left: 0; gap: 9px; margin-bottom: 14px; }
#split-page .split-sidebar .quick-report-item {
    grid-template-columns: 50px minmax(0, 1fr);
    align-items: stretch;
    gap: 0 10px;
    width: 100%; min-width: 0; max-width: none; margin: 0;
    padding: 11px 10px;
    background: linear-gradient(145deg, rgba(31, 42, 61, .76), rgba(13, 21, 33, .82));
    border: 1px solid rgba(136, 162, 202, .22);
    border-radius: 12px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .025);
    font-size: 12px;
}
#split-page .split-sidebar .quick-report-item:hover {
    background: linear-gradient(145deg, rgba(41, 55, 78, .85), rgba(18, 28, 43, .9));
    border-color: rgba(159, 185, 225, .48);
}
#split-page .split-sidebar .quick-report-item.selected {
    border-color: #e6c575;
    box-shadow: 0 0 0 1px rgba(230, 197, 117, .18), 0 3px 14px rgba(0, 0, 0, .2);
}
#split-page .quick-report-item.selected::before { content: none; }
#split-page .quick-report-meta {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding-right: 9px;
    border-right: 1px solid rgba(131, 158, 201, .2);
}
#split-page .quick-report-rank {
    display: grid; place-items: center; width: 36px; height: 36px;
    border-radius: 50%; border: 1px solid rgba(114, 166, 255, .72);
    background: radial-gradient(circle at 35% 25%, rgba(82, 134, 233, .3), rgba(18, 29, 47, .8));
    color: #e2ebff; font-size: 16px;
    box-shadow: 0 0 8px rgba(62, 125, 255, .12);
}
#split-page .selected .quick-report-rank {
    color: #ffe59e; border-color: #d7b86c;
    background: rgba(213, 173, 73, .12);
}
#split-page .quick-report-item.team1-advantage .quick-report-rank {
    color: #d9e8ff;
    border-color: #5b95f5;
    background: radial-gradient(circle at 35% 25%, rgba(70, 126, 231, .4), rgba(18, 39, 73, .88));
    box-shadow: 0 0 9px rgba(62, 125, 255, .2);
}
#split-page .quick-report-item.team2-advantage .quick-report-rank {
    color: #ffdce0;
    border-color: #ef6575;
    background: radial-gradient(circle at 35% 25%, rgba(224, 76, 94, .38), rgba(71, 22, 34, .88));
    box-shadow: 0 0 9px rgba(229, 75, 94, .2);
}
#split-page .quick-report-item.even-teams .quick-report-rank {
    color: #fff0bd;
    border-color: #d7b86c;
    background: rgba(213, 173, 73, .12);
}
#split-page .quick-report-diff {
    flex-direction: column;
    justify-self: center;
    gap: 2px;
    font-size: 11px;
}
#split-page .quick-report-diff-label { color: #aebbd0; }
#split-page .quick-report-diff-value {
    height: 22px; min-width: 30px; padding: 0 6px;
    border-color: rgba(166, 190, 230, .2); background: rgba(126, 150, 191, .13);
    color: #e7edf8; font-size: 12px;
}
#split-page .medium-diff .quick-report-diff-value { color: #ffdc86; background: rgba(207, 160, 44, .14); }
#split-page .bad-diff .quick-report-diff-value { color: #ffa2a7; background: rgba(216, 73, 88, .17); }
#split-page .quick-report-chevron {
    position: absolute;
    top: 7px;
    right: 9px;
    color: #e1c46c;
    font-size: 25px;
    line-height: 1;
}
#split-page .quick-report-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
}
#split-page .quick-report-balance {
    --blue-share: 50%;
    display: block; width: 100%; height: 8px; margin-top: 8px; overflow: hidden;
    border-radius: 999px;
    background: linear-gradient(90deg,
        #3978e4 0%,
        #83b4ff calc(var(--blue-share) - 1.5%),
        #f56873 calc(var(--blue-share) + 1.5%),
        #b83c4b 100%);
    box-shadow: 0 0 0 1px rgba(149, 177, 220, .1);
}
#split-page .quick-report-teams {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    min-width: 0;
    padding-right: 17px;
}
#split-page .quick-report-team { color: #bac8dc; font-size: 11px; line-height: 1.3; }
#split-page .quick-report-team strong { display: block; font-size: 12px; font-variant-numeric: tabular-nums; }
#split-page .quick-report-team-blue strong { color: #82b5ff; }
#split-page .quick-report-team-red { min-width: 0; text-align: right; }
#split-page .quick-report-team-red strong { color: #f48c95; }
#split-page .quick-report-status {
    display: block;
    align-self: center;
    max-width: 100%;
    margin-top: 7px;
    padding: 3px 7px;
    overflow: hidden;
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(182, 138, 35, .7), rgba(103, 75, 14, .68));
    box-shadow: inset 0 1px 0 rgba(255, 229, 144, .22), 0 2px 8px rgba(0, 0, 0, .2);
    color: #ffe18a;
    font-size: 9px;
    line-height: 1.25;
    font-weight: 800;
    letter-spacing: .025em;
    text-align: center;
    text-overflow: ellipsis;
    text-transform: uppercase;
    white-space: nowrap;
}
#split-page .split-sidebar .sidebar-btn { border-radius: 9px; }
#split-page #split-overview-mode {
    color: #d8e1ef;
    font-size: .85em;
    font-weight: 600;
    white-space: nowrap;
}
#split-page .sidebar-actions .additional-splits-btn {
    width: 100%;
    max-width: none;
    min-width: 0;
    min-height: 40px;
    flex: none;
    order: 0;
}
#split-page .sidebar-actions-divider {
    height: 1px;
    margin: 10px 0 4px;
    background: linear-gradient(90deg, transparent, #c99735 10%, #f2cf75 50%, #c99735 90%, transparent);
    box-shadow: 0 0 8px rgba(226, 177, 66, .32);
}
#split-page .civ-plus-quick-modes[style*="display: none"] ~ .sidebar-actions-divider {
    display: none;
}
#split-page .civ-plus-quick-modes {
    width: 100%;
    padding-top: 7px;
}
#split-page .civ-plus-quick-modes h4 {
    margin: 0 0 12px;
    color: #f5d273;
    font-size: 17px;
    font-weight: 800;
    line-height: 1.2;
}
#split-page .civ-plus-quick-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}
#split-page .civ-plus-quick-mode {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 9px;
    min-width: 0;
    min-height: 60px;
    padding: 8px 10px;
    border: 1px solid rgba(112, 143, 179, .35);
    border-radius: 12px;
    background: linear-gradient(145deg, #111d2d, #0b1421);
    color: #e8edf5;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .035);
    cursor: pointer;
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.25;
    text-align: left;
    transition: border-color .2s, background .2s, box-shadow .2s;
}
#split-page .civ-plus-quick-mode small {
    display: block;
    margin-top: 2px;
    color: #b6c2d2;
    font-size: 11px;
    font-weight: 500;
}
#split-page .civ-plus-quick-icon {
    position: relative;
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
    overflow: hidden;
}
#split-page .civ-plus-quick-icon img {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 66px;
    height: 66px;
    max-width: none;
    transform: translate(-50%, -50%);
    object-fit: contain;
}
#split-page .civ-plus-quick-mode:hover:not(:disabled):not(.selected) {
    border-color: #e6b84f;
    box-shadow: 0 0 12px rgba(230, 184, 79, .22);
}
#split-page .civ-plus-quick-mode:focus-visible:not(.selected) {
    outline: 2px solid #94b9ee;
    outline-offset: 2px;
}
#split-page .civ-plus-quick-mode.selected {
    border-color: #e6b84f;
    background: linear-gradient(145deg, #4b3b1f, #221e18);
    box-shadow: 0 0 0 1px rgba(230, 184, 79, .65), 0 0 16px rgba(230, 184, 79, .35);
}
#split-page .civ-plus-quick-mode:disabled { opacity: .55; cursor: not-allowed; }
@media (max-width: 1024px) {
    #split-page .split-sidebar { width: 100%; }
    #split-page .quick-report-items { display: grid; grid-template-columns: repeat(auto-fit, minmax(205px, 1fr)); }
}
@media (max-width: 600px) {
    #split-page .split-sidebar { padding: 16px; }
    #split-page .sidebar-content h3 { margin-bottom: 14px; padding-bottom: 12px; font-size: 1.35em; }
    #split-page .quick-report-items { grid-template-columns: 1fr; gap: 14px; margin-bottom: 26px; }
    #split-page .split-sidebar .quick-report-item {
        grid-template-columns: 60px minmax(0, 1fr);
        gap: 0 12px;
        padding: 14px;
        border-radius: 14px;
    }
    #split-page .quick-report-meta { gap: 7px; padding-right: 12px; }
    #split-page .quick-report-rank { width: 44px; height: 44px; font-size: 20px; }
    #split-page .quick-report-diff { gap: 3px; font-size: 15px; }
    #split-page .quick-report-diff-value { height: 30px; min-width: 42px; font-size: 16px; }
    #split-page .quick-report-team { font-size: 15px; line-height: 1.3; }
    #split-page .quick-report-team strong { font-size: 19px; }
    #split-page .quick-report-balance { height: 12px; margin-top: 10px; }
    #split-page .quick-report-status { margin-top: 8px; padding: 4px 9px; font-size: 12px; }
    #split-page .quick-report-teams { padding-right: 22px; }
    #split-page .quick-report-chevron { top: 10px; right: 12px; font-size: 32px; }
    #split-page .split-sidebar .sidebar-btn { padding: 12px 14px; font-size: 16px; }
}
