html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

/* Keep the topic toolbar clear of the shared floating chat button. */
:root { --quick-chat-toggle-size: 3.5rem; }
html[data-bs-theme="dark"] .forum-compose-compact .forum-compose-surface { background:#293743 !important; border-color:#435563 !important; }
html[data-bs-theme="dark"] .forum-compose-compact .forum-compose-surface:focus-within { border-color:#76aace !important; }
html[data-bs-theme="dark"] .forum-compose-compact textarea { background:transparent !important; }
html[data-bs-theme="dark"] .forum-compose-compact .forum-attach { color:#bacbd7 !important; }
html[data-bs-theme="dark"] .forum-compose-compact .forum-attach:hover { background:#364957 !important; }
html[data-bs-theme="dark"] .forum-page .forum-post-icon { color:#bacbd7 !important; }
html[data-bs-theme="dark"] .forum-page .forum-post-icon:hover { background:#263946 !important; border-color:#435563 !important; }
html[data-bs-theme="dark"] .forum-page .forum-post-admin-panel { background:#202d38 !important; border-color:#435563 !important; }
@media (max-width: 420px) {
    :root { --quick-chat-toggle-size: 3.15rem; }
}

/* Shared website presence palette for profiles, messages and the Home grid. */
[data-presence-state="online"] { --presence-color: #33844d; }
[data-presence-state="recent"] { --presence-color: #287fd0; }
[data-presence-state="away"] { --presence-color: #d4ab00; }
[data-presence-state="idle"] { --presence-color: #df791e; }
[data-presence-state="offline"] { --presence-color: #96a5ae; }
[data-presence-state="inactive"] { --presence-color: #d34444; }
html[data-bs-theme="dark"] [data-presence-state="online"] { --presence-color: #65ba80; }
html[data-bs-theme="dark"] [data-presence-state="recent"] { --presence-color: #69adf0; }
html[data-bs-theme="dark"] [data-presence-state="away"] { --presence-color: #edcf54; }
html[data-bs-theme="dark"] [data-presence-state="idle"] { --presence-color: #f2a05b; }
html[data-bs-theme="dark"] [data-presence-state="inactive"] { --presence-color: #ef8585; }
html[data-bs-theme="dark"] .community-presence { color: #9baab5; }
html[data-bs-theme="dark"] .community-friend-icon { color: #a1c3db; background: #263946; border-color: #496373; }
html[data-bs-theme="dark"] .community-friend-icon.is-friend { color: #9bcdb1; background: #243b32; border-color: #4c7260; }
html[data-bs-theme="dark"] .community-friend-menu-actions { background: #202d38; border-color: #496373; }
html[data-bs-theme="dark"] .community-friend-menu-actions .btn { color: #dce6ed; border-color: #7f98aa; }
html[data-bs-theme="dark"] .community-friend-menu-actions .btn:hover { color: #fff; background: #3c5364; }
html[data-bs-theme="dark"] .profile-labels-row .reputation-label { color: #aebeca; }
html[data-bs-theme="dark"] .community-friend-icon:hover,
html[data-bs-theme="dark"] .community-friend-menu[open] > summary { background: #30495a; border-color: #7aa7c4; }

.profile-labels-row { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: .35rem .6rem; margin-bottom: .35rem; }
.profile-labels-row:empty { display: none; }
.profile-labels-row .profile-weapon-badge { margin-top: 0; }
.profile-reputation { display: inline-flex; align-items: center; white-space: nowrap; }
.profile-title-row { min-width: 0; }
.profile-title-row .profile-name { min-width: 0; overflow-wrap: anywhere; }
.profile-name .nickname-team img { width: 1.1em; height: 1.1em; min-width: 32px; min-height: 32px; max-width: 44px; max-height: 44px; }
.team-action-identity { display: inline-flex; align-items: center; max-width: 100%; }
.team-action-identity > button { flex: 1; min-width: 0; }
.forum-mention-picker .team-action-identity, .player-search-results .team-action-identity, .list-group > .team-action-identity { display: flex; width: 100%; }
.message-mention { display: inline; background: #e9f2f8; border-radius: 3px; padding: 0 .15rem; color: #316587; font-weight: 600; text-decoration: none; overflow-wrap: anywhere; }
.message-mention a { color: inherit; text-decoration: none; }
.group-chat-mention-picker { max-height: 140px; overflow-y: auto; border: 1px solid var(--bs-border-color, #c8d8e3); border-radius: 6px; background: var(--bs-body-bg, white); }
.group-chat-mention-picker button { display: block; border: 0; background: transparent; color: inherit; width: 100%; text-align: left; padding: .4rem .6rem; font-size: .85rem; overflow-wrap: anywhere; }
.group-chat-mention-picker button:hover, .group-chat-mention-picker button:focus, .group-chat-mention-picker button.is-active { background: var(--bs-tertiary-bg, #e8f2f8); }
.message-mention:hover, .message-mention:focus-within { background: #dbeaf5; text-decoration: underline; }
html[data-bs-theme="dark"] .message-mention { background: #263946; color: #9dd5f4; }
html[data-bs-theme="dark"] .message-mention:hover, html[data-bs-theme="dark"] .message-mention:focus-within { background: #344b5a; }
.profile-title-row .player-community-identity { margin: 0; }
@media (min-width: 768px), (max-width: 575.98px) {
    .profile-labels-row { justify-content: flex-start; }
}

html {
    color-scheme: light;
}

/* Preserve transparent emblems across avatar, table and chat surfaces. */
html [data-team-emblem] {
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    object-fit: contain;
}
html[data-bs-theme="light"] [data-team-emblem] {
    filter: drop-shadow(.4px 0 0 #243746b3)
            drop-shadow(-.4px 0 0 #243746b3)
            drop-shadow(0 .4px 0 #243746b3)
            drop-shadow(0 -.4px 0 #243746b3);
}

/* Shared JavaScript dialogs live outside page containers and follow either theme. */
.site-dialog {
    width: min(30rem, calc(100% - 2rem));
    max-width: calc(100% - 2rem);
    max-height: calc(100dvh - 2rem);
    margin: auto;
    padding: 1.25rem;
    overflow: auto;
    overscroll-behavior: contain;
    border: 1px solid var(--bs-border-color, #dee2e6);
    border-radius: .65rem;
    background: var(--bs-body-bg, #fff);
    color: var(--bs-body-color, #212529);
    box-shadow: 0 1rem 3rem #0005;
    overflow-wrap: anywhere;
}
.site-dialog:not([open]) { display: none; }
.site-dialog::backdrop { background: #0009; }
.site-dialog-form, .site-dialog-fields { display: grid; gap: 1rem; }
.site-dialog-form h2 { margin: 0; font-size: 1.25rem; font-weight: 700; }
.site-dialog-message { margin: 0; white-space: pre-wrap; }
.site-dialog-fields { margin: 0; padding: 0; border: 0; min-width: 0; }
.site-dialog-fields .form-check { margin: 0; }
.site-dialog .form-control { min-width: 0; font-size: 1rem; }
.site-dialog-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .75rem; }
.site-dialog-actions .btn { min-height: 44px; min-width: 4.5rem; }
body:has(.site-dialog[open]) { overflow: hidden; }
html[data-bs-theme="dark"] .site-dialog { background: var(--bs-tertiary-bg); border-color: var(--site-control-border); }

html[data-bs-theme="dark"] .match-page { --match-border:#344757; --match-muted:#abbcca; --match-surface:#1b2a37; --match-soft:#243745; }
html[data-bs-theme="dark"] {
    color-scheme: dark;
    --bs-body-bg: #111820;
    --bs-body-bg-rgb: 17, 24, 32;
    --bs-body-color: #d5dde4;
    --bs-body-color-rgb: 213, 221, 228;
    --bs-secondary-bg: #1a252f;
    --bs-tertiary-bg: #202d38;
    --bs-border-color: #364754;
    --bs-secondary-color: #9baab5;
    --bs-link-color: #78b7df;
    --bs-link-color-rgb: 120, 183, 223;
    --bs-link-hover-color: #a4d3ef;
    --bs-link-hover-color-rgb: 164, 211, 239;
    --site-link-color: #91c5e6;
    --community-role-ink: #e4ebf1;
    --community-role-strength: 35%;
    --site-control-border: #718a9d;
    --site-focus-color: #9ac8e6;
    --site-percentile-top: #efa3a8;
    --site-percentile-high: #f0d88f;
    --site-percentile-middle: #94c9aa;
    --site-percentile-low: #91c5e6;
    --site-percentile-bottom: #bacbd7;
}

/* Pair dark fills with their own readable foregrounds, including interaction states. */
html[data-bs-theme="dark"] :is(.btn-primary, .btn-outline-primary) {
    --site-action-bg: #315f82; --site-action-hover: #3b6a8f;
    --site-action-text: #e7f1f7; --site-action-outline: #91c5e6;
}
html[data-bs-theme="dark"] :is(.btn-secondary, .btn-outline-secondary, .btn-light, .btn-white) {
    --site-action-bg: #364956; --site-action-hover: #415766;
    --site-action-text: #dde7ee; --site-action-outline: #bacbd7;
}
html[data-bs-theme="dark"] :is(.btn-success, .btn-outline-success) {
    --site-action-bg: #28543b; --site-action-hover: #326446;
    --site-action-text: #d5f0dd; --site-action-outline: #94c9aa;
}
html[data-bs-theme="dark"] :is(.btn-danger, .btn-outline-danger) {
    --site-action-bg: #723e46; --site-action-hover: #844b54;
    --site-action-text: #f7e5e7; --site-action-outline: #efa3a8;
}
html[data-bs-theme="dark"] :is(.btn-warning, .btn-outline-warning) {
    --site-action-bg: #584819; --site-action-hover: #695723;
    --site-action-text: #f2dfac; --site-action-outline: #f0d88f;
}
html[data-bs-theme="dark"] :is(.btn-info, .btn-outline-info) {
    --site-action-bg: #275461; --site-action-hover: #326371;
    --site-action-text: #e0eff4; --site-action-outline: #8ed3e3;
}
html[data-bs-theme="dark"] .btn:is(
    .btn-primary, .btn-secondary, .btn-success, .btn-danger, .btn-warning, .btn-info,
    .btn-outline-primary, .btn-outline-secondary, .btn-outline-success,
    .btn-outline-danger, .btn-outline-warning, .btn-outline-info, .btn-light, .btn-white
) {
    --bs-btn-color: var(--site-action-text);
    --bs-btn-bg: var(--site-action-bg);
    --bs-btn-border-color: var(--site-control-border);
    --bs-btn-hover-color: var(--site-action-text);
    --bs-btn-hover-bg: var(--site-action-hover);
    --bs-btn-hover-border-color: var(--site-action-outline);
    --bs-btn-active-color: var(--site-action-text);
    --bs-btn-active-bg: var(--site-action-hover);
    --bs-btn-active-border-color: var(--site-action-outline);
    --bs-btn-disabled-color: var(--site-action-text);
    --bs-btn-disabled-bg: var(--site-action-bg);
    --bs-btn-disabled-border-color: var(--site-control-border);
    color: var(--bs-btn-color) !important;
    background-color: var(--bs-btn-bg) !important;
    border-color: var(--bs-btn-border-color) !important;
}
html[data-bs-theme="dark"] .btn:is(.btn-outline-primary, .btn-outline-secondary, .btn-outline-success, .btn-outline-danger, .btn-outline-warning, .btn-outline-info) {
    --bs-btn-color: var(--site-action-outline);
    --bs-btn-bg: transparent;
}
html[data-bs-theme="dark"] .btn-link { --bs-btn-hover-color: #a4d3ef; --bs-btn-active-color: #a4d3ef; }
html[data-bs-theme="dark"] .btn:is(:hover, :focus-visible):not(:disabled) {
    color: var(--bs-btn-hover-color) !important;
    background-color: var(--bs-btn-hover-bg) !important;
    border-color: var(--bs-btn-hover-border-color) !important;
}
html[data-bs-theme="dark"] .btn:is(:active, .active, [aria-pressed="true"]):not(:disabled) {
    color: var(--bs-btn-active-color) !important;
    background-color: var(--bs-btn-active-bg) !important;
    border-color: var(--bs-btn-active-border-color) !important;
}
html[data-bs-theme="dark"] :is(.form-control, .form-select, .form-check-input) {
    background-color: #1a252f;
    color: #d5dde4;
    border-color: var(--site-control-border);
}
html[data-bs-theme="dark"] :is(.form-control, .form-select)::placeholder { color: #a8bbc9; opacity: 1; }
html[data-bs-theme="dark"] .form-check-input:checked { background-color: #315f82; border-color: #91c5e6; }
html[data-bs-theme="dark"] .form-control::file-selector-button { background: #364956; color: #dde7ee; }
html[data-bs-theme="dark"] .form-control:hover:not(:disabled)::file-selector-button { background: #415766; }
html[data-bs-theme="dark"] :is(.btn, .btn-link.nav-link, .form-control, .form-select, .form-check-input):focus {
    box-shadow: 0 0 0 .1rem #111820, 0 0 0 .25rem var(--site-focus-color);
}
html[data-bs-theme="dark"] :is(a[href], button, input, select, textarea, summary, [tabindex]:not([tabindex="-1"])):focus-visible {
    outline: 2px solid var(--site-focus-color);
    outline-offset: 3px;
}
html[data-bs-theme="dark"] .nav-pills {
    --bs-nav-pills-link-active-bg: #315f82;
    --bs-nav-pills-link-active-color: #e7f1f7;
}
html[data-bs-theme="dark"] .dropdown-menu {
    --bs-dropdown-bg: #202d38;
    --bs-dropdown-color: #d5dde4;
    --bs-dropdown-link-color: #d5dde4;
    --bs-dropdown-link-hover-color: #e7f1f7;
    --bs-dropdown-link-hover-bg: #30495a;
    --bs-dropdown-link-active-color: #e7f1f7;
    --bs-dropdown-link-active-bg: #315f82;
}
html[data-bs-theme="dark"] .pagination {
    --bs-pagination-bg: #18232d;
    --bs-pagination-color: #91c5e6;
    --bs-pagination-border-color: #486175;
    --bs-pagination-hover-bg: #30495a;
    --bs-pagination-hover-color: #e7f1f7;
    --bs-pagination-focus-bg: #30495a;
    --bs-pagination-focus-color: #e7f1f7;
    --bs-pagination-active-bg: #315f82;
    --bs-pagination-active-border-color: #91c5e6;
    --bs-pagination-active-color: #e7f1f7;
}
html[data-bs-theme="dark"] :is(.badge, .card-header):is(.bg-primary, .text-bg-primary) { background-color: #1d3546 !important; color: #b9d9ec !important; }
html[data-bs-theme="dark"] :is(.badge, .card-header):is(.bg-secondary, .text-bg-secondary) { background-color: #293743 !important; color: #bacbd7 !important; }
html[data-bs-theme="dark"] :is(.badge, .card-header):is(.bg-success, .text-bg-success) { background-color: #243b32 !important; color: #bfe6ca !important; }
html[data-bs-theme="dark"] :is(.badge, .card-header):is(.bg-danger, .text-bg-danger) { background-color: #452a30 !important; color: #efa3a8 !important; }
html[data-bs-theme="dark"] :is(.badge, .card-header):is(.bg-warning, .text-bg-warning) { background-color: #3b3218 !important; color: #f0dda3 !important; }
html[data-bs-theme="dark"] :is(.badge, .card-header):is(.bg-info, .text-bg-info) { background-color: #173647 !important; color: #b9d9ec !important; }

/* Data bars stay distinct from the track without neon fills or white stripes. */
html[data-bs-theme="dark"] .progress { --bs-progress-bg: #111820; --bs-progress-bar-bg: #3e6e8c; --bs-progress-bar-color: #f1f5f7; }
html[data-bs-theme="dark"] .progress-bar { color: #f1f5f7; }
html[data-bs-theme="dark"] .progress-bar.bg-primary { background-color: #3e6e8c !important; }
html[data-bs-theme="dark"] .progress-bar.bg-success { background-color: #427852 !important; }
html[data-bs-theme="dark"] .progress-bar.bg-info { background-color: #347587 !important; }
html[data-bs-theme="dark"] .progress-bar.bg-warning { background-color: #806937 !important; }
html[data-bs-theme="dark"] .progress-bar.bg-danger { background-color: #a95360 !important; }
html[data-bs-theme="dark"] .progress-bar.bg-secondary { background-color: #607082 !important; }
html[data-bs-theme="dark"] .progress-bar-striped { background-image: none; }
html[data-bs-theme="dark"] .progress-bar[style*="linear-gradient"] { background: #7558a0 !important; }
html[data-bs-theme="dark"] :is(.progress-bar.text-dark, .progress-bar .text-dark) { color: #f1f5f7 !important; }
html[data-bs-theme="dark"] hr { border-color: #364754; opacity: 1; }

/* Dashboard grids share the same surfaces, row states and readable metrics. */
html[data-bs-theme="dark"] .home-overview :is(
    .home-welcome, .home-activity, .home-fraggers, .home-popular-maps, .home-supporters,
    .activity-table, .fragger-table, .supporters-table, .duel-list
) { color: #d5dde4; }

html[data-bs-theme="dark"] .home-overview :is(
    .activity-window, .fragger-window, .maps-table-wrap, .supporters-table-wrap,
    .welcome-list, .duel-list
) { background: #18232d; border-color: #344753; }

html[data-bs-theme="dark"] .home-overview :is(.activity-window, .fragger-window) h3,
html[data-bs-theme="dark"] .home-overview :is(.activity-table, .fragger-table, .supporters-table) thead {
    background: #202d38;
    color: #b5cedf;
    border-color: #344753;
}

html[data-bs-theme="dark"] .home-overview :is(.activity-table, .fragger-table, .supporters-table) :is(th, td),
html[data-bs-theme="dark"] .home-overview :is(.welcome-member, .duel-row) { border-color: #344753; }
html[data-bs-theme="dark"] .home-overview .supporters-table th { color: #b5cedf; }
html[data-bs-theme="dark"] .home-overview :is(.activity-table, .fragger-table, .supporters-table) tbody tr:nth-child(even) { background: #1c2934; }
html[data-bs-theme="dark"] .home-overview .rating-table tbody tr:nth-child(even) { background: #1c2934; }
html[data-bs-theme="dark"] .home-overview :is(.activity-table, .fragger-table, .supporters-table) tbody tr:hover { background: #263946; }
html[data-bs-theme="dark"] .home-overview :is(.welcome-profile, .activity-player, .activity-map, .fragger-player, .supporters-member, .duel-details a) { color: #91c5e6; }
html[data-bs-theme="dark"] .home-overview :is(.activity-rank, .fragger-rank, .supporters-rank, .duel-details) { color: #a8bbc9; }
html[data-bs-theme="dark"] .home-overview :is(.time-column, .ratio-value, .duel-winner a, .duel-winner strong) { color: #94c9aa; }
html[data-bs-theme="dark"] .home-overview .activity-table tbody .time-column { color: #94c9aa; }
html[data-bs-theme="dark"] .home-overview .fragger-table tbody .kills-column { color: #91c5e6; }
html[data-bs-theme="dark"] .home-overview .headshot-value { color: #cea9de; }
html[data-bs-theme="dark"] .home-overview :is(.duel-loser a, .duel-loser strong) { color: #efa3a8; }
html[data-bs-theme="dark"] .home-overview .result-label { background: #243b32; color: #9bcdb1; }
html[data-bs-theme="dark"] .home-overview .rank-1 { background: #4a3b19; color: #f0d88f; }
html[data-bs-theme="dark"] .home-overview .rank-2 { background: #36424e; color: #d4dee8; }
html[data-bs-theme="dark"] .home-overview .rank-3 { background: #483327; color: #e4b48e; }
html[data-bs-theme="dark"] :is(.rank-badge.rank-1, .onevsone-rank-1) { background: #4a3b19; color: #f0d88f; }
html[data-bs-theme="dark"] :is(.rank-badge.rank-2, .onevsone-rank-2) { background: #36424e; color: #d4dee8; }
html[data-bs-theme="dark"] :is(.rank-badge.rank-3, .onevsone-rank-3) { background: #483327; color: #e4b48e; }
html[data-bs-theme="dark"] .table .text-muted { opacity: 1 !important; }
html[data-bs-theme="dark"] .custom-table img:not([data-team-emblem]) { background-color: #202d38 !important; }
html[data-bs-theme="dark"] .map-hero {
    --map-wash-start: rgba(17, 24, 32, 0.88);
    --map-wash-end: rgba(17, 24, 32, 0.75);
}
html[data-bs-theme="dark"] .map-hero :is(.opacity-75, .text-white-50) { color: #b5cedf !important; opacity: 1 !important; }
html[data-bs-theme="dark"] .home-overview :is(.welcome-avatar, .activity-player img, .fragger-player img, .supporters-member img) { background: #202d38; border-color: #486175; }
html[data-bs-theme="dark"] .home-overview .supporters-empty { background: #202d38; border-color: #344753; color: #a8bbc9; }

/* Legacy table variants and utility controls do not inherit Bootstrap's dark palette. */
html[data-bs-theme="dark"] .text-primary { color: #91c5e6 !important; }
html[data-bs-theme="dark"] .text-success { color: #94c9aa !important; }
html[data-bs-theme="dark"] .text-danger { color: #efa3a8 !important; }
html[data-bs-theme="dark"] .text-info { color: #8ed3e3 !important; }
html[data-bs-theme="dark"] .text-secondary { color: #a8bbc9 !important; }
html[data-bs-theme="dark"] :is(.table-primary, .table-info) { --bs-table-bg: #1d3546; }
html[data-bs-theme="dark"] .table-success { --bs-table-bg: #243b32; }
html[data-bs-theme="dark"] .table-warning { --bs-table-bg: #3b3218; }
html[data-bs-theme="dark"] .table-danger { --bs-table-bg: #452a30; }
html[data-bs-theme="dark"] .table-secondary { --bs-table-bg: #293743; }
html[data-bs-theme="dark"] :is(.table-primary, .table-info, .table-success, .table-warning, .table-danger, .table-secondary) {
    --bs-table-color: #d5dde4;
    --bs-table-border-color: #486175;
    --bs-table-striped-bg: #263946;
    --bs-table-striped-color: #d5dde4;
    --bs-table-active-bg: #30495a;
    --bs-table-active-color: #dce9f2;
    --bs-table-hover-bg: #30495a;
    --bs-table-hover-color: #dce9f2;
}

/* Staff, community and detail surfaces that have their own scoped light styles. */
html[data-bs-theme="dark"] :is(
    .command-server-choice, .command-selected-server, .cmd-card, .community-nav,
    .community-load-messages, .community-message.is-community-notification header,
    .forum-active-filter, .forum-composer summary, .forum-hero, .forum-post-author,
    .forum-mention-link, .forum-everyone-mention, .forum-mention-everyone-icon,
    .weapon-icon-box, .weapon-img-box, .body-hit-bar, .account-player-avatar
) { background: #202d38 !important; border-color: #486175 !important; color: #b5cedf !important; }
html[data-bs-theme="dark"] :is(.command-server-choice:hover:not(:disabled), .community-load-messages:hover:not(:disabled), .forum-load-messages:hover, .forum-mention-link:hover) { background: #263946 !important; }
html[data-bs-theme="dark"] :is(.command-server-picker h2, .command-selected-server h2, .community-nav a, .community-breadcrumb a) { color: #91c5e6 !important; }
html[data-bs-theme="dark"] :is(.command-server-picker > p, .command-server-choice small, .command-selected-server span, .community-empty, .community-info) { color: #a8bbc9 !important; }
html[data-bs-theme="dark"] :is(.command-ban-scope, .match-preview-note, .community-message-delete-confirmation) { background: #3b3218; border-color: #756322; color: #f0dda3; }
html[data-bs-theme="dark"] :is(.community-score, .match-intro > span, .vote-state.is-open, .ac-ready) { background: #243b32; border-color: #4c7260; color: #9bcdb1; }
html[data-bs-theme="dark"] :is(.match-pill, .ac-priority-1, .ac-review-new) { background: #1d3546; color: #91c5e6; }
html[data-bs-theme="dark"] :is(.ac-priority-3, .ac-strength-3) { background: #483327; color: #efb58b; }
html[data-bs-theme="dark"] :is(.ac-priority-2, .ac-strength-2, .ac-stale, .ac-review-watch) { background: #3b3218; color: #f0dda3; }
html[data-bs-theme="dark"] :is(.ac-priority-0, .ac-strength-1, .ac-strength-0, .ac-review-dismissed) { background: #293743; color: #bacbd7; }

html[data-bs-theme="dark"] .community-role-badge {
    background: color-mix(in srgb, var(--community-role-color, #64748b) 12%, #18232d);
    border-color: color-mix(in srgb, var(--community-role-color, #64748b) 30%, #486175);
    color: color-mix(in srgb, var(--community-role-color, #64748b) 35%, #e4ebf1);
}
html[data-bs-theme="dark"] :is(.community-online-name:not([style]), .weapon-name, .forum-context-label, .match-tabs a.active) { color: #91c5e6; }
html[data-bs-theme="dark"] :is(.account-page .section-heading > span, .advanced-stat-label, .match-private, .community-online-time, .forum-last-author) { color: #a8bbc9; }
html[data-bs-theme="dark"] .match-private { border-color: #486175; }
html[data-bs-theme="dark"] .bg-success-light { background: #243b32; border-color: #4c7260; color: #9bcdb1; }
html[data-bs-theme="dark"] .bg-danger-light { background: #452a30; border-color: #795057; color: #efa3a8; }
html[data-bs-theme="dark"] .bg-primary-subtle { background-color: #1d3546 !important; }
html[data-bs-theme="dark"] .player-profile-page .profile-avatar-image { background: #202d38; border-color: #486175 !important; }
html[data-bs-theme="dark"] .player-profile-page .team-stat-t { color: #efb58b !important; }
html[data-bs-theme="dark"] .player-profile-page .team-stat-ct { color: #91c5e6 !important; }
html[data-bs-theme="dark"] .site-navigation .site-nav-link.active { background: #30495a; color: #fff; }
html[data-bs-theme="dark"] .private-message-count { border-color: #18232d; }
html[data-bs-theme="dark"] .account-data > div { border-color: #364754; }
html[data-bs-theme="dark"] .statistics-page .card.bg-primary { background-color: #1d3546 !important; }
html[data-bs-theme="dark"] .statistics-page .card.bg-success { background-color: #243b32 !important; }
html[data-bs-theme="dark"] .statistics-page .card.bg-info { background-color: #173647 !important; }
html[data-bs-theme="dark"] .statistics-page .card.bg-warning { background-color: #3b3218 !important; }
html[data-bs-theme="dark"] .statistics-page .card-header[style*="linear-gradient"] { background: #293743 !important; color: #dce9f2 !important; }
html[data-bs-theme="dark"] :is(.bg-warning.text-dark:not(.progress-bar), .badge.bg-warning) { background-color: #3b3218 !important; color: #f0dda3 !important; }
html[data-bs-theme="dark"] :is(.private-chat-notice, .private-chat-alert) { background: #3b3218; border-color: #756322; color: #f0dda3; }
html[data-bs-theme="dark"] :is(.rule-title, .member-table details summary, .forum-member-controls summary, .community-inbox-latest a, .forum-load-messages) { color: #91c5e6 !important; }
html[data-bs-theme="dark"] .rule-content { color: #d5dde4; }
html[data-bs-theme="dark"] :is(.rule-number, .section-number) { background: #315f82; }
html[data-bs-theme="dark"] :is(
    .member-filters label, .forum-member-controls label, .member-control-status, .cmd-card label,
    .member-control-help, .member-alert-help, .member-alert-total,
    .account-kicker, .admin-involvement, .forum-topic-group,
    .forum-context-excerpt, .forum-context-label > span, .community-message-preview,
    .community-inbox-latest, .community-message header, .community-delivery-status,
    .community-thread-note, .community-message time,
    .screenshot-source, .server-address-card > span, .server-metric > span, .score-divider
) { color: #a8bbc9 !important; }
html[data-bs-theme="dark"] :is(.community-notification-label, .community-notification-actor) { color: #94c9aa !important; }
html[data-bs-theme="dark"] .community-avatar,
html[data-bs-theme="dark"] .community-page .community-avatar,
html[data-bs-theme="dark"] .forum-page .forum-member-avatar,
html[data-bs-theme="dark"] .forum-online-members .community-online-avatar { background: #202d38; border-color: #486175; }
html[data-bs-theme="dark"] .community-page .community-section-heading { background: #1d3546; color: #e7f1f7; }
html[data-bs-theme="dark"] .community-page :is(.community-status, .community-meta, .community-note, .community-pagination) { color: #a8bbc9; }
html[data-bs-theme="dark"] .community-page .community-meta a { color: #91c5e6; }
html[data-bs-theme="dark"] .community-page .community-status.is-friend { color: #94c9aa; }
html[data-bs-theme="dark"] :is(.community-friend-icon, .community-friend-menu-actions) { background: #202d38; color: #91c5e6; border-color: #718a9d; }
html[data-bs-theme="dark"] .community-friend-icon.is-friend { background: #243b32; color: #94c9aa; border-color: #718a9d; }
html[data-bs-theme="dark"] .community-friend-icon:hover,
html[data-bs-theme="dark"] .community-friend-menu[open] > summary { background: #263946; border-color: #91c5e6; }
html[data-bs-theme="dark"] :is(.history-event-time, .history-event-title code) { color: #a8bbc9; }
html[data-bs-theme="dark"] .history-details { color: #d5dde4; }
html[data-bs-theme="dark"] .installation-screenshots figure { background: #18232d; border-color: #344753; }
html[data-bs-theme="dark"] .online-steps code { color: #e0a9a9; }
html[data-bs-theme="dark"] .link-secondary { color: #a8bbc9 !important; }
html[data-bs-theme="dark"] .badge.bg-info { background-color: #173647 !important; color: #b9d9ec; }
html[data-bs-theme="dark"] :is(.cs-guide-page .btn-primary, .home-overview .connect-button) { background: #315f82; border-color: #6398bc; }
html[data-bs-theme="dark"] :is(.cs-guide-page .btn-primary:hover, .home-overview .connect-button:hover) { background: #274e6d; }
html[data-bs-theme="dark"] .cs-guide-page .btn-success { background: #296847; border-color: #5d9c77; }
html[data-bs-theme="dark"] .cs-guide-page .btn-success:hover { background: #215538; }
html[data-bs-theme="dark"] .player-profile-page .nav-pills .nav-link { color: #a8bbc9; }
html[data-bs-theme="dark"] .player-profile-page .nav-pills .nav-link.active { background: #1d3546; color: #91c5e6; border-color: #6398bc; }
html[data-bs-theme="dark"] .account-player .profile-tab { color: #a8bbc9; }
html[data-bs-theme="dark"] .account-player .profile-tab.active { color: #e7f1f7; background: #315f82; }
html[data-bs-theme="dark"] .account-player .profile-tab:hover { color: #dce9f2; background: #263946; }
html[data-bs-theme="dark"] .community-page .community-notification-action a { color: #94c9aa; text-decoration: underline; }
html[data-bs-theme="dark"] .match-page .team-marker { color: #91c5e6; background: #1d3546; }
html[data-bs-theme="dark"] .match-page .team-b .team-marker { color: #f0d88f; background: #3b3218; }
html[data-bs-theme="dark"] .manual-eyebrow { color: #91c5e6; }
html[data-bs-theme="dark"] :is(.alert-light, .alert-secondary) { background: #202d38; color: #d5dde4; border-color: #486175; }
html[data-bs-theme="dark"] .forum-page details > summary { color: #91c5e6; }

html[data-bs-theme="dark"] body {
    background: #111820;
    color: #d5dde4;
}

html[data-bs-theme="dark"] :is(.sidebar, .site-navigation) {
    background-image: linear-gradient(180deg, #213747 0%, #192d3b 50%, #12232f 100%) !important;
    border-color: #314b5c !important;
}

html[data-bs-theme="dark"] :is(.account-page, .forum-page, .community-page, .account-player, .home-overview, .download-page) {
    color: #d5dde4 !important;
}

html[data-bs-theme="dark"] :is(
    .account-heading h1, .account-data dd, .account-action-row strong, .section-heading h2,
    .forum-page h1, .forum-topic-title, .community-page-heading, .community-person-name,
    .profile-name, .home-overview h1, .home-overview h2, .download-page h1, .download-page h2
) {
    color: #dce9f2 !important;
}

html[data-bs-theme="dark"] :is(
    .account-heading p, .account-action-row p, .account-data dt,
    .forum-page .forum-note, .forum-page .forum-meta, .community-note, .community-meta
) {
    color: #93a4b0 !important;
}

html[data-bs-theme="dark"] :is(
    .account-section, .forum-new-topic, .forum-discussion-row, .forum-card, .forum-composer,
    .forum-conversation, .forum-post, .community-board, .community-message,
    .profile-header, .profile-tabs-card, .server-panel, .welcome-grid
) {
    background: #18232d !important;
    border-color: #344753 !important;
}

html[data-bs-theme="dark"] :is(
    .account-page .section-heading, .forum-new-topic-settings, .forum-section-heading, .forum-topic-columns,
    .forum-context, .forum-reply, .forum-search-summary, .community-info, .community-person-row,
    .community-search, .community-inbox-row, .community-adjust-form, .community-player-panel,
    .community-conversation-heading, .roles-section,
    .notification-settings-choice, .section-empty, .status-message
) {
    background: #202d38 !important;
    border-color: #364b59 !important;
}

html[data-bs-theme="dark"] :is(.forum-discussion-row:hover, .community-inbox-row:hover, .welcome-profile:hover, .profile-tab:hover) {
    background: #223440 !important;
}

html[data-bs-theme="dark"] .reputation-widget .reputation-count { color: #94c9aa; }
html[data-bs-theme="dark"] .browser-notification-settings {
    background: #18232d;
    color: #d5dde4;
    border-color: #456070;
}

html[data-bs-theme="dark"] .notification-settings-header {
    background: #202d38;
    border-color: #364b59;
}

html[data-bs-theme="dark"] .notification-settings-header h2 {
    color: #dce9f2;
}

html[data-bs-theme="dark"] :is(.notification-settings-kicker, .notification-settings-privacy, .notification-settings-choice small) {
    color: #a8bbc9;
}

html[data-bs-theme="dark"] .notification-settings-body .notification-settings-status {
    color: #a8bbc9 !important;
}

html[data-bs-theme="dark"] .notification-settings-close {
    color: #dce9f2;
    background: #18232d;
    border-color: #456070;
}

html[data-bs-theme="dark"] :is(.table-hover, .custom-table, .custom-leaderboard) tbody tr:hover,
html[data-bs-theme="dark"] :is(.table-hover, .custom-table, .custom-leaderboard) tbody tr:hover > * {
    --bs-table-accent-bg: #263946;
    --bs-table-hover-bg: #263946;
    background-color: #263946 !important;
    color: inherit;
}

html[data-bs-theme="dark"] :is(.list-group-item-action:hover, .list-group-item-action:focus, .dropdown-item:hover, .dropdown-item:focus) {
    background-color: #263946 !important;
    color: #dce9f2 !important;
}

html[data-bs-theme="dark"] .forum-discussion-row.has-unread,
html[data-bs-theme="dark"] .community-inbox-row.has-unread {
    background: #1d3546 !important;
}

html[data-bs-theme="dark"] .forum-discussion-row:not(.has-unread),
html[data-bs-theme="dark"] .community-inbox-row:not(.has-unread) {
    background: #18232d !important;
}

html[data-bs-theme="dark"] :is(.forum-poll, .forum-poll-option, .forum-poll-result, .forum-poll-builder-fields) {
    background: #202d38 !important;
    border-color: #3c5362 !important;
}

html[data-bs-theme="dark"] :is(.forum-poll-heading h2, .forum-poll-option-line strong) {
    color: #d4e7f3 !important;
}

html[data-bs-theme="dark"] .forum-poll-mode { background:#2b4353; color:#b9d8e9; }
html[data-bs-theme="dark"] .forum-poll-meter { background:#344653; }

html[data-bs-theme="dark"] .forum-new-replies {
    color: #87c5ec !important;
}

html[data-bs-theme="dark"] :is(.table, .card, .list-group-item, .form-control, .form-select) {
    --bs-table-bg: transparent;
    --bs-card-bg: #18232d;
    --bs-list-group-bg: #18232d;
}

html[data-bs-theme="dark"] .home-overview {
    --home-border: #344753;
    --home-heading: #dce9f2;
    --home-muted: #93a4b0;
}

html[data-bs-theme="dark"] .home-overview .server-panel::before {
    background: linear-gradient(100deg, #18232deb 0%, #18232de0 42%, #18232d99 100%);
}

html[data-bs-theme="dark"] .match-page .event-card::before {
    background: linear-gradient(100deg, #18232deb 0%, #18232de0 42%, #18232d99 100%);
}

html[data-bs-theme="dark"] .match-page .event-hero {
    --event-heading: #9cd4ec;
    --event-muted: #c1d3df;
    --event-panel: #18232ddb;
    --event-border: #486175;
    --event-wash: linear-gradient(100deg, #18232deb 0%, #18232de0 42%, #18232d99 100%);
}

html[data-bs-theme="dark"] .home-overview .server-metrics {
    background: #18232ddb;
    border-color: #486175;
}

html[data-bs-theme="dark"] .home-overview :is(.server-address code, .map-name, .time-left, .player-count) { color: #d1e0eb; }
html[data-bs-theme="dark"] .home-overview .next-map { color: #73818c; }
html[data-bs-theme="dark"] .home-overview .players-ct { color: #8bc7f0; }
html[data-bs-theme="dark"] .home-overview .players-t { color: #efa3a8; }
html[data-bs-theme="dark"] .home-overview .team-score { background: #18232de6; border-color: #486175; }
html[data-bs-theme="dark"] .home-overview .score-ct { color: #8bc7f0; }
html[data-bs-theme="dark"] .home-overview .score-t { color: #efa3a8; }
html[data-bs-theme="dark"] .home-server-trend { background: #18232d; border-color: #486175; color: #b5cedf; }
html[data-bs-theme="dark"] .home-server-trend :is(.trend-time, .trend-now) { color: #b5cedf; }
html[data-bs-theme="dark"] .home-server-trend .trend-status { color: #a4b3bf; }
html[data-bs-theme="dark"] .home-overview .server-state { color: #88d5a7; }

html[data-bs-theme="dark"] .home-forum-loading {
    border-color: #334a5b;
    background: #1d2b36;
    color: #a8bac7;
}

html[data-bs-theme="dark"] :is(
    .welcome-empty, .welcome-member:nth-child(even), .duel-row:nth-child(even),
    .section-tag, .duels-section .section-tag
) {
    background: #202d38 !important;
    border-color: #364b59 !important;
    color: #d5dde4 !important;
}

html[data-bs-theme="dark"] :is(.leader-table, .rating-table) > :not(caption) > * > * {
    background-color: #18232d !important;
    border-color: #344753 !important;
    color: #d5dde4 !important;
}

html[data-bs-theme="dark"] :is(.leader-table, .rating-table) thead,
html[data-bs-theme="dark"] :is(.leader-table, .rating-table) thead > tr > * {
    background-color: #202d38 !important;
}

html[data-bs-theme="dark"] :is(.leader-table, .rating-table) tbody tr:nth-child(even) > * {
    background-color: #1c2934 !important;
}

html[data-bs-theme="dark"] .leader-table tbody tr:hover > * {
    background-color: #223440 !important;
}

html[data-bs-theme="dark"] .rating-member {
    color: #91c5e6;
}

html[data-bs-theme="dark"] .server-address button {
    background: #202d38 !important;
    border-color: #3b5261 !important;
    color: #91c5e6 !important;
}

html[data-bs-theme="dark"] .server-address button:hover {
    background: #263946 !important;
}

html[data-bs-theme="dark"] .occupancy {
    background: #2e414f !important;
}

html[data-bs-theme="dark"] :is(
    [style*="color: #2c5e85"], [style*="color:#2c5e85"],
    [style*="color: #1a3c57"], [style*="color:#1a3c57"]
) {
    color: #dce9f2 !important;
    text-shadow: none !important;
}

html[data-bs-theme="dark"] .bg-white {
    background-color: #202d38 !important;
}

html[data-bs-theme="dark"] .bg-light {
    background-color: #202d38 !important;
}

html[data-bs-theme="dark"] :is(.text-bg-light, .btn-light) {
    background-color: #202d38 !important;
    border-color: #3b5261 !important;
    color: #d5dde4 !important;
}

html[data-bs-theme="dark"] .text-dark {
    color: #d5dde4 !important;
}

html[data-bs-theme="dark"] .text-muted {
    color: #93a4b0 !important;
}

html[data-bs-theme="dark"] .card {
    background-color: #18232d;
    border-color: #344753 !important;
}

html[data-bs-theme="dark"] .table {
    --bs-table-color: #d5dde4;
    --bs-table-border-color: #344753;
    --bs-table-striped-color: #d5dde4;
    --bs-table-striped-bg: #1c2934;
    --bs-table-hover-color: #dce9f2;
    --bs-table-hover-bg: #223440;
}

html[data-bs-theme="dark"] .table-light {
    --bs-table-color: #d5dde4;
    --bs-table-bg: #202d38;
    --bs-table-border-color: #344753;
}

html[data-bs-theme="dark"] .table thead th {
    background-color: #202d38 !important;
    border-color: #344753 !important;
    color: #91c5e6 !important;
}

html[data-bs-theme="dark"] .alert-primary {
    background: #142d50 !important;
    border-color: #315b8a !important;
    color: #c8dcf2 !important;
}

html[data-bs-theme="dark"] .alert-info {
    background: #173647 !important;
    border-color: #2b6075 !important;
    color: #b9d9ec !important;
}

html[data-bs-theme="dark"] .alert-success {
    background: #173725 !important;
    border-color: #2c6640 !important;
    color: #bfe6ca !important;
}

html[data-bs-theme="dark"] .alert-warning {
    background: #3b3218 !important;
    border-color: #756322 !important;
    color: #f0dda3 !important;
}

html[data-bs-theme="dark"] .input-group-text {
    background-color: #202d38 !important;
    border-color: #3b5261 !important;
}

html[data-bs-theme="dark"] .custom-leaderboard thead th {
    background-color: #202d38 !important;
    border-color: #344753 !important;
    color: #91c5e6 !important;
}

html[data-bs-theme="dark"] .custom-leaderboard tbody tr:hover > * {
    background-color: #223440 !important;
}

html[data-bs-theme="dark"] .player-name-link {
    color: #91c5e6 !important;
}

html[data-bs-theme="dark"] :is(
    .cs-guide-page .settings-section, .cs-guide-page .setting-card,
    .cs-guide-page .reference-card
) {
    background: #18232d !important;
    border-color: #344753 !important;
    color: #d5dde4 !important;
}

html[data-bs-theme="dark"] .cs-guide-page .setting-card {
    background: #202d38 !important;
    border-left-color: #5b9bd1 !important;
}

html[data-bs-theme="dark"] .cs-guide-page :is(.section-title, .setting-card h3, .reference-card h3) {
    color: #dce9f2 !important;
}

html[data-bs-theme="dark"] :is(
    .download-hero, .download-option-card, .installation-card, .compatibility-card,
    .server-address-card, .requirements-grid div, .faq-list article
) {
    background: #18232d !important;
    border-color: #344753 !important;
    color: #d5dde4 !important;
}

html[data-bs-theme="dark"] .download-hero {
    background: linear-gradient(135deg, #1c2b36 0%, #18232d 58%, #20293a 100%) !important;
}

html[data-bs-theme="dark"] .cheating-votes-page { color: #d5dde4; }
html[data-bs-theme="dark"] .cheating-votes-page .cheating-votes-hero {
    background: linear-gradient(135deg, #172532 0%, #1b2a36 58%, #1c3140 100%);
    border-color: #3c596c;
}
html[data-bs-theme="dark"] .cheating-votes-page :is(.cheating-votes-hero h1, .nomination-composer h2, h2, .nomination-player h3 a) {
    color: #dce9f2;
}
html[data-bs-theme="dark"] .cheating-votes-page :is(.cheating-votes-intro, .nomination-meta, .vote-result-labels, .closed-note, .vote-lock-note) {
    color: #9baab5;
}
html[data-bs-theme="dark"] .cheating-votes-page .cheating-votes-eyebrow { color: #82b7da; }
html[data-bs-theme="dark"] .cheating-votes-page .cheating-votes-privacy {
    background: #183027;
    border-color: #365e4b;
    color: #c4e2d1;
}
html[data-bs-theme="dark"] .cheating-votes-page .privacy-icon { background: #244839; }
html[data-bs-theme="dark"] .cheating-votes-page .player-search-results {
    background: #18232d;
    border-color: #3c5261;
}
html[data-bs-theme="dark"] .cheating-votes-page .player-search-result { border-color: #314451; }
html[data-bs-theme="dark"] .cheating-votes-page .player-search-result:is(:hover, :focus-visible, .is-selected) { background: #263946; }
html[data-bs-theme="dark"] .cheating-votes-page .player-search-name small { color: #9baab5; }
html[data-bs-theme="dark"] .cheating-votes-page .selected-player {
    background: #183027;
    border-color: #365e4b;
}
html[data-bs-theme="dark"] .cheating-votes-page .selected-player-copy small { color: #9ebaaa; }
html[data-bs-theme="dark"] .cheating-votes-page .player-search-wrap .form-control::placeholder { color: #a8bbc9; }
html[data-bs-theme="dark"] .cheating-votes-page .vote-question { color: #c8d5dd; }
html[data-bs-theme="dark"] .cheating-votes-page .report-decision {
    background: #382719;
    border-color: #a76326;
    border-left-color: #f39a46;
    color: #ffb66e;
}
html[data-bs-theme="dark"] .cheating-votes-page .closed-note {
    background: #263745;
    color: #c8d5dd;
}
html[data-bs-theme="dark"] .cheating-votes-page .vote-button {
    background: #202d38;
    border-color: #425563;
    color: #d5dde4;
}
html[data-bs-theme="dark"] .cheating-votes-page .vote-yes:is(:hover, .is-selected) {
    background: #1c3b2a;
    border-color: #4f9569;
    color: #bce0c8;
}
html[data-bs-theme="dark"] .cheating-votes-page .vote-no:is(:hover, .is-selected) {
    background: #412523;
    border-color: #bc6862;
    color: #efbfbb;
}
html[data-bs-theme="dark"] .cheating-votes-page .vote-result { background: #344653; }
html[data-bs-theme="dark"] .cheating-votes-page .owner-vote-details {
    background: #202d38;
    border-color: #425563;
}
html[data-bs-theme="dark"] .cheating-votes-page .owner-vote-details summary { color: #9ac8e9; }
html[data-bs-theme="dark"] .cheating-votes-page .owner-vote-body { border-color: #425563; }

html[data-bs-theme="dark"] :is(
    .download-page, .download-intro, .download-option-card p, .download-option-list,
    .download-option-note, .download-page .section-heading p
) {
    color: #b7c4cc !important;
}

html[data-bs-theme="dark"] :is(
    .download-eyebrow, .download-option-kicker, .download-hero h1,
    .download-option-card h2, .download-page .section-heading h2,
    .installation-card h3, .compatibility-card h3, .server-address-card h3,
    .faq-list h3, .requirements-grid dt
) {
    color: #dce9f2 !important;
}

html[data-bs-theme="dark"] :is(.download-jump-links a, .community-icon) {
    background: #202d38 !important;
    border-color: #3b5261 !important;
    color: #91c5e6 !important;
}

html[data-bs-theme="dark"] :is(.installation-follow-up, .tip-box, .safety-note) {
    background: #2d2a1d !important;
    border-color: #6d6134 !important;
    color: #e8ddb8 !important;
}

html[data-bs-theme="dark"] .classiccs-servers {
    background: linear-gradient(180deg, transparent 0%, #16232d 14%, #16232d 86%, transparent 100%) !important;
}

html[data-bs-theme="dark"] .server-address-card code {
    background: #111820 !important;
    border-color: #344753 !important;
    color: #e0a9a9 !important;
}

.server-detail-page .server-player-state {
    display: inline-block;
    width: 0.5rem;
    height: 0.5rem;
    flex-shrink: 0;
    border: 2px solid currentColor;
    border-radius: 50%;
}

.server-detail-page .server-player-state-alive { background: currentColor; color: #166534; }
.server-detail-page .server-player-state-dead { background: transparent; color: #687786; }

html[data-bs-theme="dark"] .server-detail-page { --server-dead-name-opacity: 0.8; }
html[data-bs-theme="dark"] .server-detail-page .server-player-state-alive { color: #9fe0b5; }
html[data-bs-theme="dark"] .server-detail-page .server-player-state-dead { color: #aab8c2; }

html[data-bs-theme="dark"] .server-detail-page .server-detail-hero {
    background-color: #18232d !important;
}

html[data-bs-theme="dark"] .server-detail-page .server-detail-map-overlay {
    --server-map-wash-start: rgba(17, 24, 32, 0.93);
    --server-map-wash-end: rgba(17, 24, 32, 0.72);
    opacity: 1 !important;
}

html[data-bs-theme="dark"] .server-detail-page .server-detail-score {
    background: #1d3546;
    color: #e7f1f7 !important;
}

html[data-bs-theme="dark"] .server-detail-page .server-detail-score .opacity-75 {
    color: #b5cedf;
    opacity: 1 !important;
}

html[data-bs-theme="dark"] .server-detail-page .server-count-t { color: #efa3a8 !important; }
html[data-bs-theme="dark"] .server-detail-page .server-count-ct { color: #91c5e6 !important; }
html[data-bs-theme="dark"] .server-detail-page .alias-muted { color: #bacbd7; }
html[data-bs-theme="dark"] .server-detail-page .hover-link:hover { color: #a4d3ef !important; }

html[data-bs-theme="dark"] .server-detail-page .log-pill {
    background: #202d38;
    color: #d5dde4;
    border-color: #486175;
}
html[data-bs-theme="dark"] .server-detail-page .log-connect { background: #243b32; color: #94c9aa; }
html[data-bs-theme="dark"] .server-detail-page .log-disconnect { background: #452a30; color: #efa3a8; }
html[data-bs-theme="dark"] .server-detail-page .log-map { background: #3b3218; color: #f0dda3; }
html[data-bs-theme="dark"] .server-detail-page .log-say { background: #1d3546; color: #91c5e6; }
html[data-bs-theme="dark"] .server-detail-page .log-sayteam { background: #342647; color: #c6a9ed; }
html[data-bs-theme="dark"] .server-detail-page .log-mapvote { background: #173647; color: #8ed3e3; }
html[data-bs-theme="dark"] .server-detail-page .log-admin { background: #483327; color: #efb58b; }

html[data-bs-theme="dark"] .server-detail-page .server-detail-badge {
    background: rgba(24, 35, 45, 0.9) !important;
    border-color: #4a6576 !important;
    color: #dce9f2 !important;
}

html[data-bs-theme="dark"] .server-detail-page .server-team-header {
    background: #202d38 !important;
    border-bottom: 1px solid #344753 !important;
}

html[data-bs-theme="dark"] .server-detail-page .server-team-header-t {
    color: #ff9898 !important;
}

html[data-bs-theme="dark"] .server-detail-page .server-team-header-ct {
    color: #91c5e6 !important;
}

html[data-bs-theme="dark"] .server-detail-page .player-table tbody td {
    border-color: #344753 !important;
}

html[data-bs-theme="dark"] .server-detail-page .dropdown-map-item:hover {
    background: #263946 !important;
}

html[data-bs-theme="dark"] .player-profile-page .skill-meter {
    background: #202d38 !important;
    border-color: #3b5261 !important;
}

html[data-bs-theme="dark"] .player-profile-page .profile-tabs-card {
    background: #18232d !important;
    border-color: #344753 !important;
}

html[data-bs-theme="dark"] .player-profile-page .profile-tabs .profile-tab {
    background: #202d38 !important;
    border-color: #3b5261 !important;
    color: #aab8c2 !important;
}

html[data-bs-theme="dark"] .player-profile-page .profile-tabs .profile-tab:hover:not(.active) {
    background: #263946 !important;
    border-color: #58768a !important;
    color: #dce9f2 !important;
}

html[data-bs-theme="dark"] .player-profile-page .profile-tabs .profile-tab:is(.active, [aria-pressed="true"]) {
    background: #315f82 !important;
    border-color: #6fa0c8 !important;
    color: #fff !important;
}

html[data-bs-theme="dark"] .player-profile-page :is(.weapon-icon-box, .body-hit-bar, .log-pill) {
    background: #202d38 !important;
    border-color: #3b5261 !important;
    color: #d5dde4 !important;
}

html[data-bs-theme="dark"] .player-profile-page .nav-pills .nav-link:hover:not(.active) {
    background: #263946 !important;
}

html[data-bs-theme="dark"] .contact-admins-page .admin-card {
    background: #202d38 !important;
    border-color: #344753 !important;
    color: #d5dde4 !important;
}

html[data-bs-theme="dark"] .contact-admins-page .admin-card a h2:hover {
    color: #a4d3ef !important;
}

html[data-bs-theme="dark"] .supporters-page .donor-item {
    background: #202d38 !important;
    border: 1px solid #344753;
    color: #d5dde4 !important;
}

html[data-bs-theme="dark"] :is(.forum-online-members, .forum-online-heading) {
    background: #18232d !important;
    border-color: #344753 !important;
}

html[data-bs-theme="dark"] .forum-online-heading {
    background: #202d38 !important;
}

html[data-bs-theme="dark"] :is(.forum-online-heading h2, .forum-online-count, .forum-online-empty, .forum-online-pagination) {
    color: #aab8c2 !important;
}

html[data-bs-theme="dark"] :is(
    .forum-member-controls details[open], .forum-quoted-post,
    .forum-markdown pre, .forum-link-embed, .reaction-picker-trigger,
    .reaction-choices, .forum-compose-quote, .forum-mention-picker,
    .forum-mention-option, .forum-compose-mentions > span,
    .forum-owner-content, .forum-pin-order button,
    .reaction-actors-toggle, .reaction-actors-retry,
    .reaction-actors-pages button, .reaction-actors-panel
) {
    background: #202d38 !important;
    border-color: #3b5261 !important;
    color: #d5dde4 !important;
}

html[data-bs-theme="dark"] .forum-link-embed:hover {
    background: #263946 !important;
}

html[data-bs-theme="dark"] :is(.forum-link-embed-kicker, .forum-link-embed-address, .forum-selected-files) {
    color: #93a4b0 !important;
}

html[data-bs-theme="dark"] :is(.forum-mention-caption, .forum-mention-option:hover, .forum-mention-option:focus-visible) {
    background: #263946 !important;
    color: #d5dde4 !important;
}

html[data-bs-theme="dark"] .quick-chat {
    color: #d5dde4;
}

html[data-bs-theme="dark"] .quick-chat-panel {
    background: #18232d;
    border-color: #3b5261;
    box-shadow: 0 5px 25px #05090d73;
}

html[data-bs-theme="dark"] .quick-chat-header {
    background: linear-gradient(#213747, #192d3b);
    border-color: #3b5261;
}

html[data-bs-theme="dark"] :is(.quick-chat-title, .quick-chat-author a) {
    color: #dce9f2;
}

html[data-bs-theme="dark"] :is(.quick-chat-subtitle, .quick-chat-time, .quick-chat-edited, .quick-chat-count, .quick-chat-empty) {
    color: #93a4b0;
}

html[data-bs-theme="dark"] .quick-chat-minimize {
    background: #202d38;
    border-color: #4a6576;
    color: #b9d9ec;
}

html[data-bs-theme="dark"] .quick-chat-history {
    background: #111820;
}

html[data-bs-theme="dark"] .quick-chat-message {
    background: #202d38;
    border-color: #344753;
}

html[data-bs-theme="dark"] .quick-chat-message.is-mine {
    background: #1d3546;
    border-color: #4a6576;
}

html[data-bs-theme="dark"] .quick-chat-avatar {
    background: #263946;
    border-color: #4a6576;
}

html[data-bs-theme="dark"] :is(.quick-chat-hide, .quick-chat-edit) {
    color: #9baab5;
}

html[data-bs-theme="dark"] .quick-chat-hide:hover {
    color: #f0aaa5;
}

html[data-bs-theme="dark"] .quick-chat-edit:hover {
    color: #a4d3ef;
}

html[data-bs-theme="dark"] .reaction-pill {
    color: #b9d9ec;
    background: #263946;
}

html[data-bs-theme="dark"] .forum-page .forum-conversation .forum-post-footer { --message-meta-color: #93a4b0; }
html[data-bs-theme="dark"] .quick-chat-message-footer { --message-meta-color: #93a4b0; }

html[data-bs-theme="dark"] .reaction-pill:hover {
    color: #dce9f2;
}

html[data-bs-theme="dark"] .reaction-pill.is-mine { border-color: #5f91b0; }

html[data-bs-theme="dark"] :is(.quick-chat-reaction-picker, .quick-chat-owner-actions) {
    background: #18232d;
    border-color: #4a6576;
    color: #b9d9ec;
}

html[data-bs-theme="dark"] .quick-chat-reaction-choice.is-mine {
    background: #21435a;
    border-color: #5f91b0;
    color: #dce9f2;
}

html[data-bs-theme="dark"] .quick-chat-action {
    color: #b9d9ec;
}

html[data-bs-theme="dark"] :is(.quick-chat-action:hover, .quick-chat-action[aria-expanded="true"], .quick-chat-owner-menu[open] > summary, .quick-chat-reaction-choice:hover) {
    background: #263946;
    border-color: #5f7d90;
}

html[data-bs-theme="dark"] :is(.quick-chat-edit-form label, .quick-chat-compose label) {
    color: #b7c4cc;
}

html[data-bs-theme="dark"] :is(
    .quick-chat-edit-form textarea, .quick-chat-recovered-edit textarea,
    .quick-chat-compose textarea, .quick-chat-mention-picker
) {
    background: #111820;
    border-color: #3b5261;
    color: #d5dde4;
}

html[data-bs-theme="dark"] .quick-chat textarea::placeholder {
    color: #a8bbc9;
    opacity: 1;
}

html[data-bs-theme="dark"] .quick-chat-input-row { background: #293743; border-color: #435563; }
html[data-bs-theme="dark"] .quick-chat-input-row:focus-within { border-color: #76aace; }
html[data-bs-theme="dark"] .quick-chat-compose textarea { background: transparent; }

html[data-bs-theme="dark"] :is(.quick-chat-cancel-edit, .quick-chat-dismiss-edit) {
    background: #202d38;
    border-color: #4a6576;
    color: #b9d9ec;
}

html[data-bs-theme="dark"] .quick-chat-edit-error {
    color: #f0b0aa;
}

html[data-bs-theme="dark"] .quick-chat-recovered-edit {
    background: #252d20;
    border-color: #56634b;
}

html[data-bs-theme="dark"] .quick-chat-recovered-edit p {
    color: #bdc9ad;
}

html[data-bs-theme="dark"] .quick-chat-notice {
    background: #3b3218;
    border-color: #756322;
    color: #f0dda3;
}

html[data-bs-theme="dark"] .quick-chat-error {
    background: #3b2424;
    border-color: #754040;
    color: #f0b0aa;
}

html[data-bs-theme="dark"] .quick-chat-compose {
    background: #18232d;
    border-color: #3b5261;
}

html[data-bs-theme="dark"] .quick-chat-compose textarea:disabled {
    background: #202d38;
}

html[data-bs-theme="dark"] .quick-chat-readonly {
    background: #202d38;
    border-color: #3b5261;
    color: #aab8c2;
}

html[data-bs-theme="dark"] .quick-chat-reply {
    color: #91c5e6;
}

html[data-bs-theme="dark"] .quick-chat-quote {
    background: #182c39;
    border-color: #5f879f;
    color: #a9c4d5;
}

html[data-bs-theme="dark"] .quick-chat-mention-picker button {
    color: #d5dde4;
}

html[data-bs-theme="dark"] :is(.quick-chat-mention-picker button:hover, .quick-chat-mention-picker button:focus) {
    background: #263946;
}

html[data-bs-theme="dark"] .quick-chat-unread {
    border-color: #111820;
}

html[data-bs-theme="dark"] :is(.member-muted-status, .owner-delete-warning) {
    background: #3b3218 !important;
    border-color: #756322 !important;
    color: #f0dda3 !important;
}
html[data-bs-theme="dark"] .forum-page .forum-post-remove-panel {
    border-color: #8f5d55;
    background: #3c2c2a;
    color: #efc5bd;
}

a, .btn-link {
    color: var(--site-link-color, #006bb7);
}

html[data-bs-theme="dark"] .player-profile-page .advanced-details summary { color: #91c5e6; }

html[data-bs-theme="dark"] .contact-admins-page .card-header { background: #1d3546 !important; color: #e7f1f7 !important; }
html[data-bs-theme="dark"] .contact-admins-page .admin-involvement { opacity: 1; }
html[data-bs-theme="dark"] .cs-guide-page .pro-tip-card { background: #293743; color: #d5dde4; }
html[data-bs-theme="dark"] .match-page .lineup-slot.is-moving { opacity: 0.8; }
html[data-bs-theme="dark"] .cheating-votes-page :is(.player-search-result img, .nomination-player > img) { background: #202d38; border-color: #486175; }
html[data-bs-theme="dark"] .cheating-votes-page .vote-result { background: #111820; }
html[data-bs-theme="dark"] .cheating-votes-page .vote-result-yes { background: #427852; }
html[data-bs-theme="dark"] .cheating-votes-page .vote-result-no { background: #a95360; }

.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

.content {
    padding-top: 1.1rem;
}

h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}

/* Prevent the whole page from horizontal scrolling */
html, body {
    overflow-x: hidden;
}

/* The main content area in the default Blazor template */
main, article, .content {
    min-width: 0; /* important for flex layouts */
}

/* Only the table area scrolls horizontally */
.table-x {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

    /* Ensure table can be wider than the viewport */
    .table-x > table {
        min-width: max-content; /* forces table to keep its natural width */
    }

    /* Optional: keep header cells from wrapping on mobile */
    .table-x th, .table-x td {
        white-space: nowrap;
    }

@keyframes pulse-animation {
    0% {
        transform: scale(0.95);
        opacity: 1;
    }

    70% {
        transform: scale(1.2);
        opacity: 0.7;
    }

    100% {
        transform: scale(0.95);
        opacity: 1;
    }
}

.status-indicator {
    animation: pulse-animation 2s infinite;
}

.map-image-container {
    width: 60px;
    height: 40px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-color: #5b8fb9;
    flex-shrink: 0;
    border-radius: 4px; /* Optional: gives it a slightly modern rounded look */
    transition: transform 0.2s ease-in-out;
    cursor: pointer;
}

/* The zoom effect looks best if it stays inside the bounds of the cell */
tr:hover .map-image-container {
    transform: scale(1.1);
}

.custom-table a span {
    letter-spacing: 0.3px;
}

.weapon-icon-container {
    width: 100px;
    height: 40px;
    flex-shrink: 0;
    transition: transform 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.page-container {
    /* mobile / tablet: edge-to-edge */
    padding-left: 0 !important;
    padding-right: 0 !important;
    padding-top: 1.5rem;
    padding-bottom: 1.5rem;
}

@media (min-width: 992px) {
    .page-container {
        /* desktop only */
        padding-left: 2rem;
        padding-right: 1.5rem;
    }
}

html[data-bs-theme="dark"] .message-history-panel { background:#18232d; border-color:#4a6576; color:#b9d9ec; }
html[data-bs-theme="dark"] .history-content-link { color: #8ecdf4; }

/* Restored Discord invitation surfaces. */
html[data-bs-theme="dark"] :is(.discord-hero, .community-card, .classiccs-link-card, .discord-final-cta) {
    background: #18232d !important;
    border-color: #344753 !important;
    color: #d5dde4 !important;
}
html[data-bs-theme="dark"] .discord-hero {
    background: linear-gradient(135deg, #1c2b36 0%, #18232d 58%, #20293a 100%) !important;
}
html[data-bs-theme="dark"] :is(.discord-page, .discord-intro, .discord-external-note, .discord-page .section-heading p, .classiccs-link-card span) {
    color: #b7c4cc !important;
}
html[data-bs-theme="dark"] :is(.discord-eyebrow, .discord-hero h1, .discord-page .section-heading h2, .discord-final-cta h2, .community-card h3, .classiccs-link-card strong) {
    color: #dce9f2 !important;
}
