.game-info-modal { --roles-surface: var(--ui-canvas, #f4f6ff); --roles-card: var(--ui-surface, #fff); --roles-ink: var(--ui-ink, #202b55); --roles-muted: var(--ui-muted, #64748b); --roles-border: var(--ui-line, #dce2f1); --roles-soft: var(--ui-primary-soft, #eef1ff); text-align: start; }
.game-info-modal .modal-dialog { max-width: 680px; margin: 1.5rem auto; padding: 0 .75rem; }
.game-info-modal .modal-content { border: 0; border-radius: 18px; overflow: hidden; background: var(--roles-surface); color: var(--roles-ink); box-shadow: 0 1.5rem 4rem #17203340; max-height: calc(100vh - 3rem); max-height: calc(100dvh - 3rem); }
.game-info-modal .modal-header { flex-shrink: 0; align-items: center; gap: .75rem; border: 0; padding: 1.15rem 1.25rem; color: #fff; background: radial-gradient(circle at 8% 10%, #ffffff29, transparent 28%), linear-gradient(135deg, #202b55, #3549a8 58%, #5268d9); }
.game-info-modal .modal-title { order: 1; margin: 0 !important; color: inherit; font-size: 1.1rem; font-weight: 700; }
.game-info-modal :is(#msgModalIcon, .game-info-modal__icon) { display: grid; place-items: center; flex: 0 0 42px; height: 42px; border: 1px solid #ffffff3d; border-radius: 12px; background: #ffffff1c; font-size: 1.2rem !important; margin: 0 !important; }
.game-info-modal .modal-header .btn-close { order: 2; margin: 0 auto 0 0; padding: .4rem .6rem; border-radius: 8px; filter: invert(1) grayscale(100%) brightness(220%); opacity: .9; }
.game-info-modal .modal-header .btn-close:hover { background-color: #ffffff26; opacity: 1; }
.game-info-modal .modal-body { overflow-y: auto; overscroll-behavior: contain; padding: 1rem 1.25rem 1.25rem; min-height: 0; }
.game-info-modal .modal-footer:empty { display: none; }
.game-info-modal :is(#msgModalIcon, .game-info-modal__icon) i { color: inherit; }
.game-players__summary { margin: 0 0 .85rem; color: var(--roles-muted); font-size: .8rem; }
.game-players__list { display: grid; gap: .6rem; margin: 0; padding: 0; list-style: none; }
.game-players__row { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; gap: .75rem; align-items: center; padding: .75rem; border: 1px solid var(--roles-border); border-radius: 12px; background: var(--roles-card); }
.game-players__number { display: grid; place-items: center; min-height: 36px; border-radius: 10px; background: var(--roles-soft); color: var(--roles-ink); font-weight: 700; }
.game-players__identity { display: grid; gap: .25rem; min-width: 0; overflow-wrap: anywhere; }
.game-players__identity strong { font-size: .9rem; }
.game-players__final-role { color: var(--roles-muted); font-size: .8rem; }
.game-players__status { padding: .2rem .5rem; border-radius: 999px; background: #e9f7ee; color: #17613b; font-size: .75rem; white-space: nowrap; }
.game-players__row.is-out .game-players__identity strong { color: var(--roles-muted); }
.game-players__row.is-out .game-players__status { background: #fff0f1; color: #942b35; }
.game-players__empty { color: var(--roles-muted); }
.game-description-modal .modal-body > div { padding: 1rem; border: 1px solid var(--roles-border); border-radius: 12px; background: var(--roles-card); font-size: .9rem; line-height: 2; overflow-wrap: anywhere; }
.game-description-modal .modal-body p { margin: 0 0 .75rem; white-space: pre-line; }
.game-description-modal .modal-body p:last-child { margin-bottom: 0; }
.game-team-members { padding-top: 1rem; margin-top: 1rem; border-top: 1px solid var(--roles-border); }
.game-team-members h6 { color: var(--roles-ink); font-size: .9rem; font-weight: 700; margin-bottom: .75rem; }
.game-team-members table { width: 100%; }
.game-team-members thead, .game-team-members tbody { border-color: var(--roles-border); background: var(--roles-card); }
.game-team-members th, .game-team-members td { padding: .5rem; border-bottom: 1px solid var(--roles-border); color: var(--roles-ink); overflow-wrap: anywhere; }
.game-team-members th { background: var(--roles-soft); }
.game-news-modal .news-timeline__body { padding: 0; }
.game-news-modal .news-period { padding: .9rem; margin-bottom: .8rem; border: 1px solid var(--roles-border); border-radius: 12px; background: var(--roles-card); }
.game-news-modal .news-period:last-child { margin-bottom: 0; border-bottom: 1px solid var(--roles-border); }
.game-news-modal .news-period__title { display: inline-flex; padding: .3rem .65rem; border-radius: 999px; background: #fff3d8; color: #80580c; font-size: .85rem; }
.game-news-modal .news-period--night .news-period__title { background: #e8ecfc; color: #3549a8; }
.game-news-modal .news-period__items { padding: 0; list-style: none; }
.game-news-modal .news-line { padding: .55rem .65rem; margin: .4rem 0 0; border-radius: 9px; font-size: .85rem; }
.game-news-modal .news-line:not(:where(.news-line--entry, .news-line--exit, .news-line--personal)) { background: var(--roles-soft); }
.game-news-modal .news-timeline__empty { color: var(--roles-muted); }
.game-news-modal .news-line.news-line--fresh {
    background: color-mix(in srgb, var(--ui-phase) 24%, var(--roles-card));
}
.game-news-modal.is-breaking-news #msgModalIcon { color: #ffe6a5; background: #ffdf7626; }
.automatic-game-news-overlay {
    inline-size: 100%;
    max-inline-size: none;
    max-block-size: 100dvh;
    margin: 0 auto;
    padding: 0;
    border: 0;
    background: transparent;
}
.automatic-game-news-overlay.fade .modal-dialog {
    transform: translateY(-50px);
    transition: transform .3s ease-out;
}
.automatic-game-news-overlay.show .modal-dialog { transform: none; }
.automatic-game-news-overlay::backdrop {
    background: color-mix(in srgb, var(--bs-black) 45%, transparent);
    opacity: 0;
    transition: opacity .15s linear;
}
.automatic-game-news-overlay.show::backdrop { opacity: 1; }
@media (prefers-reduced-motion: reduce) {
    .automatic-game-news-overlay.fade .modal-dialog,
    .automatic-game-news-overlay::backdrop { transition: none; }
}
body:has(> .automatic-game-news-overlay[open]) { overflow: hidden; }
.game-roles__summary { margin: 0 0 .85rem; color: var(--roles-muted); font-size: .8rem; }
.game-roles__list { display: grid; gap: .65rem; }
.game-roles__card { --team-color: #705a9b; --team-tint: #705a9b12; min-width: 0; border: 1px solid var(--roles-border); border-inline-start: 3px solid var(--team-color); border-radius: 12px; background: var(--roles-card); }
.game-roles__card[data-team=citizen] { --team-color: #2272b4; --team-tint: #2272b412; }
.game-roles__card[data-team=mafia] { --team-color: #b83f52; --team-tint: #b83f5212; }
.game-roles__toggle { display: grid; grid-template-columns: 38px minmax(0, 1fr) auto 14px; align-items: center; gap: .75rem; width: 100%; padding: .85rem; border: 0; border-radius: 10px; background: transparent; color: var(--roles-ink); text-align: right; cursor: pointer; }
.game-roles__toggle:hover { background: var(--roles-soft); }
.game-roles__team-icon { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; background: var(--team-tint); color: var(--team-color); }
.game-roles__identity { display: grid; gap: .25rem; min-width: 0; }
.game-roles__identity strong { font-size: .9rem; overflow-wrap: anywhere; }
.game-roles__team { font-size: .75rem; color: var(--roles-muted); }
.game-roles__count { padding: .25rem .55rem; border: 1px solid var(--roles-border); border-radius: 999px; background: var(--roles-soft); font-size: .75rem; white-space: nowrap; }
.game-roles__chevron { font-size: .7rem; color: var(--roles-muted); transition: transform .2s ease; }
.game-roles__toggle[aria-expanded=true] .game-roles__chevron { transform: rotate(180deg); }
.game-roles__description-content { margin: 0 .85rem; padding: .85rem 0; border-top: 1px solid var(--roles-border); font-size: .85rem; line-height: 2; white-space: pre-line; overflow-wrap: anywhere; }
.game-roles__empty { margin: 0; color: var(--roles-muted); }
.game-info-modal button:focus-visible { outline: 2px solid #8c9eea; outline-offset: 2px; }
.night-theme .game-info-modal { --roles-surface: #403332; --roles-card: #524440; --roles-ink: #f7ece6; --roles-muted: #d2bfb7; --roles-border: #7b6a63; --roles-soft: #66524a; }
.night-theme .game-info-modal .modal-header { background: radial-gradient(circle at 8% 10%, #ffffff29, transparent 28%), linear-gradient(135deg, #2f2326, #3e2e2a 58%, #524747); }
.night-theme .game-roles__card[data-team=citizen] { --team-color: #8ec7f4; --team-tint: #8ec7f418; }
.night-theme .game-roles__card[data-team=mafia] { --team-color: #f5a0ae; --team-tint: #f5a0ae18; }
.night-theme .game-info-modal .news-line--entry, .night-theme .game-players__status { background: #284a38; color: #bde8cb; }
.night-theme .game-info-modal .news-line--exit, .night-theme .game-players__row.is-out .game-players__status { background: #572f38; color: #ffd1d8; }
.night-theme .game-news-modal .news-line--personal { background: #304558; color: #d0e8ff; }
.night-theme .game-news-modal .news-period__title { background: #66513b; color: #ffe0a6; }
.night-theme .game-news-modal .news-period--night .news-period__title { background: #574c67; color: #e4d6ff; }
@media (max-width: 575.98px) {
    .game-info-modal .modal-dialog { margin: .65rem auto; padding: 0 .5rem; }
    .game-info-modal .modal-content { max-height: calc(100vh - 1.3rem); max-height: calc(100dvh - 1.3rem); border-radius: 14px; }
    .game-info-modal .modal-header, .game-info-modal .modal-body { padding: .85rem; }
    .game-roles__toggle { grid-template-columns: 32px minmax(0, 1fr) auto 12px; padding: .7rem; gap: .5rem; }
    .game-roles__team-icon { width: 32px; height: 34px; }
    .game-roles__count { padding: .2rem .4rem; }
}
@media (prefers-reduced-motion: reduce) { .game-roles__chevron { transition: none; } }
.game-description-modal[data-team=mafia] {
    --roles-surface: #fff3f4;
    --roles-card: #fffafb;
    --roles-ink: #622537;
    --roles-muted: #8a5b66;
    --roles-border: #edc8ce;
    --roles-soft: #f7e1e6;
    --description-header: linear-gradient(135deg, #501c2a, #9e304b 58%, #b74c62);
}
.game-info-modal.game-description-modal[data-team=mafia] .modal-header {
    background: radial-gradient(circle at 8% 10%, #ffffff29, transparent 28%), var(--description-header);
}
.game-description-modal[data-team=mafia] button:focus-visible { outline-color: #db8498; }
.night-theme .game-description-modal[data-team=mafia] {
    --roles-surface: #3e252c;
    --roles-card: #4d2f38;
    --roles-ink: #ffe8ed;
    --roles-muted: #dfb4bf;
    --roles-border: #87545f;
    --roles-soft: #653d49;
    --description-header: linear-gradient(135deg, #35151f, #602331 58%, #7e2e41);
}
.game-info-modal .modal-footer { flex-shrink: 0; gap: .5rem; padding: .85rem 1.25rem; border: 0; background: var(--roles-card); }
.game-info-modal .modal-footer .btn { margin: 0; min-height: 40px; border-radius: 10px; padding: .45rem 1rem; }
.game-info-modal .modal-body { line-height: 1.9; overflow-wrap: anywhere; }
.game-error-modal .modal-header { background: linear-gradient(135deg, #7d293c, #b53b54); }
.game-confirm-modal .modal-header { background: linear-gradient(135deg, #6c4b20, #9a7138); }
.game-info-modal .btn-secondary, .game-info-modal .btn-light { background: var(--roles-soft); color: var(--roles-ink); border-color: var(--roles-border); }
.game-polling-modal .table { color: var(--roles-ink); background: var(--roles-card); border-radius: 10px; overflow: hidden; }
.game-polling-modal .table th, .game-polling-modal .table td { border-color: var(--roles-border); vertical-align: middle; }
.game-polling-modal .table thead { background: var(--roles-soft); }
.game-polling-modal .table tbody { background: var(--roles-card); }
.game-polling-modal .table-hover tbody tr:hover { background: var(--roles-soft); color: var(--roles-ink); }
.game-polling-modal .form-control { min-width: 4rem; color: var(--roles-ink); background: var(--roles-surface); border-color: var(--roles-border); border-radius: 8px; }
.game-polling-modal .btn { border-radius: 10px; min-height: 40px; }
.night-theme .game-error-modal .modal-header { background: linear-gradient(135deg, #552331, #793447); }
.night-theme .game-confirm-modal .modal-header { background: linear-gradient(135deg, #4b3928, #705434); }
.night-theme .game-info-modal .alert-danger { background: #572f38; color: #ffd1d8; border-color: #87545f; }
.night-theme .game-info-modal .alert-info { background: #304558; color: #d0e8ff; border-color: #52708b; }
.night-theme .game-info-modal .btn-primary { background: #6575bc; border-color: #8291cf; }
.night-theme .game-info-modal .btn-danger { background: #a73d52; border-color: #c9677c; }
.night-theme .player-management-modal .player-management { color: var(--roles-ink); }
.night-theme .player-management-modal .player-management__summary > span,
.night-theme .player-management-modal .player-management__number,
.night-theme .player-management-modal .player-management__close { background: var(--roles-soft); color: var(--roles-ink); border-color: var(--roles-border); }
.night-theme .player-management-modal .player-management__summary .player-management__count--active { background: #284a38; color: #bde8cb; }
.night-theme .player-management-modal .player-management__row,
.night-theme .player-management-modal .player-management__search .form-control,
.night-theme .player-management-modal #managedPlayersNoResults { background: var(--roles-card); color: var(--roles-ink); border-color: var(--roles-border); }
.night-theme .player-management-modal .player-management__row.is-out { background: var(--roles-surface); }
.night-theme .player-management-modal .player-management__status,
.night-theme .player-management-modal .player-management__search > i { color: var(--roles-muted); }
.night-theme .player-management-modal .is-active .player-management__status { color: #bde8cb; }
.night-theme .player-management-modal .player-management__action--eliminate { background: #572f38; color: #ffd1d8; border-color: #87545f; }
.night-theme .player-management-modal .player-management__action--revive { background: #284a38; color: #bde8cb; border-color: #517761; }
