﻿html.no-animations .perf-page *,
html.no-animations .perf-page *::before,
html.no-animations .perf-page *::after {
    animation: none !important;
    transition: none !important;
    filter: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    scroll-behavior: auto !important;
}

html.no-animations .perf-page [style*="animation"],
html.no-animations .perf-page [style*="transition"],
html.no-animations .perf-page [style*="filter"],
html.no-animations .perf-page [style*="backdrop-filter"] {
    animation: none !important;
    transition: none !important;
    filter: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

html.no-animations .perf-page [class*="animate-"] {
    animation: none !important;
    transition: none !important;
}

html.no-animations .perf-page .spinner-ring {
    animation: spin 1s linear infinite !important;
}

html.no-animations .perf-page .loading-spinner-ring .ring-outer {
    animation: lrSpin 1s cubic-bezier(0.4, 0, 0.2, 1) infinite !important;
}

html.no-animations .perf-page .loading-spinner-ring .ring-inner {
    animation: lrSpin 1.5s cubic-bezier(0.4, 0, 0.2, 1) infinite reverse !important;
}

html.no-animations .perf-page .loading-spinner-ring .ring-dot {
    animation: lrPulse 1.2s ease-in-out infinite !important;
}

html.no-animations .perf-page .hero-overlay,
html.no-animations .perf-page .media-overlay,
html.no-animations .perf-page [class*="glow"],
html.no-animations .perf-page [class*="blur"] {
    filter: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

html.no-animations .perf-page .auth-card,
html.no-animations .perf-page .media-card,
html.no-animations .perf-page .dashboard-card,
html.no-animations .perf-page .quick-card,
html.no-animations .perf-page .quick-card-full {
    box-shadow: none !important;
}

html.no-animations .perf-page .hero-image-layer {
    background-attachment: scroll !important;
}

html.reduce-animations *,
html.reduce-animations *::before,
html.reduce-animations *::after {
    animation-duration: 0.001ms !important;
    animation-delay: 0ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    transition-delay: 0ms !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    will-change: auto !important;
}

html.reduce-animations [class*="mud-progress"],
html.reduce-animations [class*="mud-progress"] * {
    animation-duration: 1.4s !important;
    animation-delay: 0s !important;
    animation-iteration-count: infinite !important;
}

html.reduce-animations .loading-spinner,
html.reduce-animations .loading-spinner *,
html.reduce-animations .loading-spinner-ring,
html.reduce-animations .loading-spinner-ring * {
    animation-duration: 1.5s !important;
    animation-delay: 0s !important;
    animation-iteration-count: infinite !important;
}

html.reduce-animations img {
    image-rendering: auto;
}

html.reduce-animations .stat-card,
html.reduce-animations .quick-card,
html.reduce-animations .quick-card-full,
html.reduce-animations .auth-card,
html.reduce-animations .dashboard-card {
    box-shadow: none !important;
    filter: none !important;
}

html.reduce-animations .stat-icon,
html.reduce-animations [class*="glow"],
html.reduce-animations [class*="icon"] {
    filter: none !important;
}

html.reduce-animations [class*="hero"] {
    animation: none !important;
    background-size: 100% 100% !important;
}

@media (hover: hover) and (pointer: fine) {
    html.reduce-animations [class*="card"]:hover,
html.reduce-animations [class*="item"]:hover,
html.reduce-animations [class*="btn"]:hover,
html.reduce-animations button:hover { transform: none !important; box-shadow: none !important; filter: none !important; }
}

html.reduce-animations .media-card,
html.reduce-animations .game-card {
    box-shadow: none !important;
    filter: none !important;
}

.trending-carousel,
.trending-carousel-wrapper {
    contain: layout style;
    will-change: scroll-position;
}

.media-card,
.game-card {
    contain: layout style paint;
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.001ms !important;
        animation-delay: 0ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.15s !important;
        transition-delay: 0ms !important;
        scroll-behavior: auto !important;
    }

    [class*="mud-progress"],
    [class*="mud-progress"] *,
    .loading-spinner,
    .loading-spinner *,
    .loading-spinner-ring,
    .loading-spinner-ring * {
        animation-duration: 1.5s !important;
        animation-delay: 0s !important;
        animation-iteration-count: infinite !important;
    }

    [class*="backdrop-filter"],
    .hero-overlay,
    .media-overlay {
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
    }
}

.trending-carousel,
.mud-grid {
    -webkit-overflow-scrolling: touch;
}

@media (hover: hover) and (pointer: fine) {
    .media-card:hover,
.game-card:hover { will-change: transform; }
}

.loading-spinner-ring {
    will-change: transform;
}

html.reduce-animations [style*="transition"],
html.reduce-animations .friends-ranking-widget *,
html.reduce-animations .ranking-card * {
    transition-property: opacity, transform !important;
    transition-duration: 0.1s !important;
}

@media (max-width: 768px) {
    .media-card,
    .game-card,
    .trending-card,
    .anticipated-card,
    .upcoming-card,
    .weekly-card,
    .result-card,
    .feature-card,
    .friend-card,
    .news-card,
    .ranking-card,
    .achievement-card,
    .preview-card,
    .dashboard-card,
    .quick-card,
    .connections-card,
    .feed-item,
    .activity-item,
    .filters-content,
    .filters-toggle-btn,
    .local-search-container {
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
    }

    .media-container [class*="-badge"],
    .games-container [class*="-badge"],
    .media-container .quick-watch-btn,
    .games-container .quick-watch-btn,
    .smart-section,
    .media-container .stat-card,
    .games-container .stat-card {
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
    }

    .media-container [class*="-badge"],
    .games-container [class*="-badge"],
    .media-container .quick-watch-btn,
    .games-container .quick-watch-btn {
        box-shadow: none !important;
    }

    .media-card,
    .game-card {
        animation: none !important;
    }

    .smart-section-content {
        transition: none !important;
    }

    .carousel-arrow,
    .carousel-arrow.left,
    .carousel-arrow.right {
        display: none !important;
    }

    .smart-section,
    .timeline-group,
    .trending-carousel {
        content-visibility: auto;
        contain-intrinsic-size: auto 400px;
    }
}

.smart-section,
.timeline-group,
.ranking-section {
    contain: layout style paint;
}

.compact-grid .mud-grid-item {
    content-visibility: auto;
    contain-intrinsic-size: auto 240px;
}

.normal-grid .mud-grid-item {
    content-visibility: auto;
    contain-intrinsic-size: auto 380px;
}

.feed-item,
.activity-item,
.ranking-item,
.ranking-row,
.notification-item,
.transaction-item,
.podium-item,
.weekly-item {
    content-visibility: auto;
    contain-intrinsic-size: auto 120px;
}

.ranking-list,
.activity-list,
.news-list,
.transactions-list,
.notifications-list {
    contain: layout style paint;
}

.media-card,
.game-card,
.trending-card,
.anticipated-card,
.upcoming-card,
.weekly-card,
.result-card,
.news-card,
.ranking-card,
.friend-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.filter-chip,
.sort-option,
.tab-item {
    transition: background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease, color 0.2s ease;
}
