html[data-performance-mode="performance"] {
    --ui-backdrop-rune-blur: 0px;
    --ui-backdrop-rune-opacity: 0.18;
    --ui-backdrop-rune-peak-opacity: 0.24;
    --scene-twilight-blur: 0px;
    --scene-twilight-animation-duration: 0s;
}

html[data-performance-mode="balanced"] {
    --ui-backdrop-rune-blur: 2px;
    --ui-backdrop-rune-opacity: 0.36;
    --ui-backdrop-rune-peak-opacity: 0.46;
    --scene-twilight-blur: 1px;
}

body.balanced-performance-mode .ui-backdrop-video:not(.ui-backdrop-video--static-frame) {
    display: none !important;
}

body.balanced-performance-mode .artifact-interface::before,
body.balanced-performance-mode .player-portrait-hud.is-twilight-layer img,
body.balanced-performance-mode .npc-portrait-hud.is-twilight-layer img {
    animation-duration: 12s !important;
    filter: none !important;
}

body.balanced-performance-mode .material-slot[data-item-rarity="легендарный"]::before,
body.balanced-performance-mode .material-slot[data-item-rarity="мифический"]::before,
body.balanced-performance-mode .anvil-slot,
body.balanced-performance-mode .combatant-delta-badge {
    animation: none !important;
}

body.balanced-performance-mode #combat-log .combat-log-entry.combat-log-bubble::after,
body.balanced-performance-mode .combat-log .combat-log-entry.combat-log-bubble::after,
body.balanced-performance-mode .combatant-card::before {
    animation-duration: 22s !important;
    opacity: 0.16 !important;
}

body.low-performance-mode .ui-backdrop-video:not(.ui-backdrop-video--static-frame),
body.low-performance-mode .ui-backdrop-rune-mask,
body.low-performance-mode .abilities-bg-particles {
    display: none !important;
}

body.low-performance-mode .game-background-twilight::before,
body.low-performance-mode .player-portrait-hud.is-twilight-layer img,
body.low-performance-mode .npc-portrait-hud.is-twilight-layer img,
body.low-performance-mode .player-portrait-hud.is-twilight-layer.has-veins-mask::after,
body.low-performance-mode .npc-portrait-hud.is-twilight-layer.has-veins-mask::after {
    animation: none !important;
    filter: none !important;
}

body.low-performance-mode .npc-portrait-hud.portrait-fx-fade img,
body.low-performance-mode .npc-portrait-hud.portrait-fx-shadow_pulse img,
body.low-performance-mode .npc-portrait-hud.portrait-fx-beast_shift img,
body.low-performance-mode .npc-portrait-hud.portrait-fx-glitch_soft img {
    animation: portraitFade 120ms ease-out !important;
}

body.low-performance-mode .game-modal .modal-content,
body.low-performance-mode .quest-panel-card,
body.low-performance-mode .quest-tracker-item,
body.low-performance-mode .combat-log,
body.low-performance-mode .combatant-card,
body.low-performance-mode .combat-log .combat-log-entry,
body.low-performance-mode #combat-log .combat-log-entry,
body.low-performance-mode .sidebar-panel.flex-grow .chat-container,
body.low-performance-mode .sidebar-panel.flex-grow .chat-header-row,
body.low-performance-mode .sidebar-panel.flex-grow .chat-settings-popover {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    box-shadow: none !important;
}

body.low-performance-mode #chat-messages .chat-message,
body.low-performance-mode #combat-chat-messages .chat-message {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

body.low-performance-mode .quest-tracker-item {
    background: rgba(224, 192, 128, 0.08) !important;
}

body.low-performance-mode .artifact-interface::before {
    animation: none !important;
    filter: none !important;
    mix-blend-mode: normal !important;
    opacity: 0.22 !important;
    will-change: auto !important;
}

body.low-performance-mode .material-slot,
body.low-performance-mode .material-slot::before,
body.low-performance-mode .material-slot.filled,
body.low-performance-mode .material-slot.drag-over,
body.low-performance-mode .anvil-slot,
body.low-performance-mode .ingredient-slot,
body.low-performance-mode .ingredient-slot.filled,
body.low-performance-mode .ingredient-slot.drag-over {
    animation: none !important;
    filter: none !important;
    transition: background-color 0.12s ease, border-color 0.12s ease, opacity 0.12s ease !important;
    box-shadow: none !important;
}

