/* ==========================================================================
   FRYNZY — Ultra-Performance Mode for Low-RAM / Low-End Devices
   Active automatically on devices with <= 2.4 GB RAM or Android Go.
   Eliminates all expensive GPU rasterization (backdrop-filter blurs, heavy shadows,
   continuous spinning animations) to ensure 60 FPS fluidity with ZERO freeze.
   ========================================================================== */

/* 1. Eliminate all backdrop-filter blurs globally */
.low-ram-device *,
.low-ram-device *::before,
.low-ram-device *::after {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

/* 2. Replace translucent blurred backgrounds with crisp, lightweight opaque surfaces */
.low-ram-device .frynzy-ios-player-modal,
.low-ram-device .frynzy-player-modal {
    background: #0d0d14 !important;
}

.low-ram-device .frynzy-player-crystal-overlay {
    background: #0d0d14 !important;
}

/* Disable the background blurred art in the player — huge memory & GPU saver */
.low-ram-device .frynzy-player-backdrop-img {
    display: none !important;
}

.low-ram-device .frynzy-player-menu-dropdown {
    background: #181822 !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.5) !important;
}

.low-ram-device .frynzy-queue-section {
    background: #181820 !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

.low-ram-device .frynzy-ios-drawer {
    background: #ffffff !important;
    color: #111827 !important;
    border-right: 1px solid rgba(0, 0, 0, 0.08) !important;
    box-shadow: 4px 0 16px rgba(0, 0, 0, 0.08) !important;
}

.low-ram-device .frynzy-ios-drawer-header,
.low-ram-device .frynzy-ios-drawer-title {
    color: #111827 !important;
}

.low-ram-device .frynzy-ios-drawer-overlay {
    background: rgba(0, 0, 0, 0.35) !important;
}

.low-ram-device .frynzy-ios-page-header {
    background: #ffffff !important;
    color: #111827 !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08) !important;
}

.low-ram-device .frynzy-ios-page-title {
    color: #111827 !important;
}

.low-ram-device .frynzy-ios-page {
    background: #f2f2f7 !important;
    color: #111827 !important;
}

.low-ram-device .frynzy-ios-searchbar-wrap {
    background: #ffffff !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08) !important;
}

.low-ram-device .frynzy-ios-search-input-box {
    background: rgba(0, 0, 0, 0.06) !important;
    color: #111827 !important;
}

.low-ram-device .frynzy-ios-search-input-box input {
    color: #111827 !important;
}

.low-ram-device .frynzy-ios-card,
.low-ram-device .frynzy-card-item {
    background: #ffffff !important;
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04) !important;
    color: #111827 !important;
}

.low-ram-device .frynzy-crystal-modal-backdrop {
    background: rgba(0, 0, 0, 0.45) !important;
}

.low-ram-device .frynzy-counter-modal-dialog {
    background: #ffffff !important;
    border: 1px solid rgba(0, 0, 0, 0.1) !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12) !important;
    color: #111827 !important;
}

.low-ram-device .frynzy-counter-title {
    color: #111827 !important;
}

.low-ram-device .frynzy-counter-btn {
    background: rgba(0, 0, 0, 0.05) !important;
    border: 1px solid rgba(0, 0, 0, 0.1) !important;
    color: #111827 !important;
}

.low-ram-device .frynzy-counter-display {
    color: #111827 !important;
}

.low-ram-device .frynzy-setup-batch-dropdown,
.low-ram-device #frynzyImportBatchMenu {
    background: #ffffff !important;
    border: 1px solid rgba(0, 0, 0, 0.1) !important;
    color: #111827 !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1) !important;
}

.low-ram-device .frynzy-setup-batch-dropdown .frynzy-batch-opt-row,
.low-ram-device #frynzyImportBatchMenu .frynzy-batch-opt-row {
    color: #111827 !important;
}

/* 3. Disable continuous spinning / rotating animations */
.low-ram-device .frynzy-album-vinyl.spinning,
.low-ram-device .vinyl-record.spinning {
    animation: none !important;
}

/* 4. Drastically simplify heavy multi-layer box-shadows */
.low-ram-device .frynzy-player-main-card {
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5) !important;
}

.low-ram-device .frynzy-player-playlist-thumb {
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3) !important;
}

/* 5. Accelerated scrolling ONLY on true scrollable containers (prevents GPU memory exhaustion and tile checkerboards) */
.low-ram-device .tab-screen,
.low-ram-device .dl-dedicated-scrollable,
.low-ram-device .lecture-screen-container,
.low-ram-device .gfiles-settings-page,
.low-ram-device .frynzy-ios-drawer-body,
.low-ram-device .frynzy-queue-list {
    -webkit-overflow-scrolling: touch;
}


/* Dark theme overrides for Low RAM devices */
body.dark-theme.low-ram-device .frynzy-ios-page-header,
body.dark-theme .low-ram-device .frynzy-ios-page-header {
    background: #0f172a !important;
    color: #ffffff !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
}
body.dark-theme.low-ram-device .frynzy-ios-page-title,
body.dark-theme .low-ram-device .frynzy-ios-page-title {
    color: #ffffff !important;
}
body.dark-theme.low-ram-device .frynzy-ios-page-header .frynzy-ios-back-btn,
body.dark-theme.low-ram-device .frynzy-ios-page-header .frynzy-ios-header-btn,
body.dark-theme .low-ram-device .frynzy-ios-page-header .frynzy-ios-back-btn,
body.dark-theme .low-ram-device .frynzy-ios-page-header .frynzy-ios-header-btn {
    color: #38bdf8 !important;
}
body.dark-theme.low-ram-device .frynzy-ios-page,
body.dark-theme .low-ram-device .frynzy-ios-page {
    background: #09090e !important;
    color: #f8fafc !important;
}
body.dark-theme.low-ram-device .frynzy-ios-card,
body.dark-theme.low-ram-device .frynzy-card-item,
body.dark-theme .low-ram-device .frynzy-ios-card,
body.dark-theme .low-ram-device .frynzy-card-item {
    background: #111827 !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: #ffffff !important;
}
