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 {
    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.low-performance-mode .ui-backdrop-video,
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 .game-modal .modal-content,
body.low-performance-mode .quest-panel-card,
body.low-performance-mode .combatant-card,
body.low-performance-mode .combat-log .combat-log-entry,
body.low-performance-mode #combat-log .combat-log-entry {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    box-shadow: none !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 #combat-log .combat-log-reveal,
body.low-performance-mode .combat-log .combat-log-reveal,
body.low-performance-mode .combatant-card,
body.low-performance-mode .combatant-bars .bar.bar-value-changed::after,
body.low-performance-mode .combatant-effect-icon.combatant-effect-new,
body.low-performance-mode .combatant-delta-badge,
body.low-performance-mode .combat-footer-menu .footer-button.quest-helper-pulse,
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 {
    animation: none !important;
    will-change: auto !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;
    }
}