body.low-performance-mode .combatant-card,
body.low-performance-mode .combatant-bars .bar::after,
body.low-performance-mode .combatant-bars .bar.bar-value-changed::after,
body.low-performance-mode .character-status .health-bar,
body.low-performance-mode .health-bar,
body.low-performance-mode .character-status .energy-bar,
body.low-performance-mode .energy-bar,
body.low-performance-mode .combatant-effect-icon.combatant-effect-new,
body.low-performance-mode .combatant-effect-icon.combatant-effect-removed,
body.low-performance-mode #combat-log .combat-log-emphasis,
body.low-performance-mode .combat-log .combat-log-emphasis,
body.low-performance-mode #combat-log .combat-log-entry.combat-log-bubble.has-critical::before,
body.low-performance-mode #combat-log .combat-log-entry.combat-log-bubble.has-pierce::before,
body.low-performance-mode .combat-log .combat-log-entry.combat-log-bubble.has-critical::before,
body.low-performance-mode .combat-log .combat-log-entry.combat-log-bubble.has-pierce::before,
body.low-performance-mode .combatant-delta-badge,
body.low-performance-mode .combat-footer-menu .footer-button.quest-helper-pulse,
body.low-performance-mode .combat-footer-menu .footer-button.quest-coach-anchor,
body.low-performance-mode .combat-footer-menu .footer-button.has-unread-mail,
body.low-performance-mode .combat-footer-menu .footer-button.has-free-stat-points,
body.low-performance-mode .combat-footer-menu .footer-button.has-free-mastery-points,
body.low-performance-mode.quest-helper-abilities-active .combat-footer-menu #abilities-button,
body.low-performance-mode.quest-helper-inventory-active .combat-footer-menu #inventory-button,
body.low-performance-mode.quest-helper-quests-active .combat-footer-menu #quests-button,
body.low-performance-mode .quest-coach-tip--pulse,
body.low-performance-mode .quest-coach-tip--soft-pulse,
body.low-performance-mode .npc-card-actions .btn-talk.quest-coach-talk-hint,
body.low-performance-mode .npc-card-actions .btn-attack.quest-coach-talk-hint,
body.low-performance-mode .quest-helper-mini-location-target,
body.low-performance-mode .quest-helper-ability-target,
body.low-performance-mode .quest-helper-action-bar-target,
body.low-performance-mode .footer-button.has-unread-mail,
body.low-performance-mode .footer-button.has-free-stat-points,
body.low-performance-mode .footer-button.has-free-mastery-points,
body.low-performance-mode .stat-points-label.has-free-stat-points,
body.low-performance-mode .branch-free-points-label.has-free-mastery-points,
body.low-performance-mode .abilities-tab-button.has-free-mastery-points {
    animation: none !important;
    will-change: auto !important;
}

body.low-performance-mode .footer-button.has-unread-mail,
body.low-performance-mode .footer-button.has-free-stat-points,
body.low-performance-mode .footer-button.has-free-mastery-points,
body.low-performance-mode .stat-points-label.has-free-stat-points,
body.low-performance-mode .branch-free-points-label.has-free-mastery-points,
body.low-performance-mode .footer-button.quest-coach-anchor,
body.low-performance-mode .footer-button.quest-helper-pulse,
body.low-performance-mode [data-modal="abilities-modal"].quest-coach-anchor,
body.low-performance-mode [data-modal="quests-modal"].quest-coach-anchor,
body.low-performance-mode [data-modal="inventory-modal"].quest-coach-anchor,
body.low-performance-mode .abilities-skill-item.quest-coach-anchor,
body.low-performance-mode .abilities-skill-item.quest-helper-ability-target,
body.low-performance-mode .abilities-tab-button.quest-coach-anchor,
body.low-performance-mode .abilities-tab-button.quest-coach-branch-target,
body.low-performance-mode .abilities-tab-button.quest-helper-ability-target,
body.low-performance-mode .action-bar-slot.quest-coach-anchor,
body.low-performance-mode .action-bar-slot.quest-helper-action-bar-target,
body.low-performance-mode .location-action-button.quest-coach-anchor,
body.low-performance-mode .location-action-button.quest-helper-mini-location-target,
body.low-performance-mode .quest-choice.quest-coach-choice-target,
body.low-performance-mode .npc-item.quest-coach-anchor {
    transform: none;
    animation: none !important;
}

body.low-performance-mode #combat-log .combat-log-reveal,
body.low-performance-mode .combat-log .combat-log-reveal {
    animation: combatLogActionRevealLow 530ms ease-out both !important;
    will-change: opacity, transform !important;
}

body.low-performance-mode #combat-log .combat-log-entry.combat-log-bubble::after,
body.low-performance-mode .combat-log .combat-log-entry.combat-log-bubble::after,
body.low-performance-mode .combatant-card::before {
    animation: none !important;
    will-change: auto !important;
}

body.low-performance-mode .combatant-card {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

body.low-performance-mode .combat-log-filter-btn,
body.low-performance-mode .footer-button,
body.low-performance-mode .game-button,
body.low-performance-mode .artifact-list-item,
body.low-performance-mode .quest-list-item {
    transition-duration: 0.08s !important;
}

@media (prefers-reduced-motion: reduce) {
    body:not(.quality-performance-mode) .ui-backdrop-video,
    body:not(.quality-performance-mode) .ui-backdrop-rune-mask,
    body:not(.quality-performance-mode) .abilities-bg-particles {
        display: none !important;
    }
}
